From 7d1738b59aed4e2d5c5e573a90efc6d7e4513d5c Mon Sep 17 00:00:00 2001 From: Ryuya Date: Fri, 2 Oct 2026 03:11:03 -0700 Subject: [PATCH 1/3] fix: update TypeScript integration --- .github/workflows/package-dry-run.yml | 2 +- .github/workflows/test-typescript.yml | 4 +- .github/workflows/typescript-update.yml | 2 +- .github/workflows/validate.yml | 2 +- .github/workflows/weekly-update.yml | 2 +- CONTRIBUTING.md | 2 +- derived/current/classification.json | 17 +++-- derived/current/compat-management-report.json | 7 +- lib/classifier.mjs | 24 +++---- lib/compat-management-registry.mjs | 17 +++-- lib/generator.mjs | 4 +- lib/typescript-proposal.mjs | 6 +- lib/typescript-upstream.mjs | 57 ++++++++------- manifests/baseline-js.json | 2 +- registry/compat-management.json | 8 ++- registry/compat-management.schema.json | 14 ++++ scripts/test-typescript-integration.mjs | 7 +- test/classifier.test.mjs | 4 +- test/compat-management-schema.test.mjs | 10 +++ test/typescript-proposal.test.mjs | 33 ++++++++- test/typescript-upstream.test.mjs | 69 +++++++++---------- 21 files changed, 175 insertions(+), 118 deletions(-) diff --git a/.github/workflows/package-dry-run.yml b/.github/workflows/package-dry-run.yml index e156714..9043455 100644 --- a/.github/workflows/package-dry-run.yml +++ b/.github/workflows/package-dry-run.yml @@ -26,7 +26,7 @@ jobs: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: - node-version: "22" + node-version: "24" cache: "npm" - run: npm ci diff --git a/.github/workflows/test-typescript.yml b/.github/workflows/test-typescript.yml index d03230e..f176ee8 100644 --- a/.github/workflows/test-typescript.yml +++ b/.github/workflows/test-typescript.yml @@ -28,7 +28,7 @@ jobs: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: - node-version: "22" + node-version: "24" cache: "npm" - run: npm ci @@ -61,7 +61,7 @@ jobs: uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 with: path: .tmp/TypeScript - key: typescript-source-${{ steps.ts-pin.outputs.commit }}-node22-v1 + key: typescript-source-${{ steps.ts-pin.outputs.commit }}-node24-v2 - name: Reset cached TypeScript working tree if: steps.ts-cache.outputs.cache-hit == 'true' diff --git a/.github/workflows/typescript-update.yml b/.github/workflows/typescript-update.yml index 090219e..d410e6f 100644 --- a/.github/workflows/typescript-update.yml +++ b/.github/workflows/typescript-update.yml @@ -27,7 +27,7 @@ jobs: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: - node-version: "22" + node-version: "24" cache: "npm" - run: npm ci diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index ed33dff..d5f3a95 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -26,7 +26,7 @@ jobs: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: - node-version: "22" + node-version: "24" cache: "npm" - run: npm ci diff --git a/.github/workflows/weekly-update.yml b/.github/workflows/weekly-update.yml index a77c437..c7feb5b 100644 --- a/.github/workflows/weekly-update.yml +++ b/.github/workflows/weekly-update.yml @@ -27,7 +27,7 @@ jobs: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: - node-version: "22" + node-version: "24" cache: "npm" - run: npm ci diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 33dcf65..a5619a2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,7 +17,7 @@ The command must pass before you open a pull request. Use the Node.js version in the `engines` field. The project supports macOS, Linux, and WSL. -If you run the TypeScript 7 integration gate, install the Go toolchain. +The upstream TypeScript integration gate requires Node.js 24 and the Go version in the pinned checkout's `tsc/go.mod`. ## How the generator works diff --git a/derived/current/classification.json b/derived/current/classification.json index 6d17e8f..f838dff 100644 --- a/derived/current/classification.json +++ b/derived/current/classification.json @@ -40,7 +40,7 @@ "compatManagementRegistrySummary": { "kind": "typescript-baseline-lib/compat-management-registry", "schemaVersion": 1, - "sourceHash": "sha256-11588342536d409110b0237bcfe2a83a7588c122398f0bc6168217cd786b4603", + "sourceHash": "sha256-5aad0f5fa9d5a6b4b43e7ccc9ee8220eaf5d617bdfe3f6b31edebae55d7cb9c6", "groupCount": 20, "managedCompatCount": 61 }, @@ -9918,16 +9918,17 @@ "category": "actionable_upstream_gap", "delivery": "defer-upstream", "upstreamState": "tracked", - "reason": "proposal-json-parse-with-source is tracked upstream, but the current TypeScript lib still lacks JSON.rawJSON, JSON.isRawJSON, and the reviver context parameter surface required by web-features.", + "reason": "TypeScript 7.0 lacks these declarations. The pinned upstream source includes all three in lib.es2026.json.d.ts.", "sourceUrls": [ "https://github.com/microsoft/TypeScript/issues/61330", + "https://github.com/microsoft/TypeScript/pull/64096", "https://github.com/tc39/proposal-json-parse-with-source" ], "externalAction": { "kind": "watch-existing", "repo": "microsoft/TypeScript", "targetUrl": "https://github.com/microsoft/TypeScript/issues/61330", - "note": "Watch the existing Domain: lib.d.ts issue and promote once the canonical lib surface lands." + "note": "Watch the next TypeScript release and remove the source-specific expectation once the published declarations include these APIs." }, "expectedResolutionKinds": [ "not-modeled-upstream", @@ -9994,16 +9995,17 @@ "category": "actionable_upstream_gap", "delivery": "defer-upstream", "upstreamState": "tracked", - "reason": "proposal-json-parse-with-source is tracked upstream, but the current TypeScript lib still lacks JSON.rawJSON, JSON.isRawJSON, and the reviver context parameter surface required by web-features.", + "reason": "TypeScript 7.0 lacks these declarations. The pinned upstream source includes all three in lib.es2026.json.d.ts.", "sourceUrls": [ "https://github.com/microsoft/TypeScript/issues/61330", + "https://github.com/microsoft/TypeScript/pull/64096", "https://github.com/tc39/proposal-json-parse-with-source" ], "externalAction": { "kind": "watch-existing", "repo": "microsoft/TypeScript", "targetUrl": "https://github.com/microsoft/TypeScript/issues/61330", - "note": "Watch the existing Domain: lib.d.ts issue and promote once the canonical lib surface lands." + "note": "Watch the next TypeScript release and remove the source-specific expectation once the published declarations include these APIs." }, "expectedResolutionKinds": [ "not-modeled-upstream", @@ -10032,16 +10034,17 @@ "category": "actionable_upstream_gap", "delivery": "defer-upstream", "upstreamState": "tracked", - "reason": "proposal-json-parse-with-source is tracked upstream, but the current TypeScript lib still lacks JSON.rawJSON, JSON.isRawJSON, and the reviver context parameter surface required by web-features.", + "reason": "TypeScript 7.0 lacks these declarations. The pinned upstream source includes all three in lib.es2026.json.d.ts.", "sourceUrls": [ "https://github.com/microsoft/TypeScript/issues/61330", + "https://github.com/microsoft/TypeScript/pull/64096", "https://github.com/tc39/proposal-json-parse-with-source" ], "externalAction": { "kind": "watch-existing", "repo": "microsoft/TypeScript", "targetUrl": "https://github.com/microsoft/TypeScript/issues/61330", - "note": "Watch the existing Domain: lib.d.ts issue and promote once the canonical lib surface lands." + "note": "Watch the next TypeScript release and remove the source-specific expectation once the published declarations include these APIs." }, "expectedResolutionKinds": [ "not-modeled-upstream", diff --git a/derived/current/compat-management-report.json b/derived/current/compat-management-report.json index f2749c2..00a68b2 100644 --- a/derived/current/compat-management-report.json +++ b/derived/current/compat-management-report.json @@ -8,7 +8,7 @@ "kind": "typescript-baseline-lib/compat-management-registry", "schemaVersion": 1, "sourcePath": "registry/compat-management.json", - "sourceHash": "sha256-11588342536d409110b0237bcfe2a83a7588c122398f0bc6168217cd786b4603", + "sourceHash": "sha256-5aad0f5fa9d5a6b4b43e7ccc9ee8220eaf5d617bdfe3f6b31edebae55d7cb9c6", "groupCount": 20, "managedCompatCount": 61 }, @@ -513,16 +513,17 @@ "not-modeled-upstream", "already-excluded-upstream" ], - "reason": "proposal-json-parse-with-source is tracked upstream, but the current TypeScript lib still lacks JSON.rawJSON, JSON.isRawJSON, and the reviver context parameter surface required by web-features.", + "reason": "TypeScript 7.0 lacks these declarations. The pinned upstream source includes all three in lib.es2026.json.d.ts.", "sourceUrls": [ "https://github.com/microsoft/TypeScript/issues/61330", + "https://github.com/microsoft/TypeScript/pull/64096", "https://github.com/tc39/proposal-json-parse-with-source" ], "externalAction": { "kind": "watch-existing", "repo": "microsoft/TypeScript", "targetUrl": "https://github.com/microsoft/TypeScript/issues/61330", - "note": "Watch the existing Domain: lib.d.ts issue and promote once the canonical lib surface lands." + "note": "Watch the next TypeScript release and remove the source-specific expectation once the published declarations include these APIs." }, "compatKeyCount": 3, "compatKeys": [ diff --git a/lib/classifier.mjs b/lib/classifier.mjs index 7d2d6e3..367303d 100644 --- a/lib/classifier.mjs +++ b/lib/classifier.mjs @@ -201,7 +201,7 @@ export async function classifyManifest(options) { /** @param {any} left @param {any} right */ (left, right) => compareStringsCaseSensitive(left.compatKey, right.compatKey), ); - const compatManagementRegistry = await loadCompatManagementRegistry(compatManagementRegistryPath); + const compatManagementRegistry = await loadCompatManagementRegistry(compatManagementRegistryPath, manifest.libSource?.basePackage); const classifiedCompatRows = classifyCompatRowsForTarget({ libCompatRows, @@ -1030,25 +1030,21 @@ function resolveManualClassification(options) { const qualifierPath = tailSegments.join("."); if (compatRow.compatKey === "javascript.builtins.JSON.parse.reviver_parameter_context_argument") { - // Watchdog on a pinned verdict: this row is treated as excluded on the - // assumption that TypeScript's JSON.parse reviver doesn't yet model the - // context argument (TC39 source-text-access proposal). To stop that - // assumption from silently going false the day TS models it, inspect the - // current lib signature for real. - const parseUnits = getPreferredMemberUnits(inventory, "JSON", "parse"); + const parseUnits = getMemberUnits(inventory, "JSON", "parse"); if (!parseUnits.length) { throw new Error( `${compatRow.compatKey}: could not find JSON.parse in the current lib to verify the reviver signature. ` + "The fossilized 'already-excluded-upstream' verdict can no longer be trusted; re-evaluate this row.", ); } - const modelsContextArgument = parseUnits.some(unit => /reviver[\s\S]*\bcontext\b/u.test(unit.text)); - if (modelsContextArgument) { - throw new Error( - `${compatRow.compatKey}: TypeScript's JSON.parse now appears to model the reviver context argument ` - + "(the lib signature mentions `context`). The 'already-excluded-upstream' verdict is stale — " - + "re-evaluate whether this row should now be included or re-classified.", - ); + const contextUnits = parseUnits.filter(unit => /reviver[\s\S]*\bcontext\b/u.test(unit.text)); + if (contextUnits.length) { + return { + resolutionKind: "member", + resolvedUnitIds: contextUnits.map(unit => unit.id), + notes: "JSON.parse overload with a reviver context argument", + transforms: [], + }; } return { resolutionKind: "already-excluded-upstream", diff --git a/lib/compat-management-registry.mjs b/lib/compat-management-registry.mjs index b7bb6a2..3c8e32c 100644 --- a/lib/compat-management-registry.mjs +++ b/lib/compat-management-registry.mjs @@ -21,8 +21,9 @@ const validatorPromise = readJsonFile(schemaPath).then( /** * @param {string} filePath + * @param {string} [libSource] */ -export async function loadCompatManagementRegistry(filePath) { +export async function loadCompatManagementRegistry(filePath, libSource) { const sourceText = await readFile(filePath, "utf8"); const data = await parseCompatManagementRegistry(JSON.parse(sourceText), filePath); @@ -67,7 +68,7 @@ export async function loadCompatManagementRegistry(filePath) { } for (const rawGroup of data.groups) { - const group = normalizeCompatManagementGroup(rawGroup); + const group = normalizeCompatManagementGroup(rawGroup, libSource); groups.push(group); for (const compatKey of group.compatKeys) { @@ -160,16 +161,18 @@ async function parseCompatManagementRegistry(data, filePath) { } /** - * @param {CompatManagementGroupRecord} rawGroup +* @param {RegistryGroupSource} rawGroup + * @param {string | undefined} libSource */ -function normalizeCompatManagementGroup(rawGroup) { +function normalizeCompatManagementGroup(rawGroup, libSource) { return { id: rawGroup.id, category: rawGroup.category, delivery: rawGroup.delivery, upstreamState: rawGroup.upstreamState, compatRoot: rawGroup.compatRoot, - expectedResolutionKinds: rawGroup.expectedResolutionKinds, + expectedResolutionKinds: (libSource && rawGroup.expectedResolutionKindsBySource?.[libSource]) + || rawGroup.expectedResolutionKinds, reason: rawGroup.reason, sourceUrls: [...new Set(rawGroup.sourceUrls)].sort(compareStringsCaseSensitive), externalAction: rawGroup.externalAction, @@ -236,9 +239,11 @@ function hashText(value) { * declarationMappings?: Record; * compilerSupport: SupportGroup[]; * runtimeAliases: SupportGroup[]; - * groups: CompatManagementGroupRecord[]; + * groups: RegistryGroupSource[]; * }} RegistrySource * + * @typedef {CompatManagementGroupRecord & { expectedResolutionKindsBySource?: Partial>; }} RegistryGroupSource + * * @typedef {{ id: string; reason: string; sourceUrls: string[]; surfaces: string[]; }} SupportGroup * * @typedef {{ kind: "none"; note: string; } diff --git a/lib/generator.mjs b/lib/generator.mjs index 5958d1a..1180e5e 100644 --- a/lib/generator.mjs +++ b/lib/generator.mjs @@ -301,7 +301,9 @@ export function assertRuntimeDeclarationProvenance(options) { [...options.inventory.rootSurfaceByCompatName.values()] .filter(root => root.rootDeclarationUnitIds.some(unitId => { const unit = options.inventory.unitById.get(unitId); - return RUNTIME_DECLARATION_KINDS.has(unit?.declarationKind ?? ""); + return unit && RUNTIME_DECLARATION_KINDS.has(unit.declarationKind ?? "") + && !(options.inventory.fileByLibFileName.get(unit.libFileName)?.preserveWholeFile + && !unit.containerPath.length); })) .flatMap(root => [...root.instanceContainerSymbols, ...root.staticContainerSymbols]), ); diff --git a/lib/typescript-proposal.mjs b/lib/typescript-proposal.mjs index ce784eb..16d9bff 100644 --- a/lib/typescript-proposal.mjs +++ b/lib/typescript-proposal.mjs @@ -8,7 +8,7 @@ import { generateFirstClassBaselineLib } from "./generator.mjs"; import { computeLibDirectoryContentHash } from "./toolchain-libs.mjs"; import { assertTypeScriptSourcePin, - typescriptGeneratedLibDirectory, + typescriptLibSourceDirectory, } from "./typescript-upstream.mjs"; /** @@ -39,7 +39,7 @@ export async function generateTypeScriptProposalLib(options) { } else { snapshotDeclarationCorpus( - path.join(typescriptDir, typescriptGeneratedLibDirectory), + path.join(typescriptDir, typescriptLibSourceDirectory), libDirectory, ); } @@ -94,7 +94,7 @@ export async function generateTypeScriptProposalLib(options) { * @param {string} destinationDirectory */ function snapshotDeclarationCorpusFromCommit(typescriptDir, commit, destinationDirectory) { - const relativeDirectory = typescriptGeneratedLibDirectory.split(path.sep).join("/"); + const relativeDirectory = typescriptLibSourceDirectory.split(path.sep).join("/"); const filePaths = execFileSync( "git", ["--no-replace-objects", "ls-tree", "-r", "--name-only", "-z", commit, "--", relativeDirectory], diff --git a/lib/typescript-upstream.mjs b/lib/typescript-upstream.mjs index bcd89ab..b4924e8 100644 --- a/lib/typescript-upstream.mjs +++ b/lib/typescript-upstream.mjs @@ -8,18 +8,14 @@ import { assertDirectoryExists, assertFileExists, copyDirectoryContents, - copyFileIfChanged, ensurePatchedTextFile, } from "./text-patch.mjs"; -export const typescriptLibSourceDirectory = path.join("tsc", "internal", "bundled", "source"); -export const typescriptGeneratedLibDirectory = path.join("tsc", "internal", "bundled", "libs"); -export const enumMapsRelativePath = path.join("tsc", "internal", "tsoptions", "enummaps.go"); +export const typescriptLibSourceDirectory = path.join("tsc", "internal", "bundled", "libs"); +export const compilerOptionsRelativePath = path.join("tools", "scripts", "tsc", "options.ts"); -const libMapEntry = '\t{Key: "baseline", Value: "lib.baseline.d.ts"},'; -const libMapAnchor = '\t{Key: "esnext", Value: "lib.esnext.d.ts"},'; -const libsJsonEntry = ' "baseline",'; -const libsJsonAnchor = ' "esnext",'; +const libMapEntry = ' { name: "baseline", value: "lib.baseline.d.ts" },'; +const libMapAnchor = ' { name: "esnext", value: "lib.esnext.d.ts" },'; /** * @param {{ @@ -45,29 +41,35 @@ export function prepareTypeScriptBaselinePatch(options) { const fixtureCasesRoot = path.join(fixturesRoot, "tests", "cases"); const fixtureBaselinesRoot = path.join(fixturesRoot, "tests", "baselines", "reference"); const libSourceDirectory = path.join(typescriptDir, typescriptLibSourceDirectory); - const targetLibSourcePath = path.join(libSourceDirectory, "baseline.d.ts"); - const libsJsonPath = path.join(libSourceDirectory, "libs.json"); - const enumMapsPath = path.join(typescriptDir, enumMapsRelativePath); + const targetLibSourcePath = path.join(libSourceDirectory, "lib.baseline.d.ts"); + const compilerOptionsPath = path.join(typescriptDir, compilerOptionsRelativePath); + const copyrightPath = path.join(typescriptDir, "tsc", "internal", "bundled", "CopyrightNotice.txt"); assertFileExists(generatedLibPath, "generated baseline lib"); - assertFileExists(libsJsonPath, "TypeScript bundled source libs.json"); - assertFileExists(enumMapsPath, "TypeScript LibMap"); + assertFileExists(compilerOptionsPath, "TypeScript compiler option definitions"); + assertFileExists(copyrightPath, "TypeScript copyright notice"); assertDirectoryExists(fixtureCasesRoot, "TypeScript fixture cases root"); assertDirectoryExists(fixtureBaselinesRoot, "TypeScript fixture baselines root"); - const copiedGeneratedLib = copyFileIfChanged(generatedLibPath, targetLibSourcePath); - const patchedLibsJson = ensurePatchedTextFile(libsJsonPath, { - alreadyPresentMarker: '"baseline"', - anchor: libsJsonAnchor, - insertion: `${libsJsonAnchor}\n${libsJsonEntry}`, - description: "bundled source libs.json entry", - }); - const patchedEnumMaps = ensurePatchedTextFile(enumMapsPath, { + const source = fs.readFileSync(generatedLibPath, "utf8"); + const copyright = fs.readFileSync(copyrightPath, "utf8"); + const license = source.match(/\/\*! \*+[\s\S]*?\*+ \*\/\s*/u); + if (!license || license[0].trim() !== copyright.trim()) { + throw new Error("Generated baseline lib does not contain the TypeScript copyright notice"); + } + const libText = `${copyright}\n${source.replace(license[0], "")}`.replace(/\r\n/gu, "\n"); + const patchedCompilerOptions = ensurePatchedTextFile(compilerOptionsPath, { alreadyPresentMarker: libMapEntry.trim(), anchor: libMapAnchor, insertion: `${libMapAnchor}\n${libMapEntry}`, - description: "enummaps.go LibMap entry", + description: "options.ts lib entry", }); + const copiedGeneratedLib = { + changed: !fs.existsSync(targetLibSourcePath) || fs.readFileSync(targetLibSourcePath, "utf8") !== libText, + }; + if (copiedGeneratedLib.changed) { + fs.writeFileSync(targetLibSourcePath, libText); + } const fixtureFiles = [ ...copyDirectoryContents( fixtureCasesRoot, @@ -85,11 +87,9 @@ export function prepareTypeScriptBaselinePatch(options) { typescriptDir, generatedLibPath, targetLibSourcePath, - libsJsonPath, - enumMapsPath, + compilerOptionsPath, copiedGeneratedLib, - patchedLibsJson, - patchedEnumMaps, + patchedCompilerOptions, fixtureFiles: fixtureFilePaths, changedFixtureFiles, }; @@ -214,8 +214,7 @@ export function renderTypeScriptPatchSummary(summary) { `- TypeScript clone: \`${summary.typescriptDir}\``, `- Generated source: \`${summary.generatedLibPath}\``, `- Installed lib source: \`${summary.targetLibSourcePath}\``, - `- bundled source libs.json patched: ${formatBoolean(summary.patchedLibsJson.changed)}`, - `- enummaps.go LibMap patched: ${formatBoolean(summary.patchedEnumMaps.changed)}`, + `- Compiler option definitions patched: ${formatBoolean(summary.patchedCompilerOptions.changed)}`, `- Compiler fixture files: ${summary.fixtureFiles.length} total, ${summary.changedFixtureFiles.length} written this run`, "", "## Installed Files", @@ -264,7 +263,7 @@ export function assertTypeScriptSourcePin(typescriptDir, expectedCommit) { */ function resolveTypeScriptWorkingDirectory(repoRoot, explicitDirectory) { const candidatePath = path.resolve(explicitDirectory ?? path.join(repoRoot, ".tmp", "TypeScript")); - if (fs.existsSync(path.join(candidatePath, typescriptLibSourceDirectory, "libs.json"))) { + if (fs.existsSync(path.join(candidatePath, typescriptLibSourceDirectory, "lib.es5.d.ts"))) { return candidatePath; } diff --git a/manifests/baseline-js.json b/manifests/baseline-js.json index 6205454..133e7de 100644 --- a/manifests/baseline-js.json +++ b/manifests/baseline-js.json @@ -16,7 +16,7 @@ "typescriptSource": { "repository": "https://github.com/microsoft/TypeScript.git", "ref": "main", - "commit": "d6c4afddb2c55f4a9dea7b59293a99a8fdea1799" + "commit": "09b1db0617311f3b39f165bb3480c0ce2f718b27" }, "baselineTarget": "high", "dataset": "../datasets/web-features-js-compat.json", diff --git a/registry/compat-management.json b/registry/compat-management.json index 8eea7b6..97bb404 100644 --- a/registry/compat-management.json +++ b/registry/compat-management.json @@ -563,16 +563,20 @@ "not-modeled-upstream", "already-excluded-upstream" ], - "reason": "proposal-json-parse-with-source is tracked upstream, but the current TypeScript lib still lacks JSON.rawJSON, JSON.isRawJSON, and the reviver context parameter surface required by web-features.", + "expectedResolutionKindsBySource": { + "microsoft/TypeScript": ["member"] + }, + "reason": "TypeScript 7.0 lacks these declarations. The pinned upstream source includes all three in lib.es2026.json.d.ts.", "sourceUrls": [ "https://github.com/microsoft/TypeScript/issues/61330", + "https://github.com/microsoft/TypeScript/pull/64096", "https://github.com/tc39/proposal-json-parse-with-source" ], "externalAction": { "kind": "watch-existing", "repo": "microsoft/TypeScript", "targetUrl": "https://github.com/microsoft/TypeScript/issues/61330", - "note": "Watch the existing Domain: lib.d.ts issue and promote once the canonical lib surface lands." + "note": "Watch the next TypeScript release and remove the source-specific expectation once the published declarations include these APIs." }, "compatKeys": [ "javascript.builtins.JSON.isRawJSON", diff --git a/registry/compat-management.schema.json b/registry/compat-management.schema.json index 56651fe..c772e30 100644 --- a/registry/compat-management.schema.json +++ b/registry/compat-management.schema.json @@ -167,6 +167,20 @@ "type": "string" } }, + "expectedResolutionKindsBySource": { + "type": "object", + "additionalProperties": false, + "properties": { + "microsoft/TypeScript": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, "reason": { "type": "string", "minLength": 1 diff --git a/scripts/test-typescript-integration.mjs b/scripts/test-typescript-integration.mjs index 058072b..e2a78bd 100644 --- a/scripts/test-typescript-integration.mjs +++ b/scripts/test-typescript-integration.mjs @@ -39,12 +39,13 @@ const defaultFocusedBaselinesDirectory = path.join(repoRoot, ".tmp", "typescript const defaultLocalBaselinesDirectory = path.join(repoRoot, ".tmp", "typescript-raw-local-baselines"); const TYPESCRIPT_PROPOSAL_PATHS = [ - path.join("tsc", "internal", "bundled", "source", "baseline.d.ts"), - path.join("tsc", "internal", "bundled", "source", "libs.json"), path.join("tsc", "internal", "bundled", "libs", "lib.baseline.d.ts"), path.join("tsc", "internal", "bundled", "libs_generated.go"), path.join("tsc", "internal", "bundled", "embed_generated.go"), - path.join("tsc", "internal", "tsoptions", "enummaps.go"), + path.join("tools", "scripts", "tsc", "options.ts"), + path.join("tsc", "internal", "tsoptions", "declarations_generated.go"), + path.join("packages", "typescript", "schemas", "tsconfig.schema.json"), + path.join("packages", "typescript", "schemas", "jsconfig.schema.json"), path.join("tsc", "testdata", "tests", "cases", "compiler", "libBaseline.ts"), path.join("tsc", "testdata", "baselines", "reference", "compiler", "libBaseline.errors.txt"), path.join("tsc", "testdata", "baselines", "reference", "compiler", "libBaseline.js"), diff --git a/test/classifier.test.mjs b/test/classifier.test.mjs index f8f9f68..b57afa0 100644 --- a/test/classifier.test.mjs +++ b/test/classifier.test.mjs @@ -703,7 +703,7 @@ test("JSON.parse reviver verdict fails closed once TypeScript models the context ].join("\n"); await assert.rejects( - () => classifyFixture({ rows: [row(JSON_PARSE_KEY, "low")], libSource }), - /reviver context argument[\s\S]*stale|now appears to model the reviver context/u, + () => classifyFixture({ rows: [row(JSON_PARSE_KEY, "low")], libSource, registryGroups: [jsonParseRegistryGroup()] }), + /resolution kind no longer matches registry expectations/u, ); }); diff --git a/test/compat-management-schema.test.mjs b/test/compat-management-schema.test.mjs index 3752e0a..bf8a05c 100644 --- a/test/compat-management-schema.test.mjs +++ b/test/compat-management-schema.test.mjs @@ -46,6 +46,16 @@ test("compat-management registry keeps compiler support and runtime aliases disj ); }); +test("compat-management expectations distinguish published and upstream declarations", async () => { + const published = await loadCompatManagementRegistry(repoRegistryPath, "typescript"); + const upstream = await loadCompatManagementRegistry(repoRegistryPath, "microsoft/TypeScript"); + const key = "javascript.builtins.JSON.rawJSON"; + assert.deepEqual(published.entryByCompatKey.get(key)?.expectedResolutionKinds, [ + "not-modeled-upstream", "already-excluded-upstream", + ]); + assert.deepEqual(upstream.entryByCompatKey.get(key)?.expectedResolutionKinds, ["member"]); +}); + test("compat-management registry validates declaration mappings", async () => { const tempDirectory = createTempDirectory(tempDirectories); const registry = readJsonFile(repoRegistryPath); diff --git a/test/typescript-proposal.test.mjs b/test/typescript-proposal.test.mjs index 6bd228a..b2b0c14 100644 --- a/test/typescript-proposal.test.mjs +++ b/test/typescript-proposal.test.mjs @@ -6,7 +6,7 @@ import fs from "node:fs"; import path from "node:path"; import test from "node:test"; import { generateTypeScriptProposalLib } from "../lib/typescript-proposal.mjs"; -import { typescriptGeneratedLibDirectory } from "../lib/typescript-upstream.mjs"; +import { typescriptLibSourceDirectory } from "../lib/typescript-upstream.mjs"; import { verifyLibSource } from "../lib/toolchain-libs.mjs"; import { cleanupTempDirectories, @@ -27,13 +27,14 @@ test.afterEach(() => { test("proposal generation follows the pinned TypeScript checkout declaration corpus", async () => { const tempDirectory = createTempDirectory(tempDirectories); const typescriptDir = path.join(tempDirectory, "TypeScript"); - const targetLibDirectory = path.join(typescriptDir, typescriptGeneratedLibDirectory); + const targetLibDirectory = path.join(typescriptDir, typescriptLibSourceDirectory); const proposalRepoRoot = path.join(tempDirectory, "repo"); const externalDirectory = path.join(tempDirectory, "external"); const sentinelPath = path.join(externalDirectory, "libs", "sentinel.txt"); const packageLibSource = await verifyLibSource({ repoRoot, manifest: repoManifest }); fs.cpSync(packageLibSource.libDirectory, targetLibDirectory, { recursive: true }); + addUpstreamJsonDeclarations(targetLibDirectory); removePluralRulesCallSignature(path.join(targetLibDirectory, "lib.es2018.intl.d.ts")); removePluralRulesCallSignature(path.join(targetLibDirectory, "lib.es2020.intl.d.ts")); fs.mkdirSync(path.dirname(sentinelPath), { recursive: true }); @@ -54,6 +55,11 @@ test("proposal generation follows the pinned TypeScript checkout declaration cor assert.doesNotMatch(proposalOutputs[0], /\n\s*\(locales\?: [^\n]+PluralRulesOptions\): PluralRules;/u); assert.match(proposalOutputs[0], /new \(locales\?: LocalesArgument, options\?: PluralRulesOptions\): PluralRules;/u); assert.equal(fs.readFileSync(sentinelPath, "utf8"), "keep\n"); + assert.doesNotMatch(proposalOutputs[0], /rawJSON\(text|isRawJSON\(value|context: \{ source/u); + const yearOutput = fs.readFileSync(path.join(path.dirname(proposals[0].outputPath), "year", "2025", "index.d.ts"), "utf8"); + assert.match(yearOutput, /#isRawJson: unknown/u); + assert.match(yearOutput, /rawJSON\(text: string\): RawJSON/u); + assert.match(yearOutput, /context: \{ source\?: string \}/u); } finally { for (const proposal of proposals) { @@ -65,10 +71,11 @@ test("proposal generation follows the pinned TypeScript checkout declaration cor test("pinned proposal generation reads commit blobs instead of hidden working-tree changes", async () => { const tempDirectory = createTempDirectory(tempDirectories); const typescriptDir = path.join(tempDirectory, "TypeScript"); - const targetLibDirectory = path.join(typescriptDir, typescriptGeneratedLibDirectory); + const targetLibDirectory = path.join(typescriptDir, typescriptLibSourceDirectory); const packageLibSource = await verifyLibSource({ repoRoot, manifest: repoManifest }); fs.cpSync(packageLibSource.libDirectory, targetLibDirectory, { recursive: true }); + addUpstreamJsonDeclarations(targetLibDirectory); execFileSync("git", ["init", "--quiet", "--initial-branch=main"], { cwd: typescriptDir }); execFileSync("git", ["config", "user.email", "test@example.com"], { cwd: typescriptDir }); execFileSync("git", ["config", "user.name", "Test"], { cwd: typescriptDir }); @@ -138,3 +145,23 @@ function removePluralRulesCallSignature(filePath) { assert.notEqual(updated, source, `expected a PluralRules call signature in ${filePath}`); fs.writeFileSync(filePath, updated); } + +/** @param {string} libDirectory */ +function addUpstreamJsonDeclarations(libDirectory) { + fs.writeFileSync(path.join(libDirectory, "lib.es2026.json.d.ts"), [ + "export {};", + "declare class RawJSONInstance {", + " #isRawJson: unknown;", + " readonly rawJSON: string;", + "}", + "declare global {", + " interface RawJSON extends RawJSONInstance {}", + " interface JSON {", + " parse(text: string, reviver: (this: any, key: string, value: any, context: { source?: string }) => any): any;", + " rawJSON(text: string): RawJSON;", + " isRawJSON(value: unknown): value is RawJSON;", + " }", + "}", + "", + ].join("\n")); +} diff --git a/test/typescript-upstream.test.mjs b/test/typescript-upstream.test.mjs index a28d5ca..23046bb 100644 --- a/test/typescript-upstream.test.mjs +++ b/test/typescript-upstream.test.mjs @@ -6,7 +6,7 @@ import fs from "node:fs"; import path from "node:path"; import test from "node:test"; import { - enumMapsRelativePath, + compilerOptionsRelativePath, findUnexpectedTypeScriptPatchPaths, hasPassingGoTestEvent, prepareTypeScriptBaselinePatch, @@ -21,6 +21,7 @@ import { /** @type {string[]} */ const tempDirectories = []; +const COPYRIGHT = "/*! *****\nCopyright (c) Microsoft Corporation. All rights reserved.\n***** */\n\n"; test.afterEach(() => { cleanupTempDirectories(tempDirectories); @@ -29,11 +30,11 @@ test.afterEach(() => { test("prepareTypeScriptBaselinePatch patches the unified TypeScript tree once", () => { const tempDirectory = createTempDirectory(tempDirectories); const typescriptDir = createFakeTypeScriptTree(tempDirectory); - const generatedLibPath = path.join(tempDirectory, "generated", "baseline.d.ts"); + const generatedLibPath = path.join(tempDirectory, "generated", "lib.baseline.d.ts"); const fixturesRoot = createFixtureTree(tempDirectory); fs.mkdirSync(path.dirname(generatedLibPath), { recursive: true }); - fs.writeFileSync(generatedLibPath, "// generated baseline\n"); + fs.writeFileSync(generatedLibPath, `${COPYRIGHT}\n// generated baseline\n`); const first = prepareTypeScriptBaselinePatch({ repoRoot: tempDirectory, @@ -42,20 +43,17 @@ test("prepareTypeScriptBaselinePatch patches the unified TypeScript tree once", fixturesRoot, }); - const libSourcePath = path.join(typescriptDir, typescriptLibSourceDirectory, "baseline.d.ts"); - const libsJsonPath = path.join(typescriptDir, typescriptLibSourceDirectory, "libs.json"); - const enumMapsPath = path.join(typescriptDir, enumMapsRelativePath); + const libSourcePath = path.join(typescriptDir, typescriptLibSourceDirectory, "lib.baseline.d.ts"); + const compilerOptionsPath = path.join(typescriptDir, compilerOptionsRelativePath); const testCasePath = path.join(typescriptDir, "tsc", "testdata", "tests", "cases", "compiler", "libBaseline.ts"); const baselinePath = path.join(typescriptDir, "tsc", "testdata", "baselines", "reference", "compiler", "libBaseline.errors.txt"); - assert.equal(fs.readFileSync(libSourcePath, "utf8"), "// generated baseline\n"); - assert.equal([...fs.readFileSync(libsJsonPath, "utf8").matchAll(/"baseline"/g)].length, 1); - assert.equal([...fs.readFileSync(enumMapsPath, "utf8").matchAll(/Value: "lib\.baseline\.d\.ts"/g)].length, 1); + assert.equal(fs.readFileSync(libSourcePath, "utf8"), `${COPYRIGHT}\n// generated baseline\n`); + assert.equal([...fs.readFileSync(compilerOptionsPath, "utf8").matchAll(/value: "lib\.baseline\.d\.ts"/g)].length, 1); assert.ok(fs.existsSync(testCasePath)); assert.ok(fs.existsSync(baselinePath)); assert.equal(first.copiedGeneratedLib.changed, true); - assert.equal(first.patchedLibsJson.changed, true); - assert.equal(first.patchedEnumMaps.changed, true); + assert.equal(first.patchedCompilerOptions.changed, true); assert.equal(first.fixtureFiles.length, 2); assert.equal(first.changedFixtureFiles.length, 2); assert.match(renderTypeScriptPatchSummary(first), /npm ci && npm run generate/u); @@ -67,8 +65,7 @@ test("prepareTypeScriptBaselinePatch patches the unified TypeScript tree once", fixturesRoot, }); assert.equal(second.copiedGeneratedLib.changed, false); - assert.equal(second.patchedLibsJson.changed, false); - assert.equal(second.patchedEnumMaps.changed, false); + assert.equal(second.patchedCompilerOptions.changed, false); assert.equal(second.fixtureFiles.length, 2); assert.equal(second.changedFixtureFiles.length, 0); }); @@ -77,13 +74,13 @@ test("prepareTypeScriptBaselinePatch uses the checkout command's default directo const tempDirectory = createTempDirectory(tempDirectories); const sourceDirectory = createFakeTypeScriptTree(tempDirectory); const typescriptDir = path.join(tempDirectory, ".tmp", "TypeScript"); - const generatedLibPath = path.join(tempDirectory, "generated", "baseline.d.ts"); + const generatedLibPath = path.join(tempDirectory, "generated", "lib.baseline.d.ts"); const fixturesRoot = createFixtureTree(tempDirectory); fs.mkdirSync(path.dirname(typescriptDir), { recursive: true }); fs.renameSync(sourceDirectory, typescriptDir); fs.mkdirSync(path.dirname(generatedLibPath), { recursive: true }); - fs.writeFileSync(generatedLibPath, "// generated baseline\n"); + fs.writeFileSync(generatedLibPath, `${COPYRIGHT}\n// generated baseline\n`); const summary = prepareTypeScriptBaselinePatch({ repoRoot: tempDirectory, @@ -93,46 +90,46 @@ test("prepareTypeScriptBaselinePatch uses the checkout command's default directo assert.equal(summary.typescriptDir, typescriptDir); }); -test("prepareTypeScriptBaselinePatch fails closed when the LibMap anchor drifts", () => { +test("prepareTypeScriptBaselinePatch fails closed when the compiler option anchor drifts", () => { const tempDirectory = createTempDirectory(tempDirectories); const typescriptDir = createFakeTypeScriptTree(tempDirectory); - const generatedLibPath = path.join(tempDirectory, "generated", "baseline.d.ts"); + const generatedLibPath = path.join(tempDirectory, "generated", "lib.baseline.d.ts"); const fixturesRoot = createFixtureTree(tempDirectory); - const enumMapsPath = path.join(typescriptDir, enumMapsRelativePath); + const compilerOptionsPath = path.join(typescriptDir, compilerOptionsRelativePath); fs.mkdirSync(path.dirname(generatedLibPath), { recursive: true }); - fs.writeFileSync(generatedLibPath, "// generated baseline\n"); - fs.writeFileSync(enumMapsPath, "var LibMap = ...\n\t{Key: \"es2025\", Value: \"lib.es2025.d.ts\"},\n"); + fs.writeFileSync(generatedLibPath, `${COPYRIGHT}\n// generated baseline\n`); + fs.writeFileSync(compilerOptionsPath, "var LibMap = ...\n\t{Key: \"es2025\", Value: \"lib.es2025.d.ts\"},\n"); assert.throws( () => prepareTypeScriptBaselinePatch({ repoRoot: tempDirectory, typescriptDir, generatedLibPath, fixturesRoot }), - /enummaps\.go LibMap entry anchor/u, + /options\.ts lib entry anchor/u, ); }); test("prepareTypeScriptBaselinePatch preserves upstream line endings", () => { const tempDirectory = createTempDirectory(tempDirectories); const typescriptDir = createFakeTypeScriptTree(tempDirectory); - const generatedLibPath = path.join(tempDirectory, "generated", "baseline.d.ts"); + const generatedLibPath = path.join(tempDirectory, "generated", "lib.baseline.d.ts"); const fixturesRoot = createFixtureTree(tempDirectory); - const libsJsonPath = path.join(typescriptDir, typescriptLibSourceDirectory, "libs.json"); fs.mkdirSync(path.dirname(generatedLibPath), { recursive: true }); - fs.writeFileSync(generatedLibPath, "// generated baseline\n"); - fs.writeFileSync(libsJsonPath, fs.readFileSync(libsJsonPath, "utf8").replace(/\n/gu, "\r\n")); + fs.writeFileSync(generatedLibPath, `${COPYRIGHT}\n// generated baseline\n`); + const compilerOptionsPath = path.join(typescriptDir, compilerOptionsRelativePath); + fs.writeFileSync(compilerOptionsPath, fs.readFileSync(compilerOptionsPath, "utf8").replace(/\n/gu, "\r\n")); prepareTypeScriptBaselinePatch({ repoRoot: tempDirectory, typescriptDir, generatedLibPath, fixturesRoot }); - assert.doesNotMatch(fs.readFileSync(libsJsonPath, "utf8"), /(? { const tempDirectory = createTempDirectory(tempDirectories); const typescriptDir = createFakeTypeScriptTree(tempDirectory); - const generatedLibPath = path.join(tempDirectory, "generated", "baseline.d.ts"); + const generatedLibPath = path.join(tempDirectory, "generated", "lib.baseline.d.ts"); const fixturesRoot = createFixtureTree(tempDirectory); fs.mkdirSync(path.dirname(generatedLibPath), { recursive: true }); - fs.writeFileSync(generatedLibPath, "// generated baseline\n"); + fs.writeFileSync(generatedLibPath, `${COPYRIGHT}\n// generated baseline\n`); execFileSync("git", ["init", "--quiet"], { cwd: typescriptDir }); execFileSync("git", ["-c", "user.email=t@example.com", "-c", "user.name=t", "add", "."], { cwd: typescriptDir }); execFileSync("git", ["-c", "user.email=t@example.com", "-c", "user.name=t", "commit", "--quiet", "-m", "fixture"], { cwd: typescriptDir }); @@ -147,7 +144,7 @@ test("prepareTypeScriptBaselinePatch refuses a clone that drifted from the pin", }), /Refusing to patch an unpinned clone/u, ); - assert.ok(!fs.existsSync(path.join(typescriptDir, typescriptLibSourceDirectory, "baseline.d.ts"))); + assert.ok(!fs.existsSync(path.join(typescriptDir, typescriptLibSourceDirectory, "lib.baseline.d.ts"))); }); test("TypeScript patch auditing rejects changes outside the proposal surface", () => { @@ -231,17 +228,15 @@ test("TypeScript patch auditing accepts only mechanical lib-list baseline update function createFakeTypeScriptTree(tempDirectory) { const typescriptDir = path.join(tempDirectory, "TypeScript"); const libSourceDirectory = path.join(typescriptDir, typescriptLibSourceDirectory); - const enumMapsPath = path.join(typescriptDir, enumMapsRelativePath); + const compilerOptionsPath = path.join(typescriptDir, compilerOptionsRelativePath); fs.mkdirSync(libSourceDirectory, { recursive: true }); - fs.mkdirSync(path.dirname(enumMapsPath), { recursive: true }); + fs.mkdirSync(path.dirname(compilerOptionsPath), { recursive: true }); + fs.writeFileSync(path.join(libSourceDirectory, "lib.es5.d.ts"), "interface Object {}\n"); + fs.writeFileSync(path.join(typescriptDir, "tsc", "internal", "bundled", "CopyrightNotice.txt"), COPYRIGHT); fs.writeFileSync( - path.join(libSourceDirectory, "libs.json"), - "{\n \"libs\": [\n \"es2025\",\n \"esnext\",\n \"dom.generated\"\n ]\n}\n", - ); - fs.writeFileSync( - enumMapsPath, - "var LibMap = collections.NewOrderedMapFromList([]collections.MapEntry[string, any]{\n\t{Key: \"es2025\", Value: \"lib.es2025.d.ts\"},\n\t{Key: \"esnext\", Value: \"lib.esnext.d.ts\"},\n\t{Key: \"dom\", Value: \"lib.dom.d.ts\"},\n})\n", + compilerOptionsPath, + 'const options = {\n { name: "esnext", value: "lib.esnext.d.ts" },\n};\n', ); return typescriptDir; From 46611f026ed0319319360ee863b05ca9dd3abdda Mon Sep 17 00:00:00 2001 From: Ryuya Date: Sun, 4 Oct 2026 01:20:47 -0700 Subject: [PATCH 2/3] fix: preserve declaration scope and literal types --- derived/current/generation.json | 12 +- derived/current/inventory.json | 154 + .../allow/_support/intl-duration-format.d.ts | 278 +- .../allow/_support/intl-segmenter.d.ts | 62 +- .../current/allow/_support/set-methods.d.ts | 24 +- .../current/allow/atomics-pause/index.d.ts | 10 +- .../allow/atomics-wait-async/index.d.ts | 36 +- .../current/allow/float16array/index.d.ts | 832 +- .../current/allow/getorinsert/index.d.ts | 48 +- .../allow/intl-duration-format/index.d.ts | 96 +- .../current/allow/intl-segmenter/index.d.ts | 142 +- .../current/allow/promise-try/index.d.ts | 28 +- .../current/allow/regexp-escape/index.d.ts | 24 +- .../allow/resizable-buffers/index.d.ts | 76 +- .../current/allow/set-methods/index.d.ts | 136 +- .../allow/uint8array-base64-hex/index.d.ts | 130 +- generated/current/baseline.d.ts | 15416 +++++------ generated/current/year/2020/index.d.ts | 11462 ++++----- generated/current/year/2021/index.d.ts | 13404 +++++----- generated/current/year/2022/index.d.ts | 14560 +++++------ generated/current/year/2023/index.d.ts | 15294 +++++------ generated/current/year/2024/index.d.ts | 15848 ++++++------ generated/current/year/2025/index.d.ts | 21146 ++++++++-------- lib/classifier.mjs | 184 +- lib/compat-management-registry.mjs | 2 +- lib/generator.mjs | 257 +- lib/surface-inventory.mjs | 356 +- lib/typescript-proposal.mjs | 13 + lib/typescript-upstream.mjs | 30 +- test/classifier.test.mjs | 83 +- test/excluded-units.test.mjs | 1 - test/generate.test.mjs | 9 + test/surface-inventory.test.mjs | 138 +- test/typescript-proposal.test.mjs | 6 + test/typescript-upstream.test.mjs | 6 + tsconfig.typecheck.json | 2 + 36 files changed, 55623 insertions(+), 54682 deletions(-) diff --git a/derived/current/generation.json b/derived/current/generation.json index fceb997..97d178b 100644 --- a/derived/current/generation.json +++ b/derived/current/generation.json @@ -1071,7 +1071,7 @@ { "year": 2020, "outputPath": "generated/current/year/2020/index.d.ts", - "contentHash": "sha256-37070d861cfe386653cb7f2174009f9040e1e38e7dd8c42a271c90d03221c8cc", + "contentHash": "sha256-9a8752a75a8c7c57a43174e986f2e43f0ac05526b739d5b71488b365e743d59c", "includedCompatKeys": [ "javascript.builtins.AggregateError", "javascript.builtins.AggregateError.AggregateError", @@ -1702,7 +1702,7 @@ { "year": 2021, "outputPath": "generated/current/year/2021/index.d.ts", - "contentHash": "sha256-bef6c646f03e1822bb699a80525ad3f00b716a48f804964a5febdec4a3a73c17", + "contentHash": "sha256-879c5fc01ab387aa8081fba4aa26383de44c332ead05b04ca6bacfd250a21305", "includedCompatKeys": [ "javascript.builtins.AggregateError", "javascript.builtins.AggregateError.AggregateError", @@ -2397,7 +2397,7 @@ { "year": 2022, "outputPath": "generated/current/year/2022/index.d.ts", - "contentHash": "sha256-b15e474041af2d6b95db413bf3e9e4953f89ead33679df763f4ad8275245000f", + "contentHash": "sha256-a6a79f10683753856da19a492ee1451c01123d23abd7cb5d68a23735cba6a5f3", "includedCompatKeys": [ "javascript.builtins.AggregateError", "javascript.builtins.AggregateError.AggregateError", @@ -3102,7 +3102,7 @@ { "year": 2023, "outputPath": "generated/current/year/2023/index.d.ts", - "contentHash": "sha256-7fe871afdc5ba183c2942cf3642461df4cffba6ac808c7cb5c5391a7e0d014a4", + "contentHash": "sha256-3d740e009e79d6e8996dfbf9fdfe70f0445027627d4e9d99d87f3a4de9d48784", "includedCompatKeys": [ "javascript.builtins.AggregateError", "javascript.builtins.AggregateError.AggregateError", @@ -3829,7 +3829,7 @@ { "year": 2024, "outputPath": "generated/current/year/2024/index.d.ts", - "contentHash": "sha256-fc090f5baf6146ade06fca1d78f99cb38602c202e1f3a9820110e815bbb36732", + "contentHash": "sha256-b53954e6dc67ee1c8d942aad4ca0d76bbff9a42d8dd03b7fa7ca78dcdf93f83d", "includedCompatKeys": [ "javascript.builtins.AggregateError", "javascript.builtins.AggregateError.AggregateError", @@ -4586,7 +4586,7 @@ { "year": 2025, "outputPath": "generated/current/year/2025/index.d.ts", - "contentHash": "sha256-ca9e417cbda66904a277ae025e3cc7383a7268571ffcc5aec4a751eff7d01169", + "contentHash": "sha256-139fdb314cddf099a5ce5a0e74752afa0a1b60bace01f25dddac09c3a12698f4", "includedCompatKeys": [ "javascript.builtins.AggregateError", "javascript.builtins.AggregateError.AggregateError", diff --git a/derived/current/inventory.json b/derived/current/inventory.json index 1212507..235e01b 100644 --- a/derived/current/inventory.json +++ b/derived/current/inventory.json @@ -7661,6 +7661,9 @@ "lib.es2015.iterable.d.ts::IteratorResult::11", "lib.es2025.iterator.d.ts::IteratorObject::10" ], + "heritageSymbols": [ + "IteratorObject" + ], "parameterNames": [], "surfacePath": "Generator", "order": 0 @@ -8338,6 +8341,9 @@ "lib.es2025.iterator.d.ts::Iterator::31", "lib.es2025.iterator.d.ts::Iterator::5" ], + "heritageSymbols": [ + "Iterator" + ], "parameterNames": [], "surfacePath": "IterableIterator", "order": 15 @@ -8384,6 +8390,9 @@ "lib.es2025.iterator.d.ts::Iterator::31", "lib.es2025.iterator.d.ts::Iterator::5" ], + "heritageSymbols": [ + "Iterator" + ], "parameterNames": [], "surfacePath": "IteratorObject", "order": 17 @@ -8447,6 +8456,9 @@ "lib.es2015.iterable.d.ts::IteratorObject::24", "lib.es2025.iterator.d.ts::IteratorObject::10" ], + "heritageSymbols": [ + "IteratorObject" + ], "parameterNames": [], "surfacePath": "ArrayIterator", "order": 20 @@ -8831,6 +8843,9 @@ "lib.es2015.iterable.d.ts::IteratorObject::24", "lib.es2025.iterator.d.ts::IteratorObject::10" ], + "heritageSymbols": [ + "IteratorObject" + ], "parameterNames": [], "surfacePath": "MapIterator", "order": 37 @@ -9260,6 +9275,9 @@ "lib.es2015.iterable.d.ts::IteratorObject::24", "lib.es2025.iterator.d.ts::IteratorObject::10" ], + "heritageSymbols": [ + "IteratorObject" + ], "parameterNames": [], "surfacePath": "SetIterator", "order": 55 @@ -9777,6 +9795,9 @@ "lib.es2015.iterable.d.ts::IteratorObject::24", "lib.es2025.iterator.d.ts::IteratorObject::10" ], + "heritageSymbols": [ + "IteratorObject" + ], "parameterNames": [], "surfacePath": "StringIterator", "order": 76 @@ -18191,6 +18212,9 @@ "lib.es5.d.ts::Promise::457", "lib.es5.d.ts::PromiseLike::454" ], + "heritageSymbols": [ + "AsyncIteratorObject" + ], "parameterNames": [], "surfacePath": "AsyncGenerator", "order": 0 @@ -18775,6 +18799,9 @@ "dependencyUnitIds": [ "lib.es2018.asynciterable.d.ts::AsyncIterator::4" ], + "heritageSymbols": [ + "AsyncIterator" + ], "parameterNames": [], "surfacePath": "AsyncIterableIterator", "order": 8 @@ -18818,6 +18845,9 @@ "dependencyUnitIds": [ "lib.es2018.asynciterable.d.ts::AsyncIterator::4" ], + "heritageSymbols": [ + "AsyncIterator" + ], "parameterNames": [], "surfacePath": "AsyncIteratorObject", "order": 10 @@ -25542,6 +25572,9 @@ "lib.es2020.intl.d.ts::Intl.LocaleOptions::79", "lib.es2020.intl.d.ts::Intl.UnicodeBCP47LocaleIdentifier::2" ], + "heritageSymbols": [ + "Intl.LocaleOptions" + ], "parameterNames": [], "surfacePath": "Intl.Locale", "order": 77 @@ -27666,6 +27699,9 @@ "lib.es2015.iterable.d.ts::IteratorObject::24", "lib.es2025.iterator.d.ts::IteratorObject::10" ], + "heritageSymbols": [ + "IteratorObject" + ], "parameterNames": [], "surfacePath": "RegExpStringIterator", "order": 2 @@ -27949,6 +27985,9 @@ "dependencyUnitIds": [ "lib.es2017.intl.d.ts::Intl.DateTimeFormatPart::17" ], + "heritageSymbols": [ + "Intl.DateTimeFormatPart" + ], "parameterNames": [], "surfacePath": "Intl.DateTimeRangeFormatPart", "order": 9 @@ -28682,6 +28721,9 @@ "lib.es5.d.ts::Error::305", "lib.es5.d.ts::Error::314" ], + "heritageSymbols": [ + "Error" + ], "parameterNames": [], "surfacePath": "AggregateError", "order": 0 @@ -30833,6 +30875,9 @@ "lib.es2015.iterable.d.ts::IteratorObject::24", "lib.es2025.iterator.d.ts::IteratorObject::10" ], + "heritageSymbols": [ + "IteratorObject" + ], "parameterNames": [], "surfacePath": "Intl.SegmentIterator", "order": 10 @@ -31328,6 +31373,9 @@ "lib.es5.d.ts::Array::401", "lib.es5.d.ts::Array::443" ], + "heritageSymbols": [ + "Array" + ], "parameterNames": [], "surfacePath": "RegExpIndicesArray", "order": 4 @@ -34110,6 +34158,9 @@ "lib.es2018.intl.d.ts::Intl.NumberFormatPartTypeRegistry::34", "lib.es2020.intl.d.ts::Intl.NumberFormatPartTypeRegistry::61" ], + "heritageSymbols": [ + "Intl.NumberFormatPartTypeRegistry" + ], "parameterNames": [], "surfacePath": "Intl.NumberFormatRangePartTypeRegistry", "order": 7 @@ -38940,6 +38991,9 @@ "lib.es2015.iterable.d.ts::IteratorObject::24", "lib.es2025.iterator.d.ts::IteratorObject::10" ], + "heritageSymbols": [ + "IteratorObject" + ], "parameterNames": [], "surfacePath": "Iterator", "order": 3 @@ -39454,6 +39508,9 @@ "lib.es2025.iterator.d.ts::IteratorObject::10", "lib.es2025.iterator.d.ts::IteratorObjectConstructor::6" ], + "heritageSymbols": [ + "IteratorObjectConstructor" + ], "parameterNames": [], "surfacePath": "IteratorConstructor", "order": 24 @@ -41186,6 +41243,9 @@ "lib.es5.d.ts::ThisParameterType::77", "lib.esnext.decorators.d.ts::Function::4" ], + "heritageSymbols": [ + "Function" + ], "parameterNames": [], "surfacePath": "CallableFunction", "order": 72 @@ -41325,6 +41385,9 @@ "lib.es5.d.ts::Function::76", "lib.esnext.decorators.d.ts::Function::4" ], + "heritageSymbols": [ + "Function" + ], "parameterNames": [], "surfacePath": "NewableFunction", "order": 78 @@ -42724,6 +42787,9 @@ "lib.es2023.array.d.ts::ReadonlyArray::11", "lib.es5.d.ts::ReadonlyArray::370" ], + "heritageSymbols": [ + "ReadonlyArray" + ], "parameterNames": [], "surfacePath": "TemplateStringsArray", "order": 141 @@ -44553,6 +44619,9 @@ "lib.es5.d.ts::Array::401", "lib.es5.d.ts::Array::443" ], + "heritageSymbols": [ + "Array" + ], "parameterNames": [], "surfacePath": "RegExpMatchArray", "order": 233 @@ -44636,6 +44705,9 @@ "lib.es5.d.ts::Array::401", "lib.es5.d.ts::Array::443" ], + "heritageSymbols": [ + "Array" + ], "parameterNames": [], "surfacePath": "RegExpExecArray", "order": 237 @@ -45635,6 +45707,9 @@ "lib.es5.d.ts::Error::305", "lib.es5.d.ts::Error::314" ], + "heritageSymbols": [ + "Error" + ], "parameterNames": [], "surfacePath": "EvalError", "order": 285 @@ -45661,6 +45736,9 @@ "lib.es5.d.ts::EvalError::322", "lib.esnext.error.d.ts::ErrorConstructor::1" ], + "heritageSymbols": [ + "ErrorConstructor" + ], "parameterNames": [], "surfacePath": "EvalErrorConstructor", "order": 286 @@ -45779,6 +45857,9 @@ "lib.es5.d.ts::Error::305", "lib.es5.d.ts::Error::314" ], + "heritageSymbols": [ + "Error" + ], "parameterNames": [], "surfacePath": "RangeError", "order": 291 @@ -45805,6 +45886,9 @@ "lib.es5.d.ts::RangeError::330", "lib.esnext.error.d.ts::ErrorConstructor::1" ], + "heritageSymbols": [ + "ErrorConstructor" + ], "parameterNames": [], "surfacePath": "RangeErrorConstructor", "order": 292 @@ -45923,6 +46007,9 @@ "lib.es5.d.ts::Error::305", "lib.es5.d.ts::Error::314" ], + "heritageSymbols": [ + "Error" + ], "parameterNames": [], "surfacePath": "ReferenceError", "order": 297 @@ -45949,6 +46036,9 @@ "lib.es5.d.ts::ReferenceError::338", "lib.esnext.error.d.ts::ErrorConstructor::1" ], + "heritageSymbols": [ + "ErrorConstructor" + ], "parameterNames": [], "surfacePath": "ReferenceErrorConstructor", "order": 298 @@ -46067,6 +46157,9 @@ "lib.es5.d.ts::Error::305", "lib.es5.d.ts::Error::314" ], + "heritageSymbols": [ + "Error" + ], "parameterNames": [], "surfacePath": "SyntaxError", "order": 303 @@ -46093,6 +46186,9 @@ "lib.es5.d.ts::SyntaxError::346", "lib.esnext.error.d.ts::ErrorConstructor::1" ], + "heritageSymbols": [ + "ErrorConstructor" + ], "parameterNames": [], "surfacePath": "SyntaxErrorConstructor", "order": 304 @@ -46211,6 +46307,9 @@ "lib.es5.d.ts::Error::305", "lib.es5.d.ts::Error::314" ], + "heritageSymbols": [ + "Error" + ], "parameterNames": [], "surfacePath": "TypeError", "order": 309 @@ -46237,6 +46336,9 @@ "lib.es5.d.ts::TypeError::354", "lib.esnext.error.d.ts::ErrorConstructor::1" ], + "heritageSymbols": [ + "ErrorConstructor" + ], "parameterNames": [], "surfacePath": "TypeErrorConstructor", "order": 310 @@ -46355,6 +46457,9 @@ "lib.es5.d.ts::Error::305", "lib.es5.d.ts::Error::314" ], + "heritageSymbols": [ + "Error" + ], "parameterNames": [], "surfacePath": "URIError", "order": 315 @@ -46381,6 +46486,9 @@ "lib.es5.d.ts::URIError::362", "lib.esnext.error.d.ts::ErrorConstructor::1" ], + "heritageSymbols": [ + "ErrorConstructor" + ], "parameterNames": [], "surfacePath": "URIErrorConstructor", "order": 316 @@ -63917,6 +64025,10 @@ "lib.esnext.temporal.d.ts::Temporal.DateLikeObject::14", "lib.esnext.temporal.d.ts::Temporal.TimeLikeObject::37" ], + "heritageSymbols": [ + "Temporal.DateLikeObject", + "Temporal.TimeLikeObject" + ], "parameterNames": [], "surfacePath": "Temporal.DateTimeLikeObject", "order": 20 @@ -64287,6 +64399,9 @@ "lib.es5.d.ts::Omit::472", "lib.esnext.temporal.d.ts::Temporal.DateLikeObject::14" ], + "heritageSymbols": [ + "Omit" + ], "parameterNames": [], "surfacePath": "Temporal.YearMonthLikeObject", "order": 39 @@ -64313,6 +64428,9 @@ "lib.esnext.temporal.d.ts::Temporal.DateTimeLikeObject::23", "lib.esnext.temporal.d.ts::Temporal.TimeZoneLike::10" ], + "heritageSymbols": [ + "Temporal.DateTimeLikeObject" + ], "parameterNames": [], "surfacePath": "Temporal.ZonedDateTimeLikeObject", "order": 40 @@ -64654,6 +64772,9 @@ "lib.esnext.temporal.d.ts::Temporal.RoundingOptions::63", "lib.esnext.temporal.d.ts::Temporal.TimeUnit::51" ], + "heritageSymbols": [ + "Temporal.RoundingOptions" + ], "parameterNames": [], "surfacePath": "Temporal.RoundingOptionsWithLargestUnit", "order": 56 @@ -64707,6 +64828,9 @@ "lib.esnext.temporal.d.ts::Temporal.RoundingOptions::63", "lib.esnext.temporal.d.ts::Temporal.TimeUnit::51" ], + "heritageSymbols": [ + "Pick" + ], "parameterNames": [], "surfacePath": "Temporal.ToStringRoundingOptions", "order": 58 @@ -64735,6 +64859,9 @@ "lib.esnext.temporal.d.ts::Temporal.TimeUnit::51", "lib.esnext.temporal.d.ts::Temporal.ToStringRoundingOptions::71" ], + "heritageSymbols": [ + "Temporal.ToStringRoundingOptions" + ], "parameterNames": [], "surfacePath": "Temporal.ToStringRoundingOptionsWithFractionalSeconds", "order": 59 @@ -66085,6 +66212,9 @@ "lib.esnext.temporal.d.ts::Temporal.TimeUnit::51", "lib.esnext.temporal.d.ts::Temporal.ToStringRoundingOptionsWithFractionalSeconds::73" ], + "heritageSymbols": [ + "Temporal.ToStringRoundingOptionsWithFractionalSeconds" + ], "parameterNames": [], "surfacePath": "Temporal.PlainTimeToStringOptions", "order": 113 @@ -66793,6 +66923,10 @@ "lib.esnext.temporal.d.ts::Temporal.PlainDateToStringOptions::84", "lib.esnext.temporal.d.ts::Temporal.PlainTimeToStringOptions::133" ], + "heritageSymbols": [ + "Temporal.PlainDateToStringOptions", + "Temporal.PlainTimeToStringOptions" + ], "parameterNames": [], "surfacePath": "Temporal.PlainDateTimeToStringOptions", "order": 140 @@ -67971,6 +68105,9 @@ "dependencyUnitIds": [ "lib.esnext.temporal.d.ts::Temporal.PlainDateTimeToStringOptions::163" ], + "heritageSymbols": [ + "Temporal.PlainDateTimeToStringOptions" + ], "parameterNames": [], "surfacePath": "Temporal.ZonedDateTimeToStringOptions", "order": 188 @@ -68035,6 +68172,10 @@ "lib.esnext.temporal.d.ts::Temporal.DisambiguationOptions::54", "lib.esnext.temporal.d.ts::Temporal.OverflowOptions::57" ], + "heritageSymbols": [ + "Temporal.DisambiguationOptions", + "Temporal.OverflowOptions" + ], "parameterNames": [], "surfacePath": "Temporal.ZonedDateTimeFromOptions", "order": 191 @@ -69524,6 +69665,10 @@ "lib.esnext.temporal.d.ts::Temporal.RoundingOptionsWithLargestUnit::68", "lib.esnext.temporal.d.ts::Temporal.TimeUnit::51" ], + "heritageSymbols": [ + "Temporal.DurationRelativeToOptions", + "Temporal.RoundingOptionsWithLargestUnit" + ], "parameterNames": [], "surfacePath": "Temporal.DurationRoundingOptions", "order": 253 @@ -69552,6 +69697,9 @@ "lib.esnext.temporal.d.ts::Temporal.TimeUnit::51", "lib.esnext.temporal.d.ts::Temporal.ToStringRoundingOptionsWithFractionalSeconds::73" ], + "heritageSymbols": [ + "Temporal.ToStringRoundingOptionsWithFractionalSeconds" + ], "parameterNames": [], "surfacePath": "Temporal.DurationToStringOptions", "order": 254 @@ -69582,6 +69730,9 @@ "lib.esnext.temporal.d.ts::Temporal.PluralizeUnit::52", "lib.esnext.temporal.d.ts::Temporal.TimeUnit::51" ], + "heritageSymbols": [ + "Temporal.DurationRelativeToOptions" + ], "parameterNames": [], "surfacePath": "Temporal.DurationTotalOptions", "order": 255 @@ -70428,6 +70579,9 @@ "lib.esnext.temporal.d.ts::Temporal.PlainTimeToStringOptions::133", "lib.esnext.temporal.d.ts::Temporal.TimeZoneLike::10" ], + "heritageSymbols": [ + "Temporal.PlainTimeToStringOptions" + ], "parameterNames": [], "surfacePath": "Temporal.InstantToStringOptions", "order": 290 diff --git a/generated/current/allow/_support/intl-duration-format.d.ts b/generated/current/allow/_support/intl-duration-format.d.ts index 792dcb6..9fd6791 100644 --- a/generated/current/allow/_support/intl-duration-format.d.ts +++ b/generated/current/allow/_support/intl-duration-format.d.ts @@ -22,176 +22,176 @@ and limitations under the License. // lib.es2025.intl.d.ts ///////////////////////////// declare namespace Intl { - /** - * The locale matching algorithm to use. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). - */ - type DurationFormatLocaleMatcher = "lookup" | "best fit"; - - /** - * The style of the formatted duration. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/DurationFormat#style). - */ - type DurationFormatStyle = "long" | "short" | "narrow" | "digital"; - - /** - * Whether to always display a unit, or only if it is non-zero. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/DurationFormat#display). - */ - type DurationFormatDisplayOption = "always" | "auto"; - - /** - * Value of the `unit` property in duration objects - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/format#duration). - */ - type DurationFormatUnit = - | "years" - | "months" - | "weeks" - | "days" - | "hours" - | "minutes" - | "seconds" - | "milliseconds" - | "microseconds" - | "nanoseconds"; +/** + * The locale matching algorithm to use. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). + */ + type DurationFormatLocaleMatcher = "lookup" | "best fit"; + +/** + * The style of the formatted duration. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/DurationFormat#style). + */ + type DurationFormatStyle = "long" | "short" | "narrow" | "digital"; + +/** + * Whether to always display a unit, or only if it is non-zero. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/DurationFormat#display). + */ + type DurationFormatDisplayOption = "always" | "auto"; + +/** + * Value of the `unit` property in duration objects + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/format#duration). + */ + type DurationFormatUnit = + | "years" + | "months" + | "weeks" + | "days" + | "hours" + | "minutes" + | "seconds" + | "milliseconds" + | "microseconds" + | "nanoseconds"; + +type DurationFormatUnitSingular = + | "year" + | "month" + | "week" + | "day" + | "hour" + | "minute" + | "second" + | "millisecond" + | "microsecond" + | "nanosecond"; + +/** + * An object representing the relative time format in parts + * that can be used for custom locale-aware formatting. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/formatToParts). + */ + type DurationFormatPart = + | { + type: "literal"; + value: string; + unit?: DurationFormatUnitSingular; + } + | { + type: Exclude; + value: string; + unit: DurationFormatUnitSingular; + }; + +/** + * An object with some or all properties of the `Intl.DurationFormat` constructor `options` parameter. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/DurationFormat#parameters) + */ + interface DurationFormatOptions { + localeMatcher?: DurationFormatLocaleMatcher | undefined; + + numberingSystem?: string | undefined; + + style?: DurationFormatStyle | undefined; + + years?: "long" | "short" | "narrow" | undefined; + + yearsDisplay?: DurationFormatDisplayOption | undefined; + + months?: "long" | "short" | "narrow" | undefined; + + monthsDisplay?: DurationFormatDisplayOption | undefined; + + weeks?: "long" | "short" | "narrow" | undefined; + + weeksDisplay?: DurationFormatDisplayOption | undefined; + + days?: "long" | "short" | "narrow" | undefined; + + daysDisplay?: DurationFormatDisplayOption | undefined; + + hours?: "long" | "short" | "narrow" | "numeric" | "2-digit" | undefined; + + hoursDisplay?: DurationFormatDisplayOption | undefined; + + minutes?: "long" | "short" | "narrow" | "numeric" | "2-digit" | undefined; + + minutesDisplay?: DurationFormatDisplayOption | undefined; - type DurationFormatUnitSingular = - | "year" - | "month" - | "week" - | "day" - | "hour" - | "minute" - | "second" - | "millisecond" - | "microsecond" - | "nanosecond"; + seconds?: "long" | "short" | "narrow" | "numeric" | "2-digit" | undefined; - /** - * An object representing the relative time format in parts - * that can be used for custom locale-aware formatting. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/formatToParts). - */ - type DurationFormatPart = - | { - type: "literal"; - value: string; - unit?: DurationFormatUnitSingular; - } - | { - type: Exclude; - value: string; - unit: DurationFormatUnitSingular; - }; + secondsDisplay?: DurationFormatDisplayOption | undefined; - /** - * An object with some or all properties of the `Intl.DurationFormat` constructor `options` parameter. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/DurationFormat#parameters) - */ - interface DurationFormatOptions { - localeMatcher?: DurationFormatLocaleMatcher | undefined; + milliseconds?: "long" | "short" | "narrow" | "numeric" | undefined; - numberingSystem?: string | undefined; + millisecondsDisplay?: DurationFormatDisplayOption | undefined; - style?: DurationFormatStyle | undefined; + microseconds?: "long" | "short" | "narrow" | "numeric" | undefined; - years?: "long" | "short" | "narrow" | undefined; + microsecondsDisplay?: DurationFormatDisplayOption | undefined; - yearsDisplay?: DurationFormatDisplayOption | undefined; + nanoseconds?: "long" | "short" | "narrow" | "numeric" | undefined; - months?: "long" | "short" | "narrow" | undefined; + nanosecondsDisplay?: DurationFormatDisplayOption | undefined; - monthsDisplay?: DurationFormatDisplayOption | undefined; - - weeks?: "long" | "short" | "narrow" | undefined; - - weeksDisplay?: DurationFormatDisplayOption | undefined; - - days?: "long" | "short" | "narrow" | undefined; - - daysDisplay?: DurationFormatDisplayOption | undefined; - - hours?: "long" | "short" | "narrow" | "numeric" | "2-digit" | undefined; - - hoursDisplay?: DurationFormatDisplayOption | undefined; - - minutes?: "long" | "short" | "narrow" | "numeric" | "2-digit" | undefined; - - minutesDisplay?: DurationFormatDisplayOption | undefined; - - seconds?: "long" | "short" | "narrow" | "numeric" | "2-digit" | undefined; - - secondsDisplay?: DurationFormatDisplayOption | undefined; - - milliseconds?: "long" | "short" | "narrow" | "numeric" | undefined; - - millisecondsDisplay?: DurationFormatDisplayOption | undefined; - - microseconds?: "long" | "short" | "narrow" | "numeric" | undefined; - - microsecondsDisplay?: DurationFormatDisplayOption | undefined; - - nanoseconds?: "long" | "short" | "narrow" | "numeric" | undefined; - - nanosecondsDisplay?: DurationFormatDisplayOption | undefined; - - fractionalDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined; - } + fractionalDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined; +} - interface ResolvedDurationFormatOptions { - locale: UnicodeBCP47LocaleIdentifier; +interface ResolvedDurationFormatOptions { + locale: UnicodeBCP47LocaleIdentifier; - numberingSystem: string; + numberingSystem: string; - style: DurationFormatStyle; + style: DurationFormatStyle; - years: "long" | "short" | "narrow"; + years: "long" | "short" | "narrow"; - yearsDisplay: DurationFormatDisplayOption; + yearsDisplay: DurationFormatDisplayOption; - months: "long" | "short" | "narrow"; + months: "long" | "short" | "narrow"; - monthsDisplay: DurationFormatDisplayOption; + monthsDisplay: DurationFormatDisplayOption; - weeks: "long" | "short" | "narrow"; + weeks: "long" | "short" | "narrow"; - weeksDisplay: DurationFormatDisplayOption; + weeksDisplay: DurationFormatDisplayOption; - days: "long" | "short" | "narrow"; + days: "long" | "short" | "narrow"; - daysDisplay: DurationFormatDisplayOption; + daysDisplay: DurationFormatDisplayOption; - hours: "long" | "short" | "narrow" | "numeric" | "2-digit"; + hours: "long" | "short" | "narrow" | "numeric" | "2-digit"; - hoursDisplay: DurationFormatDisplayOption; + hoursDisplay: DurationFormatDisplayOption; - minutes: "long" | "short" | "narrow" | "numeric" | "2-digit"; + minutes: "long" | "short" | "narrow" | "numeric" | "2-digit"; - minutesDisplay: DurationFormatDisplayOption; + minutesDisplay: DurationFormatDisplayOption; - seconds: "long" | "short" | "narrow" | "numeric" | "2-digit"; + seconds: "long" | "short" | "narrow" | "numeric" | "2-digit"; - secondsDisplay: DurationFormatDisplayOption; + secondsDisplay: DurationFormatDisplayOption; - milliseconds: "long" | "short" | "narrow" | "numeric"; + milliseconds: "long" | "short" | "narrow" | "numeric"; - millisecondsDisplay: DurationFormatDisplayOption; + millisecondsDisplay: DurationFormatDisplayOption; - microseconds: "long" | "short" | "narrow" | "numeric"; + microseconds: "long" | "short" | "narrow" | "numeric"; - microsecondsDisplay: DurationFormatDisplayOption; + microsecondsDisplay: DurationFormatDisplayOption; - nanoseconds: "long" | "short" | "narrow" | "numeric"; + nanoseconds: "long" | "short" | "narrow" | "numeric"; - nanosecondsDisplay: DurationFormatDisplayOption; + nanosecondsDisplay: DurationFormatDisplayOption; - fractionalDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9; - } + fractionalDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9; +} } diff --git a/generated/current/allow/_support/intl-segmenter.d.ts b/generated/current/allow/_support/intl-segmenter.d.ts index 66f7f7c..60f60a1 100644 --- a/generated/current/allow/_support/intl-segmenter.d.ts +++ b/generated/current/allow/_support/intl-segmenter.d.ts @@ -22,43 +22,43 @@ and limitations under the License. // lib.es2022.intl.d.ts ///////////////////////////// declare namespace Intl { - /** - * An object with some or all properties of the `Intl.Segmenter` constructor `options` parameter. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/Segmenter#parameters) - */ - interface SegmenterOptions { - /** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */ - localeMatcher?: "best fit" | "lookup" | undefined; +/** + * An object with some or all properties of the `Intl.Segmenter` constructor `options` parameter. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/Segmenter#parameters) + */ + interface SegmenterOptions { + /** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */ + localeMatcher?: "best fit" | "lookup" | undefined; - /** The type of input to be split */ - granularity?: "grapheme" | "word" | "sentence" | undefined; - } + /** The type of input to be split */ + granularity?: "grapheme" | "word" | "sentence" | undefined; +} - interface ResolvedSegmenterOptions { - locale: string; +interface ResolvedSegmenterOptions { + locale: string; - granularity: "grapheme" | "word" | "sentence"; - } + granularity: "grapheme" | "word" | "sentence"; +} - interface SegmentIterator extends IteratorObject { - [Symbol.iterator](): SegmentIterator; - } +interface SegmentIterator extends IteratorObject { + [Symbol.iterator](): SegmentIterator; +} - interface SegmentData { - /** A string containing the segment extracted from the original input string. */ - segment: string; +interface SegmentData { + /** A string containing the segment extracted from the original input string. */ + segment: string; - /** The code unit index in the original input string at which the segment begins. */ - index: number; + /** The code unit index in the original input string at which the segment begins. */ + index: number; - /** The complete input string that was segmented. */ - input: string; + /** The complete input string that was segmented. */ + input: string; - /** - * A boolean value only if granularity is "word"; otherwise, undefined. - * If granularity is "word", then isWordLike is true when the segment is word-like (i.e., consists of letters/numbers/ideographs/etc.); otherwise, false. - */ - isWordLike?: boolean; - } + /** + * A boolean value only if granularity is "word"; otherwise, undefined. + * If granularity is "word", then isWordLike is true when the segment is word-like (i.e., consists of letters/numbers/ideographs/etc.); otherwise, false. + */ + isWordLike?: boolean; +} } diff --git a/generated/current/allow/_support/set-methods.d.ts b/generated/current/allow/_support/set-methods.d.ts index c892446..c1d16dc 100644 --- a/generated/current/allow/_support/set-methods.d.ts +++ b/generated/current/allow/_support/set-methods.d.ts @@ -22,18 +22,18 @@ and limitations under the License. // lib.es2025.collection.d.ts ///////////////////////////// interface ReadonlySetLike { - /** - * Despite its name, returns an iterator of the values in the set-like. - */ - keys(): Iterator; + /** + * Despite its name, returns an iterator of the values in the set-like. + */ + keys(): Iterator; - /** - * @returns a boolean indicating whether an element with the specified value exists in the set-like or not. - */ - has(value: T): boolean; + /** + * @returns a boolean indicating whether an element with the specified value exists in the set-like or not. + */ + has(value: T): boolean; - /** - * @returns the number of (unique) elements in the set-like. - */ - readonly size: number; + /** + * @returns the number of (unique) elements in the set-like. + */ + readonly size: number; } diff --git a/generated/current/allow/atomics-pause/index.d.ts b/generated/current/allow/atomics-pause/index.d.ts index 35f1aba..be0383b 100644 --- a/generated/current/allow/atomics-pause/index.d.ts +++ b/generated/current/allow/atomics-pause/index.d.ts @@ -22,9 +22,9 @@ and limitations under the License. // lib.esnext.sharedmemory.d.ts ///////////////////////////// interface Atomics { - /** - * Performs a finite-time microwait by signaling to the operating system or - * CPU that the current executing code is in a spin-wait loop. - */ - pause(n?: number): void; + /** + * Performs a finite-time microwait by signaling to the operating system or + * CPU that the current executing code is in a spin-wait loop. + */ + pause(n?: number): void; } diff --git a/generated/current/allow/atomics-wait-async/index.d.ts b/generated/current/allow/atomics-wait-async/index.d.ts index e9c44f0..3f02153 100644 --- a/generated/current/allow/atomics-wait-async/index.d.ts +++ b/generated/current/allow/atomics-wait-async/index.d.ts @@ -22,23 +22,23 @@ and limitations under the License. // lib.es2024.sharedmemory.d.ts ///////////////////////////// interface Atomics { - /** - * A non-blocking, asynchronous version of wait which is usable on the main thread. - * Waits asynchronously on a shared memory location and returns a Promise - * @param typedArray A shared Int32Array or BigInt64Array. - * @param index The position in the typedArray to wait on. - * @param value The expected value to test. - * @param [timeout] The expected value to test. - */ - waitAsync(typedArray: Int32Array, index: number, value: number, timeout?: number): { async: false; value: "not-equal" | "timed-out"; } | { async: true; value: Promise<"ok" | "timed-out">; }; + /** + * A non-blocking, asynchronous version of wait which is usable on the main thread. + * Waits asynchronously on a shared memory location and returns a Promise + * @param typedArray A shared Int32Array or BigInt64Array. + * @param index The position in the typedArray to wait on. + * @param value The expected value to test. + * @param [timeout] The expected value to test. + */ + waitAsync(typedArray: Int32Array, index: number, value: number, timeout?: number): { async: false; value: "not-equal" | "timed-out"; } | { async: true; value: Promise<"ok" | "timed-out">; }; - /** - * A non-blocking, asynchronous version of wait which is usable on the main thread. - * Waits asynchronously on a shared memory location and returns a Promise - * @param typedArray A shared Int32Array or BigInt64Array. - * @param index The position in the typedArray to wait on. - * @param value The expected value to test. - * @param [timeout] The expected value to test. - */ - waitAsync(typedArray: BigInt64Array, index: number, value: bigint, timeout?: number): { async: false; value: "not-equal" | "timed-out"; } | { async: true; value: Promise<"ok" | "timed-out">; }; + /** + * A non-blocking, asynchronous version of wait which is usable on the main thread. + * Waits asynchronously on a shared memory location and returns a Promise + * @param typedArray A shared Int32Array or BigInt64Array. + * @param index The position in the typedArray to wait on. + * @param value The expected value to test. + * @param [timeout] The expected value to test. + */ + waitAsync(typedArray: BigInt64Array, index: number, value: bigint, timeout?: number): { async: false; value: "not-equal" | "timed-out"; } | { async: true; value: Promise<"ok" | "timed-out">; }; } diff --git a/generated/current/allow/float16array/index.d.ts b/generated/current/allow/float16array/index.d.ts index 99bcd7b..267d836 100644 --- a/generated/current/allow/float16array/index.d.ts +++ b/generated/current/allow/float16array/index.d.ts @@ -26,431 +26,431 @@ and limitations under the License. * of bytes could not be allocated an exception is raised. */ interface Float16Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; - - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; - - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; - - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; - - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; - - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float16Array; - - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number | undefined; - - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number; - - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; - - /** - * Returns the index of the first occurrence of a value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; - - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; - - /** - * Returns the index of the last occurrence of a value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; - - /** - * The length of the array. - */ - readonly length: number; - - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float16Array; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; - - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; - - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - - /** - * Reverses the elements in an Array. - */ - reverse(): this; - - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; - - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Float16Array; - - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; - - /** - * Gets a new Float16Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Float16Array; - - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; - - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): Float16Array; - - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = Float16Array.from([11.25, 2, -22.5, 1]); - * myNums.toSorted((a, b) => a - b) // Float16Array(4) [-22.5, 1, 2, 11.5] - * ``` - */ - toSorted(compareFn?: (a: number, b: number) => number): Float16Array; - - /** - * Returns a string representation of an array. - */ - toString(): string; - - /** Returns the primitive value of the specified object. */ - valueOf(): this; - - /** - * Copies the array and inserts the given number at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: number): Float16Array; - - [index: number]: number; - - [Symbol.iterator](): ArrayIterator; - - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; - - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; - - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; - - readonly [Symbol.toStringTag]: "Float16Array"; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; + + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; + + /** + * The length in bytes of the array. + */ + readonly byteLength: number; + + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; + + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; + + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; + + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; + + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float16Array; + + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number | undefined; + + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number; + + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; + + /** + * Returns the index of the first occurrence of a value in an array. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; + + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; + + /** + * Returns the index of the last occurrence of a value in an array. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; + + /** + * The length of the array. + */ + readonly length: number; + + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float16Array; + + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + + /** + * Reverses the elements in an Array. + */ + reverse(): this; + + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; + + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Float16Array; + + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; + + /** + * Gets a new Float16Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Float16Array; + + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; + + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Float16Array; + + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = Float16Array.from([11.25, 2, -22.5, 1]); + * myNums.toSorted((a, b) => a - b) // Float16Array(4) [-22.5, 1, 2, 11.5] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Float16Array; + + /** + * Returns a string representation of an array. + */ + toString(): string; + + /** Returns the primitive value of the specified object. */ + valueOf(): this; + + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Float16Array; + + [index: number]: number; + + [Symbol.iterator](): ArrayIterator; + + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; + + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; + + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; + + readonly [Symbol.toStringTag]: "Float16Array"; } interface Float16ArrayConstructor { - readonly prototype: Float16Array; - - new (length?: number): Float16Array; - - new (array: ArrayLike | Iterable): Float16Array; - - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Float16Array; - - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float16Array; - - new (array: ArrayLike | ArrayBuffer): Float16Array; - - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Float16Array; - - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Float16Array; - - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float16Array; - - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Float16Array; - - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Float16Array; + readonly prototype: Float16Array; + + new (length?: number): Float16Array; + + new (array: ArrayLike | Iterable): Float16Array; + + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Float16Array; + + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float16Array; + + new (array: ArrayLike | ArrayBuffer): Float16Array; + + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; + + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Float16Array; + + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Float16Array; + + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float16Array; + + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Float16Array; + + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Float16Array; } declare var Float16Array: Float16ArrayConstructor; interface Math { - /** - * Returns the nearest half precision float representation of a number. - * @param x A numeric expression. - */ - f16round(x: number): number; + /** + * Returns the nearest half precision float representation of a number. + * @param x A numeric expression. + */ + f16round(x: number): number; } interface DataView { - /** - * Gets the Float16 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getFloat16(byteOffset: number, littleEndian?: boolean): number; - - /** - * Stores an Float16 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setFloat16(byteOffset: number, value: number, littleEndian?: boolean): void; + /** + * Gets the Float16 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getFloat16(byteOffset: number, littleEndian?: boolean): number; + + /** + * Stores an Float16 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setFloat16(byteOffset: number, value: number, littleEndian?: boolean): void; } diff --git a/generated/current/allow/getorinsert/index.d.ts b/generated/current/allow/getorinsert/index.d.ts index 075d298..9aff301 100644 --- a/generated/current/allow/getorinsert/index.d.ts +++ b/generated/current/allow/getorinsert/index.d.ts @@ -22,33 +22,33 @@ and limitations under the License. // lib.esnext.collection.d.ts ///////////////////////////// interface Map { - /** - * Returns a specified element from the Map object. - * If no element is associated with the specified key, a new element with the value `defaultValue` will be inserted into the Map and returned. - * @returns The element associated with the specified key, which will be `defaultValue` if no element previously existed. - */ - getOrInsert(key: K, defaultValue: V): V; + /** + * Returns a specified element from the Map object. + * If no element is associated with the specified key, a new element with the value `defaultValue` will be inserted into the Map and returned. + * @returns The element associated with the specified key, which will be `defaultValue` if no element previously existed. + */ + getOrInsert(key: K, defaultValue: V): V; - /** - * Returns a specified element from the Map object. - * If no element is associated with the specified key, the result of passing the specified key to the `callback` function will be inserted into the Map and returned. - * @returns The element associated with the specific key, which will be the newly computed value if no element previously existed. - */ - getOrInsertComputed(key: K, callback: (key: K) => V): V; + /** + * Returns a specified element from the Map object. + * If no element is associated with the specified key, the result of passing the specified key to the `callback` function will be inserted into the Map and returned. + * @returns The element associated with the specific key, which will be the newly computed value if no element previously existed. + */ + getOrInsertComputed(key: K, callback: (key: K) => V): V; } interface WeakMap { - /** - * Returns a specified element from the WeakMap object. - * If no element is associated with the specified key, a new element with the value `defaultValue` will be inserted into the WeakMap and returned. - * @returns The element associated with the specified key, which will be `defaultValue` if no element previously existed. - */ - getOrInsert(key: K, defaultValue: V): V; + /** + * Returns a specified element from the WeakMap object. + * If no element is associated with the specified key, a new element with the value `defaultValue` will be inserted into the WeakMap and returned. + * @returns The element associated with the specified key, which will be `defaultValue` if no element previously existed. + */ + getOrInsert(key: K, defaultValue: V): V; - /** - * Returns a specified element from the WeakMap object. - * If no element is associated with the specified key, the result of passing the specified key to the `callback` function will be inserted into the WeakMap and returned. - * @returns The element associated with the specific key, which will be the newly computed value if no element previously existed. - */ - getOrInsertComputed(key: K, callback: (key: K) => V): V; + /** + * Returns a specified element from the WeakMap object. + * If no element is associated with the specified key, the result of passing the specified key to the `callback` function will be inserted into the WeakMap and returned. + * @returns The element associated with the specific key, which will be the newly computed value if no element previously existed. + */ + getOrInsertComputed(key: K, callback: (key: K) => V): V; } diff --git a/generated/current/allow/intl-duration-format/index.d.ts b/generated/current/allow/intl-duration-format/index.d.ts index 831e837..2ac81b5 100644 --- a/generated/current/allow/intl-duration-format/index.d.ts +++ b/generated/current/allow/intl-duration-format/index.d.ts @@ -24,59 +24,59 @@ and limitations under the License. // lib.es2025.intl.d.ts ///////////////////////////// declare namespace Intl { - /** - * The Intl.DurationFormat object enables language-sensitive duration formatting. +/** + * The Intl.DurationFormat object enables language-sensitive duration formatting. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat) + */ + interface DurationFormat { + /** + * @param duration The duration object to be formatted. It should include some or all of the following properties: months, weeks, days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds. * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat) + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/format). */ - interface DurationFormat { - /** - * @param duration The duration object to be formatted. It should include some or all of the following properties: months, weeks, days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/format). - */ - format(duration: Partial>): string; + format(duration: Partial>): string; - /** - * @param duration The duration object to be formatted. It should include some or all of the following properties: months, weeks, days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/formatToParts). - */ - formatToParts(duration: Partial>): DurationFormatPart[]; + /** + * @param duration The duration object to be formatted. It should include some or all of the following properties: months, weeks, days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/formatToParts). + */ + formatToParts(duration: Partial>): DurationFormatPart[]; - /** - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/resolvedOptions). - */ - resolvedOptions(): ResolvedDurationFormatOptions; - } + /** + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/resolvedOptions). + */ + resolvedOptions(): ResolvedDurationFormatOptions; +} - const DurationFormat: { - prototype: DurationFormat; +const DurationFormat: { + prototype: DurationFormat; - /** - * @param locales A string with a BCP 47 language tag, or an array of such strings. - * For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) - * page. - * - * @param options An object for setting up a duration format. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/DurationFormat). - */ - new (locales?: LocalesArgument, options?: DurationFormatOptions): DurationFormat; + /** + * @param locales A string with a BCP 47 language tag, or an array of such strings. + * For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) + * page. + * + * @param options An object for setting up a duration format. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/DurationFormat). + */ + new (locales?: LocalesArgument, options?: DurationFormatOptions): DurationFormat; - /** - * Returns an array containing those of the provided locales that are supported in display names without having to fall back to the runtime's default locale. - * - * @param locales A string with a BCP 47 language tag, or an array of such strings. - * For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) - * page. - * - * @param options An object with a locale matcher. - * - * @returns An array of strings representing a subset of the given locale tags that are supported in display names without having to fall back to the runtime's default locale. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/supportedLocalesOf). - */ - supportedLocalesOf(locales?: LocalesArgument, options?: { localeMatcher?: DurationFormatLocaleMatcher; }): UnicodeBCP47LocaleIdentifier[]; - }; + /** + * Returns an array containing those of the provided locales that are supported in display names without having to fall back to the runtime's default locale. + * + * @param locales A string with a BCP 47 language tag, or an array of such strings. + * For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) + * page. + * + * @param options An object with a locale matcher. + * + * @returns An array of strings representing a subset of the given locale tags that are supported in display names without having to fall back to the runtime's default locale. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/supportedLocalesOf). + */ + supportedLocalesOf(locales?: LocalesArgument, options?: { localeMatcher?: DurationFormatLocaleMatcher; }): UnicodeBCP47LocaleIdentifier[]; +}; } diff --git a/generated/current/allow/intl-segmenter/index.d.ts b/generated/current/allow/intl-segmenter/index.d.ts index 1f0091d..0fcc2ca 100644 --- a/generated/current/allow/intl-segmenter/index.d.ts +++ b/generated/current/allow/intl-segmenter/index.d.ts @@ -24,86 +24,86 @@ and limitations under the License. // lib.es2022.intl.d.ts ///////////////////////////// declare namespace Intl { - /** - * The `Intl.Segmenter` object enables locale-sensitive text segmentation, enabling you to get meaningful items (graphemes, words or sentences) from a string. +/** + * The `Intl.Segmenter` object enables locale-sensitive text segmentation, enabling you to get meaningful items (graphemes, words or sentences) from a string. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter) + */ + interface Segmenter { + /** + * Returns `Segments` object containing the segments of the input string, using the segmenter's locale and granularity. * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter) + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/segment) + * + * @param input - The text to be segmented as a `string`. + * + * @returns A new iterable Segments object containing the segments of the input string, using the segmenter's locale and granularity. */ - interface Segmenter { - /** - * Returns `Segments` object containing the segments of the input string, using the segmenter's locale and granularity. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/segment) - * - * @param input - The text to be segmented as a `string`. - * - * @returns A new iterable Segments object containing the segments of the input string, using the segmenter's locale and granularity. - */ - segment(input: string): Segments; + segment(input: string): Segments; - /** - * The `resolvedOptions()` method of `Intl.Segmenter` instances returns a new object with properties reflecting the options computed during initialization of this `Segmenter` object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/resolvedOptions) - */ - resolvedOptions(): ResolvedSegmenterOptions; - } + /** + * The `resolvedOptions()` method of `Intl.Segmenter` instances returns a new object with properties reflecting the options computed during initialization of this `Segmenter` object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/resolvedOptions) + */ + resolvedOptions(): ResolvedSegmenterOptions; +} - /** - * A `Segments` object is an iterable collection of the segments of a text string. It is returned by a call to the `segment()` method of an `Intl.Segmenter` object. +/** + * A `Segments` object is an iterable collection of the segments of a text string. It is returned by a call to the `segment()` method of an `Intl.Segmenter` object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/segment/Segments) + */ + interface Segments { + /** + * Returns an object describing the segment in the original string that includes the code unit at a specified index. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/segment/Segments/containing) * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/segment/Segments) + * @param codeUnitIndex - A number specifying the index of the code unit in the original input string. If the value is omitted, it defaults to `0`. */ - interface Segments { - /** - * Returns an object describing the segment in the original string that includes the code unit at a specified index. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/segment/Segments/containing) - * - * @param codeUnitIndex - A number specifying the index of the code unit in the original input string. If the value is omitted, it defaults to `0`. - */ - containing(codeUnitIndex?: number): SegmentData | undefined; + containing(codeUnitIndex?: number): SegmentData | undefined; + + /** Returns an iterator to iterate over the segments. */ + [Symbol.iterator](): SegmentIterator; +} - /** Returns an iterator to iterate over the segments. */ - [Symbol.iterator](): SegmentIterator; - } +/** + * The `Intl.Segmenter` object enables locale-sensitive text segmentation, enabling you to get meaningful items (graphemes, words or sentences) from a string. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter) + */ + const Segmenter: { + prototype: Segmenter; - /** - * The `Intl.Segmenter` object enables locale-sensitive text segmentation, enabling you to get meaningful items (graphemes, words or sentences) from a string. + /** + * Creates a new `Intl.Segmenter` object. * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter) + * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. + * For the general form and interpretation of the `locales` argument, + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/Segmenter#parameters) + * with some or all options of `SegmenterOptions`. + * + * @returns [Intl.Segmenter](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segments) object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter). */ - const Segmenter: { - prototype: Segmenter; - - /** - * Creates a new `Intl.Segmenter` object. - * - * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. - * For the general form and interpretation of the `locales` argument, - * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). - * - * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/Segmenter#parameters) - * with some or all options of `SegmenterOptions`. - * - * @returns [Intl.Segmenter](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segments) object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter). - */ - new (locales?: LocalesArgument, options?: SegmenterOptions): Segmenter; + new (locales?: LocalesArgument, options?: SegmenterOptions): Segmenter; - /** - * Returns an array containing those of the provided locales that are supported without having to fall back to the runtime's default locale. - * - * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. - * For the general form and interpretation of the `locales` argument, - * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). - * - * @param options An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/supportedLocalesOf#parameters). - * with some or all possible options. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/supportedLocalesOf) - */ - supportedLocalesOf(locales: LocalesArgument, options?: Pick): UnicodeBCP47LocaleIdentifier[]; - }; + /** + * Returns an array containing those of the provided locales that are supported without having to fall back to the runtime's default locale. + * + * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. + * For the general form and interpretation of the `locales` argument, + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * + * @param options An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/supportedLocalesOf#parameters). + * with some or all possible options. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/supportedLocalesOf) + */ + supportedLocalesOf(locales: LocalesArgument, options?: Pick): UnicodeBCP47LocaleIdentifier[]; +}; } diff --git a/generated/current/allow/promise-try/index.d.ts b/generated/current/allow/promise-try/index.d.ts index 023d042..05ff568 100644 --- a/generated/current/allow/promise-try/index.d.ts +++ b/generated/current/allow/promise-try/index.d.ts @@ -22,18 +22,18 @@ and limitations under the License. // lib.es2025.promise.d.ts ///////////////////////////// interface PromiseConstructor { - /** - * Takes a callback of any kind (returns or throws, synchronously or asynchronously) and wraps its result - * in a Promise. - * - * @param callbackFn A function that is called synchronously. It can do anything: either return - * a value, throw an error, or return a promise. - * @param args Additional arguments, that will be passed to the callback. - * - * @returns A Promise that is: - * - Already fulfilled, if the callback synchronously returns a value. - * - Already rejected, if the callback synchronously throws an error. - * - Asynchronously fulfilled or rejected, if the callback returns a promise. - */ - try(callbackFn: (...args: U) => T | PromiseLike, ...args: U): Promise>; + /** + * Takes a callback of any kind (returns or throws, synchronously or asynchronously) and wraps its result + * in a Promise. + * + * @param callbackFn A function that is called synchronously. It can do anything: either return + * a value, throw an error, or return a promise. + * @param args Additional arguments, that will be passed to the callback. + * + * @returns A Promise that is: + * - Already fulfilled, if the callback synchronously returns a value. + * - Already rejected, if the callback synchronously throws an error. + * - Asynchronously fulfilled or rejected, if the callback returns a promise. + */ + try(callbackFn: (...args: U) => T | PromiseLike, ...args: U): Promise>; } diff --git a/generated/current/allow/regexp-escape/index.d.ts b/generated/current/allow/regexp-escape/index.d.ts index 9869659..ce24060 100644 --- a/generated/current/allow/regexp-escape/index.d.ts +++ b/generated/current/allow/regexp-escape/index.d.ts @@ -22,16 +22,16 @@ and limitations under the License. // lib.es2025.regexp.d.ts ///////////////////////////// interface RegExpConstructor { - /** - * Escapes any RegExp syntax characters in the input string, returning a - * new string that can be safely interpolated into a RegExp as a literal - * string to match. - * @example - * ```ts - * const regExp = new RegExp(RegExp.escape("foo.bar")); - * regExp.test("foo.bar"); // true - * regExp.test("foo!bar"); // false - * ``` - */ - escape(string: string): string; + /** + * Escapes any RegExp syntax characters in the input string, returning a + * new string that can be safely interpolated into a RegExp as a literal + * string to match. + * @example + * ```ts + * const regExp = new RegExp(RegExp.escape("foo.bar")); + * regExp.test("foo.bar"); // true + * regExp.test("foo!bar"); // false + * ``` + */ + escape(string: string): string; } diff --git a/generated/current/allow/resizable-buffers/index.d.ts b/generated/current/allow/resizable-buffers/index.d.ts index 243e681..3b4f695 100644 --- a/generated/current/allow/resizable-buffers/index.d.ts +++ b/generated/current/allow/resizable-buffers/index.d.ts @@ -22,58 +22,58 @@ and limitations under the License. // lib.es2024.arraybuffer.d.ts ///////////////////////////// interface ArrayBuffer { - /** - * If this ArrayBuffer is resizable, returns the maximum byte length given during construction; returns the byte length if not. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/maxByteLength) - */ - get maxByteLength(): number; + /** + * If this ArrayBuffer is resizable, returns the maximum byte length given during construction; returns the byte length if not. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/maxByteLength) + */ + get maxByteLength(): number; - /** - * Returns true if this ArrayBuffer can be resized. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/resizable) - */ - get resizable(): boolean; + /** + * Returns true if this ArrayBuffer can be resized. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/resizable) + */ + get resizable(): boolean; - /** - * Resizes the ArrayBuffer to the specified size (in bytes). - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/resize) - */ - resize(newByteLength?: number): void; + /** + * Resizes the ArrayBuffer to the specified size (in bytes). + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/resize) + */ + resize(newByteLength?: number): void; } interface ArrayBufferConstructor { - new (byteLength: number, options?: { maxByteLength?: number; }): ArrayBuffer; + new (byteLength: number, options?: { maxByteLength?: number; }): ArrayBuffer; } ///////////////////////////// // lib.es2024.sharedmemory.d.ts ///////////////////////////// interface SharedArrayBuffer { - /** - * Returns true if this SharedArrayBuffer can be grown. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/growable) - */ - get growable(): boolean; + /** + * Returns true if this SharedArrayBuffer can be grown. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/growable) + */ + get growable(): boolean; - /** - * If this SharedArrayBuffer is growable, returns the maximum byte length given during construction; returns the byte length if not. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/maxByteLength) - */ - get maxByteLength(): number; + /** + * If this SharedArrayBuffer is growable, returns the maximum byte length given during construction; returns the byte length if not. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/maxByteLength) + */ + get maxByteLength(): number; - /** - * Grows the SharedArrayBuffer to the specified size (in bytes). - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/grow) - */ - grow(newByteLength?: number): void; + /** + * Grows the SharedArrayBuffer to the specified size (in bytes). + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/grow) + */ + grow(newByteLength?: number): void; } interface SharedArrayBufferConstructor { - new (byteLength: number, options?: { maxByteLength?: number; }): SharedArrayBuffer; + new (byteLength: number, options?: { maxByteLength?: number; }): SharedArrayBuffer; } diff --git a/generated/current/allow/set-methods/index.d.ts b/generated/current/allow/set-methods/index.d.ts index b377beb..572378e 100644 --- a/generated/current/allow/set-methods/index.d.ts +++ b/generated/current/allow/set-methods/index.d.ts @@ -24,75 +24,75 @@ and limitations under the License. // lib.es2025.collection.d.ts ///////////////////////////// interface Set { - /** - * @returns a new Set containing all the elements in this Set and also all the elements in the argument. - */ - union(other: ReadonlySetLike): Set; - - /** - * @returns a new Set containing all the elements which are both in this Set and in the argument. - */ - intersection(other: ReadonlySetLike): Set; - - /** - * @returns a new Set containing all the elements in this Set which are not also in the argument. - */ - difference(other: ReadonlySetLike): Set; - - /** - * @returns a new Set containing all the elements which are in either this Set or in the argument, but not in both. - */ - symmetricDifference(other: ReadonlySetLike): Set; - - /** - * @returns a boolean indicating whether all the elements in this Set are also in the argument. - */ - isSubsetOf(other: ReadonlySetLike): boolean; - - /** - * @returns a boolean indicating whether all the elements in the argument are also in this Set. - */ - isSupersetOf(other: ReadonlySetLike): boolean; - - /** - * @returns a boolean indicating whether this Set has no elements in common with the argument. - */ - isDisjointFrom(other: ReadonlySetLike): boolean; + /** + * @returns a new Set containing all the elements in this Set and also all the elements in the argument. + */ + union(other: ReadonlySetLike): Set; + + /** + * @returns a new Set containing all the elements which are both in this Set and in the argument. + */ + intersection(other: ReadonlySetLike): Set; + + /** + * @returns a new Set containing all the elements in this Set which are not also in the argument. + */ + difference(other: ReadonlySetLike): Set; + + /** + * @returns a new Set containing all the elements which are in either this Set or in the argument, but not in both. + */ + symmetricDifference(other: ReadonlySetLike): Set; + + /** + * @returns a boolean indicating whether all the elements in this Set are also in the argument. + */ + isSubsetOf(other: ReadonlySetLike): boolean; + + /** + * @returns a boolean indicating whether all the elements in the argument are also in this Set. + */ + isSupersetOf(other: ReadonlySetLike): boolean; + + /** + * @returns a boolean indicating whether this Set has no elements in common with the argument. + */ + isDisjointFrom(other: ReadonlySetLike): boolean; } interface ReadonlySet { - /** - * @returns a new Set containing all the elements in this Set and also all the elements in the argument. - */ - union(other: ReadonlySetLike): Set; - - /** - * @returns a new Set containing all the elements which are both in this Set and in the argument. - */ - intersection(other: ReadonlySetLike): Set; - - /** - * @returns a new Set containing all the elements in this Set which are not also in the argument. - */ - difference(other: ReadonlySetLike): Set; - - /** - * @returns a new Set containing all the elements which are in either this Set or in the argument, but not in both. - */ - symmetricDifference(other: ReadonlySetLike): Set; - - /** - * @returns a boolean indicating whether all the elements in this Set are also in the argument. - */ - isSubsetOf(other: ReadonlySetLike): boolean; - - /** - * @returns a boolean indicating whether all the elements in the argument are also in this Set. - */ - isSupersetOf(other: ReadonlySetLike): boolean; - - /** - * @returns a boolean indicating whether this Set has no elements in common with the argument. - */ - isDisjointFrom(other: ReadonlySetLike): boolean; + /** + * @returns a new Set containing all the elements in this Set and also all the elements in the argument. + */ + union(other: ReadonlySetLike): Set; + + /** + * @returns a new Set containing all the elements which are both in this Set and in the argument. + */ + intersection(other: ReadonlySetLike): Set; + + /** + * @returns a new Set containing all the elements in this Set which are not also in the argument. + */ + difference(other: ReadonlySetLike): Set; + + /** + * @returns a new Set containing all the elements which are in either this Set or in the argument, but not in both. + */ + symmetricDifference(other: ReadonlySetLike): Set; + + /** + * @returns a boolean indicating whether all the elements in this Set are also in the argument. + */ + isSubsetOf(other: ReadonlySetLike): boolean; + + /** + * @returns a boolean indicating whether all the elements in the argument are also in this Set. + */ + isSupersetOf(other: ReadonlySetLike): boolean; + + /** + * @returns a boolean indicating whether this Set has no elements in common with the argument. + */ + isDisjointFrom(other: ReadonlySetLike): boolean; } diff --git a/generated/current/allow/uint8array-base64-hex/index.d.ts b/generated/current/allow/uint8array-base64-hex/index.d.ts index e6063b5..fb5aca9 100644 --- a/generated/current/allow/uint8array-base64-hex/index.d.ts +++ b/generated/current/allow/uint8array-base64-hex/index.d.ts @@ -22,76 +22,76 @@ and limitations under the License. // lib.esnext.typedarrays.d.ts ///////////////////////////// interface Uint8Array { - /** - * Converts the `Uint8Array` to a base64-encoded string. - * @param options If provided, sets the alphabet and padding behavior used. - * @returns A base64-encoded string. - */ - toBase64( - options?: { - alphabet?: "base64" | "base64url" | undefined; - omitPadding?: boolean | undefined; - }, - ): string; + /** + * Converts the `Uint8Array` to a base64-encoded string. + * @param options If provided, sets the alphabet and padding behavior used. + * @returns A base64-encoded string. + */ + toBase64( + options?: { + alphabet?: "base64" | "base64url" | undefined; + omitPadding?: boolean | undefined; + }, + ): string; - /** - * Sets the `Uint8Array` from a base64-encoded string. - * @param string The base64-encoded string. - * @param options If provided, specifies the alphabet and handling of the last chunk. - * @returns An object containing the number of bytes read and written. - * @throws {SyntaxError} If the input string contains characters outside the specified alphabet, or if the last - * chunk is inconsistent with the `lastChunkHandling` option. - */ - setFromBase64( - string: string, - options?: { - alphabet?: "base64" | "base64url" | undefined; - lastChunkHandling?: "loose" | "strict" | "stop-before-partial" | undefined; - }, - ): { - read: number; - written: number; - }; + /** + * Sets the `Uint8Array` from a base64-encoded string. + * @param string The base64-encoded string. + * @param options If provided, specifies the alphabet and handling of the last chunk. + * @returns An object containing the number of bytes read and written. + * @throws {SyntaxError} If the input string contains characters outside the specified alphabet, or if the last + * chunk is inconsistent with the `lastChunkHandling` option. + */ + setFromBase64( + string: string, + options?: { + alphabet?: "base64" | "base64url" | undefined; + lastChunkHandling?: "loose" | "strict" | "stop-before-partial" | undefined; + }, + ): { + read: number; + written: number; + }; - /** - * Converts the `Uint8Array` to a base16-encoded string. - * @returns A base16-encoded string. - */ - toHex(): string; + /** + * Converts the `Uint8Array` to a base16-encoded string. + * @returns A base16-encoded string. + */ + toHex(): string; - /** - * Sets the `Uint8Array` from a base16-encoded string. - * @param string The base16-encoded string. - * @returns An object containing the number of bytes read and written. - */ - setFromHex(string: string): { - read: number; - written: number; - }; + /** + * Sets the `Uint8Array` from a base16-encoded string. + * @param string The base16-encoded string. + * @returns An object containing the number of bytes read and written. + */ + setFromHex(string: string): { + read: number; + written: number; + }; } interface Uint8ArrayConstructor { - /** - * Creates a new `Uint8Array` from a base64-encoded string. - * @param string The base64-encoded string. - * @param options If provided, specifies the alphabet and handling of the last chunk. - * @returns A new `Uint8Array` instance. - * @throws {SyntaxError} If the input string contains characters outside the specified alphabet, or if the last - * chunk is inconsistent with the `lastChunkHandling` option. - */ - fromBase64( - string: string, - options?: { - alphabet?: "base64" | "base64url" | undefined; - lastChunkHandling?: "loose" | "strict" | "stop-before-partial" | undefined; - }, - ): Uint8Array; + /** + * Creates a new `Uint8Array` from a base64-encoded string. + * @param string The base64-encoded string. + * @param options If provided, specifies the alphabet and handling of the last chunk. + * @returns A new `Uint8Array` instance. + * @throws {SyntaxError} If the input string contains characters outside the specified alphabet, or if the last + * chunk is inconsistent with the `lastChunkHandling` option. + */ + fromBase64( + string: string, + options?: { + alphabet?: "base64" | "base64url" | undefined; + lastChunkHandling?: "loose" | "strict" | "stop-before-partial" | undefined; + }, + ): Uint8Array; - /** - * Creates a new `Uint8Array` from a base16-encoded string. - * @returns A new `Uint8Array` instance. - */ - fromHex( - string: string, - ): Uint8Array; + /** + * Creates a new `Uint8Array` from a base16-encoded string. + * @returns A new `Uint8Array` instance. + */ + fromHex( + string: string, + ): Uint8Array; } diff --git a/generated/current/baseline.d.ts b/generated/current/baseline.d.ts index acc7fe9..7ba6d68 100644 --- a/generated/current/baseline.d.ts +++ b/generated/current/baseline.d.ts @@ -22,175 +22,175 @@ and limitations under the License. // lib.es2015.collection.d.ts ///////////////////////////// interface Map { - /** - * Removes all elements from the Map. - */ - clear(): void; + /** + * Removes all elements from the Map. + */ + clear(): void; - /** - * @returns true if an element in the Map existed and has been removed, or false if the element does not exist. - */ - delete(key: K): boolean; + /** + * @returns true if an element in the Map existed and has been removed, or false if the element does not exist. + */ + delete(key: K): boolean; - /** - * Executes a provided function once per each key/value pair in the Map, in insertion order. - */ - forEach(callbackfn: (value: V, key: K, map: Map) => void, thisArg?: any): void; + /** + * Executes a provided function once per each key/value pair in the Map, in insertion order. + */ + forEach(callbackfn: (value: V, key: K, map: Map) => void, thisArg?: any): void; - /** - * Returns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map. - * @returns Returns the element associated with the specified key. If no element is associated with the specified key, undefined is returned. - */ - get(key: K): V | undefined; + /** + * Returns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map. + * @returns Returns the element associated with the specified key. If no element is associated with the specified key, undefined is returned. + */ + get(key: K): V | undefined; - /** - * @returns boolean indicating whether an element with the specified key exists or not. - */ - has(key: K): boolean; + /** + * @returns boolean indicating whether an element with the specified key exists or not. + */ + has(key: K): boolean; - /** - * Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated. - */ - set(key: K, value: V): this; + /** + * Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated. + */ + set(key: K, value: V): this; - /** - * @returns the number of elements in the Map. - */ - readonly size: number; + /** + * @returns the number of elements in the Map. + */ + readonly size: number; } interface MapConstructor { - new (): Map; + new (): Map; - new (entries?: readonly (readonly [K, V])[] | null): Map; + new (entries?: readonly (readonly [K, V])[] | null): Map; - readonly prototype: Map; + readonly prototype: Map; } declare var Map: MapConstructor; interface ReadonlyMap { - forEach(callbackfn: (value: V, key: K, map: ReadonlyMap) => void, thisArg?: any): void; + forEach(callbackfn: (value: V, key: K, map: ReadonlyMap) => void, thisArg?: any): void; - get(key: K): V | undefined; + get(key: K): V | undefined; - has(key: K): boolean; + has(key: K): boolean; - readonly size: number; + readonly size: number; } interface WeakMap { - /** - * Removes the specified element from the WeakMap. - * @returns true if the element was successfully removed, or false if it was not present. - */ - delete(key: K): boolean; + /** + * Removes the specified element from the WeakMap. + * @returns true if the element was successfully removed, or false if it was not present. + */ + delete(key: K): boolean; - /** - * @returns a specified element. - */ - get(key: K): V | undefined; + /** + * @returns a specified element. + */ + get(key: K): V | undefined; - /** - * @returns a boolean indicating whether an element with the specified key exists or not. - */ - has(key: K): boolean; + /** + * @returns a boolean indicating whether an element with the specified key exists or not. + */ + has(key: K): boolean; - /** - * Adds a new element with a specified key and value. - * @param key Must be an object or symbol. - */ - set(key: K, value: V): this; + /** + * Adds a new element with a specified key and value. + * @param key Must be an object or symbol. + */ + set(key: K, value: V): this; } interface WeakMapConstructor { - new (entries?: readonly (readonly [K, V])[] | null): WeakMap; + new (entries?: readonly (readonly [K, V])[] | null): WeakMap; - readonly prototype: WeakMap; + readonly prototype: WeakMap; } declare var WeakMap: WeakMapConstructor; interface Set { - /** - * Appends a new element with a specified value to the end of the Set. - */ - add(value: T): this; + /** + * Appends a new element with a specified value to the end of the Set. + */ + add(value: T): this; - /** - * Removes all elements from the Set. - */ - clear(): void; + /** + * Removes all elements from the Set. + */ + clear(): void; - /** - * Removes a specified value from the Set. - * @returns Returns true if an element in the Set existed and has been removed, or false if the element does not exist. - */ - delete(value: T): boolean; + /** + * Removes a specified value from the Set. + * @returns Returns true if an element in the Set existed and has been removed, or false if the element does not exist. + */ + delete(value: T): boolean; - /** - * Executes a provided function once per each value in the Set object, in insertion order. - */ - forEach(callbackfn: (value: T, value2: T, set: Set) => void, thisArg?: any): void; + /** + * Executes a provided function once per each value in the Set object, in insertion order. + */ + forEach(callbackfn: (value: T, value2: T, set: Set) => void, thisArg?: any): void; - /** - * @returns a boolean indicating whether an element with the specified value exists in the Set or not. - */ - has(value: T): boolean; + /** + * @returns a boolean indicating whether an element with the specified value exists in the Set or not. + */ + has(value: T): boolean; - /** - * @returns the number of (unique) elements in the Set. - */ - readonly size: number; + /** + * @returns the number of (unique) elements in the Set. + */ + readonly size: number; } interface SetConstructor { - new (values?: readonly T[] | null): Set; + new (values?: readonly T[] | null): Set; - readonly prototype: Set; + readonly prototype: Set; } declare var Set: SetConstructor; interface ReadonlySet { - /** - * Executes a provided function once per each value in the ReadonlySet object, in insertion order. - */ - forEach(callbackfn: (value: T, value2: T, set: ReadonlySet) => void, thisArg?: any): void; + /** + * Executes a provided function once per each value in the ReadonlySet object, in insertion order. + */ + forEach(callbackfn: (value: T, value2: T, set: ReadonlySet) => void, thisArg?: any): void; - /** - * @returns a boolean indicating whether an element with the specified value exists in the Set or not. - */ - has(value: T): boolean; + /** + * @returns a boolean indicating whether an element with the specified value exists in the Set or not. + */ + has(value: T): boolean; - /** - * @returns the number of (unique) elements in the Set. - */ - readonly size: number; + /** + * @returns the number of (unique) elements in the Set. + */ + readonly size: number; } interface WeakSet { - /** - * Appends a new value to the end of the WeakSet. - */ - add(value: T): this; + /** + * Appends a new value to the end of the WeakSet. + */ + add(value: T): this; - /** - * Removes the specified element from the WeakSet. - * @returns Returns true if the element existed and has been removed, or false if the element does not exist. - */ - delete(value: T): boolean; + /** + * Removes the specified element from the WeakSet. + * @returns Returns true if the element existed and has been removed, or false if the element does not exist. + */ + delete(value: T): boolean; - /** - * @returns a boolean indicating whether a value exists in the WeakSet or not. - */ - has(value: T): boolean; + /** + * @returns a boolean indicating whether a value exists in the WeakSet or not. + */ + has(value: T): boolean; } interface WeakSetConstructor { - new (values?: readonly T[] | null): WeakSet; + new (values?: readonly T[] | null): WeakSet; - readonly prototype: WeakSet; + readonly prototype: WeakSet; } declare var WeakSet: WeakSetConstructor; @@ -199,596 +199,596 @@ declare var WeakSet: WeakSetConstructor; // lib.es2015.core.d.ts ///////////////////////////// interface Array { - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: T, index: number, obj: T[]) => value is S, thisArg?: any): S | undefined; - - find(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): T | undefined; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: T, index: number, obj: T[]) => value is S, thisArg?: any): S | undefined; + + find(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): T | undefined; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: T, start?: number, end?: number): this; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: T, start?: number, end?: number): this; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } interface ArrayConstructor { - /** - * Creates an array from an array-like object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): T[]; + /** + * Creates an array from an array-like object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): T[]; - /** - * Creates an array from an iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; + /** + * Creates an array from an iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: T[]): T[]; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: T[]): T[]; } interface DateConstructor { - new (value: number | string | Date): Date; + new (value: number | string | Date): Date; } interface Function { - /** - * Returns the name of the function. Function names are read-only and can not be changed. - */ - readonly name: string; + /** + * Returns the name of the function. Function names are read-only and can not be changed. + */ + readonly name: string; } interface Math { - /** - * Returns the number of leading zero bits in the 32-bit binary representation of a number. - * @param x A numeric expression. - */ - clz32(x: number): number; + /** + * Returns the number of leading zero bits in the 32-bit binary representation of a number. + * @param x A numeric expression. + */ + clz32(x: number): number; - /** - * Returns the result of 32-bit multiplication of two numbers. - * @param x First number - * @param y Second number - */ - imul(x: number, y: number): number; + /** + * Returns the result of 32-bit multiplication of two numbers. + * @param x First number + * @param y Second number + */ + imul(x: number, y: number): number; - /** - * Returns the sign of x, indicating whether x is positive, negative, or zero. - * @param x The numeric expression to test - */ - sign(x: number): number; + /** + * Returns the sign of x, indicating whether x is positive, negative, or zero. + * @param x The numeric expression to test + */ + sign(x: number): number; - /** - * Returns the base 10 logarithm of a number. - * @param x A numeric expression. - */ - log10(x: number): number; + /** + * Returns the base 10 logarithm of a number. + * @param x A numeric expression. + */ + log10(x: number): number; - /** - * Returns the base 2 logarithm of a number. - * @param x A numeric expression. - */ - log2(x: number): number; + /** + * Returns the base 2 logarithm of a number. + * @param x A numeric expression. + */ + log2(x: number): number; - /** - * Returns the natural logarithm of 1 + x. - * @param x A numeric expression. - */ - log1p(x: number): number; + /** + * Returns the natural logarithm of 1 + x. + * @param x A numeric expression. + */ + log1p(x: number): number; - /** - * Returns the result of (e^x - 1), which is an implementation-dependent approximation to - * subtracting 1 from the exponential function of x (e raised to the power of x, where e - * is the base of the natural logarithms). - * @param x A numeric expression. - */ - expm1(x: number): number; + /** + * Returns the result of (e^x - 1), which is an implementation-dependent approximation to + * subtracting 1 from the exponential function of x (e raised to the power of x, where e + * is the base of the natural logarithms). + * @param x A numeric expression. + */ + expm1(x: number): number; - /** - * Returns the hyperbolic cosine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - cosh(x: number): number; + /** + * Returns the hyperbolic cosine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + cosh(x: number): number; - /** - * Returns the hyperbolic sine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - sinh(x: number): number; + /** + * Returns the hyperbolic sine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + sinh(x: number): number; - /** - * Returns the hyperbolic tangent of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - tanh(x: number): number; + /** + * Returns the hyperbolic tangent of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + tanh(x: number): number; - /** - * Returns the inverse hyperbolic cosine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - acosh(x: number): number; + /** + * Returns the inverse hyperbolic cosine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + acosh(x: number): number; - /** - * Returns the inverse hyperbolic sine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - asinh(x: number): number; + /** + * Returns the inverse hyperbolic sine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + asinh(x: number): number; - /** - * Returns the inverse hyperbolic tangent of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - atanh(x: number): number; + /** + * Returns the inverse hyperbolic tangent of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + atanh(x: number): number; - /** - * Returns the square root of the sum of squares of its arguments. - * @param values Values to compute the square root for. - * If no arguments are passed, the result is +0. - * If there is only one argument, the result is the absolute value. - * If any argument is +Infinity or -Infinity, the result is +Infinity. - * If any argument is NaN, the result is NaN. - * If all arguments are either +0 or −0, the result is +0. - */ - hypot(...values: number[]): number; + /** + * Returns the square root of the sum of squares of its arguments. + * @param values Values to compute the square root for. + * If no arguments are passed, the result is +0. + * If there is only one argument, the result is the absolute value. + * If any argument is +Infinity or -Infinity, the result is +Infinity. + * If any argument is NaN, the result is NaN. + * If all arguments are either +0 or −0, the result is +0. + */ + hypot(...values: number[]): number; - /** - * Returns the integral part of the numeric expression x, removing any fractional digits. - * If x is already an integer, the result is x. - * @param x A numeric expression. - */ - trunc(x: number): number; + /** + * Returns the integral part of the numeric expression x, removing any fractional digits. + * If x is already an integer, the result is x. + * @param x A numeric expression. + */ + trunc(x: number): number; - /** - * Returns the nearest single precision float representation of a number. - * @param x A numeric expression. - */ - fround(x: number): number; + /** + * Returns the nearest single precision float representation of a number. + * @param x A numeric expression. + */ + fround(x: number): number; - /** - * Returns an implementation-dependent approximation to the cube root of number. - * @param x A numeric expression. - */ - cbrt(x: number): number; + /** + * Returns an implementation-dependent approximation to the cube root of number. + * @param x A numeric expression. + */ + cbrt(x: number): number; } interface NumberConstructor { - /** - * The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1 - * that is representable as a Number value, which is approximately: - * 2.2204460492503130808472633361816 x 10‍−‍16. - */ - readonly EPSILON: number; + /** + * The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1 + * that is representable as a Number value, which is approximately: + * 2.2204460492503130808472633361816 x 10‍−‍16. + */ + readonly EPSILON: number; - /** - * Returns true if passed value is finite. - * Unlike the global isFinite, Number.isFinite doesn't forcibly convert the parameter to a - * number. Only finite values of the type number, result in true. - * @param number A numeric value. - */ - isFinite(number: unknown): boolean; + /** + * Returns true if passed value is finite. + * Unlike the global isFinite, Number.isFinite doesn't forcibly convert the parameter to a + * number. Only finite values of the type number, result in true. + * @param number A numeric value. + */ + isFinite(number: unknown): boolean; - /** - * Returns true if the value passed is an integer, false otherwise. - * @param number A numeric value. - */ - isInteger(number: unknown): boolean; + /** + * Returns true if the value passed is an integer, false otherwise. + * @param number A numeric value. + */ + isInteger(number: unknown): boolean; - /** - * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a - * number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter - * to a number. Only values of the type number, that are also NaN, result in true. - * @param number A numeric value. - */ - isNaN(number: unknown): boolean; + /** + * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a + * number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter + * to a number. Only values of the type number, that are also NaN, result in true. + * @param number A numeric value. + */ + isNaN(number: unknown): boolean; - /** - * Returns true if the value passed is a safe integer. - * @param number A numeric value. - */ - isSafeInteger(number: unknown): boolean; + /** + * Returns true if the value passed is a safe integer. + * @param number A numeric value. + */ + isSafeInteger(number: unknown): boolean; - /** - * The value of the largest integer n such that n and n + 1 are both exactly representable as - * a Number value. - * The value of Number.MAX_SAFE_INTEGER is 9007199254740991 2^53 − 1. - */ - readonly MAX_SAFE_INTEGER: number; + /** + * The value of the largest integer n such that n and n + 1 are both exactly representable as + * a Number value. + * The value of Number.MAX_SAFE_INTEGER is 9007199254740991 2^53 − 1. + */ + readonly MAX_SAFE_INTEGER: number; - /** - * The value of the smallest integer n such that n and n − 1 are both exactly representable as - * a Number value. - * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)). - */ - readonly MIN_SAFE_INTEGER: number; + /** + * The value of the smallest integer n such that n and n − 1 are both exactly representable as + * a Number value. + * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)). + */ + readonly MIN_SAFE_INTEGER: number; - /** - * Converts a string to a floating-point number. - * @param string A string that contains a floating-point number. - */ - parseFloat(string: string): number; + /** + * Converts a string to a floating-point number. + * @param string A string that contains a floating-point number. + */ + parseFloat(string: string): number; - /** - * Converts A string to an integer. - * @param string A string to convert into a number. - * @param radix A value between 2 and 36 that specifies the base of the number in `string`. - * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. - * All other strings are considered decimal. - */ - parseInt(string: string, radix?: number): number; + /** + * Converts A string to an integer. + * @param string A string to convert into a number. + * @param radix A value between 2 and 36 that specifies the base of the number in `string`. + * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. + * All other strings are considered decimal. + */ + parseInt(string: string, radix?: number): number; } interface ObjectConstructor { - /** - * Copy the values of all of the enumerable own properties from one or more source objects to a - * target object. Returns the target object. - * @param target The target object to copy to. - * @param source The source object from which to copy properties. - */ - assign(target: T, source: U): T & U; + /** + * Copy the values of all of the enumerable own properties from one or more source objects to a + * target object. Returns the target object. + * @param target The target object to copy to. + * @param source The source object from which to copy properties. + */ + assign(target: T, source: U): T & U; - /** - * Copy the values of all of the enumerable own properties from one or more source objects to a - * target object. Returns the target object. - * @param target The target object to copy to. - * @param source1 The first source object from which to copy properties. - * @param source2 The second source object from which to copy properties. - */ - assign(target: T, source1: U, source2: V): T & U & V; + /** + * Copy the values of all of the enumerable own properties from one or more source objects to a + * target object. Returns the target object. + * @param target The target object to copy to. + * @param source1 The first source object from which to copy properties. + * @param source2 The second source object from which to copy properties. + */ + assign(target: T, source1: U, source2: V): T & U & V; - /** - * Copy the values of all of the enumerable own properties from one or more source objects to a - * target object. Returns the target object. - * @param target The target object to copy to. - * @param source1 The first source object from which to copy properties. - * @param source2 The second source object from which to copy properties. - * @param source3 The third source object from which to copy properties. - */ - assign(target: T, source1: U, source2: V, source3: W): T & U & V & W; + /** + * Copy the values of all of the enumerable own properties from one or more source objects to a + * target object. Returns the target object. + * @param target The target object to copy to. + * @param source1 The first source object from which to copy properties. + * @param source2 The second source object from which to copy properties. + * @param source3 The third source object from which to copy properties. + */ + assign(target: T, source1: U, source2: V, source3: W): T & U & V & W; - /** - * Copy the values of all of the enumerable own properties from one or more source objects to a - * target object. Returns the target object. - * @param target The target object to copy to. - * @param sources One or more source objects from which to copy properties - */ - assign(target: object, ...sources: any[]): any; + /** + * Copy the values of all of the enumerable own properties from one or more source objects to a + * target object. Returns the target object. + * @param target The target object to copy to. + * @param sources One or more source objects from which to copy properties + */ + assign(target: object, ...sources: any[]): any; - /** - * Returns an array of all symbol properties found directly on object o. - * @param o Object to retrieve the symbols from. - */ - getOwnPropertySymbols(o: any): symbol[]; + /** + * Returns an array of all symbol properties found directly on object o. + * @param o Object to retrieve the symbols from. + */ + getOwnPropertySymbols(o: any): symbol[]; - /** - * Returns the names of the enumerable string properties and methods of an object. - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - keys(o: {}): string[]; + /** + * Returns the names of the enumerable string properties and methods of an object. + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + keys(o: {}): string[]; - /** - * Returns true if the values are the same value, false otherwise. - * @param value1 The first value. - * @param value2 The second value. - */ - is(value1: any, value2: any): boolean; + /** + * Returns true if the values are the same value, false otherwise. + * @param value1 The first value. + * @param value2 The second value. + */ + is(value1: any, value2: any): boolean; - /** - * Sets the prototype of a specified object o to object proto or null. Returns the object o. - * @param o The object to change its prototype. - * @param proto The value of the new prototype or null. - */ - setPrototypeOf(o: any, proto: object | null): any; + /** + * Sets the prototype of a specified object o to object proto or null. Returns the object o. + * @param o The object to change its prototype. + * @param proto The value of the new prototype or null. + */ + setPrototypeOf(o: any, proto: object | null): any; } interface ReadonlyArray { - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: T, index: number, obj: readonly T[]) => value is S, thisArg?: any): S | undefined; - - find(predicate: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): T | undefined; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: T, index: number, obj: readonly T[]) => value is S, thisArg?: any): S | undefined; + + find(predicate: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): T | undefined; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): number; - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } interface RegExp { - /** - * Returns a string indicating the flags of the regular expression in question. This field is read-only. - * The characters in this string are sequenced and concatenated in the following order: - * - * - "g" for global - * - "i" for ignoreCase - * - "m" for multiline - * - "u" for unicode - * - "y" for sticky - * - * If no flags are set, the value is the empty string. - */ - readonly flags: string; + /** + * Returns a string indicating the flags of the regular expression in question. This field is read-only. + * The characters in this string are sequenced and concatenated in the following order: + * + * - "g" for global + * - "i" for ignoreCase + * - "m" for multiline + * - "u" for unicode + * - "y" for sticky + * + * If no flags are set, the value is the empty string. + */ + readonly flags: string; - /** - * Returns a Boolean value indicating the state of the sticky flag (y) used with a regular - * expression. Default is false. Read-only. - */ - readonly sticky: boolean; + /** + * Returns a Boolean value indicating the state of the sticky flag (y) used with a regular + * expression. Default is false. Read-only. + */ + readonly sticky: boolean; - /** - * Returns a Boolean value indicating the state of the Unicode flag (u) used with a regular - * expression. Default is false. Read-only. - */ - readonly unicode: boolean; + /** + * Returns a Boolean value indicating the state of the Unicode flag (u) used with a regular + * expression. Default is false. Read-only. + */ + readonly unicode: boolean; } interface RegExpConstructor { - new (pattern: RegExp | string, flags?: string): RegExp; + new (pattern: RegExp | string, flags?: string): RegExp; - (pattern: RegExp | string, flags?: string): RegExp; + (pattern: RegExp | string, flags?: string): RegExp; } interface String { - /** - * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point - * value of the UTF-16 encoded code point starting at the string element at position pos in - * the String resulting from converting this object to a String. - * If there is no element at that position, the result is undefined. - * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos. - */ - codePointAt(pos: number): number | undefined; + /** + * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point + * value of the UTF-16 encoded code point starting at the string element at position pos in + * the String resulting from converting this object to a String. + * If there is no element at that position, the result is undefined. + * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos. + */ + codePointAt(pos: number): number | undefined; - /** - * Returns true if searchString appears as a substring of the result of converting this - * object to a String, at one or more positions that are - * greater than or equal to position; otherwise, returns false. - * @param searchString search string - * @param position If position is undefined, 0 is assumed, so as to search all of the String. - */ - includes(searchString: string, position?: number): boolean; + /** + * Returns true if searchString appears as a substring of the result of converting this + * object to a String, at one or more positions that are + * greater than or equal to position; otherwise, returns false. + * @param searchString search string + * @param position If position is undefined, 0 is assumed, so as to search all of the String. + */ + includes(searchString: string, position?: number): boolean; - /** - * Returns true if the sequence of elements of searchString converted to a String is the - * same as the corresponding elements of this object (converted to a String) starting at - * endPosition – length(this). Otherwise returns false. - */ - endsWith(searchString: string, endPosition?: number): boolean; + /** + * Returns true if the sequence of elements of searchString converted to a String is the + * same as the corresponding elements of this object (converted to a String) starting at + * endPosition – length(this). Otherwise returns false. + */ + endsWith(searchString: string, endPosition?: number): boolean; - /** - * Returns the String value result of normalizing the string into the normalization form - * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms. - * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default - * is "NFC" - */ - normalize(form: "NFC" | "NFD" | "NFKC" | "NFKD"): string; + /** + * Returns the String value result of normalizing the string into the normalization form + * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms. + * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default + * is "NFC" + */ + normalize(form: "NFC" | "NFD" | "NFKC" | "NFKD"): string; - /** - * Returns the String value result of normalizing the string into the normalization form - * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms. - * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default - * is "NFC" - */ - normalize(form?: string): string; + /** + * Returns the String value result of normalizing the string into the normalization form + * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms. + * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default + * is "NFC" + */ + normalize(form?: string): string; - /** - * Returns a String value that is made from count copies appended together. If count is 0, - * the empty string is returned. - * @param count number of copies to append - */ - repeat(count: number): string; + /** + * Returns a String value that is made from count copies appended together. If count is 0, + * the empty string is returned. + * @param count number of copies to append + */ + repeat(count: number): string; - /** - * Returns true if the sequence of elements of searchString converted to a String is the - * same as the corresponding elements of this object (converted to a String) starting at - * position. Otherwise returns false. - */ - startsWith(searchString: string, position?: number): boolean; + /** + * Returns true if the sequence of elements of searchString converted to a String is the + * same as the corresponding elements of this object (converted to a String) starting at + * position. Otherwise returns false. + */ + startsWith(searchString: string, position?: number): boolean; } interface StringConstructor { - /** - * Return the String value whose elements are, in order, the elements in the List elements. - * If length is 0, the empty string is returned. - */ - fromCodePoint(...codePoints: number[]): string; + /** + * Return the String value whose elements are, in order, the elements in the List elements. + * If length is 0, the empty string is returned. + */ + fromCodePoint(...codePoints: number[]): string; - /** - * String.raw is usually used as a tag function of a Tagged Template String. When called as - * such, the first argument will be a well formed template call site object and the rest - * parameter will contain the substitution values. It can also be called directly, for example, - * to interleave strings and values from your own tag function, and in this case the only thing - * it needs from the first argument is the raw property. - * @param template A well-formed template string call site representation. - * @param substitutions A set of substitution values. - */ - raw(template: { raw: readonly string[] | ArrayLike; }, ...substitutions: any[]): string; + /** + * String.raw is usually used as a tag function of a Tagged Template String. When called as + * such, the first argument will be a well formed template call site object and the rest + * parameter will contain the substitution values. It can also be called directly, for example, + * to interleave strings and values from your own tag function, and in this case the only thing + * it needs from the first argument is the raw property. + * @param template A well-formed template string call site representation. + * @param substitutions A set of substitution values. + */ + raw(template: { raw: readonly string[] | ArrayLike; }, ...substitutions: any[]): string; } interface Int8Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Uint8Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Uint8ClampedArray { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Int16Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Uint16Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Int32Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Uint32Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Float32Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Float64Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } ///////////////////////////// // lib.es2015.generator.d.ts ///////////////////////////// interface Generator extends IteratorObject { - // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. - next(...[value]: [] | [TNext]): IteratorResult; + // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. + next(...[value]: [] | [TNext]): IteratorResult; - return(value: TReturn): IteratorResult; + return(value: TReturn): IteratorResult; - throw(e: any): IteratorResult; + throw(e: any): IteratorResult; - [Symbol.iterator](): Generator; + [Symbol.iterator](): Generator; } interface GeneratorFunction { - /** - * Creates a new Generator object. - * @param args A list of arguments the function accepts. - */ - new (...args: any[]): Generator; + /** + * Creates a new Generator object. + * @param args A list of arguments the function accepts. + */ + new (...args: any[]): Generator; - /** - * Creates a new Generator object. - * @param args A list of arguments the function accepts. - */ - (...args: any[]): Generator; + /** + * Creates a new Generator object. + * @param args A list of arguments the function accepts. + */ + (...args: any[]): Generator; - /** - * The length of the arguments. - */ - readonly length: number; + /** + * The length of the arguments. + */ + readonly length: number; - /** - * Returns the name of the function. - */ - readonly name: string; + /** + * Returns the name of the function. + */ + readonly name: string; - /** - * A reference to the prototype. - */ - readonly prototype: Generator; + /** + * A reference to the prototype. + */ + readonly prototype: Generator; } ///////////////////////////// // lib.es2015.iterable.d.ts ///////////////////////////// interface SymbolConstructor { - /** - * A method that returns the default iterator for an object. Called by the semantics of the - * for-of statement. - */ - readonly iterator: unique symbol; + /** + * A method that returns the default iterator for an object. Called by the semantics of the + * for-of statement. + */ + readonly iterator: unique symbol; } interface IteratorYieldResult { - done?: false; + done?: false; - value: TYield; + value: TYield; } interface IteratorReturnResult { - done: true; + done: true; - value: TReturn; + value: TReturn; } type IteratorResult = IteratorYieldResult | IteratorReturnResult; interface Iterator { - // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. - next(...[value]: [] | [TNext]): IteratorResult; + // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. + next(...[value]: [] | [TNext]): IteratorResult; - return?(value?: TReturn): IteratorResult; + return?(value?: TReturn): IteratorResult; - throw?(e?: any): IteratorResult; + throw?(e?: any): IteratorResult; } interface Iterable { - [Symbol.iterator](): Iterator; + [Symbol.iterator](): Iterator; } /** * Describes a user-defined {@link Iterator} that is also iterable. */ interface IterableIterator extends Iterator { - [Symbol.iterator](): IterableIterator; + [Symbol.iterator](): IterableIterator; } /** * Describes an {@link Iterator} produced by the runtime that inherits from the intrinsic `Iterator.prototype`. */ interface IteratorObject extends Iterator { - [Symbol.iterator](): IteratorObject; + [Symbol.iterator](): IteratorObject; } /** @@ -798,589 +798,589 @@ interface IteratorObject extends Iterator type BuiltinIteratorReturn = intrinsic; interface ArrayIterator extends IteratorObject { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; } interface Array { - /** Iterator */ - [Symbol.iterator](): ArrayIterator; + /** Iterator */ + [Symbol.iterator](): ArrayIterator; - /** - * Returns an iterable of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, T]>; + /** + * Returns an iterable of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, T]>; - /** - * Returns an iterable of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an iterable of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an iterable of values in the array - */ - values(): ArrayIterator; + /** + * Returns an iterable of values in the array + */ + values(): ArrayIterator; } interface ArrayConstructor { - /** - * Creates an array from an iterable object. - * @param iterable An iterable object to convert to an array. - */ - from(iterable: Iterable | ArrayLike): T[]; + /** + * Creates an array from an iterable object. + * @param iterable An iterable object to convert to an array. + */ + from(iterable: Iterable | ArrayLike): T[]; - /** - * Creates an array from an iterable object. - * @param iterable An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; + /** + * Creates an array from an iterable object. + * @param iterable An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } interface ReadonlyArray { - /** Iterator of values in the array. */ - [Symbol.iterator](): ArrayIterator; + /** Iterator of values in the array. */ + [Symbol.iterator](): ArrayIterator; - /** - * Returns an iterable of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, T]>; + /** + * Returns an iterable of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, T]>; - /** - * Returns an iterable of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an iterable of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an iterable of values in the array - */ - values(): ArrayIterator; + /** + * Returns an iterable of values in the array + */ + values(): ArrayIterator; } interface IArguments { - /** Iterator */ - [Symbol.iterator](): ArrayIterator; + /** Iterator */ + [Symbol.iterator](): ArrayIterator; } interface MapIterator extends IteratorObject { - [Symbol.iterator](): MapIterator; + [Symbol.iterator](): MapIterator; } interface Map { - /** Returns an iterable of entries in the map. */ - [Symbol.iterator](): MapIterator<[K, V]>; + /** Returns an iterable of entries in the map. */ + [Symbol.iterator](): MapIterator<[K, V]>; - /** - * Returns an iterable of key, value pairs for every entry in the map. - */ - entries(): MapIterator<[K, V]>; + /** + * Returns an iterable of key, value pairs for every entry in the map. + */ + entries(): MapIterator<[K, V]>; - /** - * Returns an iterable of keys in the map - */ - keys(): MapIterator; + /** + * Returns an iterable of keys in the map + */ + keys(): MapIterator; - /** - * Returns an iterable of values in the map - */ - values(): MapIterator; + /** + * Returns an iterable of values in the map + */ + values(): MapIterator; } interface ReadonlyMap { - /** Returns an iterable of entries in the map. */ - [Symbol.iterator](): MapIterator<[K, V]>; + /** Returns an iterable of entries in the map. */ + [Symbol.iterator](): MapIterator<[K, V]>; - /** - * Returns an iterable of key, value pairs for every entry in the map. - */ - entries(): MapIterator<[K, V]>; + /** + * Returns an iterable of key, value pairs for every entry in the map. + */ + entries(): MapIterator<[K, V]>; - /** - * Returns an iterable of keys in the map - */ - keys(): MapIterator; + /** + * Returns an iterable of keys in the map + */ + keys(): MapIterator; - /** - * Returns an iterable of values in the map - */ - values(): MapIterator; + /** + * Returns an iterable of values in the map + */ + values(): MapIterator; } interface MapConstructor { - new (): Map; + new (): Map; - new (iterable?: Iterable | null): Map; + new (iterable?: Iterable | null): Map; } interface WeakMap { } interface WeakMapConstructor { - new (iterable?: Iterable | null): WeakMap; + new (iterable?: Iterable | null): WeakMap; } interface SetIterator extends IteratorObject { - [Symbol.iterator](): SetIterator; + [Symbol.iterator](): SetIterator; } interface Set { - /** Iterates over values in the set. */ - [Symbol.iterator](): SetIterator; + /** Iterates over values in the set. */ + [Symbol.iterator](): SetIterator; - /** - * Returns an iterable of [v,v] pairs for every value `v` in the set. - */ - entries(): SetIterator<[T, T]>; + /** + * Returns an iterable of [v,v] pairs for every value `v` in the set. + */ + entries(): SetIterator<[T, T]>; - /** - * Despite its name, returns an iterable of the values in the set. - */ - keys(): SetIterator; + /** + * Despite its name, returns an iterable of the values in the set. + */ + keys(): SetIterator; - /** - * Returns an iterable of values in the set. - */ - values(): SetIterator; + /** + * Returns an iterable of values in the set. + */ + values(): SetIterator; } interface ReadonlySet { - /** Iterates over values in the set. */ - [Symbol.iterator](): SetIterator; + /** Iterates over values in the set. */ + [Symbol.iterator](): SetIterator; - /** - * Returns an iterable of [v,v] pairs for every value `v` in the set. - */ - entries(): SetIterator<[T, T]>; + /** + * Returns an iterable of [v,v] pairs for every value `v` in the set. + */ + entries(): SetIterator<[T, T]>; - /** - * Despite its name, returns an iterable of the values in the set. - */ - keys(): SetIterator; + /** + * Despite its name, returns an iterable of the values in the set. + */ + keys(): SetIterator; - /** - * Returns an iterable of values in the set. - */ - values(): SetIterator; + /** + * Returns an iterable of values in the set. + */ + values(): SetIterator; } interface SetConstructor { - new (iterable?: Iterable | null): Set; + new (iterable?: Iterable | null): Set; } interface WeakSet { } interface WeakSetConstructor { - new (iterable: Iterable): WeakSet; + new (iterable: Iterable): WeakSet; } interface PromiseConstructor { - /** - * Creates a Promise that is resolved with an array of results when all of the provided Promises - * resolve, or rejected when any Promise is rejected. - * @param values An iterable of Promises. - * @returns A new Promise. - */ - all(values: Iterable>): Promise[]>; + /** + * Creates a Promise that is resolved with an array of results when all of the provided Promises + * resolve, or rejected when any Promise is rejected. + * @param values An iterable of Promises. + * @returns A new Promise. + */ + all(values: Iterable>): Promise[]>; - /** - * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved - * or rejected. - * @param values An iterable of Promises. - * @returns A new Promise. - */ - race(values: Iterable>): Promise>; + /** + * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved + * or rejected. + * @param values An iterable of Promises. + * @returns A new Promise. + */ + race(values: Iterable>): Promise>; } interface StringIterator extends IteratorObject { - [Symbol.iterator](): StringIterator; + [Symbol.iterator](): StringIterator; } interface String { - /** Iterator */ - [Symbol.iterator](): StringIterator; + /** Iterator */ + [Symbol.iterator](): StringIterator; } interface Int8Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Int8ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Int8Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Int8Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int8Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int8Array; } interface Uint8Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Uint8ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Uint8Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Uint8Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8Array; } interface Uint8ClampedArray { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Uint8ClampedArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Uint8ClampedArray; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Uint8ClampedArray; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } interface Int16Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Int16ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Int16Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Int16Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int16Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int16Array; } interface Uint16Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Uint16ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Uint16Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Uint16Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint16Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint16Array; } interface Int32Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Int32ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Int32Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Int32Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int32Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int32Array; } interface Uint32Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Uint32ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Uint32Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Uint32Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint32Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint32Array; } interface Float32Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Float32ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Float32Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Float32Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Float32Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Float32Array; } interface Float64Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Float64ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Float64Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Float64Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Float64Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Float64Array; } ///////////////////////////// // lib.es2015.promise.d.ts ///////////////////////////// interface PromiseConstructor { - /** - * A reference to the prototype. - */ - readonly prototype: Promise; + /** + * A reference to the prototype. + */ + readonly prototype: Promise; - /** - * Creates a new Promise. - * @param executor A callback used to initialize the promise. This callback is passed two arguments: - * a resolve callback used to resolve the promise with a value or the result of another promise, - * and a reject callback used to reject the promise with a provided reason or error. - */ - new (executor: (resolve: (value: T | PromiseLike) => void, reject: (reason?: any) => void) => void): Promise; + /** + * Creates a new Promise. + * @param executor A callback used to initialize the promise. This callback is passed two arguments: + * a resolve callback used to resolve the promise with a value or the result of another promise, + * and a reject callback used to reject the promise with a provided reason or error. + */ + new (executor: (resolve: (value: T | PromiseLike) => void, reject: (reason?: any) => void) => void): Promise; - /** - * Creates a Promise that is resolved with an array of results when all of the provided Promises - * resolve, or rejected when any Promise is rejected. - * @param values An array of Promises. - * @returns A new Promise. - */ - all(values: T): Promise<{ -readonly [P in keyof T]: Awaited; }>; + /** + * Creates a Promise that is resolved with an array of results when all of the provided Promises + * resolve, or rejected when any Promise is rejected. + * @param values An array of Promises. + * @returns A new Promise. + */ + all(values: T): Promise<{ -readonly [P in keyof T]: Awaited; }>; - // see: lib.es2015.iterable.d.ts - // all(values: Iterable>): Promise[]>; + // see: lib.es2015.iterable.d.ts + // all(values: Iterable>): Promise[]>; - /** - * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved - * or rejected. - * @param values An array of Promises. - * @returns A new Promise. - */ - race(values: T): Promise>; + /** + * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved + * or rejected. + * @param values An array of Promises. + * @returns A new Promise. + */ + race(values: T): Promise>; - // see: lib.es2015.iterable.d.ts - // race(values: Iterable>): Promise>; + // see: lib.es2015.iterable.d.ts + // race(values: Iterable>): Promise>; - /** - * Creates a new rejected promise for the provided reason. - * @param reason The reason the promise was rejected. - * @returns A new rejected Promise. - */ - reject(reason?: any): Promise; + /** + * Creates a new rejected promise for the provided reason. + * @param reason The reason the promise was rejected. + * @returns A new rejected Promise. + */ + reject(reason?: any): Promise; - /** - * Creates a new resolved promise. - * @returns A resolved promise. - */ - resolve(): Promise; + /** + * Creates a new resolved promise. + * @returns A resolved promise. + */ + resolve(): Promise; - /** - * Creates a new resolved promise for the provided value. - * @param value A promise. - * @returns A promise whose internal state matches the provided promise. - */ - resolve(value: T): Promise>; + /** + * Creates a new resolved promise for the provided value. + * @param value A promise. + * @returns A promise whose internal state matches the provided promise. + */ + resolve(value: T): Promise>; - /** - * Creates a new resolved promise for the provided value. - * @param value A promise. - * @returns A promise whose internal state matches the provided promise. - */ - resolve(value: T | PromiseLike): Promise>; + /** + * Creates a new resolved promise for the provided value. + * @param value A promise. + * @returns A promise whose internal state matches the provided promise. + */ + resolve(value: T | PromiseLike): Promise>; } declare var Promise: PromiseConstructor; @@ -1389,113 +1389,113 @@ declare var Promise: PromiseConstructor; // lib.es2015.proxy.d.ts ///////////////////////////// interface ProxyHandler { - /** - * A trap method for a function call. - * @param target The original callable object which is being proxied. - */ - apply?(target: T, thisArg: any, argArray: any[]): any; + /** + * A trap method for a function call. + * @param target The original callable object which is being proxied. + */ + apply?(target: T, thisArg: any, argArray: any[]): any; - /** - * A trap for the `new` operator. - * @param target The original object which is being proxied. - * @param newTarget The constructor that was originally called. - */ - construct?(target: T, argArray: any[], newTarget: Function): object; + /** + * A trap for the `new` operator. + * @param target The original object which is being proxied. + * @param newTarget The constructor that was originally called. + */ + construct?(target: T, argArray: any[], newTarget: Function): object; - /** - * A trap for `Object.defineProperty()`. - * @param target The original object which is being proxied. - * @returns A `Boolean` indicating whether or not the property has been defined. - */ - defineProperty?(target: T, property: string | symbol, attributes: PropertyDescriptor): boolean; + /** + * A trap for `Object.defineProperty()`. + * @param target The original object which is being proxied. + * @returns A `Boolean` indicating whether or not the property has been defined. + */ + defineProperty?(target: T, property: string | symbol, attributes: PropertyDescriptor): boolean; - /** - * A trap for the `delete` operator. - * @param target The original object which is being proxied. - * @param p The name or `Symbol` of the property to delete. - * @returns A `Boolean` indicating whether or not the property was deleted. - */ - deleteProperty?(target: T, p: string | symbol): boolean; + /** + * A trap for the `delete` operator. + * @param target The original object which is being proxied. + * @param p The name or `Symbol` of the property to delete. + * @returns A `Boolean` indicating whether or not the property was deleted. + */ + deleteProperty?(target: T, p: string | symbol): boolean; - /** - * A trap for getting a property value. - * @param target The original object which is being proxied. - * @param p The name or `Symbol` of the property to get. - * @param receiver The proxy or an object that inherits from the proxy. - */ - get?(target: T, p: string | symbol, receiver: any): any; + /** + * A trap for getting a property value. + * @param target The original object which is being proxied. + * @param p The name or `Symbol` of the property to get. + * @param receiver The proxy or an object that inherits from the proxy. + */ + get?(target: T, p: string | symbol, receiver: any): any; - /** - * A trap for `Object.getOwnPropertyDescriptor()`. - * @param target The original object which is being proxied. - * @param p The name of the property whose description should be retrieved. - */ - getOwnPropertyDescriptor?(target: T, p: string | symbol): PropertyDescriptor | undefined; + /** + * A trap for `Object.getOwnPropertyDescriptor()`. + * @param target The original object which is being proxied. + * @param p The name of the property whose description should be retrieved. + */ + getOwnPropertyDescriptor?(target: T, p: string | symbol): PropertyDescriptor | undefined; - /** - * A trap for the `[[GetPrototypeOf]]` internal method. - * @param target The original object which is being proxied. - */ - getPrototypeOf?(target: T): object | null; + /** + * A trap for the `[[GetPrototypeOf]]` internal method. + * @param target The original object which is being proxied. + */ + getPrototypeOf?(target: T): object | null; - /** - * A trap for the `in` operator. - * @param target The original object which is being proxied. - * @param p The name or `Symbol` of the property to check for existence. - */ - has?(target: T, p: string | symbol): boolean; + /** + * A trap for the `in` operator. + * @param target The original object which is being proxied. + * @param p The name or `Symbol` of the property to check for existence. + */ + has?(target: T, p: string | symbol): boolean; - /** - * A trap for `Object.isExtensible()`. - * @param target The original object which is being proxied. - */ - isExtensible?(target: T): boolean; + /** + * A trap for `Object.isExtensible()`. + * @param target The original object which is being proxied. + */ + isExtensible?(target: T): boolean; - /** - * A trap for `Reflect.ownKeys()`. - * @param target The original object which is being proxied. - */ - ownKeys?(target: T): ArrayLike; + /** + * A trap for `Reflect.ownKeys()`. + * @param target The original object which is being proxied. + */ + ownKeys?(target: T): ArrayLike; - /** - * A trap for `Object.preventExtensions()`. - * @param target The original object which is being proxied. - */ - preventExtensions?(target: T): boolean; + /** + * A trap for `Object.preventExtensions()`. + * @param target The original object which is being proxied. + */ + preventExtensions?(target: T): boolean; - /** - * A trap for setting a property value. - * @param target The original object which is being proxied. - * @param p The name or `Symbol` of the property to set. - * @param receiver The object to which the assignment was originally directed. - * @returns A `Boolean` indicating whether or not the property was set. - */ - set?(target: T, p: string | symbol, newValue: any, receiver: any): boolean; + /** + * A trap for setting a property value. + * @param target The original object which is being proxied. + * @param p The name or `Symbol` of the property to set. + * @param receiver The object to which the assignment was originally directed. + * @returns A `Boolean` indicating whether or not the property was set. + */ + set?(target: T, p: string | symbol, newValue: any, receiver: any): boolean; - /** - * A trap for `Object.setPrototypeOf()`. - * @param target The original object which is being proxied. - * @param newPrototype The object's new prototype or `null`. - */ - setPrototypeOf?(target: T, v: object | null): boolean; + /** + * A trap for `Object.setPrototypeOf()`. + * @param target The original object which is being proxied. + * @param newPrototype The object's new prototype or `null`. + */ + setPrototypeOf?(target: T, v: object | null): boolean; } interface ProxyConstructor { - /** - * Creates a revocable Proxy object. - * @param target A target object to wrap with Proxy. - * @param handler An object whose properties define the behavior of Proxy when an operation is attempted on it. - */ - revocable(target: T, handler: ProxyHandler): { proxy: T; revoke: () => void; }; + /** + * Creates a revocable Proxy object. + * @param target A target object to wrap with Proxy. + * @param handler An object whose properties define the behavior of Proxy when an operation is attempted on it. + */ + revocable(target: T, handler: ProxyHandler): { proxy: T; revoke: () => void; }; - /** - * Creates a Proxy object. The Proxy object allows you to create an object that can be used in place of the - * original object, but which may redefine fundamental Object operations like getting, setting, and defining - * properties. Proxy objects are commonly used to log property accesses, validate, format, or sanitize inputs. - * @param target A target object to wrap with Proxy. - * @param handler An object whose properties define the behavior of Proxy when an operation is attempted on it. - */ - new (target: T, handler: ProxyHandler): T; + /** + * Creates a Proxy object. The Proxy object allows you to create an object that can be used in place of the + * original object, but which may redefine fundamental Object operations like getting, setting, and defining + * properties. Proxy objects are commonly used to log property accesses, validate, format, or sanitize inputs. + * @param target A target object to wrap with Proxy. + * @param handler An object whose properties define the behavior of Proxy when an operation is attempted on it. + */ + new (target: T, handler: ProxyHandler): T; } declare var Proxy: ProxyConstructor; @@ -1504,163 +1504,163 @@ declare var Proxy: ProxyConstructor; // lib.es2015.reflect.d.ts ///////////////////////////// declare namespace Reflect { - /** - * Calls the function with the specified object as the this value - * and the elements of specified array as the arguments. - * @param target The function to call. - * @param thisArgument The object to be used as the this object. - * @param argumentsList An array of argument values to be passed to the function. - */ - function apply( - target: (this: T, ...args: A) => R, - thisArgument: T, - argumentsList: Readonly, - ): R; - - function apply(target: Function, thisArgument: any, argumentsList: ArrayLike): any; - - /** - * Constructs the target with the elements of specified array as the arguments - * and the specified constructor as the `new.target` value. - * @param target The constructor to invoke. - * @param argumentsList An array of argument values to be passed to the constructor. - * @param newTarget The constructor to be used as the `new.target` object. - */ - function construct( - target: new (...args: A) => R, - argumentsList: Readonly, - newTarget?: new (...args: any) => any, - ): R; - - function construct(target: Function, argumentsList: ArrayLike, newTarget?: Function): any; +/** + * Calls the function with the specified object as the this value + * and the elements of specified array as the arguments. + * @param target The function to call. + * @param thisArgument The object to be used as the this object. + * @param argumentsList An array of argument values to be passed to the function. + */ + function apply( + target: (this: T, ...args: A) => R, + thisArgument: T, + argumentsList: Readonly, + ): R; + +function apply(target: Function, thisArgument: any, argumentsList: ArrayLike): any; - /** - * Adds a property to an object, or modifies attributes of an existing property. - * @param target Object on which to add or modify the property. This can be a native JavaScript object - * (that is, a user-defined object or a built in object) or a DOM object. - * @param propertyKey The property name. - * @param attributes Descriptor for the property. It can be for a data property or an accessor property. - */ - function defineProperty(target: object, propertyKey: PropertyKey, attributes: PropertyDescriptor & ThisType): boolean; +/** + * Constructs the target with the elements of specified array as the arguments + * and the specified constructor as the `new.target` value. + * @param target The constructor to invoke. + * @param argumentsList An array of argument values to be passed to the constructor. + * @param newTarget The constructor to be used as the `new.target` object. + */ + function construct( + target: new (...args: A) => R, + argumentsList: Readonly, + newTarget?: new (...args: any) => any, + ): R; + +function construct(target: Function, argumentsList: ArrayLike, newTarget?: Function): any; - /** - * Removes a property from an object, equivalent to `delete target[propertyKey]`, - * except it won't throw if `target[propertyKey]` is non-configurable. - * @param target Object from which to remove the own property. - * @param propertyKey The property name. - */ - function deleteProperty(target: object, propertyKey: PropertyKey): boolean; +/** + * Adds a property to an object, or modifies attributes of an existing property. + * @param target Object on which to add or modify the property. This can be a native JavaScript object + * (that is, a user-defined object or a built in object) or a DOM object. + * @param propertyKey The property name. + * @param attributes Descriptor for the property. It can be for a data property or an accessor property. + */ + function defineProperty(target: object, propertyKey: PropertyKey, attributes: PropertyDescriptor & ThisType): boolean; - /** - * Gets the property of target, equivalent to `target[propertyKey]` when `receiver === target`. - * @param target Object that contains the property on itself or in its prototype chain. - * @param propertyKey The property name. - * @param receiver The reference to use as the `this` value in the getter function, - * if `target[propertyKey]` is an accessor property. - */ - function get( - target: T, - propertyKey: P, - receiver?: unknown, - ): P extends keyof T ? T[P] : any; +/** + * Removes a property from an object, equivalent to `delete target[propertyKey]`, + * except it won't throw if `target[propertyKey]` is non-configurable. + * @param target Object from which to remove the own property. + * @param propertyKey The property name. + */ + function deleteProperty(target: object, propertyKey: PropertyKey): boolean; - /** - * Gets the own property descriptor of the specified object. - * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype. - * @param target Object that contains the property. - * @param propertyKey The property name. - */ - function getOwnPropertyDescriptor( - target: T, - propertyKey: P, - ): TypedPropertyDescriptor

| undefined; +/** + * Gets the property of target, equivalent to `target[propertyKey]` when `receiver === target`. + * @param target Object that contains the property on itself or in its prototype chain. + * @param propertyKey The property name. + * @param receiver The reference to use as the `this` value in the getter function, + * if `target[propertyKey]` is an accessor property. + */ + function get( + target: T, + propertyKey: P, + receiver?: unknown, + ): P extends keyof T ? T[P] : any; - /** - * Returns the prototype of an object. - * @param target The object that references the prototype. - */ - function getPrototypeOf(target: object): object | null; +/** + * Gets the own property descriptor of the specified object. + * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype. + * @param target Object that contains the property. + * @param propertyKey The property name. + */ + function getOwnPropertyDescriptor( + target: T, + propertyKey: P, + ): TypedPropertyDescriptor

| undefined; - /** - * Equivalent to `propertyKey in target`. - * @param target Object that contains the property on itself or in its prototype chain. - * @param propertyKey Name of the property. - */ - function has(target: object, propertyKey: PropertyKey): boolean; +/** + * Returns the prototype of an object. + * @param target The object that references the prototype. + */ + function getPrototypeOf(target: object): object | null; - /** - * Returns a value that indicates whether new properties can be added to an object. - * @param target Object to test. - */ - function isExtensible(target: object): boolean; +/** + * Equivalent to `propertyKey in target`. + * @param target Object that contains the property on itself or in its prototype chain. + * @param propertyKey Name of the property. + */ + function has(target: object, propertyKey: PropertyKey): boolean; - /** - * Returns the string and symbol keys of the own properties of an object. The own properties of an object - * are those that are defined directly on that object, and are not inherited from the object's prototype. - * @param target Object that contains the own properties. - */ - function ownKeys(target: object): (string | symbol)[]; +/** + * Returns a value that indicates whether new properties can be added to an object. + * @param target Object to test. + */ + function isExtensible(target: object): boolean; - /** - * Prevents the addition of new properties to an object. - * @param target Object to make non-extensible. - * @return Whether the object has been made non-extensible. - */ - function preventExtensions(target: object): boolean; +/** + * Returns the string and symbol keys of the own properties of an object. The own properties of an object + * are those that are defined directly on that object, and are not inherited from the object's prototype. + * @param target Object that contains the own properties. + */ + function ownKeys(target: object): (string | symbol)[]; - /** - * Sets the property of target, equivalent to `target[propertyKey] = value` when `receiver === target`. - * @param target Object that contains the property on itself or in its prototype chain. - * @param propertyKey Name of the property. - * @param receiver The reference to use as the `this` value in the setter function, - * if `target[propertyKey]` is an accessor property. - */ - function set( - target: T, - propertyKey: P, - value: P extends keyof T ? T[P] : any, - receiver?: any, - ): boolean; +/** + * Prevents the addition of new properties to an object. + * @param target Object to make non-extensible. + * @return Whether the object has been made non-extensible. + */ + function preventExtensions(target: object): boolean; - function set(target: object, propertyKey: PropertyKey, value: any, receiver?: any): boolean; +/** + * Sets the property of target, equivalent to `target[propertyKey] = value` when `receiver === target`. + * @param target Object that contains the property on itself or in its prototype chain. + * @param propertyKey Name of the property. + * @param receiver The reference to use as the `this` value in the setter function, + * if `target[propertyKey]` is an accessor property. + */ + function set( + target: T, + propertyKey: P, + value: P extends keyof T ? T[P] : any, + receiver?: any, + ): boolean; + +function set(target: object, propertyKey: PropertyKey, value: any, receiver?: any): boolean; - /** - * Sets the prototype of a specified object o to object proto or null. - * @param target The object to change its prototype. - * @param proto The value of the new prototype or null. - * @return Whether setting the prototype was successful. - */ - function setPrototypeOf(target: object, proto: object | null): boolean; +/** + * Sets the prototype of a specified object o to object proto or null. + * @param target The object to change its prototype. + * @param proto The value of the new prototype or null. + * @return Whether setting the prototype was successful. + */ + function setPrototypeOf(target: object, proto: object | null): boolean; } ///////////////////////////// // lib.es2015.symbol.d.ts ///////////////////////////// interface SymbolConstructor { - /** - * A reference to the prototype. - */ - readonly prototype: Symbol; + /** + * A reference to the prototype. + */ + readonly prototype: Symbol; - /** - * Returns a new unique Symbol value. - * @param description Description of the new Symbol object. - */ - (description?: string | number): symbol; + /** + * Returns a new unique Symbol value. + * @param description Description of the new Symbol object. + */ + (description?: string | number): symbol; - /** - * Returns a Symbol object from the global symbol registry matching the given key if found. - * Otherwise, returns a new symbol with this key. - * @param key key to search for. - */ - for(key: string): symbol; + /** + * Returns a Symbol object from the global symbol registry matching the given key if found. + * Otherwise, returns a new symbol with this key. + * @param key key to search for. + */ + for(key: string): symbol; - /** - * Returns a key from the global symbol registry matching the given Symbol if found. - * Otherwise, returns undefined. - * @param sym Symbol to find the key for. - */ - keyFor(sym: symbol): string | undefined; + /** + * Returns a key from the global symbol registry matching the given Symbol if found. + * Otherwise, returns undefined. + * @param sym Symbol to find the key for. + */ + keyFor(sym: symbol): string | undefined; } declare var Symbol: SymbolConstructor; @@ -1669,590 +1669,590 @@ declare var Symbol: SymbolConstructor; // lib.es2015.symbol.wellknown.d.ts ///////////////////////////// interface SymbolConstructor { - /** - * A method that determines if a constructor object recognizes an object as one of the - * constructor’s instances. Called by the semantics of the instanceof operator. - */ - readonly hasInstance: unique symbol; + /** + * A method that determines if a constructor object recognizes an object as one of the + * constructor’s instances. Called by the semantics of the instanceof operator. + */ + readonly hasInstance: unique symbol; - /** - * A Boolean value that if true indicates that an object should flatten to its array elements - * by Array.prototype.concat. - */ - readonly isConcatSpreadable: unique symbol; + /** + * A Boolean value that if true indicates that an object should flatten to its array elements + * by Array.prototype.concat. + */ + readonly isConcatSpreadable: unique symbol; - /** - * A regular expression method that matches the regular expression against a string. Called - * by the String.prototype.match method. - */ - readonly match: unique symbol; + /** + * A regular expression method that matches the regular expression against a string. Called + * by the String.prototype.match method. + */ + readonly match: unique symbol; - /** - * A regular expression method that replaces matched substrings of a string. Called by the - * String.prototype.replace method. - */ - readonly replace: unique symbol; + /** + * A regular expression method that replaces matched substrings of a string. Called by the + * String.prototype.replace method. + */ + readonly replace: unique symbol; - /** - * A regular expression method that returns the index within a string that matches the - * regular expression. Called by the String.prototype.search method. - */ - readonly search: unique symbol; + /** + * A regular expression method that returns the index within a string that matches the + * regular expression. Called by the String.prototype.search method. + */ + readonly search: unique symbol; - /** - * A function valued property that is the constructor function that is used to create - * derived objects. - */ - readonly species: unique symbol; + /** + * A function valued property that is the constructor function that is used to create + * derived objects. + */ + readonly species: unique symbol; - /** - * A regular expression method that splits a string at the indices that match the regular - * expression. Called by the String.prototype.split method. - */ - readonly split: unique symbol; + /** + * A regular expression method that splits a string at the indices that match the regular + * expression. Called by the String.prototype.split method. + */ + readonly split: unique symbol; - /** - * A method that converts an object to a corresponding primitive value. - * Called by the ToPrimitive abstract operation. - */ - readonly toPrimitive: unique symbol; + /** + * A method that converts an object to a corresponding primitive value. + * Called by the ToPrimitive abstract operation. + */ + readonly toPrimitive: unique symbol; - /** - * A String value that is used in the creation of the default string description of an object. - * Called by the built-in method Object.prototype.toString. - */ - readonly toStringTag: unique symbol; + /** + * A String value that is used in the creation of the default string description of an object. + * Called by the built-in method Object.prototype.toString. + */ + readonly toStringTag: unique symbol; - /** - * An Object whose truthy properties are properties that are excluded from the 'with' - * environment bindings of the associated objects. - */ - readonly unscopables: unique symbol; + /** + * An Object whose truthy properties are properties that are excluded from the 'with' + * environment bindings of the associated objects. + */ + readonly unscopables: unique symbol; } interface Symbol { - /** - * Converts a Symbol object to a symbol. - */ - [Symbol.toPrimitive](hint: string): symbol; + /** + * Converts a Symbol object to a symbol. + */ + [Symbol.toPrimitive](hint: string): symbol; } interface Array { - /** - * Is an object whose properties have the value 'true' - * when they will be absent when used in a 'with' statement. - */ - readonly [Symbol.unscopables]: { - [K in keyof any[]]?: boolean; - }; + /** + * Is an object whose properties have the value 'true' + * when they will be absent when used in a 'with' statement. + */ + readonly [Symbol.unscopables]: { + [K in keyof any[]]?: boolean; + }; } interface ReadonlyArray { - /** - * Is an object whose properties have the value 'true' - * when they will be absent when used in a 'with' statement. - */ - readonly [Symbol.unscopables]: { - [K in keyof readonly any[]]?: boolean; - }; + /** + * Is an object whose properties have the value 'true' + * when they will be absent when used in a 'with' statement. + */ + readonly [Symbol.unscopables]: { + [K in keyof readonly any[]]?: boolean; + }; } interface Date { - /** - * Converts a Date object to a string. - */ - [Symbol.toPrimitive](hint: "default"): string; + /** + * Converts a Date object to a string. + */ + [Symbol.toPrimitive](hint: "default"): string; - /** - * Converts a Date object to a string. - */ - [Symbol.toPrimitive](hint: "string"): string; + /** + * Converts a Date object to a string. + */ + [Symbol.toPrimitive](hint: "string"): string; - /** - * Converts a Date object to a number. - */ - [Symbol.toPrimitive](hint: "number"): number; + /** + * Converts a Date object to a number. + */ + [Symbol.toPrimitive](hint: "number"): number; - /** - * Converts a Date object to a string or number. - * - * @param hint The strings "number", "string", or "default" to specify what primitive to return. - * - * @throws {TypeError} If 'hint' was given something other than "number", "string", or "default". - * @returns A number if 'hint' was "number", a string if 'hint' was "string" or "default". - */ - [Symbol.toPrimitive](hint: string): string | number; + /** + * Converts a Date object to a string or number. + * + * @param hint The strings "number", "string", or "default" to specify what primitive to return. + * + * @throws {TypeError} If 'hint' was given something other than "number", "string", or "default". + * @returns A number if 'hint' was "number", a string if 'hint' was "string" or "default". + */ + [Symbol.toPrimitive](hint: string): string | number; } interface Map { - readonly [Symbol.toStringTag]: string; + readonly [Symbol.toStringTag]: string; } interface WeakMap { - readonly [Symbol.toStringTag]: string; + readonly [Symbol.toStringTag]: string; } interface Set { - readonly [Symbol.toStringTag]: string; + readonly [Symbol.toStringTag]: string; } interface WeakSet { - readonly [Symbol.toStringTag]: string; + readonly [Symbol.toStringTag]: string; } interface Function { - /** - * Determines whether the given value inherits from this function if this function was used - * as a constructor function. - * - * A constructor function can control which objects are recognized as its instances by - * 'instanceof' by overriding this method. - */ - [Symbol.hasInstance](value: any): boolean; + /** + * Determines whether the given value inherits from this function if this function was used + * as a constructor function. + * + * A constructor function can control which objects are recognized as its instances by + * 'instanceof' by overriding this method. + */ + [Symbol.hasInstance](value: any): boolean; } interface GeneratorFunction { - readonly [Symbol.toStringTag]: string; + readonly [Symbol.toStringTag]: string; } interface PromiseConstructor { - readonly [Symbol.species]: PromiseConstructor; + readonly [Symbol.species]: PromiseConstructor; } interface RegExp { - /** - * Matches a string with this regular expression, and returns an array containing the results of - * that search. - * @param string A string to search within. - */ - [Symbol.match](string: string): RegExpMatchArray | null; + /** + * Matches a string with this regular expression, and returns an array containing the results of + * that search. + * @param string A string to search within. + */ + [Symbol.match](string: string): RegExpMatchArray | null; - /** - * Replaces text in a string, using this regular expression. - * @param string A String object or string literal whose contents matching against - * this regular expression will be replaced - * @param replaceValue A String object or string literal containing the text to replace for every - * successful match of this regular expression. - */ - [Symbol.replace](string: string, replaceValue: string): string; + /** + * Replaces text in a string, using this regular expression. + * @param string A String object or string literal whose contents matching against + * this regular expression will be replaced + * @param replaceValue A String object or string literal containing the text to replace for every + * successful match of this regular expression. + */ + [Symbol.replace](string: string, replaceValue: string): string; - /** - * Replaces text in a string, using this regular expression. - * @param string A String object or string literal whose contents matching against - * this regular expression will be replaced - * @param replacer A function that returns the replacement text. - */ - [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; + /** + * Replaces text in a string, using this regular expression. + * @param string A String object or string literal whose contents matching against + * this regular expression will be replaced + * @param replacer A function that returns the replacement text. + */ + [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; - /** - * Finds the position beginning first substring match in a regular expression search - * using this regular expression. - * - * @param string The string to search within. - */ - [Symbol.search](string: string): number; + /** + * Finds the position beginning first substring match in a regular expression search + * using this regular expression. + * + * @param string The string to search within. + */ + [Symbol.search](string: string): number; - /** - * Returns an array of substrings that were delimited by strings in the original input that - * match against this regular expression. - * - * If the regular expression contains capturing parentheses, then each time this - * regular expression matches, the results (including any undefined results) of the - * capturing parentheses are spliced. - * - * @param string string value to split - * @param limit if not undefined, the output array is truncated so that it contains no more - * than 'limit' elements. - */ - [Symbol.split](string: string, limit?: number): string[]; + /** + * Returns an array of substrings that were delimited by strings in the original input that + * match against this regular expression. + * + * If the regular expression contains capturing parentheses, then each time this + * regular expression matches, the results (including any undefined results) of the + * capturing parentheses are spliced. + * + * @param string string value to split + * @param limit if not undefined, the output array is truncated so that it contains no more + * than 'limit' elements. + */ + [Symbol.split](string: string, limit?: number): string[]; } interface RegExpConstructor { - readonly [Symbol.species]: RegExpConstructor; + readonly [Symbol.species]: RegExpConstructor; } interface String { - /** - * Matches a string or an object that supports being matched against, and returns an array - * containing the results of that search, or null if no matches are found. - * @param matcher An object that supports being matched against. - */ - match(matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null; + /** + * Matches a string or an object that supports being matched against, and returns an array + * containing the results of that search, or null if no matches are found. + * @param matcher An object that supports being matched against. + */ + match(matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null; - /** - * Passes a string and {@linkcode replaceValue} to the `[Symbol.replace]` method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. - * @param searchValue An object that supports searching for and replacing matches within a string. - * @param replaceValue The replacement text. - */ - replace(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string; + /** + * Passes a string and {@linkcode replaceValue} to the `[Symbol.replace]` method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. + * @param searchValue An object that supports searching for and replacing matches within a string. + * @param replaceValue The replacement text. + */ + replace(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string; - /** - * Replaces text in a string, using an object that supports replacement within a string. - * @param searchValue A object can search for and replace matches within a string. - * @param replacer A function that returns the replacement text. - */ - replace(searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string; + /** + * Replaces text in a string, using an object that supports replacement within a string. + * @param searchValue A object can search for and replace matches within a string. + * @param replacer A function that returns the replacement text. + */ + replace(searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string; - /** - * Finds the first substring match in a regular expression search. - * @param searcher An object which supports searching within a string. - */ - search(searcher: { [Symbol.search](string: string): number; }): number; + /** + * Finds the first substring match in a regular expression search. + * @param searcher An object which supports searching within a string. + */ + search(searcher: { [Symbol.search](string: string): number; }): number; - /** - * Split a string into substrings using the specified separator and return them as an array. - * @param splitter An object that can split a string. - * @param limit A value used to limit the number of elements returned in the array. - */ - split(splitter: { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number): string[]; + /** + * Split a string into substrings using the specified separator and return them as an array. + * @param splitter An object that can split a string. + * @param limit A value used to limit the number of elements returned in the array. + */ + split(splitter: { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number): string[]; } interface ArrayConstructor { - readonly [Symbol.species]: ArrayConstructor; + readonly [Symbol.species]: ArrayConstructor; } interface MapConstructor { - readonly [Symbol.species]: MapConstructor; + readonly [Symbol.species]: MapConstructor; } interface SetConstructor { - readonly [Symbol.species]: SetConstructor; + readonly [Symbol.species]: SetConstructor; } interface ArrayBufferConstructor { - readonly [Symbol.species]: ArrayBufferConstructor; + readonly [Symbol.species]: ArrayBufferConstructor; } ///////////////////////////// // lib.es2016.array.include.d.ts ///////////////////////////// interface Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: T, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: T, fromIndex?: number): boolean; } interface ReadonlyArray { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: T, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: T, fromIndex?: number): boolean; } interface Int8Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Uint8Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Uint8ClampedArray { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Int16Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Uint16Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Int32Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Uint32Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Float32Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Float64Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } ///////////////////////////// // lib.es2016.intl.d.ts ///////////////////////////// declare namespace Intl { - /** - * The `Intl.getCanonicalLocales()` method returns an array containing - * the canonical locale names. Duplicates will be omitted and elements - * will be validated as structurally valid language tags. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/getCanonicalLocales) - * - * @param locale A list of String values for which to get the canonical locale names - * @returns An array containing the canonical and validated locale names. - */ - function getCanonicalLocales(locale?: string | readonly string[]): string[]; +/** + * The `Intl.getCanonicalLocales()` method returns an array containing + * the canonical locale names. Duplicates will be omitted and elements + * will be validated as structurally valid language tags. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/getCanonicalLocales) + * + * @param locale A list of String values for which to get the canonical locale names + * @returns An array containing the canonical and validated locale names. + */ + function getCanonicalLocales(locale?: string | readonly string[]): string[]; } ///////////////////////////// // lib.es2017.date.d.ts ///////////////////////////// interface DateConstructor { - /** - * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. - * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. - * @param monthIndex The month as a number between 0 and 11 (January to December). - * @param date The date as a number between 1 and 31. - * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. - * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. - * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. - * @param ms A number from 0 to 999 that specifies the milliseconds. - */ - UTC(year: number, monthIndex?: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; + /** + * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. + * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. + * @param monthIndex The month as a number between 0 and 11 (January to December). + * @param date The date as a number between 1 and 31. + * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. + * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. + * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. + * @param ms A number from 0 to 999 that specifies the milliseconds. + */ + UTC(year: number, monthIndex?: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; } ///////////////////////////// // lib.es2017.intl.d.ts ///////////////////////////// declare namespace Intl { - interface DateTimeFormatPartTypesRegistry { - day: any; +interface DateTimeFormatPartTypesRegistry { + day: any; - dayPeriod: any; + dayPeriod: any; - era: any; + era: any; - hour: any; + hour: any; - literal: any; + literal: any; - minute: any; + minute: any; - month: any; + month: any; - second: any; + second: any; - timeZoneName: any; + timeZoneName: any; - weekday: any; + weekday: any; - year: any; - } + year: any; +} - type DateTimeFormatPartTypes = keyof DateTimeFormatPartTypesRegistry; +type DateTimeFormatPartTypes = keyof DateTimeFormatPartTypesRegistry; - interface DateTimeFormatPart { - type: DateTimeFormatPartTypes; +interface DateTimeFormatPart { + type: DateTimeFormatPartTypes; - value: string; - } + value: string; +} - interface DateTimeFormat { - formatToParts(date?: Date | number): DateTimeFormatPart[]; - } +interface DateTimeFormat { + formatToParts(date?: Date | number): DateTimeFormatPart[]; +} } ///////////////////////////// // lib.es2017.object.d.ts ///////////////////////////// interface ObjectConstructor { - /** - * Returns an array of values of the enumerable own properties of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - values(o: { [s: string]: T; } | ArrayLike): T[]; + /** + * Returns an array of values of the enumerable own properties of an object + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + values(o: { [s: string]: T; } | ArrayLike): T[]; - /** - * Returns an array of values of the enumerable own properties of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - values(o: {}): any[]; + /** + * Returns an array of values of the enumerable own properties of an object + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + values(o: {}): any[]; - /** - * Returns an array of key/values of the enumerable own properties of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - entries(o: { [s: string]: T; } | ArrayLike): [string, T][]; + /** + * Returns an array of key/values of the enumerable own properties of an object + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + entries(o: { [s: string]: T; } | ArrayLike): [string, T][]; - /** - * Returns an array of key/values of the enumerable own properties of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - entries(o: {}): [string, any][]; + /** + * Returns an array of key/values of the enumerable own properties of an object + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + entries(o: {}): [string, any][]; - /** - * Returns an object containing all own property descriptors of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - getOwnPropertyDescriptors(o: T): { [P in keyof T]: TypedPropertyDescriptor; } & { [x: string]: PropertyDescriptor; }; + /** + * Returns an object containing all own property descriptors of an object + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + getOwnPropertyDescriptors(o: T): { [P in keyof T]: TypedPropertyDescriptor; } & { [x: string]: PropertyDescriptor; }; } ///////////////////////////// // lib.es2017.sharedmemory.d.ts ///////////////////////////// interface SharedArrayBuffer { - /** - * Read-only. The length of the ArrayBuffer (in bytes). - */ - readonly byteLength: number; + /** + * Read-only. The length of the ArrayBuffer (in bytes). + */ + readonly byteLength: number; - /** - * Returns a section of an SharedArrayBuffer. - */ - slice(begin?: number, end?: number): SharedArrayBuffer; + /** + * Returns a section of an SharedArrayBuffer. + */ + slice(begin?: number, end?: number): SharedArrayBuffer; - readonly [Symbol.toStringTag]: "SharedArrayBuffer"; + readonly [Symbol.toStringTag]: "SharedArrayBuffer"; } interface SharedArrayBufferConstructor { - readonly prototype: SharedArrayBuffer; + readonly prototype: SharedArrayBuffer; - new (byteLength?: number): SharedArrayBuffer; + new (byteLength?: number): SharedArrayBuffer; - readonly [Symbol.species]: SharedArrayBufferConstructor; + readonly [Symbol.species]: SharedArrayBufferConstructor; } declare var SharedArrayBuffer: SharedArrayBufferConstructor; interface ArrayBufferTypes { - SharedArrayBuffer: SharedArrayBuffer; + SharedArrayBuffer: SharedArrayBuffer; } interface Atomics { - /** - * Adds a value to the value at the given position in the array, returning the original value. - * Until this atomic operation completes, any other read or write operation against the array - * will block. - */ - add(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + /** + * Adds a value to the value at the given position in the array, returning the original value. + * Until this atomic operation completes, any other read or write operation against the array + * will block. + */ + add(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - /** - * Stores the bitwise AND of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or - * write operation against the array will block. - */ - and(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + /** + * Stores the bitwise AND of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or + * write operation against the array will block. + */ + and(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - /** - * Replaces the value at the given position in the array if the original value equals the given - * expected value, returning the original value. Until this atomic operation completes, any - * other read or write operation against the array will block. - */ - compareExchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, expectedValue: number, replacementValue: number): number; + /** + * Replaces the value at the given position in the array if the original value equals the given + * expected value, returning the original value. Until this atomic operation completes, any + * other read or write operation against the array will block. + */ + compareExchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, expectedValue: number, replacementValue: number): number; - /** - * Replaces the value at the given position in the array, returning the original value. Until - * this atomic operation completes, any other read or write operation against the array will - * block. - */ - exchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + /** + * Replaces the value at the given position in the array, returning the original value. Until + * this atomic operation completes, any other read or write operation against the array will + * block. + */ + exchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - /** - * Returns a value indicating whether high-performance algorithms can use atomic operations - * (`true`) or must use locks (`false`) for the given number of bytes-per-element of a typed - * array. - */ - isLockFree(size: number): boolean; + /** + * Returns a value indicating whether high-performance algorithms can use atomic operations + * (`true`) or must use locks (`false`) for the given number of bytes-per-element of a typed + * array. + */ + isLockFree(size: number): boolean; - /** - * Returns the value at the given position in the array. Until this atomic operation completes, - * any other read or write operation against the array will block. - */ - load(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number): number; + /** + * Returns the value at the given position in the array. Until this atomic operation completes, + * any other read or write operation against the array will block. + */ + load(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number): number; - /** - * Stores the bitwise OR of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or write - * operation against the array will block. - */ - or(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + /** + * Stores the bitwise OR of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or write + * operation against the array will block. + */ + or(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - /** - * Stores a value at the given position in the array, returning the new value. Until this - * atomic operation completes, any other read or write operation against the array will block. - */ - store(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + /** + * Stores a value at the given position in the array, returning the new value. Until this + * atomic operation completes, any other read or write operation against the array will block. + */ + store(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - /** - * Subtracts a value from the value at the given position in the array, returning the original - * value. Until this atomic operation completes, any other read or write operation against the - * array will block. - */ - sub(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + /** + * Subtracts a value from the value at the given position in the array, returning the original + * value. Until this atomic operation completes, any other read or write operation against the + * array will block. + */ + sub(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - /** - * If the value at the given position in the array is equal to the provided value, the current - * agent is put to sleep causing execution to suspend until the timeout expires (returning - * `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns - * `"not-equal"`. - */ - wait(typedArray: Int32Array, index: number, value: number, timeout?: number): "ok" | "not-equal" | "timed-out"; + /** + * If the value at the given position in the array is equal to the provided value, the current + * agent is put to sleep causing execution to suspend until the timeout expires (returning + * `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns + * `"not-equal"`. + */ + wait(typedArray: Int32Array, index: number, value: number, timeout?: number): "ok" | "not-equal" | "timed-out"; - /** - * Wakes up sleeping agents that are waiting on the given index of the array, returning the - * number of agents that were awoken. - * @param typedArray A shared Int32Array. - * @param index The position in the typedArray to wake up on. - * @param count The number of sleeping agents to notify. Defaults to +Infinity. - */ - notify(typedArray: Int32Array, index: number, count?: number): number; + /** + * Wakes up sleeping agents that are waiting on the given index of the array, returning the + * number of agents that were awoken. + * @param typedArray A shared Int32Array. + * @param index The position in the typedArray to wake up on. + * @param count The number of sleeping agents to notify. Defaults to +Infinity. + */ + notify(typedArray: Int32Array, index: number, count?: number): number; - /** - * Stores the bitwise XOR of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or write - * operation against the array will block. - */ - xor(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + /** + * Stores the bitwise XOR of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or write + * operation against the array will block. + */ + xor(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - readonly [Symbol.toStringTag]: "Atomics"; + readonly [Symbol.toStringTag]: "Atomics"; } declare var Atomics: Atomics; @@ -2261,249 +2261,249 @@ declare var Atomics: Atomics; // lib.es2017.string.d.ts ///////////////////////////// interface String { - /** - * Pads the current string with a given string (repeated and/or truncated, if needed) so that the resulting string has a given length. - * The padding is applied from the start of the current string. - * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart) - * - * @param targetLength The length of the resulting string once the current `str` has been padded. - * If the value is less than or equal to `str.length`, then `str` is returned as-is. - * - * @param padString The string to pad the current `str` with. - * If `padString` is too long to stay within `targetLength`, it will be truncated from the end. - * The default value is the space character (U+0020). - */ - padStart(targetLength: number, padString?: string): string; + /** + * Pads the current string with a given string (repeated and/or truncated, if needed) so that the resulting string has a given length. + * The padding is applied from the start of the current string. + * + * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart) + * + * @param targetLength The length of the resulting string once the current `str` has been padded. + * If the value is less than or equal to `str.length`, then `str` is returned as-is. + * + * @param padString The string to pad the current `str` with. + * If `padString` is too long to stay within `targetLength`, it will be truncated from the end. + * The default value is the space character (U+0020). + */ + padStart(targetLength: number, padString?: string): string; - /** - * Pads the current string with a given string (repeated and/or truncated, if needed) so that the resulting string has a given length. - * The padding is applied from the end of the current string. - * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padEnd) - * - * @param targetLength The length of the resulting string once the current `str` has been padded. - * If the value is less than or equal to `str.length`, then `str` is returned as-is. - * - * @param padString The string to pad the current `str` with. - * If `padString` is too long to stay within `targetLength`, it will be truncated from the end. - * The default value is the space character (U+0020). - */ - padEnd(targetLength: number, padString?: string): string; + /** + * Pads the current string with a given string (repeated and/or truncated, if needed) so that the resulting string has a given length. + * The padding is applied from the end of the current string. + * + * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padEnd) + * + * @param targetLength The length of the resulting string once the current `str` has been padded. + * If the value is less than or equal to `str.length`, then `str` is returned as-is. + * + * @param padString The string to pad the current `str` with. + * If `padString` is too long to stay within `targetLength`, it will be truncated from the end. + * The default value is the space character (U+0020). + */ + padEnd(targetLength: number, padString?: string): string; } ///////////////////////////// // lib.es2017.typedarrays.d.ts ///////////////////////////// interface Int8ArrayConstructor { - new (): Int8Array; + new (): Int8Array; } interface Uint8ArrayConstructor { - new (): Uint8Array; + new (): Uint8Array; } interface Uint8ClampedArrayConstructor { - new (): Uint8ClampedArray; + new (): Uint8ClampedArray; } interface Int16ArrayConstructor { - new (): Int16Array; + new (): Int16Array; } interface Uint16ArrayConstructor { - new (): Uint16Array; + new (): Uint16Array; } interface Int32ArrayConstructor { - new (): Int32Array; + new (): Int32Array; } interface Uint32ArrayConstructor { - new (): Uint32Array; + new (): Uint32Array; } interface Float32ArrayConstructor { - new (): Float32Array; + new (): Float32Array; } interface Float64ArrayConstructor { - new (): Float64Array; + new (): Float64Array; } ///////////////////////////// // lib.es2018.asyncgenerator.d.ts ///////////////////////////// interface AsyncGenerator extends AsyncIteratorObject { - // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. - next(...[value]: [] | [TNext]): Promise>; + // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. + next(...[value]: [] | [TNext]): Promise>; - return(value: TReturn | PromiseLike): Promise>; + return(value: TReturn | PromiseLike): Promise>; - throw(e: any): Promise>; + throw(e: any): Promise>; - [Symbol.asyncIterator](): AsyncGenerator; + [Symbol.asyncIterator](): AsyncGenerator; } interface AsyncGeneratorFunction { - /** - * Creates a new AsyncGenerator object. - * @param args A list of arguments the function accepts. - */ - new (...args: any[]): AsyncGenerator; + /** + * Creates a new AsyncGenerator object. + * @param args A list of arguments the function accepts. + */ + new (...args: any[]): AsyncGenerator; - /** - * Creates a new AsyncGenerator object. - * @param args A list of arguments the function accepts. - */ - (...args: any[]): AsyncGenerator; + /** + * Creates a new AsyncGenerator object. + * @param args A list of arguments the function accepts. + */ + (...args: any[]): AsyncGenerator; - /** - * The length of the arguments. - */ - readonly length: number; + /** + * The length of the arguments. + */ + readonly length: number; - /** - * Returns the name of the function. - */ - readonly name: string; + /** + * Returns the name of the function. + */ + readonly name: string; - /** - * A reference to the prototype. - */ - readonly prototype: AsyncGenerator; + /** + * A reference to the prototype. + */ + readonly prototype: AsyncGenerator; } ///////////////////////////// // lib.es2018.asynciterable.d.ts ///////////////////////////// interface SymbolConstructor { - /** - * A method that returns the default async iterator for an object. Called by the semantics of - * the for-await-of statement. - */ - readonly asyncIterator: unique symbol; + /** + * A method that returns the default async iterator for an object. Called by the semantics of + * the for-await-of statement. + */ + readonly asyncIterator: unique symbol; } interface AsyncIterator { - // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. - next(...[value]: [] | [TNext]): Promise>; + // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. + next(...[value]: [] | [TNext]): Promise>; - return?(value?: TReturn | PromiseLike): Promise>; + return?(value?: TReturn | PromiseLike): Promise>; - throw?(e?: any): Promise>; + throw?(e?: any): Promise>; } interface AsyncIterable { - [Symbol.asyncIterator](): AsyncIterator; + [Symbol.asyncIterator](): AsyncIterator; } /** * Describes a user-defined {@link AsyncIterator} that is also async iterable. */ interface AsyncIterableIterator extends AsyncIterator { - [Symbol.asyncIterator](): AsyncIterableIterator; + [Symbol.asyncIterator](): AsyncIterableIterator; } /** * Describes an {@link AsyncIterator} produced by the runtime that inherits from the intrinsic `AsyncIterator.prototype`. */ interface AsyncIteratorObject extends AsyncIterator { - [Symbol.asyncIterator](): AsyncIteratorObject; + [Symbol.asyncIterator](): AsyncIteratorObject; } ///////////////////////////// // lib.es2018.intl.d.ts ///////////////////////////// declare namespace Intl { - // http://cldr.unicode.org/index/cldr-spec/plural-rules#TOC-Determining-Plural-Categories - type LDMLPluralRule = "zero" | "one" | "two" | "few" | "many" | "other"; +// http://cldr.unicode.org/index/cldr-spec/plural-rules#TOC-Determining-Plural-Categories + type LDMLPluralRule = "zero" | "one" | "two" | "few" | "many" | "other"; - type PluralRuleType = "cardinal" | "ordinal"; +type PluralRuleType = "cardinal" | "ordinal"; - interface PluralRulesOptions { - localeMatcher?: "lookup" | "best fit" | undefined; +interface PluralRulesOptions { + localeMatcher?: "lookup" | "best fit" | undefined; - type?: PluralRuleType | undefined; + type?: PluralRuleType | undefined; - minimumIntegerDigits?: number | undefined; + minimumIntegerDigits?: number | undefined; - minimumFractionDigits?: number | undefined; + minimumFractionDigits?: number | undefined; - maximumFractionDigits?: number | undefined; + maximumFractionDigits?: number | undefined; - minimumSignificantDigits?: number | undefined; + minimumSignificantDigits?: number | undefined; - maximumSignificantDigits?: number | undefined; - } + maximumSignificantDigits?: number | undefined; +} - interface ResolvedPluralRulesOptions { - locale: string; +interface ResolvedPluralRulesOptions { + locale: string; - pluralCategories: LDMLPluralRule[]; + pluralCategories: LDMLPluralRule[]; - type: PluralRuleType; + type: PluralRuleType; - minimumIntegerDigits: number; + minimumIntegerDigits: number; - minimumFractionDigits: number; + minimumFractionDigits: number; - maximumFractionDigits: number; + maximumFractionDigits: number; - minimumSignificantDigits?: number; + minimumSignificantDigits?: number; - maximumSignificantDigits?: number; - } + maximumSignificantDigits?: number; +} - interface PluralRules { - resolvedOptions(): ResolvedPluralRulesOptions; +interface PluralRules { + resolvedOptions(): ResolvedPluralRulesOptions; - select(n: number): LDMLPluralRule; - } + select(n: number): LDMLPluralRule; +} - interface PluralRulesConstructor { - new (locales?: string | readonly string[], options?: PluralRulesOptions): PluralRules; +interface PluralRulesConstructor { + new (locales?: string | readonly string[], options?: PluralRulesOptions): PluralRules; - (locales?: string | readonly string[], options?: PluralRulesOptions): PluralRules; + (locales?: string | readonly string[], options?: PluralRulesOptions): PluralRules; - supportedLocalesOf(locales: string | readonly string[], options?: { localeMatcher?: "lookup" | "best fit"; }): string[]; - } + supportedLocalesOf(locales: string | readonly string[], options?: { localeMatcher?: "lookup" | "best fit"; }): string[]; +} - const PluralRules: PluralRulesConstructor; +const PluralRules: PluralRulesConstructor; - interface NumberFormatPartTypeRegistry { - literal: never; +interface NumberFormatPartTypeRegistry { + literal: never; - nan: never; + nan: never; - infinity: never; + infinity: never; - percent: never; + percent: never; - integer: never; + integer: never; - group: never; + group: never; - decimal: never; + decimal: never; - fraction: never; + fraction: never; - plusSign: never; + plusSign: never; - minusSign: never; + minusSign: never; - percentSign: never; + percentSign: never; - currency: never; - } + currency: never; +} - type NumberFormatPartTypes = keyof NumberFormatPartTypeRegistry; +type NumberFormatPartTypes = keyof NumberFormatPartTypeRegistry; - interface NumberFormatPart { - type: NumberFormatPartTypes; +interface NumberFormatPart { + type: NumberFormatPartTypes; - value: string; - } + value: string; +} } ///////////////////////////// @@ -2513,24 +2513,24 @@ declare namespace Intl { * Represents the completion of an asynchronous operation */ interface Promise { - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): Promise; + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): Promise; } ///////////////////////////// // lib.es2018.regexp.d.ts ///////////////////////////// interface RegExp { - /** - * Returns a Boolean value indicating the state of the dotAll flag (s) used with a regular expression. - * Default is false. Read-only. - */ - readonly dotAll: boolean; + /** + * Returns a Boolean value indicating the state of the dotAll flag (s) used with a regular expression. + * Default is false. Read-only. + */ + readonly dotAll: boolean; } ///////////////////////////// @@ -2543,226 +2543,226 @@ type FlatArray = { }[Depth extends -1 ? "done" : "recur"]; interface ReadonlyArray { - /** - * Calls a defined callback function on each element of an array. Then, flattens the result into - * a new array. - * This is identical to a map followed by flat with depth 1. - * - * @param callback A function that accepts up to three arguments. The flatMap method calls the - * callback function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callback function. If - * thisArg is omitted, undefined is used as the this value. - */ - flatMap( - callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray, - thisArg?: This, - ): U[]; + /** + * Calls a defined callback function on each element of an array. Then, flattens the result into + * a new array. + * This is identical to a map followed by flat with depth 1. + * + * @param callback A function that accepts up to three arguments. The flatMap method calls the + * callback function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callback function. If + * thisArg is omitted, undefined is used as the this value. + */ + flatMap( + callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray, + thisArg?: This, + ): U[]; - /** - * Returns a new array with all sub-array elements concatenated into it recursively up to the - * specified depth. - * - * @param depth The maximum recursion depth - */ - flat( - this: A, - depth?: D, - ): FlatArray[]; + /** + * Returns a new array with all sub-array elements concatenated into it recursively up to the + * specified depth. + * + * @param depth The maximum recursion depth + */ + flat( + this: A, + depth?: D, + ): FlatArray[]; } interface Array { - /** - * Calls a defined callback function on each element of an array. Then, flattens the result into - * a new array. - * This is identical to a map followed by flat with depth 1. - * - * @param callback A function that accepts up to three arguments. The flatMap method calls the - * callback function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callback function. If - * thisArg is omitted, undefined is used as the this value. - */ - flatMap( - callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray, - thisArg?: This, - ): U[]; + /** + * Calls a defined callback function on each element of an array. Then, flattens the result into + * a new array. + * This is identical to a map followed by flat with depth 1. + * + * @param callback A function that accepts up to three arguments. The flatMap method calls the + * callback function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callback function. If + * thisArg is omitted, undefined is used as the this value. + */ + flatMap( + callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray, + thisArg?: This, + ): U[]; - /** - * Returns a new array with all sub-array elements concatenated into it recursively up to the - * specified depth. - * - * @param depth The maximum recursion depth - */ - flat( - this: A, - depth?: D, - ): FlatArray[]; + /** + * Returns a new array with all sub-array elements concatenated into it recursively up to the + * specified depth. + * + * @param depth The maximum recursion depth + */ + flat( + this: A, + depth?: D, + ): FlatArray[]; } ///////////////////////////// // lib.es2019.object.d.ts ///////////////////////////// interface ObjectConstructor { - /** - * Returns an object created by key-value entries for properties and methods - * @param entries An iterable object that contains key-value entries for properties and methods. - */ - fromEntries(entries: Iterable): { [k: string]: T; }; + /** + * Returns an object created by key-value entries for properties and methods + * @param entries An iterable object that contains key-value entries for properties and methods. + */ + fromEntries(entries: Iterable): { [k: string]: T; }; - /** - * Returns an object created by key-value entries for properties and methods - * @param entries An iterable object that contains key-value entries for properties and methods. - */ - fromEntries(entries: Iterable): any; + /** + * Returns an object created by key-value entries for properties and methods + * @param entries An iterable object that contains key-value entries for properties and methods. + */ + fromEntries(entries: Iterable): any; } ///////////////////////////// // lib.es2019.string.d.ts ///////////////////////////// interface String { - /** Removes the trailing white space and line terminator characters from a string. */ - trimEnd(): string; + /** Removes the trailing white space and line terminator characters from a string. */ + trimEnd(): string; - /** Removes the leading white space and line terminator characters from a string. */ - trimStart(): string; + /** Removes the leading white space and line terminator characters from a string. */ + trimStart(): string; } ///////////////////////////// // lib.es2019.symbol.d.ts ///////////////////////////// interface Symbol { - /** - * Expose the [[Description]] internal slot of a symbol directly. - */ - readonly description: string | undefined; + /** + * Expose the [[Description]] internal slot of a symbol directly. + */ + readonly description: string | undefined; } ///////////////////////////// // lib.es2020.bigint.d.ts ///////////////////////////// interface BigIntToLocaleStringOptions { - /** - * The locale matching algorithm to use.The default is "best fit". For information about this option, see the {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation Intl page}. - */ - localeMatcher?: string; + /** + * The locale matching algorithm to use.The default is "best fit". For information about this option, see the {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation Intl page}. + */ + localeMatcher?: string; - /** - * The formatting style to use , the default is "decimal". - */ - style?: string; + /** + * The formatting style to use , the default is "decimal". + */ + style?: string; - numberingSystem?: string; + numberingSystem?: string; - /** - * The unit to use in unit formatting, Possible values are core unit identifiers, defined in UTS #35, Part 2, Section 6. A subset of units from the full list was selected for use in ECMAScript. Pairs of simple units can be concatenated with "-per-" to make a compound unit. There is no default value; if the style is "unit", the unit property must be provided. - */ - unit?: string; + /** + * The unit to use in unit formatting, Possible values are core unit identifiers, defined in UTS #35, Part 2, Section 6. A subset of units from the full list was selected for use in ECMAScript. Pairs of simple units can be concatenated with "-per-" to make a compound unit. There is no default value; if the style is "unit", the unit property must be provided. + */ + unit?: string; - /** - * The unit formatting style to use in unit formatting, the defaults is "short". - */ - unitDisplay?: string; + /** + * The unit formatting style to use in unit formatting, the defaults is "short". + */ + unitDisplay?: string; - /** - * The currency to use in currency formatting. Possible values are the ISO 4217 currency codes, such as "USD" for the US dollar, "EUR" for the euro, or "CNY" for the Chinese RMB — see the Current currency & funds code list. There is no default value; if the style is "currency", the currency property must be provided. It is only used when [[Style]] has the value "currency". - */ - currency?: string; + /** + * The currency to use in currency formatting. Possible values are the ISO 4217 currency codes, such as "USD" for the US dollar, "EUR" for the euro, or "CNY" for the Chinese RMB — see the Current currency & funds code list. There is no default value; if the style is "currency", the currency property must be provided. It is only used when [[Style]] has the value "currency". + */ + currency?: string; - /** - * How to display the currency in currency formatting. It is only used when [[Style]] has the value "currency". The default is "symbol". - * - * "symbol" to use a localized currency symbol such as €, - * - * "code" to use the ISO currency code, - * - * "name" to use a localized currency name such as "dollar" - */ - currencyDisplay?: string; + /** + * How to display the currency in currency formatting. It is only used when [[Style]] has the value "currency". The default is "symbol". + * + * "symbol" to use a localized currency symbol such as €, + * + * "code" to use the ISO currency code, + * + * "name" to use a localized currency name such as "dollar" + */ + currencyDisplay?: string; - /** - * Whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators. The default is true. - */ - useGrouping?: boolean; + /** + * Whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators. The default is true. + */ + useGrouping?: boolean; - /** - * The minimum number of integer digits to use. Possible values are from 1 to 21; the default is 1. - */ - minimumIntegerDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; + /** + * The minimum number of integer digits to use. Possible values are from 1 to 21; the default is 1. + */ + minimumIntegerDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; - /** - * The minimum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number and percent formatting is 0; the default for currency formatting is the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html ISO 4217 currency codes list} (2 if the list doesn't provide that information). - */ - minimumFractionDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20; + /** + * The minimum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number and percent formatting is 0; the default for currency formatting is the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html ISO 4217 currency codes list} (2 if the list doesn't provide that information). + */ + minimumFractionDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20; - /** - * The maximum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number formatting is the larger of minimumFractionDigits and 3; the default for currency formatting is the larger of minimumFractionDigits and the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html ISO 4217 currency codes list} (2 if the list doesn't provide that information); the default for percent formatting is the larger of minimumFractionDigits and 0. - */ - maximumFractionDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20; + /** + * The maximum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number formatting is the larger of minimumFractionDigits and 3; the default for currency formatting is the larger of minimumFractionDigits and the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html ISO 4217 currency codes list} (2 if the list doesn't provide that information); the default for percent formatting is the larger of minimumFractionDigits and 0. + */ + maximumFractionDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20; - /** - * The minimum number of significant digits to use. Possible values are from 1 to 21; the default is 1. - */ - minimumSignificantDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; + /** + * The minimum number of significant digits to use. Possible values are from 1 to 21; the default is 1. + */ + minimumSignificantDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; - /** - * The maximum number of significant digits to use. Possible values are from 1 to 21; the default is 21. - */ - maximumSignificantDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; + /** + * The maximum number of significant digits to use. Possible values are from 1 to 21; the default is 21. + */ + maximumSignificantDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; - /** - * The formatting that should be displayed for the number, the defaults is "standard" - * - * "standard" plain number formatting - * - * "scientific" return the order-of-magnitude for formatted number. - * - * "engineering" return the exponent of ten when divisible by three - * - * "compact" string representing exponent, defaults is using the "short" form - */ - notation?: string; + /** + * The formatting that should be displayed for the number, the defaults is "standard" + * + * "standard" plain number formatting + * + * "scientific" return the order-of-magnitude for formatted number. + * + * "engineering" return the exponent of ten when divisible by three + * + * "compact" string representing exponent, defaults is using the "short" form + */ + notation?: string; - /** - * used only when notation is "compact" - */ - compactDisplay?: string; + /** + * used only when notation is "compact" + */ + compactDisplay?: string; } interface BigInt { - /** - * Returns a string representation of an object. - * @param radix Specifies a radix for converting numeric values to strings. - */ - toString(radix?: number): string; + /** + * Returns a string representation of an object. + * @param radix Specifies a radix for converting numeric values to strings. + */ + toString(radix?: number): string; - /** Returns a string representation appropriate to the host environment's current locale. */ - toLocaleString(locales?: Intl.LocalesArgument, options?: BigIntToLocaleStringOptions): string; + /** Returns a string representation appropriate to the host environment's current locale. */ + toLocaleString(locales?: Intl.LocalesArgument, options?: BigIntToLocaleStringOptions): string; - /** Returns the primitive value of the specified object. */ - valueOf(): bigint; + /** Returns the primitive value of the specified object. */ + valueOf(): bigint; - readonly [Symbol.toStringTag]: "BigInt"; + readonly [Symbol.toStringTag]: "BigInt"; } interface BigIntConstructor { - (value: bigint | boolean | number | string): bigint; + (value: bigint | boolean | number | string): bigint; - readonly prototype: BigInt; + readonly prototype: BigInt; - /** - * Interprets the low bits of a BigInt as a 2's-complement signed integer. - * All higher bits are discarded. - * @param bits The number of low bits to use - * @param int The BigInt whose bits to extract - */ - asIntN(bits: number, int: bigint): bigint; + /** + * Interprets the low bits of a BigInt as a 2's-complement signed integer. + * All higher bits are discarded. + * @param bits The number of low bits to use + * @param int The BigInt whose bits to extract + */ + asIntN(bits: number, int: bigint): bigint; - /** - * Interprets the low bits of a BigInt as an unsigned integer. - * All higher bits are discarded. - * @param bits The number of low bits to use - * @param int The BigInt whose bits to extract - */ - asUintN(bits: number, int: bigint): bigint; + /** + * Interprets the low bits of a BigInt as an unsigned integer. + * All higher bits are discarded. + * @param bits The number of low bits to use + * @param int The BigInt whose bits to extract + */ + asUintN(bits: number, int: bigint): bigint; } declare var BigInt: BigIntConstructor; @@ -2772,295 +2772,295 @@ declare var BigInt: BigIntConstructor; * requested number of bytes could not be allocated, an exception is raised. */ interface BigInt64Array { - /** The size in bytes of each element in the array. */ - readonly BYTES_PER_ELEMENT: number; - - /** The ArrayBuffer instance referenced by the array. */ - readonly buffer: TArrayBuffer; - - /** The length in bytes of the array. */ - readonly byteLength: number; + /** The size in bytes of each element in the array. */ + readonly BYTES_PER_ELEMENT: number; - /** The offset in bytes of the array. */ - readonly byteOffset: number; + /** The ArrayBuffer instance referenced by the array. */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** The length in bytes of the array. */ + readonly byteLength: number; - /** Yields index, value pairs for every entry in the array. */ - entries(): ArrayIterator<[number, bigint]>; + /** The offset in bytes of the array. */ + readonly byteOffset: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns false, - * or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; + + /** Yields index, value pairs for every entry in the array. */ + entries(): ArrayIterator<[number, bigint]>; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: bigint, start?: number, end?: number): this; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns false, + * or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: bigint, index: number, array: BigInt64Array) => any, thisArg?: any): BigInt64Array; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: bigint, start?: number, end?: number): this; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): bigint | undefined; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: bigint, index: number, array: BigInt64Array) => any, thisArg?: any): BigInt64Array; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): number; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): bigint | undefined; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: bigint, index: number, array: BigInt64Array) => void, thisArg?: any): void; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): number; - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: bigint, fromIndex?: number): boolean; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: bigint, index: number, array: BigInt64Array) => void, thisArg?: any): void; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: bigint, fromIndex?: number): number; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: bigint, fromIndex?: number): boolean; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: bigint, fromIndex?: number): number; - /** Yields each index in the array. */ - keys(): ArrayIterator; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: bigint, fromIndex?: number): number; + /** Yields each index in the array. */ + keys(): ArrayIterator; - /** The length of the array. */ - readonly length: number; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: bigint, fromIndex?: number): number; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: bigint, index: number, array: BigInt64Array) => bigint, thisArg?: any): BigInt64Array; + /** The length of the array. */ + readonly length: number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: bigint, index: number, array: BigInt64Array) => bigint, thisArg?: any): BigInt64Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint; - /** Reverses the elements in the array. */ - reverse(): this; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U; + + /** Reverses the elements in the array. */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. - */ - slice(start?: number, end?: number): BigInt64Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. + */ + slice(start?: number, end?: number): BigInt64Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls the - * predicate function for each element in the array until the predicate returns true, or until - * the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls the + * predicate function for each element in the array until the predicate returns true, or until + * the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean; - /** - * Sorts the array. - * @param compareFn The function used to determine the order of the elements. If omitted, the elements are sorted in ascending order. - */ - sort(compareFn?: (a: bigint, b: bigint) => number | bigint): this; + /** + * Sorts the array. + * @param compareFn The function used to determine the order of the elements. If omitted, the elements are sorted in ascending order. + */ + sort(compareFn?: (a: bigint, b: bigint) => number | bigint): this; - /** - * Gets a new BigInt64Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): BigInt64Array; + /** + * Gets a new BigInt64Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): BigInt64Array; - /** Converts the array to a string by using the current locale. */ - toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; + /** Converts the array to a string by using the current locale. */ + toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; - /** Returns a string representation of the array. */ - toString(): string; + /** Returns a string representation of the array. */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): BigInt64Array; + /** Returns the primitive value of the specified object. */ + valueOf(): BigInt64Array; - /** Yields each value in the array. */ - values(): ArrayIterator; + /** Yields each value in the array. */ + values(): ArrayIterator; - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - readonly [Symbol.toStringTag]: "BigInt64Array"; + readonly [Symbol.toStringTag]: "BigInt64Array"; - [index: number]: bigint; + [index: number]: bigint; } interface BigInt64ArrayConstructor { - readonly prototype: BigInt64Array; + readonly prototype: BigInt64Array; - new (length?: number): BigInt64Array; + new (length?: number): BigInt64Array; - new (array: ArrayLike | Iterable): BigInt64Array; + new (array: ArrayLike | Iterable): BigInt64Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): BigInt64Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): BigInt64Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): BigInt64Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): BigInt64Array; - new (array: ArrayLike | ArrayBuffer): BigInt64Array; + new (array: ArrayLike | ArrayBuffer): BigInt64Array; - /** The size in bytes of each element in the array. */ - readonly BYTES_PER_ELEMENT: number; + /** The size in bytes of each element in the array. */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: bigint[]): BigInt64Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: bigint[]): BigInt64Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): BigInt64Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): BigInt64Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigInt64Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigInt64Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): BigInt64Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): BigInt64Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => bigint, thisArg?: any): BigInt64Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => bigint, thisArg?: any): BigInt64Array; } declare var BigInt64Array: BigInt64ArrayConstructor; @@ -3070,1286 +3070,1286 @@ declare var BigInt64Array: BigInt64ArrayConstructor; * requested number of bytes could not be allocated, an exception is raised. */ interface BigUint64Array { - /** The size in bytes of each element in the array. */ - readonly BYTES_PER_ELEMENT: number; + /** The size in bytes of each element in the array. */ + readonly BYTES_PER_ELEMENT: number; - /** The ArrayBuffer instance referenced by the array. */ - readonly buffer: TArrayBuffer; + /** The ArrayBuffer instance referenced by the array. */ + readonly buffer: TArrayBuffer; - /** The length in bytes of the array. */ - readonly byteLength: number; + /** The length in bytes of the array. */ + readonly byteLength: number; - /** The offset in bytes of the array. */ - readonly byteOffset: number; + /** The offset in bytes of the array. */ + readonly byteOffset: number; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; + + /** Yields index, value pairs for every entry in the array. */ + entries(): ArrayIterator<[number, bigint]>; - /** Yields index, value pairs for every entry in the array. */ - entries(): ArrayIterator<[number, bigint]>; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns false, + * or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns false, - * or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: bigint, start?: number, end?: number): this; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: bigint, start?: number, end?: number): this; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: bigint, index: number, array: BigUint64Array) => any, thisArg?: any): BigUint64Array; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: bigint, index: number, array: BigUint64Array) => any, thisArg?: any): BigUint64Array; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): bigint | undefined; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): bigint | undefined; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): number; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): number; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: bigint, index: number, array: BigUint64Array) => void, thisArg?: any): void; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: bigint, index: number, array: BigUint64Array) => void, thisArg?: any): void; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: bigint, fromIndex?: number): boolean; - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: bigint, fromIndex?: number): boolean; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: bigint, fromIndex?: number): number; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: bigint, fromIndex?: number): number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** Yields each index in the array. */ + keys(): ArrayIterator; - /** Yields each index in the array. */ - keys(): ArrayIterator; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: bigint, fromIndex?: number): number; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: bigint, fromIndex?: number): number; + /** The length of the array. */ + readonly length: number; - /** The length of the array. */ - readonly length: number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: bigint, index: number, array: BigUint64Array) => bigint, thisArg?: any): BigUint64Array; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: bigint, index: number, array: BigUint64Array) => bigint, thisArg?: any): BigUint64Array; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint; - /** Reverses the elements in the array. */ - reverse(): this; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U; + + /** Reverses the elements in the array. */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. - */ - slice(start?: number, end?: number): BigUint64Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. + */ + slice(start?: number, end?: number): BigUint64Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls the - * predicate function for each element in the array until the predicate returns true, or until - * the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls the + * predicate function for each element in the array until the predicate returns true, or until + * the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean; - /** - * Sorts the array. - * @param compareFn The function used to determine the order of the elements. If omitted, the elements are sorted in ascending order. - */ - sort(compareFn?: (a: bigint, b: bigint) => number | bigint): this; + /** + * Sorts the array. + * @param compareFn The function used to determine the order of the elements. If omitted, the elements are sorted in ascending order. + */ + sort(compareFn?: (a: bigint, b: bigint) => number | bigint): this; - /** - * Gets a new BigUint64Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): BigUint64Array; + /** + * Gets a new BigUint64Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): BigUint64Array; - /** Converts the array to a string by using the current locale. */ - toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; + /** Converts the array to a string by using the current locale. */ + toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; - /** Returns a string representation of the array. */ - toString(): string; + /** Returns a string representation of the array. */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): BigUint64Array; + /** Returns the primitive value of the specified object. */ + valueOf(): BigUint64Array; - /** Yields each value in the array. */ - values(): ArrayIterator; + /** Yields each value in the array. */ + values(): ArrayIterator; - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - readonly [Symbol.toStringTag]: "BigUint64Array"; + readonly [Symbol.toStringTag]: "BigUint64Array"; - [index: number]: bigint; + [index: number]: bigint; } interface BigUint64ArrayConstructor { - readonly prototype: BigUint64Array; + readonly prototype: BigUint64Array; - new (length?: number): BigUint64Array; + new (length?: number): BigUint64Array; - new (array: ArrayLike | Iterable): BigUint64Array; + new (array: ArrayLike | Iterable): BigUint64Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): BigUint64Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): BigUint64Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): BigUint64Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): BigUint64Array; - new (array: ArrayLike | ArrayBuffer): BigUint64Array; + new (array: ArrayLike | ArrayBuffer): BigUint64Array; - /** The size in bytes of each element in the array. */ - readonly BYTES_PER_ELEMENT: number; + /** The size in bytes of each element in the array. */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: bigint[]): BigUint64Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: bigint[]): BigUint64Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): BigUint64Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): BigUint64Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigUint64Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigUint64Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): BigUint64Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): BigUint64Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => bigint, thisArg?: any): BigUint64Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => bigint, thisArg?: any): BigUint64Array; } declare var BigUint64Array: BigUint64ArrayConstructor; interface DataView { - /** - * Gets the BigInt64 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getBigInt64(byteOffset: number, littleEndian?: boolean): bigint; + /** + * Gets the BigInt64 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getBigInt64(byteOffset: number, littleEndian?: boolean): bigint; - /** - * Gets the BigUint64 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getBigUint64(byteOffset: number, littleEndian?: boolean): bigint; + /** + * Gets the BigUint64 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getBigUint64(byteOffset: number, littleEndian?: boolean): bigint; - /** - * Stores a BigInt64 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setBigInt64(byteOffset: number, value: bigint, littleEndian?: boolean): void; + /** + * Stores a BigInt64 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setBigInt64(byteOffset: number, value: bigint, littleEndian?: boolean): void; - /** - * Stores a BigUint64 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setBigUint64(byteOffset: number, value: bigint, littleEndian?: boolean): void; + /** + * Stores a BigUint64 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setBigUint64(byteOffset: number, value: bigint, littleEndian?: boolean): void; } ///////////////////////////// // lib.es2020.date.d.ts ///////////////////////////// interface Date { - /** - * Converts a date and time to a string by using the current or specified locale. - * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; + /** + * Converts a date and time to a string by using the current or specified locale. + * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; - /** - * Converts a date to a string by using the current or specified locale. - * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleDateString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; + /** + * Converts a date to a string by using the current or specified locale. + * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleDateString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; - /** - * Converts a time to a string by using the current or specified locale. - * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleTimeString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; + /** + * Converts a time to a string by using the current or specified locale. + * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleTimeString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; } ///////////////////////////// // lib.es2020.intl.d.ts ///////////////////////////// declare namespace Intl { - /** - * A string that is a valid [Unicode BCP 47 Locale Identifier](https://unicode.org/reports/tr35/#Unicode_locale_identifier). +/** + * A string that is a valid [Unicode BCP 47 Locale Identifier](https://unicode.org/reports/tr35/#Unicode_locale_identifier). + * + * For example: "fa", "es-MX", "zh-Hant-TW". + * + * See [MDN - Intl - locales argument](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). + */ + type UnicodeBCP47LocaleIdentifier = string; + +/** + * Unit to use in the relative time internationalized message. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format#Parameters). + */ + type RelativeTimeFormatUnit = + | "year" + | "years" + | "quarter" + | "quarters" + | "month" + | "months" + | "week" + | "weeks" + | "day" + | "days" + | "hour" + | "hours" + | "minute" + | "minutes" + | "second" + | "seconds"; + +/** + * Value of the `unit` property in objects returned by + * `Intl.RelativeTimeFormat.prototype.formatToParts()`. `formatToParts` and + * `format` methods accept either singular or plural unit names as input, + * but `formatToParts` only outputs singular (e.g. "day") not plural (e.g. + * "days"). + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts). + */ + type RelativeTimeFormatUnitSingular = + | "year" + | "quarter" + | "month" + | "week" + | "day" + | "hour" + | "minute" + | "second"; + +/** + * The locale matching algorithm to use. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). + */ + type RelativeTimeFormatLocaleMatcher = "lookup" | "best fit"; + +/** + * The format of output message. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). + */ + type RelativeTimeFormatNumeric = "always" | "auto"; + +/** + * The length of the internationalized message. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). + */ + type RelativeTimeFormatStyle = "long" | "short" | "narrow"; + +/** + * The locale or locales to use + * + * See [MDN - Intl - locales argument](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). + */ + type LocalesArgument = UnicodeBCP47LocaleIdentifier | Locale | readonly (UnicodeBCP47LocaleIdentifier | Locale)[] | undefined; + +/** + * An object with some or all of properties of `options` parameter + * of `Intl.RelativeTimeFormat` constructor. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). + */ + interface RelativeTimeFormatOptions { + /** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */ + localeMatcher?: RelativeTimeFormatLocaleMatcher; + + /** The format of output message. */ + numeric?: RelativeTimeFormatNumeric; +} + +/** + * An object with properties reflecting the locale + * and formatting options computed during initialization + * of the `Intl.RelativeTimeFormat` object + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions#Description). + */ + interface ResolvedRelativeTimeFormatOptions { + numeric: RelativeTimeFormatNumeric; + + numberingSystem: string; +} + +/** + * An object representing the relative time format in parts + * that can be used for custom locale-aware formatting. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts). + */ + type RelativeTimeFormatPart = + | { + type: "literal"; + value: string; + } + | { + type: Exclude; + value: string; + unit: RelativeTimeFormatUnitSingular; + }; + +interface RelativeTimeFormat { + /** + * Formats a value and a unit according to the locale + * and formatting options of the given + * [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) + * object. * - * For example: "fa", "es-MX", "zh-Hant-TW". + * While this method automatically provides the correct plural forms, + * the grammatical form is otherwise as neutral as possible. * - * See [MDN - Intl - locales argument](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). - */ - type UnicodeBCP47LocaleIdentifier = string; - - /** - * Unit to use in the relative time internationalized message. + * It is the caller's responsibility to handle cut-off logic + * such as deciding between displaying "in 7 days" or "in 1 week". + * This API does not support relative dates involving compound units. + * e.g "in 5 days and 4 hours". * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format#Parameters). - */ - type RelativeTimeFormatUnit = - | "year" - | "years" - | "quarter" - | "quarters" - | "month" - | "months" - | "week" - | "weeks" - | "day" - | "days" - | "hour" - | "hours" - | "minute" - | "minutes" - | "second" - | "seconds"; - - /** - * Value of the `unit` property in objects returned by - * `Intl.RelativeTimeFormat.prototype.formatToParts()`. `formatToParts` and - * `format` methods accept either singular or plural unit names as input, - * but `formatToParts` only outputs singular (e.g. "day") not plural (e.g. - * "days"). + * @param value - Numeric value to use in the internationalized relative time message * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts). - */ - type RelativeTimeFormatUnitSingular = - | "year" - | "quarter" - | "month" - | "week" - | "day" - | "hour" - | "minute" - | "second"; - - /** - * The locale matching algorithm to use. + * @param unit - [Unit](https://tc39.es/ecma402/#sec-singularrelativetimeunit) to use in the relative time internationalized message. * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). - */ - type RelativeTimeFormatLocaleMatcher = "lookup" | "best fit"; - - /** - * The format of output message. + * @throws `RangeError` if `unit` was given something other than `unit` possible values * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). - */ - type RelativeTimeFormatNumeric = "always" | "auto"; - - /** - * The length of the internationalized message. + * @returns {string} Internationalized relative time message as string * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format). */ - type RelativeTimeFormatStyle = "long" | "short" | "narrow"; + format(value: number, unit: RelativeTimeFormatUnit): string; - /** - * The locale or locales to use + /** + * Returns an array of objects representing the relative time format in parts that can be used for custom locale-aware formatting. + * + * @param value - Numeric value to use in the internationalized relative time message * - * See [MDN - Intl - locales argument](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). + * @param unit - [Unit](https://tc39.es/ecma402/#sec-singularrelativetimeunit) to use in the relative time internationalized message. + * + * @throws `RangeError` if `unit` was given something other than `unit` possible values + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts). */ - type LocalesArgument = UnicodeBCP47LocaleIdentifier | Locale | readonly (UnicodeBCP47LocaleIdentifier | Locale)[] | undefined; + formatToParts(value: number, unit: RelativeTimeFormatUnit): RelativeTimeFormatPart[]; - /** - * An object with some or all of properties of `options` parameter - * of `Intl.RelativeTimeFormat` constructor. + /** + * Provides access to the locale and options computed during initialization of this `Intl.RelativeTimeFormat` object. * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions). */ - interface RelativeTimeFormatOptions { - /** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */ - localeMatcher?: RelativeTimeFormatLocaleMatcher; - - /** The format of output message. */ - numeric?: RelativeTimeFormatNumeric; - } + resolvedOptions(): ResolvedRelativeTimeFormatOptions; +} - /** - * An object with properties reflecting the locale - * and formatting options computed during initialization - * of the `Intl.RelativeTimeFormat` object +/** + * The [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) + * object is a constructor for objects that enable language-sensitive relative time formatting. + * + * [Compatibility](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat#Browser_compatibility). + */ + const RelativeTimeFormat: { + /** + * Creates [Intl.RelativeTimeFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) objects * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions#Description). + * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. + * For the general form and interpretation of the locales argument, + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters) + * with some or all of options of `RelativeTimeFormatOptions`. + * + * @returns [Intl.RelativeTimeFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat). */ - interface ResolvedRelativeTimeFormatOptions { - numeric: RelativeTimeFormatNumeric; - - numberingSystem: string; - } + new ( + locales?: LocalesArgument, + options?: RelativeTimeFormatOptions, + ): RelativeTimeFormat; - /** - * An object representing the relative time format in parts - * that can be used for custom locale-aware formatting. + /** + * Returns an array containing those of the provided locales + * that are supported in date and time formatting + * without having to fall back to the runtime's default locale. * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts). - */ - type RelativeTimeFormatPart = - | { - type: "literal"; - value: string; - } - | { - type: Exclude; - value: string; - unit: RelativeTimeFormatUnitSingular; - }; - - interface RelativeTimeFormat { - /** - * Formats a value and a unit according to the locale - * and formatting options of the given - * [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) - * object. - * - * While this method automatically provides the correct plural forms, - * the grammatical form is otherwise as neutral as possible. - * - * It is the caller's responsibility to handle cut-off logic - * such as deciding between displaying "in 7 days" or "in 1 week". - * This API does not support relative dates involving compound units. - * e.g "in 5 days and 4 hours". - * - * @param value - Numeric value to use in the internationalized relative time message - * - * @param unit - [Unit](https://tc39.es/ecma402/#sec-singularrelativetimeunit) to use in the relative time internationalized message. - * - * @throws `RangeError` if `unit` was given something other than `unit` possible values - * - * @returns {string} Internationalized relative time message as string - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format). - */ - format(value: number, unit: RelativeTimeFormatUnit): string; - - /** - * Returns an array of objects representing the relative time format in parts that can be used for custom locale-aware formatting. - * - * @param value - Numeric value to use in the internationalized relative time message - * - * @param unit - [Unit](https://tc39.es/ecma402/#sec-singularrelativetimeunit) to use in the relative time internationalized message. - * - * @throws `RangeError` if `unit` was given something other than `unit` possible values - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts). - */ - formatToParts(value: number, unit: RelativeTimeFormatUnit): RelativeTimeFormatPart[]; - - /** - * Provides access to the locale and options computed during initialization of this `Intl.RelativeTimeFormat` object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions). - */ - resolvedOptions(): ResolvedRelativeTimeFormatOptions; - } - - /** - * The [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) - * object is a constructor for objects that enable language-sensitive relative time formatting. + * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. + * For the general form and interpretation of the locales argument, + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). * - * [Compatibility](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat#Browser_compatibility). + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters) + * with some or all of options of the formatting. + * + * @returns An array containing those of the provided locales + * that are supported in date and time formatting + * without having to fall back to the runtime's default locale. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/supportedLocalesOf). */ - const RelativeTimeFormat: { - /** - * Creates [Intl.RelativeTimeFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) objects - * - * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. - * For the general form and interpretation of the locales argument, - * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). - * - * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters) - * with some or all of options of `RelativeTimeFormatOptions`. - * - * @returns [Intl.RelativeTimeFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat). - */ - new ( - locales?: LocalesArgument, - options?: RelativeTimeFormatOptions, - ): RelativeTimeFormat; - - /** - * Returns an array containing those of the provided locales - * that are supported in date and time formatting - * without having to fall back to the runtime's default locale. - * - * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. - * For the general form and interpretation of the locales argument, - * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). - * - * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters) - * with some or all of options of the formatting. - * - * @returns An array containing those of the provided locales - * that are supported in date and time formatting - * without having to fall back to the runtime's default locale. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/supportedLocalesOf). - */ - supportedLocalesOf( - locales?: LocalesArgument, - options?: RelativeTimeFormatOptions, - ): UnicodeBCP47LocaleIdentifier[]; - }; + supportedLocalesOf( + locales?: LocalesArgument, + options?: RelativeTimeFormatOptions, + ): UnicodeBCP47LocaleIdentifier[]; +}; - interface NumberFormatOptionsSignDisplayRegistry { - auto: never; +interface NumberFormatOptionsSignDisplayRegistry { + auto: never; - never: never; + never: never; - always: never; + always: never; - exceptZero: never; - } + exceptZero: never; +} - type NumberFormatOptionsSignDisplay = keyof NumberFormatOptionsSignDisplayRegistry; +type NumberFormatOptionsSignDisplay = keyof NumberFormatOptionsSignDisplayRegistry; - interface NumberFormatOptions { - numberingSystem?: string | undefined; +interface NumberFormatOptions { + numberingSystem?: string | undefined; - compactDisplay?: "short" | "long" | undefined; + compactDisplay?: "short" | "long" | undefined; - notation?: "standard" | "scientific" | "engineering" | "compact" | undefined; + notation?: "standard" | "scientific" | "engineering" | "compact" | undefined; - signDisplay?: NumberFormatOptionsSignDisplay | undefined; + signDisplay?: NumberFormatOptionsSignDisplay | undefined; - unit?: string | undefined; + unit?: string | undefined; - unitDisplay?: "short" | "long" | "narrow" | undefined; + unitDisplay?: "short" | "long" | "narrow" | undefined; - currencySign?: "standard" | "accounting" | undefined; - } + currencySign?: "standard" | "accounting" | undefined; +} - interface ResolvedNumberFormatOptions { - compactDisplay?: "short" | "long"; +interface ResolvedNumberFormatOptions { + compactDisplay?: "short" | "long"; - notation: "standard" | "scientific" | "engineering" | "compact"; + notation: "standard" | "scientific" | "engineering" | "compact"; - signDisplay: NumberFormatOptionsSignDisplay; + signDisplay: NumberFormatOptionsSignDisplay; - unit?: string; + unit?: string; - unitDisplay?: "short" | "long" | "narrow"; + unitDisplay?: "short" | "long" | "narrow"; - currencySign?: "standard" | "accounting"; - } + currencySign?: "standard" | "accounting"; +} - interface DateTimeFormatOptions { - calendar?: string | undefined; +interface DateTimeFormatOptions { + calendar?: string | undefined; - numberingSystem?: string | undefined; + numberingSystem?: string | undefined; - hourCycle?: "h11" | "h12" | "h23" | "h24" | undefined; - } + hourCycle?: "h11" | "h12" | "h23" | "h24" | undefined; +} - type LocaleHourCycleKey = "h12" | "h23" | "h11" | "h24"; +type LocaleHourCycleKey = "h12" | "h23" | "h11" | "h24"; - type LocaleCollationCaseFirst = "upper" | "lower" | "false"; +type LocaleCollationCaseFirst = "upper" | "lower" | "false"; - interface LocaleOptions { - /** The part of the Locale that indicates the locale's calendar era. */ - calendar?: string; +interface LocaleOptions { + /** The part of the Locale that indicates the locale's calendar era. */ + calendar?: string; - /** Flag that defines whether case is taken into account for the locale's collation rules. */ - caseFirst?: LocaleCollationCaseFirst; + /** Flag that defines whether case is taken into account for the locale's collation rules. */ + caseFirst?: LocaleCollationCaseFirst; - /** The collation type used for sorting */ - collation?: string; + /** The collation type used for sorting */ + collation?: string; - /** The time keeping format convention used by the locale. */ - hourCycle?: LocaleHourCycleKey; + /** The time keeping format convention used by the locale. */ + hourCycle?: LocaleHourCycleKey; - /** The numeral system used by the locale. */ - numberingSystem?: string; + /** The numeral system used by the locale. */ + numberingSystem?: string; - /** Flag that defines whether the locale has special collation handling for numeric characters. */ - numeric?: boolean; + /** Flag that defines whether the locale has special collation handling for numeric characters. */ + numeric?: boolean; - /** The region of the world (usually a country) associated with the locale. Possible values are region codes as defined by ISO 3166-1. */ - region?: string; + /** The region of the world (usually a country) associated with the locale. Possible values are region codes as defined by ISO 3166-1. */ + region?: string; - /** The script used for writing the particular language used in the locale. Possible values are script codes as defined by ISO 15924. */ - script?: string; - } + /** The script used for writing the particular language used in the locale. Possible values are script codes as defined by ISO 15924. */ + script?: string; +} - interface Locale extends LocaleOptions { - /** A string containing the language, and the script and region if available. */ - baseName: string; +interface Locale extends LocaleOptions { + /** A string containing the language, and the script and region if available. */ + baseName: string; - /** The primary language subtag associated with the locale. */ - language: string; + /** The primary language subtag associated with the locale. */ + language: string; - /** Gets the most likely values for the language, script, and region of the locale based on existing values. */ - maximize(): Locale; + /** Gets the most likely values for the language, script, and region of the locale based on existing values. */ + maximize(): Locale; - /** Attempts to remove information about the locale that would be added by calling `Locale.maximize()`. */ - minimize(): Locale; + /** Attempts to remove information about the locale that would be added by calling `Locale.maximize()`. */ + minimize(): Locale; - /** Returns the locale's full locale identifier string. */ - toString(): UnicodeBCP47LocaleIdentifier; - } + /** Returns the locale's full locale identifier string. */ + toString(): UnicodeBCP47LocaleIdentifier; +} - /** - * Constructor creates [Intl.Locale](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) - * objects - * - * @param tag - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646). - * For the general form and interpretation of the locales argument, - * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). - * - * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/Locale#Parameters) with some or all of options of the locale. - * - * @returns [Intl.Locale](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale). - */ - const Locale: { - new (tag: UnicodeBCP47LocaleIdentifier | Locale, options?: LocaleOptions): Locale; - }; +/** + * Constructor creates [Intl.Locale](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) + * objects + * + * @param tag - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646). + * For the general form and interpretation of the locales argument, + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/Locale#Parameters) with some or all of options of the locale. + * + * @returns [Intl.Locale](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale). + */ + const Locale: { + new (tag: UnicodeBCP47LocaleIdentifier | Locale, options?: LocaleOptions): Locale; +}; - type DisplayNamesFallback = - | "code" - | "none"; +type DisplayNamesFallback = + | "code" + | "none"; - type DisplayNamesType = - | "language" - | "region" - | "script" - | "calendar" - | "dateTimeField" - | "currency"; +type DisplayNamesType = + | "language" + | "region" + | "script" + | "calendar" + | "dateTimeField" + | "currency"; - type DisplayNamesLanguageDisplay = - | "dialect" - | "standard"; +type DisplayNamesLanguageDisplay = + | "dialect" + | "standard"; - interface DisplayNamesOptions { - localeMatcher?: RelativeTimeFormatLocaleMatcher; +interface DisplayNamesOptions { + localeMatcher?: RelativeTimeFormatLocaleMatcher; - style?: RelativeTimeFormatStyle; + style?: RelativeTimeFormatStyle; - type: DisplayNamesType; + type: DisplayNamesType; - languageDisplay?: DisplayNamesLanguageDisplay; + languageDisplay?: DisplayNamesLanguageDisplay; - fallback?: DisplayNamesFallback; - } + fallback?: DisplayNamesFallback; +} - interface ResolvedDisplayNamesOptions { - locale: UnicodeBCP47LocaleIdentifier; +interface ResolvedDisplayNamesOptions { + locale: UnicodeBCP47LocaleIdentifier; - style: RelativeTimeFormatStyle; + style: RelativeTimeFormatStyle; - type: DisplayNamesType; + type: DisplayNamesType; - fallback: DisplayNamesFallback; + fallback: DisplayNamesFallback; - languageDisplay?: DisplayNamesLanguageDisplay; - } + languageDisplay?: DisplayNamesLanguageDisplay; +} - interface DisplayNames { - /** - * Receives a code and returns a string based on the locale and options provided when instantiating - * [`Intl.DisplayNames()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) - * - * @param code The `code` to provide depends on the `type` passed to display name during creation: - * - If the type is `"region"`, code should be either an [ISO-3166 two letters region code](https://www.iso.org/iso-3166-country-codes.html), - * or a [three digits UN M49 Geographic Regions](https://unstats.un.org/unsd/methodology/m49/). - * - If the type is `"script"`, code should be an [ISO-15924 four letters script code](https://unicode.org/iso15924/iso15924-codes.html). - * - If the type is `"language"`, code should be a `languageCode` ["-" `scriptCode`] ["-" `regionCode` ] *("-" `variant` ) - * subsequence of the unicode_language_id grammar in [UTS 35's Unicode Language and Locale Identifiers grammar](https://unicode.org/reports/tr35/#Unicode_language_identifier). - * `languageCode` is either a two letters ISO 639-1 language code or a three letters ISO 639-2 language code. - * - If the type is `"currency"`, code should be a [3-letter ISO 4217 currency code](https://www.iso.org/iso-4217-currency-codes.html). - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/of). - */ - of(code: string): string | undefined; +interface DisplayNames { + /** + * Receives a code and returns a string based on the locale and options provided when instantiating + * [`Intl.DisplayNames()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) + * + * @param code The `code` to provide depends on the `type` passed to display name during creation: + * - If the type is `"region"`, code should be either an [ISO-3166 two letters region code](https://www.iso.org/iso-3166-country-codes.html), + * or a [three digits UN M49 Geographic Regions](https://unstats.un.org/unsd/methodology/m49/). + * - If the type is `"script"`, code should be an [ISO-15924 four letters script code](https://unicode.org/iso15924/iso15924-codes.html). + * - If the type is `"language"`, code should be a `languageCode` ["-" `scriptCode`] ["-" `regionCode` ] *("-" `variant` ) + * subsequence of the unicode_language_id grammar in [UTS 35's Unicode Language and Locale Identifiers grammar](https://unicode.org/reports/tr35/#Unicode_language_identifier). + * `languageCode` is either a two letters ISO 639-1 language code or a three letters ISO 639-2 language code. + * - If the type is `"currency"`, code should be a [3-letter ISO 4217 currency code](https://www.iso.org/iso-4217-currency-codes.html). + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/of). + */ + of(code: string): string | undefined; - /** - * Returns a new object with properties reflecting the locale and style formatting options computed during the construction of the current - * [`Intl/DisplayNames`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/resolvedOptions). - */ - resolvedOptions(): ResolvedDisplayNamesOptions; - } + /** + * Returns a new object with properties reflecting the locale and style formatting options computed during the construction of the current + * [`Intl/DisplayNames`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/resolvedOptions). + */ + resolvedOptions(): ResolvedDisplayNamesOptions; +} - /** - * The [`Intl.DisplayNames()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) - * object enables the consistent translation of language, region and script display names. +/** + * The [`Intl.DisplayNames()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) + * object enables the consistent translation of language, region and script display names. + * + * [Compatibility](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames#browser_compatibility). + */ + const DisplayNames: { + prototype: DisplayNames; + + /** + * @param locales A string with a BCP 47 language tag, or an array of such strings. + * For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) + * page. + * + * @param options An object for setting up a display name. * - * [Compatibility](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames#browser_compatibility). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/DisplayNames). */ - const DisplayNames: { - prototype: DisplayNames; - - /** - * @param locales A string with a BCP 47 language tag, or an array of such strings. - * For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) - * page. - * - * @param options An object for setting up a display name. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/DisplayNames). - */ - new (locales: LocalesArgument, options: DisplayNamesOptions): DisplayNames; - - /** - * Returns an array containing those of the provided locales that are supported in display names without having to fall back to the runtime's default locale. - * - * @param locales A string with a BCP 47 language tag, or an array of such strings. - * For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) - * page. - * - * @param options An object with a locale matcher. - * - * @returns An array of strings representing a subset of the given locale tags that are supported in display names without having to fall back to the runtime's default locale. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/supportedLocalesOf). - */ - supportedLocalesOf(locales?: LocalesArgument, options?: { localeMatcher?: RelativeTimeFormatLocaleMatcher; }): UnicodeBCP47LocaleIdentifier[]; - }; + new (locales: LocalesArgument, options: DisplayNamesOptions): DisplayNames; + + /** + * Returns an array containing those of the provided locales that are supported in display names without having to fall back to the runtime's default locale. + * + * @param locales A string with a BCP 47 language tag, or an array of such strings. + * For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) + * page. + * + * @param options An object with a locale matcher. + * + * @returns An array of strings representing a subset of the given locale tags that are supported in display names without having to fall back to the runtime's default locale. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/supportedLocalesOf). + */ + supportedLocalesOf(locales?: LocalesArgument, options?: { localeMatcher?: RelativeTimeFormatLocaleMatcher; }): UnicodeBCP47LocaleIdentifier[]; +}; - interface CollatorConstructor { - new (locales?: LocalesArgument, options?: CollatorOptions): Collator; +interface CollatorConstructor { + new (locales?: LocalesArgument, options?: CollatorOptions): Collator; - (locales?: LocalesArgument, options?: CollatorOptions): Collator; + (locales?: LocalesArgument, options?: CollatorOptions): Collator; - supportedLocalesOf(locales: LocalesArgument, options?: CollatorOptions): string[]; - } + supportedLocalesOf(locales: LocalesArgument, options?: CollatorOptions): string[]; +} - interface DateTimeFormatConstructor { - new (locales?: LocalesArgument, options?: DateTimeFormatOptions): DateTimeFormat; +interface DateTimeFormatConstructor { + new (locales?: LocalesArgument, options?: DateTimeFormatOptions): DateTimeFormat; - (locales?: LocalesArgument, options?: DateTimeFormatOptions): DateTimeFormat; + (locales?: LocalesArgument, options?: DateTimeFormatOptions): DateTimeFormat; - supportedLocalesOf(locales: LocalesArgument, options?: DateTimeFormatOptions): string[]; - } + supportedLocalesOf(locales: LocalesArgument, options?: DateTimeFormatOptions): string[]; +} - interface NumberFormatConstructor { - new (locales?: LocalesArgument, options?: NumberFormatOptions): NumberFormat; +interface NumberFormatConstructor { + new (locales?: LocalesArgument, options?: NumberFormatOptions): NumberFormat; - (locales?: LocalesArgument, options?: NumberFormatOptions): NumberFormat; + (locales?: LocalesArgument, options?: NumberFormatOptions): NumberFormat; - supportedLocalesOf(locales: LocalesArgument, options?: NumberFormatOptions): string[]; - } + supportedLocalesOf(locales: LocalesArgument, options?: NumberFormatOptions): string[]; +} - interface PluralRulesConstructor { - new (locales?: LocalesArgument, options?: PluralRulesOptions): PluralRules; +interface PluralRulesConstructor { + new (locales?: LocalesArgument, options?: PluralRulesOptions): PluralRules; - (locales?: LocalesArgument, options?: PluralRulesOptions): PluralRules; + (locales?: LocalesArgument, options?: PluralRulesOptions): PluralRules; - supportedLocalesOf(locales: LocalesArgument, options?: { localeMatcher?: "lookup" | "best fit"; }): string[]; - } + supportedLocalesOf(locales: LocalesArgument, options?: { localeMatcher?: "lookup" | "best fit"; }): string[]; +} } ///////////////////////////// // lib.es2020.number.d.ts ///////////////////////////// interface Number { - /** - * Converts a number to a string by using the current or specified locale. - * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.NumberFormatOptions): string; + /** + * Converts a number to a string by using the current or specified locale. + * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.NumberFormatOptions): string; } ///////////////////////////// // lib.es2020.promise.d.ts ///////////////////////////// interface PromiseFulfilledResult { - status: "fulfilled"; + status: "fulfilled"; - value: T; + value: T; } interface PromiseRejectedResult { - status: "rejected"; + status: "rejected"; - reason: any; + reason: any; } type PromiseSettledResult = PromiseFulfilledResult | PromiseRejectedResult; interface PromiseConstructor { - /** - * Creates a Promise that is resolved with an array of results when all - * of the provided Promises resolve or reject. - * @param values An array of Promises. - * @returns A new Promise. - */ - allSettled(values: T): Promise<{ -readonly [P in keyof T]: PromiseSettledResult>; }>; + /** + * Creates a Promise that is resolved with an array of results when all + * of the provided Promises resolve or reject. + * @param values An array of Promises. + * @returns A new Promise. + */ + allSettled(values: T): Promise<{ -readonly [P in keyof T]: PromiseSettledResult>; }>; - /** - * Creates a Promise that is resolved with an array of results when all - * of the provided Promises resolve or reject. - * @param values An array of Promises. - * @returns A new Promise. - */ - allSettled(values: Iterable>): Promise>[]>; + /** + * Creates a Promise that is resolved with an array of results when all + * of the provided Promises resolve or reject. + * @param values An array of Promises. + * @returns A new Promise. + */ + allSettled(values: Iterable>): Promise>[]>; } ///////////////////////////// // lib.es2020.sharedmemory.d.ts ///////////////////////////// interface Atomics { - /** - * Adds a value to the value at the given position in the array, returning the original value. - * Until this atomic operation completes, any other read or write operation against the array - * will block. - */ - add(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + /** + * Adds a value to the value at the given position in the array, returning the original value. + * Until this atomic operation completes, any other read or write operation against the array + * will block. + */ + add(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - /** - * Stores the bitwise AND of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or - * write operation against the array will block. - */ - and(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + /** + * Stores the bitwise AND of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or + * write operation against the array will block. + */ + and(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - /** - * Replaces the value at the given position in the array if the original value equals the given - * expected value, returning the original value. Until this atomic operation completes, any - * other read or write operation against the array will block. - */ - compareExchange(typedArray: BigInt64Array | BigUint64Array, index: number, expectedValue: bigint, replacementValue: bigint): bigint; + /** + * Replaces the value at the given position in the array if the original value equals the given + * expected value, returning the original value. Until this atomic operation completes, any + * other read or write operation against the array will block. + */ + compareExchange(typedArray: BigInt64Array | BigUint64Array, index: number, expectedValue: bigint, replacementValue: bigint): bigint; - /** - * Replaces the value at the given position in the array, returning the original value. Until - * this atomic operation completes, any other read or write operation against the array will - * block. - */ - exchange(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + /** + * Replaces the value at the given position in the array, returning the original value. Until + * this atomic operation completes, any other read or write operation against the array will + * block. + */ + exchange(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - /** - * Returns the value at the given position in the array. Until this atomic operation completes, - * any other read or write operation against the array will block. - */ - load(typedArray: BigInt64Array | BigUint64Array, index: number): bigint; + /** + * Returns the value at the given position in the array. Until this atomic operation completes, + * any other read or write operation against the array will block. + */ + load(typedArray: BigInt64Array | BigUint64Array, index: number): bigint; - /** - * Stores the bitwise OR of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or write - * operation against the array will block. - */ - or(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + /** + * Stores the bitwise OR of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or write + * operation against the array will block. + */ + or(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - /** - * Stores a value at the given position in the array, returning the new value. Until this - * atomic operation completes, any other read or write operation against the array will block. - */ - store(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + /** + * Stores a value at the given position in the array, returning the new value. Until this + * atomic operation completes, any other read or write operation against the array will block. + */ + store(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - /** - * Subtracts a value from the value at the given position in the array, returning the original - * value. Until this atomic operation completes, any other read or write operation against the - * array will block. - */ - sub(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + /** + * Subtracts a value from the value at the given position in the array, returning the original + * value. Until this atomic operation completes, any other read or write operation against the + * array will block. + */ + sub(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - /** - * If the value at the given position in the array is equal to the provided value, the current - * agent is put to sleep causing execution to suspend until the timeout expires (returning - * `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns - * `"not-equal"`. - */ - wait(typedArray: BigInt64Array, index: number, value: bigint, timeout?: number): "ok" | "not-equal" | "timed-out"; + /** + * If the value at the given position in the array is equal to the provided value, the current + * agent is put to sleep causing execution to suspend until the timeout expires (returning + * `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns + * `"not-equal"`. + */ + wait(typedArray: BigInt64Array, index: number, value: bigint, timeout?: number): "ok" | "not-equal" | "timed-out"; - /** - * Wakes up sleeping agents that are waiting on the given index of the array, returning the - * number of agents that were awoken. - * @param typedArray A shared BigInt64Array. - * @param index The position in the typedArray to wake up on. - * @param count The number of sleeping agents to notify. Defaults to +Infinity. - */ - notify(typedArray: BigInt64Array, index: number, count?: number): number; + /** + * Wakes up sleeping agents that are waiting on the given index of the array, returning the + * number of agents that were awoken. + * @param typedArray A shared BigInt64Array. + * @param index The position in the typedArray to wake up on. + * @param count The number of sleeping agents to notify. Defaults to +Infinity. + */ + notify(typedArray: BigInt64Array, index: number, count?: number): number; - /** - * Stores the bitwise XOR of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or write - * operation against the array will block. - */ - xor(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + /** + * Stores the bitwise XOR of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or write + * operation against the array will block. + */ + xor(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; } ///////////////////////////// // lib.es2020.string.d.ts ///////////////////////////// interface String { - /** - * Matches a string with a regular expression, and returns an iterable of matches - * containing the results of that search. - * @param regexp A regular expression - */ - matchAll(regexp: RegExp): RegExpStringIterator; + /** + * Matches a string with a regular expression, and returns an iterable of matches + * containing the results of that search. + * @param regexp A regular expression + */ + matchAll(regexp: RegExp): RegExpStringIterator; - /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */ - toLocaleLowerCase(locales?: Intl.LocalesArgument): string; + /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */ + toLocaleLowerCase(locales?: Intl.LocalesArgument): string; - /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */ - toLocaleUpperCase(locales?: Intl.LocalesArgument): string; + /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */ + toLocaleUpperCase(locales?: Intl.LocalesArgument): string; - /** - * Determines whether two strings are equivalent in the current or specified locale. - * @param that String to compare to target string - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details. - * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details. - */ - localeCompare(that: string, locales?: Intl.LocalesArgument, options?: Intl.CollatorOptions): number; + /** + * Determines whether two strings are equivalent in the current or specified locale. + * @param that String to compare to target string + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details. + * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details. + */ + localeCompare(that: string, locales?: Intl.LocalesArgument, options?: Intl.CollatorOptions): number; } ///////////////////////////// // lib.es2020.symbol.wellknown.d.ts ///////////////////////////// interface SymbolConstructor { - /** - * A regular expression method that matches the regular expression against a string. Called - * by the String.prototype.matchAll method. - */ - readonly matchAll: unique symbol; + /** + * A regular expression method that matches the regular expression against a string. Called + * by the String.prototype.matchAll method. + */ + readonly matchAll: unique symbol; } interface RegExpStringIterator extends IteratorObject { - [Symbol.iterator](): RegExpStringIterator; + [Symbol.iterator](): RegExpStringIterator; } interface RegExp { - /** - * Matches a string with this regular expression, and returns an iterable of matches - * containing the results of that search. - * @param string A string to search within. - */ - [Symbol.matchAll](str: string): RegExpStringIterator; + /** + * Matches a string with this regular expression, and returns an iterable of matches + * containing the results of that search. + * @param string A string to search within. + */ + [Symbol.matchAll](str: string): RegExpStringIterator; } ///////////////////////////// // lib.es2021.intl.d.ts ///////////////////////////// declare namespace Intl { - interface DateTimeFormatOptions { - dateStyle?: "full" | "long" | "medium" | "short" | undefined; +interface DateTimeFormatOptions { + dateStyle?: "full" | "long" | "medium" | "short" | undefined; - timeStyle?: "full" | "long" | "medium" | "short" | undefined; + timeStyle?: "full" | "long" | "medium" | "short" | undefined; - dayPeriod?: "narrow" | "short" | "long" | undefined; + dayPeriod?: "narrow" | "short" | "long" | undefined; - fractionalSecondDigits?: 1 | 2 | 3 | undefined; - } + fractionalSecondDigits?: 1 | 2 | 3 | undefined; +} - interface DateTimeRangeFormatPart extends DateTimeFormatPart { - source: "startRange" | "endRange" | "shared"; - } +interface DateTimeRangeFormatPart extends DateTimeFormatPart { + source: "startRange" | "endRange" | "shared"; +} - interface DateTimeFormat { - formatRange(startDate: Date | number | bigint, endDate: Date | number | bigint): string; +interface DateTimeFormat { + formatRange(startDate: Date | number | bigint, endDate: Date | number | bigint): string; - formatRangeToParts(startDate: Date | number | bigint, endDate: Date | number | bigint): DateTimeRangeFormatPart[]; - } + formatRangeToParts(startDate: Date | number | bigint, endDate: Date | number | bigint): DateTimeRangeFormatPart[]; +} - interface ResolvedDateTimeFormatOptions { - dateStyle?: "full" | "long" | "medium" | "short"; +interface ResolvedDateTimeFormatOptions { + dateStyle?: "full" | "long" | "medium" | "short"; - timeStyle?: "full" | "long" | "medium" | "short"; + timeStyle?: "full" | "long" | "medium" | "short"; - hourCycle?: "h11" | "h12" | "h23" | "h24"; + hourCycle?: "h11" | "h12" | "h23" | "h24"; - dayPeriod?: "narrow" | "short" | "long"; + dayPeriod?: "narrow" | "short" | "long"; - fractionalSecondDigits?: 1 | 2 | 3; - } + fractionalSecondDigits?: 1 | 2 | 3; +} - /** - * The locale matching algorithm to use. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). - */ - type ListFormatLocaleMatcher = "lookup" | "best fit"; +/** + * The locale matching algorithm to use. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). + */ + type ListFormatLocaleMatcher = "lookup" | "best fit"; - /** - * The format of output message. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). - */ - type ListFormatType = "conjunction" | "disjunction" | "unit"; +/** + * The format of output message. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). + */ + type ListFormatType = "conjunction" | "disjunction" | "unit"; - /** - * The length of the formatted message. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). - */ - type ListFormatStyle = "long" | "short" | "narrow"; +/** + * The length of the formatted message. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). + */ + type ListFormatStyle = "long" | "short" | "narrow"; - /** - * An object with some or all properties of the `Intl.ListFormat` constructor `options` parameter. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). - */ - interface ListFormatOptions { - /** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */ - localeMatcher?: ListFormatLocaleMatcher | undefined; - - /** The format of output message. */ - type?: ListFormatType | undefined; - - /** The length of the internationalized message. */ - style?: ListFormatStyle | undefined; - } - - interface ResolvedListFormatOptions { - locale: string; - - style: ListFormatStyle; - - type: ListFormatType; - } - - interface ListFormat { - /** - * Returns a string with a language-specific representation of the list. - * - * @param list - An iterable object, such as an [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array). - * - * @throws `TypeError` if `list` includes something other than the possible values. - * - * @returns {string} A language-specific formatted string representing the elements of the list. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/format). - */ - format(list: Iterable): string; - - /** - * Returns an Array of objects representing the different components that can be used to format a list of values in a locale-aware fashion. - * - * @param list - An iterable object, such as an [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array), to be formatted according to a locale. - * - * @throws `TypeError` if `list` includes something other than the possible values. - * - * @returns {{ type: "element" | "literal", value: string; }[]} An Array of components which contains the formatted parts from the list. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/formatToParts). - */ - formatToParts(list: Iterable): { type: "element" | "literal"; value: string; }[]; - - /** - * Returns a new object with properties reflecting the locale and style - * formatting options computed during the construction of the current - * `Intl.ListFormat` object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/resolvedOptions). - */ - resolvedOptions(): ResolvedListFormatOptions; - } - - const ListFormat: { - prototype: ListFormat; - - /** - * Creates [Intl.ListFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat) objects that - * enable language-sensitive list formatting. - * - * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. - * For the general form and interpretation of the `locales` argument, - * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). - * - * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters) - * with some or all options of `ListFormatOptions`. - * - * @returns [Intl.ListFormatOptions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat) object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat). - */ - new (locales?: LocalesArgument, options?: ListFormatOptions): ListFormat; - - /** - * Returns an array containing those of the provided locales that are - * supported in list formatting without having to fall back to the runtime's default locale. - * - * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. - * For the general form and interpretation of the `locales` argument, - * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). - * - * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf#parameters). - * with some or all possible options. - * - * @returns An array of strings representing a subset of the given locale tags that are supported in list - * formatting without having to fall back to the runtime's default locale. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf). - */ - supportedLocalesOf(locales: LocalesArgument, options?: Pick): UnicodeBCP47LocaleIdentifier[]; - }; -} +/** + * An object with some or all properties of the `Intl.ListFormat` constructor `options` parameter. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). + */ + interface ListFormatOptions { + /** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */ + localeMatcher?: ListFormatLocaleMatcher | undefined; -///////////////////////////// -// lib.es2021.promise.d.ts -///////////////////////////// -interface AggregateError extends Error { - errors: any[]; + /** The format of output message. */ + type?: ListFormatType | undefined; + + /** The length of the internationalized message. */ + style?: ListFormatStyle | undefined; } -interface AggregateErrorConstructor { - new (errors: Iterable, message?: string): AggregateError; +interface ResolvedListFormatOptions { + locale: string; - (errors: Iterable, message?: string): AggregateError; + style: ListFormatStyle; - readonly prototype: AggregateError; + type: ListFormatType; } -declare var AggregateError: AggregateErrorConstructor; +interface ListFormat { + /** + * Returns a string with a language-specific representation of the list. + * + * @param list - An iterable object, such as an [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array). + * + * @throws `TypeError` if `list` includes something other than the possible values. + * + * @returns {string} A language-specific formatted string representing the elements of the list. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/format). + */ + format(list: Iterable): string; -/** - * Represents the completion of an asynchronous operation - */ -interface PromiseConstructor { /** - * The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm. - * @param values An array or iterable of Promises. - * @returns A new Promise. + * Returns an Array of objects representing the different components that can be used to format a list of values in a locale-aware fashion. + * + * @param list - An iterable object, such as an [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array), to be formatted according to a locale. + * + * @throws `TypeError` if `list` includes something other than the possible values. + * + * @returns {{ type: "element" | "literal", value: string; }[]} An Array of components which contains the formatted parts from the list. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/formatToParts). */ - any(values: T): Promise>; + formatToParts(list: Iterable): { type: "element" | "literal"; value: string; }[]; /** - * The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm. - * @param values An array or iterable of Promises. - * @returns A new Promise. + * Returns a new object with properties reflecting the locale and style + * formatting options computed during the construction of the current + * `Intl.ListFormat` object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/resolvedOptions). */ - any(values: Iterable>): Promise>; + resolvedOptions(): ResolvedListFormatOptions; } -///////////////////////////// -// lib.es2021.string.d.ts -///////////////////////////// -interface String { +const ListFormat: { + prototype: ListFormat; + /** - * Replace all instances of a substring in a string, using a regular expression or search string. - * @param searchValue A string to search for. - * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string. + * Creates [Intl.ListFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat) objects that + * enable language-sensitive list formatting. + * + * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. + * For the general form and interpretation of the `locales` argument, + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters) + * with some or all options of `ListFormatOptions`. + * + * @returns [Intl.ListFormatOptions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat) object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat). */ - replaceAll(searchValue: string | RegExp, replaceValue: string): string; + new (locales?: LocalesArgument, options?: ListFormatOptions): ListFormat; /** - * Replace all instances of a substring in a string, using a regular expression or search string. - * @param searchValue A string to search for. - * @param replacer A function that returns the replacement text. + * Returns an array containing those of the provided locales that are + * supported in list formatting without having to fall back to the runtime's default locale. + * + * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. + * For the general form and interpretation of the `locales` argument, + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf#parameters). + * with some or all possible options. + * + * @returns An array of strings representing a subset of the given locale tags that are supported in list + * formatting without having to fall back to the runtime's default locale. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf). */ - replaceAll(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; + supportedLocalesOf(locales: LocalesArgument, options?: Pick): UnicodeBCP47LocaleIdentifier[]; +}; +} + +///////////////////////////// +// lib.es2021.promise.d.ts +///////////////////////////// +interface AggregateError extends Error { + errors: any[]; +} + +interface AggregateErrorConstructor { + new (errors: Iterable, message?: string): AggregateError; + + (errors: Iterable, message?: string): AggregateError; + + readonly prototype: AggregateError; +} + +declare var AggregateError: AggregateErrorConstructor; + +/** + * Represents the completion of an asynchronous operation + */ +interface PromiseConstructor { + /** + * The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm. + * @param values An array or iterable of Promises. + * @returns A new Promise. + */ + any(values: T): Promise>; + + /** + * The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm. + * @param values An array or iterable of Promises. + * @returns A new Promise. + */ + any(values: Iterable>): Promise>; +} + +///////////////////////////// +// lib.es2021.string.d.ts +///////////////////////////// +interface String { + /** + * Replace all instances of a substring in a string, using a regular expression or search string. + * @param searchValue A string to search for. + * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string. + */ + replaceAll(searchValue: string | RegExp, replaceValue: string): string; + + /** + * Replace all instances of a substring in a string, using a regular expression or search string. + * @param searchValue A string to search for. + * @param replacer A function that returns the replacement text. + */ + replaceAll(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; } ///////////////////////////// // lib.es2021.weakref.d.ts ///////////////////////////// interface WeakRef { - readonly [Symbol.toStringTag]: "WeakRef"; + readonly [Symbol.toStringTag]: "WeakRef"; - /** - * Returns the WeakRef instance's target value, or undefined if the target value has been - * reclaimed. - * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. - */ - deref(): T | undefined; + /** + * Returns the WeakRef instance's target value, or undefined if the target value has been + * reclaimed. + * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. + */ + deref(): T | undefined; } interface WeakRefConstructor { - readonly prototype: WeakRef; + readonly prototype: WeakRef; - /** - * Creates a WeakRef instance for the given target value. - * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. - * @param target The target value for the WeakRef instance. - */ - new (target: T): WeakRef; + /** + * Creates a WeakRef instance for the given target value. + * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. + * @param target The target value for the WeakRef instance. + */ + new (target: T): WeakRef; } declare var WeakRef: WeakRefConstructor; interface FinalizationRegistry { - readonly [Symbol.toStringTag]: "FinalizationRegistry"; + readonly [Symbol.toStringTag]: "FinalizationRegistry"; - /** - * Registers a value with the registry. - * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. - * @param target The target value to register. - * @param heldValue The value to pass to the finalizer for this value. This cannot be the - * target value. - * @param unregisterToken The token to pass to the unregister method to unregister the target - * value. If not provided, the target cannot be unregistered. - */ - register(target: WeakKey, heldValue: T, unregisterToken?: WeakKey): void; + /** + * Registers a value with the registry. + * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. + * @param target The target value to register. + * @param heldValue The value to pass to the finalizer for this value. This cannot be the + * target value. + * @param unregisterToken The token to pass to the unregister method to unregister the target + * value. If not provided, the target cannot be unregistered. + */ + register(target: WeakKey, heldValue: T, unregisterToken?: WeakKey): void; - /** - * Unregisters a value from the registry. - * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. - * @param unregisterToken The token that was used as the unregisterToken argument when calling - * register to register the target value. - */ - unregister(unregisterToken: WeakKey): boolean; + /** + * Unregisters a value from the registry. + * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. + * @param unregisterToken The token that was used as the unregisterToken argument when calling + * register to register the target value. + */ + unregister(unregisterToken: WeakKey): boolean; } interface FinalizationRegistryConstructor { - readonly prototype: FinalizationRegistry; + readonly prototype: FinalizationRegistry; - /** - * Creates a finalization registry with an associated cleanup callback - * @param cleanupCallback The callback to call after a value in the registry has been reclaimed. - */ - new (cleanupCallback: (heldValue: T) => void): FinalizationRegistry; + /** + * Creates a finalization registry with an associated cleanup callback + * @param cleanupCallback The callback to call after a value in the registry has been reclaimed. + */ + new (cleanupCallback: (heldValue: T) => void): FinalizationRegistry; } declare var FinalizationRegistry: FinalizationRegistryConstructor; @@ -4358,1312 +4358,1312 @@ declare var FinalizationRegistry: FinalizationRegistryConstructor; // lib.es2022.array.d.ts ///////////////////////////// interface Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): T | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): T | undefined; } interface ReadonlyArray { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): T | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): T | undefined; } interface Int8Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; } interface Uint8Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; } interface Uint8ClampedArray { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; } interface Int16Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; } interface Uint16Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; } interface Int32Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; } interface Uint32Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; } interface Float32Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; } interface Float64Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; } interface BigInt64Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): bigint | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): bigint | undefined; } interface BigUint64Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): bigint | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): bigint | undefined; } ///////////////////////////// // lib.es2022.error.d.ts ///////////////////////////// interface ErrorOptions { - cause?: unknown; + cause?: unknown; } interface Error { - cause?: unknown; + cause?: unknown; } interface ErrorConstructor { - new (message?: string, options?: ErrorOptions): Error; + new (message?: string, options?: ErrorOptions): Error; - (message?: string, options?: ErrorOptions): Error; + (message?: string, options?: ErrorOptions): Error; } interface EvalErrorConstructor { - new (message?: string, options?: ErrorOptions): EvalError; + new (message?: string, options?: ErrorOptions): EvalError; - (message?: string, options?: ErrorOptions): EvalError; + (message?: string, options?: ErrorOptions): EvalError; } interface RangeErrorConstructor { - new (message?: string, options?: ErrorOptions): RangeError; + new (message?: string, options?: ErrorOptions): RangeError; - (message?: string, options?: ErrorOptions): RangeError; + (message?: string, options?: ErrorOptions): RangeError; } interface ReferenceErrorConstructor { - new (message?: string, options?: ErrorOptions): ReferenceError; + new (message?: string, options?: ErrorOptions): ReferenceError; - (message?: string, options?: ErrorOptions): ReferenceError; + (message?: string, options?: ErrorOptions): ReferenceError; } interface SyntaxErrorConstructor { - new (message?: string, options?: ErrorOptions): SyntaxError; + new (message?: string, options?: ErrorOptions): SyntaxError; - (message?: string, options?: ErrorOptions): SyntaxError; + (message?: string, options?: ErrorOptions): SyntaxError; } interface TypeErrorConstructor { - new (message?: string, options?: ErrorOptions): TypeError; + new (message?: string, options?: ErrorOptions): TypeError; - (message?: string, options?: ErrorOptions): TypeError; + (message?: string, options?: ErrorOptions): TypeError; } interface URIErrorConstructor { - new (message?: string, options?: ErrorOptions): URIError; + new (message?: string, options?: ErrorOptions): URIError; - (message?: string, options?: ErrorOptions): URIError; + (message?: string, options?: ErrorOptions): URIError; } interface AggregateErrorConstructor { - new ( - errors: Iterable, - message?: string, - options?: ErrorOptions, - ): AggregateError; + new ( + errors: Iterable, + message?: string, + options?: ErrorOptions, + ): AggregateError; - ( - errors: Iterable, - message?: string, - options?: ErrorOptions, - ): AggregateError; + ( + errors: Iterable, + message?: string, + options?: ErrorOptions, + ): AggregateError; } ///////////////////////////// // lib.es2022.intl.d.ts ///////////////////////////// declare namespace Intl { - /** - * Returns a sorted array of the supported collation, calendar, currency, numbering system, timezones, and units by the implementation. - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf) - * - * @param key A string indicating the category of values to return. - * @returns A sorted array of the supported values. - */ - function supportedValuesOf(key: "calendar" | "collation" | "currency" | "numberingSystem" | "timeZone" | "unit"): string[]; +/** + * Returns a sorted array of the supported collation, calendar, currency, numbering system, timezones, and units by the implementation. + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf) + * + * @param key A string indicating the category of values to return. + * @returns A sorted array of the supported values. + */ + function supportedValuesOf(key: "calendar" | "collation" | "currency" | "numberingSystem" | "timeZone" | "unit"): string[]; } ///////////////////////////// // lib.es2022.object.d.ts ///////////////////////////// interface ObjectConstructor { - /** - * Determines whether an object has a property with the specified name. - * @param o An object. - * @param v A property name. - */ - hasOwn(o: object, v: PropertyKey): boolean; + /** + * Determines whether an object has a property with the specified name. + * @param o An object. + * @param v A property name. + */ + hasOwn(o: object, v: PropertyKey): boolean; } ///////////////////////////// // lib.es2022.regexp.d.ts ///////////////////////////// interface RegExp { - /** - * Returns a Boolean value indicating the state of the hasIndices flag (d) used with a regular expression. - * Default is false. Read-only. - */ - readonly hasIndices: boolean; + /** + * Returns a Boolean value indicating the state of the hasIndices flag (d) used with a regular expression. + * Default is false. Read-only. + */ + readonly hasIndices: boolean; } ///////////////////////////// // lib.es2022.string.d.ts ///////////////////////////// interface String { - /** - * Returns a new String consisting of the single UTF-16 code unit located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): string | undefined; + /** + * Returns a new String consisting of the single UTF-16 code unit located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): string | undefined; } ///////////////////////////// // lib.es2023.array.d.ts ///////////////////////////// interface Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S | undefined; - - findLast(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S | undefined; + + findLast(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): number; - /** - * Returns a copy of an array with its elements reversed. - */ - toReversed(): T[]; + /** + * Returns a copy of an array with its elements reversed. + */ + toReversed(): T[]; - /** - * Returns a copy of an array with its elements sorted. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order. - * ```ts - * [11, 2, 22, 1].toSorted((a, b) => a - b) // [1, 2, 11, 22] - * ``` - */ - toSorted(compareFn?: (a: T, b: T) => number): T[]; + /** + * Returns a copy of an array with its elements sorted. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order. + * ```ts + * [11, 2, 22, 1].toSorted((a, b) => a - b) // [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: T, b: T) => number): T[]; - /** - * Copies an array and removes elements and, if necessary, inserts new elements in their place. Returns the copied array. - * @param start The zero-based location in the array from which to start removing elements. - * @param deleteCount The number of elements to remove. - * @param items Elements to insert into the copied array in place of the deleted elements. - * @returns The copied array. - */ - toSpliced(start: number, deleteCount: number, ...items: T[]): T[]; + /** + * Copies an array and removes elements and, if necessary, inserts new elements in their place. Returns the copied array. + * @param start The zero-based location in the array from which to start removing elements. + * @param deleteCount The number of elements to remove. + * @param items Elements to insert into the copied array in place of the deleted elements. + * @returns The copied array. + */ + toSpliced(start: number, deleteCount: number, ...items: T[]): T[]; - /** - * Copies an array and removes elements while returning the remaining elements. - * @param start The zero-based location in the array from which to start removing elements. - * @param deleteCount The number of elements to remove. - * @returns A copy of the original array with the remaining elements. - */ - toSpliced(start: number, deleteCount?: number): T[]; + /** + * Copies an array and removes elements while returning the remaining elements. + * @param start The zero-based location in the array from which to start removing elements. + * @param deleteCount The number of elements to remove. + * @returns A copy of the original array with the remaining elements. + */ + toSpliced(start: number, deleteCount?: number): T[]; - /** - * Copies an array, then overwrites the value at the provided index with the - * given value. If the index is negative, then it replaces from the end - * of the array. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to write into the copied array. - * @returns The copied array with the updated value. - */ - with(index: number, value: T): T[]; + /** + * Copies an array, then overwrites the value at the provided index with the + * given value. If the index is negative, then it replaces from the end + * of the array. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to write into the copied array. + * @returns The copied array with the updated value. + */ + with(index: number, value: T): T[]; } interface ReadonlyArray { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: (value: T, index: number, array: readonly T[]) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: (value: T, index: number, array: readonly T[]) => unknown, - thisArg?: any, - ): T | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: (value: T, index: number, array: readonly T[]) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: (value: T, index: number, array: readonly T[]) => unknown, + thisArg?: any, + ): T | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: (value: T, index: number, array: readonly T[]) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: (value: T, index: number, array: readonly T[]) => unknown, + thisArg?: any, + ): number; - /** - * Copies the array and returns the copied array with all of its elements reversed. - */ - toReversed(): T[]; + /** + * Copies the array and returns the copied array with all of its elements reversed. + */ + toReversed(): T[]; - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order. - * ```ts - * [11, 2, 22, 1].toSorted((a, b) => a - b) // [1, 2, 11, 22] - * ``` - */ - toSorted(compareFn?: (a: T, b: T) => number): T[]; + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order. + * ```ts + * [11, 2, 22, 1].toSorted((a, b) => a - b) // [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: T, b: T) => number): T[]; - /** - * Copies an array and removes elements while, if necessary, inserting new elements in their place, returning the remaining elements. - * @param start The zero-based location in the array from which to start removing elements. - * @param deleteCount The number of elements to remove. - * @param items Elements to insert into the copied array in place of the deleted elements. - * @returns A copy of the original array with the remaining elements. - */ - toSpliced(start: number, deleteCount: number, ...items: T[]): T[]; + /** + * Copies an array and removes elements while, if necessary, inserting new elements in their place, returning the remaining elements. + * @param start The zero-based location in the array from which to start removing elements. + * @param deleteCount The number of elements to remove. + * @param items Elements to insert into the copied array in place of the deleted elements. + * @returns A copy of the original array with the remaining elements. + */ + toSpliced(start: number, deleteCount: number, ...items: T[]): T[]; - /** - * Copies an array and removes elements while returning the remaining elements. - * @param start The zero-based location in the array from which to start removing elements. - * @param deleteCount The number of elements to remove. - * @returns A copy of the original array with the remaining elements. - */ - toSpliced(start: number, deleteCount?: number): T[]; + /** + * Copies an array and removes elements while returning the remaining elements. + * @param start The zero-based location in the array from which to start removing elements. + * @param deleteCount The number of elements to remove. + * @returns A copy of the original array with the remaining elements. + */ + toSpliced(start: number, deleteCount?: number): T[]; - /** - * Copies an array, then overwrites the value at the provided index with the - * given value. If the index is negative, then it replaces from the end - * of the array - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: T): T[]; + /** + * Copies an array, then overwrites the value at the provided index with the + * given value. If the index is negative, then it replaces from the end + * of the array + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: T): T[]; } interface Int8Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, - ): number | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: (value: number, index: number, array: this) => unknown, + thisArg?: any, + ): number | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: (value: number, index: number, array: this) => unknown, + thisArg?: any, + ): number; - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): Int8Array; + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Int8Array; - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = Int8Array.from([11, 2, 22, 1]); - * myNums.toSorted((a, b) => a - b) // Int8Array(4) [1, 2, 11, 22] - * ``` - */ - toSorted(compareFn?: (a: number, b: number) => number): Int8Array; + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = Int8Array.from([11, 2, 22, 1]); + * myNums.toSorted((a, b) => a - b) // Int8Array(4) [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Int8Array; - /** - * Copies the array and inserts the given number at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: number): Int8Array; + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Int8Array; } interface Uint8Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, - ): number | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: (value: number, index: number, array: this) => unknown, + thisArg?: any, + ): number | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: (value: number, index: number, array: this) => unknown, + thisArg?: any, + ): number; - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): Uint8Array; + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Uint8Array; - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = Uint8Array.from([11, 2, 22, 1]); - * myNums.toSorted((a, b) => a - b) // Uint8Array(4) [1, 2, 11, 22] - * ``` - */ - toSorted(compareFn?: (a: number, b: number) => number): Uint8Array; + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = Uint8Array.from([11, 2, 22, 1]); + * myNums.toSorted((a, b) => a - b) // Uint8Array(4) [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Uint8Array; - /** - * Copies the array and inserts the given number at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: number): Uint8Array; + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Uint8Array; } interface Uint8ClampedArray { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number; - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): Uint8ClampedArray; + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Uint8ClampedArray; - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = Uint8ClampedArray.from([11, 2, 22, 1]); - * myNums.toSorted((a, b) => a - b) // Uint8ClampedArray(4) [1, 2, 11, 22] - * ``` - */ - toSorted(compareFn?: (a: number, b: number) => number): Uint8ClampedArray; + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = Uint8ClampedArray.from([11, 2, 22, 1]); + * myNums.toSorted((a, b) => a - b) // Uint8ClampedArray(4) [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Uint8ClampedArray; - /** - * Copies the array and inserts the given number at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: number): Uint8ClampedArray; + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Uint8ClampedArray; } interface Int16Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, - ): number | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: (value: number, index: number, array: this) => unknown, + thisArg?: any, + ): number | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: (value: number, index: number, array: this) => unknown, + thisArg?: any, + ): number; - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): Int16Array; + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Int16Array; - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = Int16Array.from([11, 2, -22, 1]); - * myNums.toSorted((a, b) => a - b) // Int16Array(4) [-22, 1, 2, 11] - * ``` - */ - toSorted(compareFn?: (a: number, b: number) => number): Int16Array; + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = Int16Array.from([11, 2, -22, 1]); + * myNums.toSorted((a, b) => a - b) // Int16Array(4) [-22, 1, 2, 11] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Int16Array; - /** - * Copies the array and inserts the given number at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: number): Int16Array; + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Int16Array; } interface Uint16Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number; - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): Uint16Array; + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Uint16Array; - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = Uint16Array.from([11, 2, 22, 1]); - * myNums.toSorted((a, b) => a - b) // Uint16Array(4) [1, 2, 11, 22] - * ``` - */ - toSorted(compareFn?: (a: number, b: number) => number): Uint16Array; + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = Uint16Array.from([11, 2, 22, 1]); + * myNums.toSorted((a, b) => a - b) // Uint16Array(4) [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Uint16Array; - /** - * Copies the array and inserts the given number at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: number): Uint16Array; + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Uint16Array; } interface Int32Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, - ): number | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: (value: number, index: number, array: this) => unknown, + thisArg?: any, + ): number | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: (value: number, index: number, array: this) => unknown, + thisArg?: any, + ): number; - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): Int32Array; + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Int32Array; - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = Int32Array.from([11, 2, -22, 1]); - * myNums.toSorted((a, b) => a - b) // Int32Array(4) [-22, 1, 2, 11] - * ``` - */ - toSorted(compareFn?: (a: number, b: number) => number): Int32Array; + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = Int32Array.from([11, 2, -22, 1]); + * myNums.toSorted((a, b) => a - b) // Int32Array(4) [-22, 1, 2, 11] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Int32Array; - /** - * Copies the array and inserts the given number at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: number): Int32Array; + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Int32Array; } interface Uint32Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number; - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): Uint32Array; + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Uint32Array; - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = Uint32Array.from([11, 2, 22, 1]); - * myNums.toSorted((a, b) => a - b) // Uint32Array(4) [1, 2, 11, 22] - * ``` - */ - toSorted(compareFn?: (a: number, b: number) => number): Uint32Array; + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = Uint32Array.from([11, 2, 22, 1]); + * myNums.toSorted((a, b) => a - b) // Uint32Array(4) [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Uint32Array; - /** - * Copies the array and inserts the given number at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: number): Uint32Array; + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Uint32Array; } interface Float32Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number; - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): Float32Array; + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Float32Array; - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = Float32Array.from([11.25, 2, -22.5, 1]); - * myNums.toSorted((a, b) => a - b) // Float32Array(4) [-22.5, 1, 2, 11.5] - * ``` - */ - toSorted(compareFn?: (a: number, b: number) => number): Float32Array; + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = Float32Array.from([11.25, 2, -22.5, 1]); + * myNums.toSorted((a, b) => a - b) // Float32Array(4) [-22.5, 1, 2, 11.5] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Float32Array; - /** - * Copies the array and inserts the given number at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: number): Float32Array; + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Float32Array; } interface Float64Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number; - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): Float64Array; + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Float64Array; - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = Float64Array.from([11.25, 2, -22.5, 1]); - * myNums.toSorted((a, b) => a - b) // Float64Array(4) [-22.5, 1, 2, 11.5] - * ``` - */ - toSorted(compareFn?: (a: number, b: number) => number): Float64Array; + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = Float64Array.from([11.25, 2, -22.5, 1]); + * myNums.toSorted((a, b) => a - b) // Float64Array(4) [-22.5, 1, 2, 11.5] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Float64Array; - /** - * Copies the array and inserts the given number at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: number): Float64Array; + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Float64Array; } interface BigInt64Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: bigint, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: ( - value: bigint, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): bigint | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: bigint, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: ( + value: bigint, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): bigint | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: ( - value: bigint, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: ( + value: bigint, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number; - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): BigInt64Array; + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): BigInt64Array; - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = BigInt64Array.from([11n, 2n, -22n, 1n]); - * myNums.toSorted((a, b) => Number(a - b)) // BigInt64Array(4) [-22n, 1n, 2n, 11n] - * ``` - */ - toSorted(compareFn?: (a: bigint, b: bigint) => number): BigInt64Array; + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = BigInt64Array.from([11n, 2n, -22n, 1n]); + * myNums.toSorted((a, b) => Number(a - b)) // BigInt64Array(4) [-22n, 1n, 2n, 11n] + * ``` + */ + toSorted(compareFn?: (a: bigint, b: bigint) => number): BigInt64Array; - /** - * Copies the array and inserts the given bigint at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: bigint): BigInt64Array; + /** + * Copies the array and inserts the given bigint at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: bigint): BigInt64Array; } interface BigUint64Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: bigint, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: ( - value: bigint, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): bigint | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: bigint, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: ( + value: bigint, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): bigint | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: ( - value: bigint, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: ( + value: bigint, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number; - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): BigUint64Array; + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): BigUint64Array; - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = BigUint64Array.from([11n, 2n, 22n, 1n]); - * myNums.toSorted((a, b) => Number(a - b)) // BigUint64Array(4) [1n, 2n, 11n, 22n] - * ``` - */ - toSorted(compareFn?: (a: bigint, b: bigint) => number): BigUint64Array; + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = BigUint64Array.from([11n, 2n, 22n, 1n]); + * myNums.toSorted((a, b) => Number(a - b)) // BigUint64Array(4) [1n, 2n, 11n, 22n] + * ``` + */ + toSorted(compareFn?: (a: bigint, b: bigint) => number): BigUint64Array; - /** - * Copies the array and inserts the given bigint at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: bigint): BigUint64Array; + /** + * Copies the array and inserts the given bigint at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: bigint): BigUint64Array; } ///////////////////////////// // lib.es2023.intl.d.ts ///////////////////////////// declare namespace Intl { - interface NumberFormatRangePartTypeRegistry extends NumberFormatPartTypeRegistry { - approximatelySign: never; - } +interface NumberFormatRangePartTypeRegistry extends NumberFormatPartTypeRegistry { + approximatelySign: never; +} - type NumberFormatRangePartTypes = keyof NumberFormatRangePartTypeRegistry; +type NumberFormatRangePartTypes = keyof NumberFormatRangePartTypeRegistry; - interface NumberFormatOptions { - roundingPriority?: "auto" | "morePrecision" | "lessPrecision" | undefined; +interface NumberFormatOptions { + roundingPriority?: "auto" | "morePrecision" | "lessPrecision" | undefined; - roundingIncrement?: 1 | 2 | 5 | 10 | 20 | 25 | 50 | 100 | 200 | 250 | 500 | 1000 | 2000 | 2500 | 5000 | undefined; + roundingIncrement?: 1 | 2 | 5 | 10 | 20 | 25 | 50 | 100 | 200 | 250 | 500 | 1000 | 2000 | 2500 | 5000 | undefined; - roundingMode?: "ceil" | "floor" | "expand" | "trunc" | "halfCeil" | "halfFloor" | "halfExpand" | "halfTrunc" | "halfEven" | undefined; + roundingMode?: "ceil" | "floor" | "expand" | "trunc" | "halfCeil" | "halfFloor" | "halfExpand" | "halfTrunc" | "halfEven" | undefined; - trailingZeroDisplay?: "auto" | "stripIfInteger" | undefined; - } + trailingZeroDisplay?: "auto" | "stripIfInteger" | undefined; +} - interface ResolvedNumberFormatOptions { - roundingPriority: "auto" | "morePrecision" | "lessPrecision"; +interface ResolvedNumberFormatOptions { + roundingPriority: "auto" | "morePrecision" | "lessPrecision"; - roundingMode: "ceil" | "floor" | "expand" | "trunc" | "halfCeil" | "halfFloor" | "halfExpand" | "halfTrunc" | "halfEven"; + roundingMode: "ceil" | "floor" | "expand" | "trunc" | "halfCeil" | "halfFloor" | "halfExpand" | "halfTrunc" | "halfEven"; - roundingIncrement: 1 | 2 | 5 | 10 | 20 | 25 | 50 | 100 | 200 | 250 | 500 | 1000 | 2000 | 2500 | 5000; + roundingIncrement: 1 | 2 | 5 | 10 | 20 | 25 | 50 | 100 | 200 | 250 | 500 | 1000 | 2000 | 2500 | 5000; - trailingZeroDisplay: "auto" | "stripIfInteger"; - } + trailingZeroDisplay: "auto" | "stripIfInteger"; +} - interface NumberRangeFormatPart { - type: NumberFormatRangePartTypes; +interface NumberRangeFormatPart { + type: NumberFormatRangePartTypes; - value: string; + value: string; - source: "startRange" | "endRange" | "shared"; - } + source: "startRange" | "endRange" | "shared"; +} - type StringNumericLiteral = `${number}` | "Infinity" | "-Infinity" | "+Infinity"; +type StringNumericLiteral = `${number}` | "Infinity" | "-Infinity" | "+Infinity"; - interface NumberFormat { - format(value: number | bigint | StringNumericLiteral): string; +interface NumberFormat { + format(value: number | bigint | StringNumericLiteral): string; - formatToParts(value: number | bigint | StringNumericLiteral): NumberFormatPart[]; + formatToParts(value: number | bigint | StringNumericLiteral): NumberFormatPart[]; - formatRange(start: number | bigint | StringNumericLiteral, end: number | bigint | StringNumericLiteral): string; + formatRange(start: number | bigint | StringNumericLiteral, end: number | bigint | StringNumericLiteral): string; - formatRangeToParts(start: number | bigint | StringNumericLiteral, end: number | bigint | StringNumericLiteral): NumberRangeFormatPart[]; - } + formatRangeToParts(start: number | bigint | StringNumericLiteral, end: number | bigint | StringNumericLiteral): NumberRangeFormatPart[]; +} } ///////////////////////////// // lib.es2024.arraybuffer.d.ts ///////////////////////////// interface ArrayBuffer { - /** - * Returns a boolean indicating whether or not this buffer has been detached (transferred). - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/detached) - */ - get detached(): boolean; + /** + * Returns a boolean indicating whether or not this buffer has been detached (transferred). + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/detached) + */ + get detached(): boolean; - /** - * Creates a new ArrayBuffer with the same byte content as this buffer, then detaches this buffer. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/transfer) - */ - transfer(newByteLength?: number): ArrayBuffer; + /** + * Creates a new ArrayBuffer with the same byte content as this buffer, then detaches this buffer. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/transfer) + */ + transfer(newByteLength?: number): ArrayBuffer; - /** - * Creates a new non-resizable ArrayBuffer with the same byte content as this buffer, then detaches this buffer. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/transferToFixedLength) - */ - transferToFixedLength(newByteLength?: number): ArrayBuffer; + /** + * Creates a new non-resizable ArrayBuffer with the same byte content as this buffer, then detaches this buffer. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/transferToFixedLength) + */ + transferToFixedLength(newByteLength?: number): ArrayBuffer; } interface ArrayBufferConstructor { - new (byteLength: number): ArrayBuffer; + new (byteLength: number): ArrayBuffer; } ///////////////////////////// // lib.es2024.collection.d.ts ///////////////////////////// interface MapConstructor { - /** - * Groups members of an iterable according to the return value of the passed callback. - * @param items An iterable. - * @param keySelector A callback which will be invoked for each item in items. - */ - groupBy( - items: Iterable, - keySelector: (item: T, index: number) => K, - ): Map; + /** + * Groups members of an iterable according to the return value of the passed callback. + * @param items An iterable. + * @param keySelector A callback which will be invoked for each item in items. + */ + groupBy( + items: Iterable, + keySelector: (item: T, index: number) => K, + ): Map; } ///////////////////////////// // lib.es2024.object.d.ts ///////////////////////////// interface ObjectConstructor { - /** - * Groups members of an iterable according to the return value of the passed callback. - * @param items An iterable. - * @param keySelector A callback which will be invoked for each item in items. - */ - groupBy( - items: Iterable, - keySelector: (item: T, index: number) => K, - ): Partial>; + /** + * Groups members of an iterable according to the return value of the passed callback. + * @param items An iterable. + * @param keySelector A callback which will be invoked for each item in items. + */ + groupBy( + items: Iterable, + keySelector: (item: T, index: number) => K, + ): Partial>; } ///////////////////////////// // lib.es2024.promise.d.ts ///////////////////////////// interface PromiseWithResolvers { - promise: Promise; + promise: Promise; - resolve: (value: T | PromiseLike) => void; + resolve: (value: T | PromiseLike) => void; - reject: (reason?: any) => void; + reject: (reason?: any) => void; } interface PromiseConstructor { - /** - * Creates a new Promise and returns it in an object, along with its resolve and reject functions. - * @returns An object with the properties `promise`, `resolve`, and `reject`. - * - * ```ts - * const { promise, resolve, reject } = Promise.withResolvers(); - * ``` - */ - withResolvers(): PromiseWithResolvers; + /** + * Creates a new Promise and returns it in an object, along with its resolve and reject functions. + * @returns An object with the properties `promise`, `resolve`, and `reject`. + * + * ```ts + * const { promise, resolve, reject } = Promise.withResolvers(); + * ``` + */ + withResolvers(): PromiseWithResolvers; } ///////////////////////////// // lib.es2024.regexp.d.ts ///////////////////////////// interface RegExp { - /** - * Returns a Boolean value indicating the state of the unicodeSets flag (v) used with a regular expression. - * Default is false. Read-only. - */ - readonly unicodeSets: boolean; + /** + * Returns a Boolean value indicating the state of the unicodeSets flag (v) used with a regular expression. + * Default is false. Read-only. + */ + readonly unicodeSets: boolean; } ///////////////////////////// // lib.es2024.sharedmemory.d.ts ///////////////////////////// interface SharedArrayBufferConstructor { - new (byteLength: number): SharedArrayBuffer; + new (byteLength: number): SharedArrayBuffer; } ///////////////////////////// // lib.es2024.string.d.ts ///////////////////////////// interface String { - /** - * Returns true if all leading surrogates and trailing surrogates appear paired and in order. - */ - isWellFormed(): boolean; + /** + * Returns true if all leading surrogates and trailing surrogates appear paired and in order. + */ + isWellFormed(): boolean; - /** - * Returns a string where all lone or out-of-order surrogates have been replaced by the Unicode replacement character (U+FFFD). - */ - toWellFormed(): string; + /** + * Returns a string where all lone or out-of-order surrogates have been replaced by the Unicode replacement character (U+FFFD). + */ + toWellFormed(): string; } ///////////////////////////// @@ -5735,177 +5735,177 @@ declare function encodeURI(uri: string): string; declare function encodeURIComponent(uriComponent: string | number | boolean): string; interface Symbol { - /** Returns a string representation of an object. */ - toString(): string; + /** Returns a string representation of an object. */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): symbol; + /** Returns the primitive value of the specified object. */ + valueOf(): symbol; } declare type PropertyKey = string | number | symbol; interface PropertyDescriptor { - configurable?: boolean; + configurable?: boolean; - enumerable?: boolean; + enumerable?: boolean; - value?: any; + value?: any; - writable?: boolean; + writable?: boolean; - get?(): any; + get?(): any; - set?(v: any): void; + set?(v: any): void; } interface PropertyDescriptorMap { - [key: PropertyKey]: PropertyDescriptor; + [key: PropertyKey]: PropertyDescriptor; } interface Object { - /** The initial value of Object.prototype.constructor is the standard built-in Object constructor. */ - constructor: Function; + /** The initial value of Object.prototype.constructor is the standard built-in Object constructor. */ + constructor: Function; - /** Returns a string representation of an object. */ - toString(): string; + /** Returns a string representation of an object. */ + toString(): string; - /** Returns a date converted to a string using the current locale. */ - toLocaleString(): string; + /** Returns a date converted to a string using the current locale. */ + toLocaleString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): Object; + /** Returns the primitive value of the specified object. */ + valueOf(): Object; - /** - * Determines whether an object has a property with the specified name. - * @param v A property name. - */ - hasOwnProperty(v: PropertyKey): boolean; + /** + * Determines whether an object has a property with the specified name. + * @param v A property name. + */ + hasOwnProperty(v: PropertyKey): boolean; - /** - * Determines whether an object exists in another object's prototype chain. - * @param v Another object whose prototype chain is to be checked. - */ - isPrototypeOf(v: Object): boolean; + /** + * Determines whether an object exists in another object's prototype chain. + * @param v Another object whose prototype chain is to be checked. + */ + isPrototypeOf(v: Object): boolean; - /** - * Determines whether a specified property is enumerable. - * @param v A property name. - */ - propertyIsEnumerable(v: PropertyKey): boolean; + /** + * Determines whether a specified property is enumerable. + * @param v A property name. + */ + propertyIsEnumerable(v: PropertyKey): boolean; } interface ObjectConstructor { - new (value?: any): Object; + new (value?: any): Object; - (): any; + (): any; - (value: any): any; + (value: any): any; - /** A reference to the prototype for a class of objects. */ - readonly prototype: Object; + /** A reference to the prototype for a class of objects. */ + readonly prototype: Object; - /** - * Returns the prototype of an object. - * @param o The object that references the prototype. - */ - getPrototypeOf(o: any): any; + /** + * Returns the prototype of an object. + * @param o The object that references the prototype. + */ + getPrototypeOf(o: any): any; - /** - * Gets the own property descriptor of the specified object. - * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype. - * @param o Object that contains the property. - * @param p Name of the property. - */ - getOwnPropertyDescriptor(o: any, p: PropertyKey): PropertyDescriptor | undefined; + /** + * Gets the own property descriptor of the specified object. + * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype. + * @param o Object that contains the property. + * @param p Name of the property. + */ + getOwnPropertyDescriptor(o: any, p: PropertyKey): PropertyDescriptor | undefined; - /** - * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly - * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions. - * @param o Object that contains the own properties. - */ - getOwnPropertyNames(o: any): string[]; + /** + * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly + * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions. + * @param o Object that contains the own properties. + */ + getOwnPropertyNames(o: any): string[]; - /** - * Creates an object that has the specified prototype or that has null prototype. - * @param o Object to use as a prototype. May be null. - */ - create(o: object | null): any; + /** + * Creates an object that has the specified prototype or that has null prototype. + * @param o Object to use as a prototype. May be null. + */ + create(o: object | null): any; - /** - * Creates an object that has the specified prototype, and that optionally contains specified properties. - * @param o Object to use as a prototype. May be null - * @param properties JavaScript object that contains one or more property descriptors. - */ - create(o: object | null, properties: PropertyDescriptorMap & ThisType): any; + /** + * Creates an object that has the specified prototype, and that optionally contains specified properties. + * @param o Object to use as a prototype. May be null + * @param properties JavaScript object that contains one or more property descriptors. + */ + create(o: object | null, properties: PropertyDescriptorMap & ThisType): any; - /** - * Adds a property to an object, or modifies attributes of an existing property. - * @param o Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object. - * @param p The property name. - * @param attributes Descriptor for the property. It can be for a data property or an accessor property. - */ - defineProperty(o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType): T; + /** + * Adds a property to an object, or modifies attributes of an existing property. + * @param o Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object. + * @param p The property name. + * @param attributes Descriptor for the property. It can be for a data property or an accessor property. + */ + defineProperty(o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType): T; - /** - * Adds one or more properties to an object, and/or modifies attributes of existing properties. - * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object. - * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property. - */ - defineProperties(o: T, properties: PropertyDescriptorMap & ThisType): T; + /** + * Adds one or more properties to an object, and/or modifies attributes of existing properties. + * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object. + * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property. + */ + defineProperties(o: T, properties: PropertyDescriptorMap & ThisType): T; - /** - * Prevents the modification of attributes of existing properties, and prevents the addition of new properties. - * @param o Object on which to lock the attributes. - */ - seal(o: T): T; + /** + * Prevents the modification of attributes of existing properties, and prevents the addition of new properties. + * @param o Object on which to lock the attributes. + */ + seal(o: T): T; - /** - * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. - * @param f Object on which to lock the attributes. - */ - freeze(f: T): T; + /** + * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. + * @param f Object on which to lock the attributes. + */ + freeze(f: T): T; - /** - * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. - * @param o Object on which to lock the attributes. - */ - freeze(o: T): Readonly; + /** + * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. + * @param o Object on which to lock the attributes. + */ + freeze(o: T): Readonly; - /** - * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. - * @param o Object on which to lock the attributes. - */ - freeze(o: T): Readonly; + /** + * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. + * @param o Object on which to lock the attributes. + */ + freeze(o: T): Readonly; - /** - * Prevents the addition of new properties to an object. - * @param o Object to make non-extensible. - */ - preventExtensions(o: T): T; + /** + * Prevents the addition of new properties to an object. + * @param o Object to make non-extensible. + */ + preventExtensions(o: T): T; - /** - * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object. - * @param o Object to test. - */ - isSealed(o: any): boolean; + /** + * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object. + * @param o Object to test. + */ + isSealed(o: any): boolean; - /** - * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object. - * @param o Object to test. - */ - isFrozen(o: any): boolean; + /** + * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object. + * @param o Object to test. + */ + isFrozen(o: any): boolean; - /** - * Returns a value that indicates whether new properties can be added to an object. - * @param o Object to test. - */ - isExtensible(o: any): boolean; + /** + * Returns a value that indicates whether new properties can be added to an object. + * @param o Object to test. + */ + isExtensible(o: any): boolean; - /** - * Returns the names of the enumerable string properties and methods of an object. - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - keys(o: object): string[]; + /** + * Returns the names of the enumerable string properties and methods of an object. + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + keys(o: object): string[]; } /** @@ -5917,46 +5917,46 @@ declare var Object: ObjectConstructor; * Creates a new function. */ interface Function { - /** - * Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function. - * @param thisArg The object to be used as the this object. - * @param argArray A set of arguments to be passed to the function. - */ - apply(this: Function, thisArg: any, argArray?: any): any; + /** + * Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function. + * @param thisArg The object to be used as the this object. + * @param argArray A set of arguments to be passed to the function. + */ + apply(this: Function, thisArg: any, argArray?: any): any; - /** - * Calls a method of an object, substituting another object for the current object. - * @param thisArg The object to be used as the current object. - * @param argArray A list of arguments to be passed to the method. - */ - call(this: Function, thisArg: any, ...argArray: any[]): any; + /** + * Calls a method of an object, substituting another object for the current object. + * @param thisArg The object to be used as the current object. + * @param argArray A list of arguments to be passed to the method. + */ + call(this: Function, thisArg: any, ...argArray: any[]): any; - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg An object to which the this keyword can refer inside the new function. - * @param argArray A list of arguments to be passed to the new function. - */ - bind(this: Function, thisArg: any, ...argArray: any[]): any; + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg An object to which the this keyword can refer inside the new function. + * @param argArray A list of arguments to be passed to the new function. + */ + bind(this: Function, thisArg: any, ...argArray: any[]): any; - /** Returns a string representation of a function. */ - toString(): string; + /** Returns a string representation of a function. */ + toString(): string; - prototype: any; + prototype: any; - readonly length: number; + readonly length: number; } interface FunctionConstructor { - /** - * Creates a new function. - * @param args A list of arguments the function accepts. - */ - new (...args: string[]): Function; + /** + * Creates a new function. + * @param args A list of arguments the function accepts. + */ + new (...args: string[]): Function; - (...args: string[]): Function; + (...args: string[]): Function; - readonly prototype: Function; + readonly prototype: Function; } declare var Function: FunctionConstructor; @@ -5972,208 +5972,208 @@ type ThisParameterType = T extends (this: infer U, ...args: never) => any ? U type OmitThisParameter = unknown extends ThisParameterType ? T : T extends (...args: infer A) => infer R ? (...args: A) => R : T; interface CallableFunction extends Function { - /** - * Calls the function with the specified object as the this value and the elements of specified array as the arguments. - * @param thisArg The object to be used as the this object. - */ - apply(this: (this: T) => R, thisArg: T): R; + /** + * Calls the function with the specified object as the this value and the elements of specified array as the arguments. + * @param thisArg The object to be used as the this object. + */ + apply(this: (this: T) => R, thisArg: T): R; - /** - * Calls the function with the specified object as the this value and the elements of specified array as the arguments. - * @param thisArg The object to be used as the this object. - * @param args An array of argument values to be passed to the function. - */ - apply(this: (this: T, ...args: A) => R, thisArg: T, args: A): R; + /** + * Calls the function with the specified object as the this value and the elements of specified array as the arguments. + * @param thisArg The object to be used as the this object. + * @param args An array of argument values to be passed to the function. + */ + apply(this: (this: T, ...args: A) => R, thisArg: T, args: A): R; - /** - * Calls the function with the specified object as the this value and the specified rest arguments as the arguments. - * @param thisArg The object to be used as the this object. - * @param args Argument values to be passed to the function. - */ - call(this: (this: T, ...args: A) => R, thisArg: T, ...args: A): R; + /** + * Calls the function with the specified object as the this value and the specified rest arguments as the arguments. + * @param thisArg The object to be used as the this object. + * @param args Argument values to be passed to the function. + */ + call(this: (this: T, ...args: A) => R, thisArg: T, ...args: A): R; - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg The object to be used as the this object. - */ - bind(this: T, thisArg: ThisParameterType): OmitThisParameter; + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg The object to be used as the this object. + */ + bind(this: T, thisArg: ThisParameterType): OmitThisParameter; - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg The object to be used as the this object. - * @param args Arguments to bind to the parameters of the function. - */ - bind(this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg The object to be used as the this object. + * @param args Arguments to bind to the parameters of the function. + */ + bind(this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } interface NewableFunction extends Function { - /** - * Calls the function with the specified object as the this value and the elements of specified array as the arguments. - * @param thisArg The object to be used as the this object. - */ - apply(this: new () => T, thisArg: T): void; + /** + * Calls the function with the specified object as the this value and the elements of specified array as the arguments. + * @param thisArg The object to be used as the this object. + */ + apply(this: new () => T, thisArg: T): void; - /** - * Calls the function with the specified object as the this value and the elements of specified array as the arguments. - * @param thisArg The object to be used as the this object. - * @param args An array of argument values to be passed to the function. - */ - apply(this: new (...args: A) => T, thisArg: T, args: A): void; + /** + * Calls the function with the specified object as the this value and the elements of specified array as the arguments. + * @param thisArg The object to be used as the this object. + * @param args An array of argument values to be passed to the function. + */ + apply(this: new (...args: A) => T, thisArg: T, args: A): void; - /** - * Calls the function with the specified object as the this value and the specified rest arguments as the arguments. - * @param thisArg The object to be used as the this object. - * @param args Argument values to be passed to the function. - */ - call(this: new (...args: A) => T, thisArg: T, ...args: A): void; + /** + * Calls the function with the specified object as the this value and the specified rest arguments as the arguments. + * @param thisArg The object to be used as the this object. + * @param args Argument values to be passed to the function. + */ + call(this: new (...args: A) => T, thisArg: T, ...args: A): void; - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg The object to be used as the this object. - */ - bind(this: T, thisArg: any): T; + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg The object to be used as the this object. + */ + bind(this: T, thisArg: any): T; - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg The object to be used as the this object. - * @param args Arguments to bind to the parameters of the function. - */ - bind(this: new (...args: [...A, ...B]) => R, thisArg: any, ...args: A): new (...args: B) => R; + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg The object to be used as the this object. + * @param args Arguments to bind to the parameters of the function. + */ + bind(this: new (...args: [...A, ...B]) => R, thisArg: any, ...args: A): new (...args: B) => R; } interface IArguments { - [index: number]: any; + [index: number]: any; - length: number; + length: number; } interface String { - /** Returns a string representation of a string. */ - toString(): string; + /** Returns a string representation of a string. */ + toString(): string; - /** - * Returns the character at the specified index. - * @param pos The zero-based index of the desired character. - */ - charAt(pos: number): string; + /** + * Returns the character at the specified index. + * @param pos The zero-based index of the desired character. + */ + charAt(pos: number): string; - /** - * Returns the Unicode value of the character at the specified location, or NaN if the index is out of bounds. - * @param index The zero-based index of the desired character. - */ - charCodeAt(index: number): number; + /** + * Returns the Unicode value of the character at the specified location, or NaN if the index is out of bounds. + * @param index The zero-based index of the desired character. + */ + charCodeAt(index: number): number; - /** - * Returns a string that contains the concatenation of two or more strings. - * @param strings The strings to append to the end of the string. - */ - concat(...strings: string[]): string; + /** + * Returns a string that contains the concatenation of two or more strings. + * @param strings The strings to append to the end of the string. + */ + concat(...strings: string[]): string; - /** - * Returns the position of the first occurrence of a substring, or -1 if it is not present. - * @param searchString The substring to search for in the string - * @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string. - */ - indexOf(searchString: string, position?: number): number; + /** + * Returns the position of the first occurrence of a substring, or -1 if it is not present. + * @param searchString The substring to search for in the string + * @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string. + */ + indexOf(searchString: string, position?: number): number; - /** - * Returns the last occurrence of a substring in the string, or -1 if it is not present. - * @param searchString The substring to search for. - * @param position The index at which to begin searching. If omitted, the search begins at the end of the string. - */ - lastIndexOf(searchString: string, position?: number): number; + /** + * Returns the last occurrence of a substring in the string, or -1 if it is not present. + * @param searchString The substring to search for. + * @param position The index at which to begin searching. If omitted, the search begins at the end of the string. + */ + lastIndexOf(searchString: string, position?: number): number; - /** - * Determines whether two strings are equivalent in the current locale. - * @param that String to compare to target string - */ - localeCompare(that: string): number; + /** + * Determines whether two strings are equivalent in the current locale. + * @param that String to compare to target string + */ + localeCompare(that: string): number; - /** - * Matches a string with a regular expression, and returns an array containing the results of that search. - * @param regexp A variable name or string literal containing the regular expression pattern and flags. - */ - match(regexp: string | RegExp): RegExpMatchArray | null; + /** + * Matches a string with a regular expression, and returns an array containing the results of that search. + * @param regexp A variable name or string literal containing the regular expression pattern and flags. + */ + match(regexp: string | RegExp): RegExpMatchArray | null; - /** - * Replaces text in a string, using a regular expression or search string. - * @param searchValue A string or regular expression to search for. - * @param replaceValue A string containing the text to replace. When the {@linkcode searchValue} is a `RegExp`, all matches are replaced if the `g` flag is set (or only those matches at the beginning, if the `y` flag is also present). Otherwise, only the first match of {@linkcode searchValue} is replaced. - */ - replace(searchValue: string | RegExp, replaceValue: string): string; + /** + * Replaces text in a string, using a regular expression or search string. + * @param searchValue A string or regular expression to search for. + * @param replaceValue A string containing the text to replace. When the {@linkcode searchValue} is a `RegExp`, all matches are replaced if the `g` flag is set (or only those matches at the beginning, if the `y` flag is also present). Otherwise, only the first match of {@linkcode searchValue} is replaced. + */ + replace(searchValue: string | RegExp, replaceValue: string): string; - /** - * Replaces text in a string, using a regular expression or search string. - * @param searchValue A string to search for. - * @param replacer A function that returns the replacement text. - */ - replace(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; + /** + * Replaces text in a string, using a regular expression or search string. + * @param searchValue A string to search for. + * @param replacer A function that returns the replacement text. + */ + replace(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; - /** - * Finds the first substring match in a regular expression search. - * @param regexp The regular expression pattern and applicable flags. - */ - search(regexp: string | RegExp): number; + /** + * Finds the first substring match in a regular expression search. + * @param regexp The regular expression pattern and applicable flags. + */ + search(regexp: string | RegExp): number; - /** - * Returns a section of a string. - * @param start The index to the beginning of the specified portion of stringObj. - * @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end. - * If this value is not specified, the substring continues to the end of stringObj. - */ - slice(start?: number, end?: number): string; + /** + * Returns a section of a string. + * @param start The index to the beginning of the specified portion of stringObj. + * @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end. + * If this value is not specified, the substring continues to the end of stringObj. + */ + slice(start?: number, end?: number): string; - /** - * Split a string into substrings using the specified separator and return them as an array. - * @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned. - * @param limit A value used to limit the number of elements returned in the array. - */ - split(separator: string | RegExp, limit?: number): string[]; + /** + * Split a string into substrings using the specified separator and return them as an array. + * @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned. + * @param limit A value used to limit the number of elements returned in the array. + */ + split(separator: string | RegExp, limit?: number): string[]; - /** - * Returns the substring at the specified location within a String object. - * @param start The zero-based index number indicating the beginning of the substring. - * @param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end. - * If end is omitted, the characters from start through the end of the original string are returned. - */ - substring(start: number, end?: number): string; + /** + * Returns the substring at the specified location within a String object. + * @param start The zero-based index number indicating the beginning of the substring. + * @param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end. + * If end is omitted, the characters from start through the end of the original string are returned. + */ + substring(start: number, end?: number): string; - /** Converts all the alphabetic characters in a string to lowercase. */ - toLowerCase(): string; + /** Converts all the alphabetic characters in a string to lowercase. */ + toLowerCase(): string; - /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */ - toLocaleLowerCase(locales?: string | string[]): string; + /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */ + toLocaleLowerCase(locales?: string | string[]): string; - /** Converts all the alphabetic characters in a string to uppercase. */ - toUpperCase(): string; + /** Converts all the alphabetic characters in a string to uppercase. */ + toUpperCase(): string; - /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */ - toLocaleUpperCase(locales?: string | string[]): string; + /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */ + toLocaleUpperCase(locales?: string | string[]): string; - /** Removes the leading and trailing white space and line terminator characters from a string. */ - trim(): string; + /** Removes the leading and trailing white space and line terminator characters from a string. */ + trim(): string; - /** Returns the length of a String object. */ - readonly length: number; + /** Returns the length of a String object. */ + readonly length: number; - /** Returns the primitive value of the specified object. */ - valueOf(): string; + /** Returns the primitive value of the specified object. */ + valueOf(): string; - readonly [index: number]: string; + readonly [index: number]: string; } interface StringConstructor { - new (value?: any): String; + new (value?: any): String; - (value?: any): string; + (value?: any): string; - readonly prototype: String; + readonly prototype: String; - fromCharCode(...codes: number[]): string; + fromCharCode(...codes: number[]): string; } /** @@ -6182,220 +6182,220 @@ interface StringConstructor { declare var String: StringConstructor; interface Boolean { - /** Returns the primitive value of the specified object. */ - valueOf(): boolean; + /** Returns the primitive value of the specified object. */ + valueOf(): boolean; } interface BooleanConstructor { - new (value?: any): Boolean; + new (value?: any): Boolean; - (value?: T): boolean; + (value?: T): boolean; - readonly prototype: Boolean; + readonly prototype: Boolean; } declare var Boolean: BooleanConstructor; interface Number { - /** - * Returns a string representation of an object. - * @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers. - */ - toString(radix?: number): string; + /** + * Returns a string representation of an object. + * @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers. + */ + toString(radix?: number): string; - /** - * Returns a string representing a number in fixed-point notation. - * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 100, inclusive. - */ - toFixed(fractionDigits?: number): string; + /** + * Returns a string representing a number in fixed-point notation. + * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 100, inclusive. + */ + toFixed(fractionDigits?: number): string; - /** - * Returns a string containing a number represented in exponential notation. - * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 100, inclusive. - */ - toExponential(fractionDigits?: number): string; + /** + * Returns a string containing a number represented in exponential notation. + * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 100, inclusive. + */ + toExponential(fractionDigits?: number): string; - /** - * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits. - * @param precision Number of significant digits. Must be in the range 1 - 100, inclusive. - */ - toPrecision(precision?: number): string; + /** + * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits. + * @param precision Number of significant digits. Must be in the range 1 - 100, inclusive. + */ + toPrecision(precision?: number): string; - /** Returns the primitive value of the specified object. */ - valueOf(): number; + /** Returns the primitive value of the specified object. */ + valueOf(): number; } interface NumberConstructor { - new (value?: any): Number; + new (value?: any): Number; - (value?: any): number; + (value?: any): number; - readonly prototype: Number; + readonly prototype: Number; - /** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */ - readonly MAX_VALUE: number; + /** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */ + readonly MAX_VALUE: number; - /** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */ - readonly MIN_VALUE: number; + /** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */ + readonly MIN_VALUE: number; - /** - * A value that is not a number. - * In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function. - */ - readonly NaN: number; + /** + * A value that is not a number. + * In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function. + */ + readonly NaN: number; - /** - * A value that is less than the largest negative number that can be represented in JavaScript. - * JavaScript displays NEGATIVE_INFINITY values as -infinity. - */ - readonly NEGATIVE_INFINITY: number; + /** + * A value that is less than the largest negative number that can be represented in JavaScript. + * JavaScript displays NEGATIVE_INFINITY values as -infinity. + */ + readonly NEGATIVE_INFINITY: number; - /** - * A value greater than the largest number that can be represented in JavaScript. - * JavaScript displays POSITIVE_INFINITY values as infinity. - */ - readonly POSITIVE_INFINITY: number; + /** + * A value greater than the largest number that can be represented in JavaScript. + * JavaScript displays POSITIVE_INFINITY values as infinity. + */ + readonly POSITIVE_INFINITY: number; } /** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */ declare var Number: NumberConstructor; interface TemplateStringsArray extends ReadonlyArray { - readonly raw: readonly string[]; + readonly raw: readonly string[]; } interface Math { - /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */ - readonly E: number; + /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */ + readonly E: number; - /** The natural logarithm of 10. */ - readonly LN10: number; + /** The natural logarithm of 10. */ + readonly LN10: number; - /** The natural logarithm of 2. */ - readonly LN2: number; + /** The natural logarithm of 2. */ + readonly LN2: number; - /** The base-2 logarithm of e. */ - readonly LOG2E: number; + /** The base-2 logarithm of e. */ + readonly LOG2E: number; - /** The base-10 logarithm of e. */ - readonly LOG10E: number; + /** The base-10 logarithm of e. */ + readonly LOG10E: number; - /** Pi. This is the ratio of the circumference of a circle to its diameter. */ - readonly PI: number; + /** Pi. This is the ratio of the circumference of a circle to its diameter. */ + readonly PI: number; - /** The square root of 0.5, or, equivalently, one divided by the square root of 2. */ - readonly SQRT1_2: number; + /** The square root of 0.5, or, equivalently, one divided by the square root of 2. */ + readonly SQRT1_2: number; - /** The square root of 2. */ - readonly SQRT2: number; + /** The square root of 2. */ + readonly SQRT2: number; - /** - * Returns the absolute value of a number (the value without regard to whether it is positive or negative). - * For example, the absolute value of -5 is the same as the absolute value of 5. - * @param x A numeric expression for which the absolute value is needed. - */ - abs(x: number): number; + /** + * Returns the absolute value of a number (the value without regard to whether it is positive or negative). + * For example, the absolute value of -5 is the same as the absolute value of 5. + * @param x A numeric expression for which the absolute value is needed. + */ + abs(x: number): number; - /** - * Returns the arc cosine (or inverse cosine) of a number. - * @param x A numeric expression. - */ - acos(x: number): number; + /** + * Returns the arc cosine (or inverse cosine) of a number. + * @param x A numeric expression. + */ + acos(x: number): number; - /** - * Returns the arcsine of a number. - * @param x A numeric expression. - */ - asin(x: number): number; + /** + * Returns the arcsine of a number. + * @param x A numeric expression. + */ + asin(x: number): number; - /** - * Returns the arctangent of a number. - * @param x A numeric expression for which the arctangent is needed. - */ - atan(x: number): number; + /** + * Returns the arctangent of a number. + * @param x A numeric expression for which the arctangent is needed. + */ + atan(x: number): number; - /** - * Returns the angle (in radians) between the X axis and the line going through both the origin and the given point. - * @param y A numeric expression representing the cartesian y-coordinate. - * @param x A numeric expression representing the cartesian x-coordinate. - */ - atan2(y: number, x: number): number; + /** + * Returns the angle (in radians) between the X axis and the line going through both the origin and the given point. + * @param y A numeric expression representing the cartesian y-coordinate. + * @param x A numeric expression representing the cartesian x-coordinate. + */ + atan2(y: number, x: number): number; - /** - * Returns the smallest integer greater than or equal to its numeric argument. - * @param x A numeric expression. - */ - ceil(x: number): number; + /** + * Returns the smallest integer greater than or equal to its numeric argument. + * @param x A numeric expression. + */ + ceil(x: number): number; - /** - * Returns the cosine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - cos(x: number): number; + /** + * Returns the cosine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + cos(x: number): number; - /** - * Returns e (the base of natural logarithms) raised to a power. - * @param x A numeric expression representing the power of e. - */ - exp(x: number): number; + /** + * Returns e (the base of natural logarithms) raised to a power. + * @param x A numeric expression representing the power of e. + */ + exp(x: number): number; - /** - * Returns the greatest integer less than or equal to its numeric argument. - * @param x A numeric expression. - */ - floor(x: number): number; + /** + * Returns the greatest integer less than or equal to its numeric argument. + * @param x A numeric expression. + */ + floor(x: number): number; - /** - * Returns the natural logarithm (base e) of a number. - * @param x A numeric expression. - */ - log(x: number): number; + /** + * Returns the natural logarithm (base e) of a number. + * @param x A numeric expression. + */ + log(x: number): number; - /** - * Returns the larger of a set of supplied numeric expressions. - * @param values Numeric expressions to be evaluated. - */ - max(...values: number[]): number; + /** + * Returns the larger of a set of supplied numeric expressions. + * @param values Numeric expressions to be evaluated. + */ + max(...values: number[]): number; - /** - * Returns the smaller of a set of supplied numeric expressions. - * @param values Numeric expressions to be evaluated. - */ - min(...values: number[]): number; + /** + * Returns the smaller of a set of supplied numeric expressions. + * @param values Numeric expressions to be evaluated. + */ + min(...values: number[]): number; - /** - * Returns the value of a base expression taken to a specified power. - * @param x The base value of the expression. - * @param y The exponent value of the expression. - */ - pow(x: number, y: number): number; + /** + * Returns the value of a base expression taken to a specified power. + * @param x The base value of the expression. + * @param y The exponent value of the expression. + */ + pow(x: number, y: number): number; - /** Returns a pseudorandom number between 0 and 1. */ - random(): number; + /** Returns a pseudorandom number between 0 and 1. */ + random(): number; - /** - * Returns a supplied numeric expression rounded to the nearest integer. - * @param x The value to be rounded to the nearest integer. - */ - round(x: number): number; + /** + * Returns a supplied numeric expression rounded to the nearest integer. + * @param x The value to be rounded to the nearest integer. + */ + round(x: number): number; - /** - * Returns the sine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - sin(x: number): number; + /** + * Returns the sine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + sin(x: number): number; - /** - * Returns the square root of a number. - * @param x A numeric expression. - */ - sqrt(x: number): number; + /** + * Returns the square root of a number. + * @param x A numeric expression. + */ + sqrt(x: number): number; - /** - * Returns the tangent of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - tan(x: number): number; + /** + * Returns the tangent of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + tan(x: number): number; } /** An intrinsic object that provides basic mathematics functionality and constants. */ @@ -6403,334 +6403,334 @@ declare var Math: Math; /** Enables basic storage and retrieval of dates and times. */ interface Date { - /** Returns a string representation of a date. The format of the string depends on the locale. */ - toString(): string; + /** Returns a string representation of a date. The format of the string depends on the locale. */ + toString(): string; - /** Returns a date as a string value. */ - toDateString(): string; + /** Returns a date as a string value. */ + toDateString(): string; - /** Returns a time as a string value. */ - toTimeString(): string; + /** Returns a time as a string value. */ + toTimeString(): string; - /** Returns a value as a string value appropriate to the host environment's current locale. */ - toLocaleString(): string; + /** Returns a value as a string value appropriate to the host environment's current locale. */ + toLocaleString(): string; - /** Returns a date as a string value appropriate to the host environment's current locale. */ - toLocaleDateString(): string; + /** Returns a date as a string value appropriate to the host environment's current locale. */ + toLocaleDateString(): string; - /** Returns a time as a string value appropriate to the host environment's current locale. */ - toLocaleTimeString(): string; + /** Returns a time as a string value appropriate to the host environment's current locale. */ + toLocaleTimeString(): string; - /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */ - valueOf(): number; + /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */ + valueOf(): number; - /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */ - getTime(): number; + /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */ + getTime(): number; - /** Gets the year, using local time. */ - getFullYear(): number; + /** Gets the year, using local time. */ + getFullYear(): number; - /** Gets the year using Universal Coordinated Time (UTC). */ - getUTCFullYear(): number; + /** Gets the year using Universal Coordinated Time (UTC). */ + getUTCFullYear(): number; - /** Gets the month, using local time. */ - getMonth(): number; + /** Gets the month, using local time. */ + getMonth(): number; - /** Gets the month of a Date object using Universal Coordinated Time (UTC). */ - getUTCMonth(): number; + /** Gets the month of a Date object using Universal Coordinated Time (UTC). */ + getUTCMonth(): number; - /** Gets the day-of-the-month, using local time. */ - getDate(): number; + /** Gets the day-of-the-month, using local time. */ + getDate(): number; - /** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */ - getUTCDate(): number; + /** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */ + getUTCDate(): number; - /** Gets the day of the week, using local time. */ - getDay(): number; + /** Gets the day of the week, using local time. */ + getDay(): number; - /** Gets the day of the week using Universal Coordinated Time (UTC). */ - getUTCDay(): number; + /** Gets the day of the week using Universal Coordinated Time (UTC). */ + getUTCDay(): number; - /** Gets the hours in a date, using local time. */ - getHours(): number; + /** Gets the hours in a date, using local time. */ + getHours(): number; - /** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */ - getUTCHours(): number; + /** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */ + getUTCHours(): number; - /** Gets the minutes of a Date object, using local time. */ - getMinutes(): number; + /** Gets the minutes of a Date object, using local time. */ + getMinutes(): number; - /** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */ - getUTCMinutes(): number; + /** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */ + getUTCMinutes(): number; - /** Gets the seconds of a Date object, using local time. */ - getSeconds(): number; + /** Gets the seconds of a Date object, using local time. */ + getSeconds(): number; - /** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */ - getUTCSeconds(): number; + /** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */ + getUTCSeconds(): number; - /** Gets the milliseconds of a Date, using local time. */ - getMilliseconds(): number; + /** Gets the milliseconds of a Date, using local time. */ + getMilliseconds(): number; - /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */ - getUTCMilliseconds(): number; + /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */ + getUTCMilliseconds(): number; - /** Gets the difference in minutes between Universal Coordinated Time (UTC) and the time on the local computer. */ - getTimezoneOffset(): number; + /** Gets the difference in minutes between Universal Coordinated Time (UTC) and the time on the local computer. */ + getTimezoneOffset(): number; - /** - * Sets the date and time value in the Date object. - * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT. - */ - setTime(time: number): number; + /** + * Sets the date and time value in the Date object. + * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT. + */ + setTime(time: number): number; - /** - * Sets the milliseconds value in the Date object using local time. - * @param ms A numeric value equal to the millisecond value. - */ - setMilliseconds(ms: number): number; + /** + * Sets the milliseconds value in the Date object using local time. + * @param ms A numeric value equal to the millisecond value. + */ + setMilliseconds(ms: number): number; - /** - * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC). - * @param ms A numeric value equal to the millisecond value. - */ - setUTCMilliseconds(ms: number): number; + /** + * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC). + * @param ms A numeric value equal to the millisecond value. + */ + setUTCMilliseconds(ms: number): number; - /** - * Sets the seconds value in the Date object using local time. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setSeconds(sec: number, ms?: number): number; + /** + * Sets the seconds value in the Date object using local time. + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setSeconds(sec: number, ms?: number): number; - /** - * Sets the seconds value in the Date object using Universal Coordinated Time (UTC). - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setUTCSeconds(sec: number, ms?: number): number; + /** + * Sets the seconds value in the Date object using Universal Coordinated Time (UTC). + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setUTCSeconds(sec: number, ms?: number): number; - /** - * Sets the minutes value in the Date object using local time. - * @param min A numeric value equal to the minutes value. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setMinutes(min: number, sec?: number, ms?: number): number; + /** + * Sets the minutes value in the Date object using local time. + * @param min A numeric value equal to the minutes value. + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setMinutes(min: number, sec?: number, ms?: number): number; - /** - * Sets the minutes value in the Date object using Universal Coordinated Time (UTC). - * @param min A numeric value equal to the minutes value. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setUTCMinutes(min: number, sec?: number, ms?: number): number; + /** + * Sets the minutes value in the Date object using Universal Coordinated Time (UTC). + * @param min A numeric value equal to the minutes value. + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setUTCMinutes(min: number, sec?: number, ms?: number): number; - /** - * Sets the hour value in the Date object using local time. - * @param hours A numeric value equal to the hours value. - * @param min A numeric value equal to the minutes value. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setHours(hours: number, min?: number, sec?: number, ms?: number): number; + /** + * Sets the hour value in the Date object using local time. + * @param hours A numeric value equal to the hours value. + * @param min A numeric value equal to the minutes value. + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setHours(hours: number, min?: number, sec?: number, ms?: number): number; - /** - * Sets the hours value in the Date object using Universal Coordinated Time (UTC). - * @param hours A numeric value equal to the hours value. - * @param min A numeric value equal to the minutes value. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number; + /** + * Sets the hours value in the Date object using Universal Coordinated Time (UTC). + * @param hours A numeric value equal to the hours value. + * @param min A numeric value equal to the minutes value. + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number; - /** - * Sets the numeric day-of-the-month value of the Date object using local time. - * @param date A numeric value equal to the day of the month. - */ - setDate(date: number): number; + /** + * Sets the numeric day-of-the-month value of the Date object using local time. + * @param date A numeric value equal to the day of the month. + */ + setDate(date: number): number; - /** - * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC). - * @param date A numeric value equal to the day of the month. - */ - setUTCDate(date: number): number; + /** + * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC). + * @param date A numeric value equal to the day of the month. + */ + setUTCDate(date: number): number; - /** - * Sets the month value in the Date object using local time. - * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. - * @param date A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used. - */ - setMonth(month: number, date?: number): number; + /** + * Sets the month value in the Date object using local time. + * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. + * @param date A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used. + */ + setMonth(month: number, date?: number): number; - /** - * Sets the month value in the Date object using Universal Coordinated Time (UTC). - * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. - * @param date A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used. - */ - setUTCMonth(month: number, date?: number): number; + /** + * Sets the month value in the Date object using Universal Coordinated Time (UTC). + * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. + * @param date A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used. + */ + setUTCMonth(month: number, date?: number): number; - /** - * Sets the year of the Date object using local time. - * @param year A numeric value for the year. - * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified. - * @param date A numeric value equal for the day of the month. - */ - setFullYear(year: number, month?: number, date?: number): number; + /** + * Sets the year of the Date object using local time. + * @param year A numeric value for the year. + * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified. + * @param date A numeric value equal for the day of the month. + */ + setFullYear(year: number, month?: number, date?: number): number; - /** - * Sets the year value in the Date object using Universal Coordinated Time (UTC). - * @param year A numeric value equal to the year. - * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied. - * @param date A numeric value equal to the day of the month. - */ - setUTCFullYear(year: number, month?: number, date?: number): number; + /** + * Sets the year value in the Date object using Universal Coordinated Time (UTC). + * @param year A numeric value equal to the year. + * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied. + * @param date A numeric value equal to the day of the month. + */ + setUTCFullYear(year: number, month?: number, date?: number): number; - /** Returns a date converted to a string using Universal Coordinated Time (UTC). */ - toUTCString(): string; + /** Returns a date converted to a string using Universal Coordinated Time (UTC). */ + toUTCString(): string; - /** Returns a date as a string value in ISO format. */ - toISOString(): string; + /** Returns a date as a string value in ISO format. */ + toISOString(): string; - /** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */ - toJSON(key?: any): string; + /** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */ + toJSON(key?: any): string; } interface DateConstructor { - new (): Date; + new (): Date; - new (value: number | string): Date; + new (value: number | string): Date; - /** - * Creates a new Date. - * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. - * @param monthIndex The month as a number between 0 and 11 (January to December). - * @param date The date as a number between 1 and 31. - * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. - * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. - * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. - * @param ms A number from 0 to 999 that specifies the milliseconds. - */ - new (year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; + /** + * Creates a new Date. + * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. + * @param monthIndex The month as a number between 0 and 11 (January to December). + * @param date The date as a number between 1 and 31. + * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. + * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. + * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. + * @param ms A number from 0 to 999 that specifies the milliseconds. + */ + new (year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; - (): string; + (): string; - readonly prototype: Date; + readonly prototype: Date; - /** - * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970. - * @param s A date string - */ - parse(s: string): number; + /** + * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970. + * @param s A date string + */ + parse(s: string): number; - /** - * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. - * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. - * @param monthIndex The month as a number between 0 and 11 (January to December). - * @param date The date as a number between 1 and 31. - * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. - * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. - * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. - * @param ms A number from 0 to 999 that specifies the milliseconds. - */ - UTC(year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; + /** + * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. + * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. + * @param monthIndex The month as a number between 0 and 11 (January to December). + * @param date The date as a number between 1 and 31. + * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. + * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. + * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. + * @param ms A number from 0 to 999 that specifies the milliseconds. + */ + UTC(year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; - /** Returns the number of milliseconds elapsed since midnight, January 1, 1970 Universal Coordinated Time (UTC). */ - now(): number; + /** Returns the number of milliseconds elapsed since midnight, January 1, 1970 Universal Coordinated Time (UTC). */ + now(): number; } declare var Date: DateConstructor; interface RegExpMatchArray extends Array { - /** - * The index of the search at which the result was found. - */ - index?: number; + /** + * The index of the search at which the result was found. + */ + index?: number; - /** - * A copy of the search string. - */ - input?: string; + /** + * A copy of the search string. + */ + input?: string; - /** - * The first match. This will always be present because `null` will be returned if there are no matches. - */ - 0: string; + /** + * The first match. This will always be present because `null` will be returned if there are no matches. + */ + 0: string; } interface RegExpExecArray extends Array { - /** - * The index of the search at which the result was found. - */ - index: number; + /** + * The index of the search at which the result was found. + */ + index: number; - /** - * A copy of the search string. - */ - input: string; + /** + * A copy of the search string. + */ + input: string; - /** - * The first match. This will always be present because `null` will be returned if there are no matches. - */ - 0: string; + /** + * The first match. This will always be present because `null` will be returned if there are no matches. + */ + 0: string; } interface RegExp { - /** - * Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search. - * @param string The String object or string literal on which to perform the search. - */ - exec(string: string): RegExpExecArray | null; + /** + * Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search. + * @param string The String object or string literal on which to perform the search. + */ + exec(string: string): RegExpExecArray | null; - /** - * Returns a Boolean value that indicates whether or not a pattern exists in a searched string. - * @param string String on which to perform the search. - */ - test(string: string): boolean; + /** + * Returns a Boolean value that indicates whether or not a pattern exists in a searched string. + * @param string String on which to perform the search. + */ + test(string: string): boolean; - /** Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. */ - readonly source: string; + /** Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. */ + readonly source: string; - /** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */ - readonly global: boolean; + /** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */ + readonly global: boolean; - /** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */ - readonly ignoreCase: boolean; + /** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */ + readonly ignoreCase: boolean; - /** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */ - readonly multiline: boolean; + /** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */ + readonly multiline: boolean; - lastIndex: number; + lastIndex: number; } interface RegExpConstructor { - new (pattern: RegExp | string): RegExp; + new (pattern: RegExp | string): RegExp; - new (pattern: string, flags?: string): RegExp; + new (pattern: string, flags?: string): RegExp; - (pattern: RegExp | string): RegExp; + (pattern: RegExp | string): RegExp; - (pattern: string, flags?: string): RegExp; + (pattern: string, flags?: string): RegExp; - readonly "prototype": RegExp; + readonly "prototype": RegExp; } declare var RegExp: RegExpConstructor; interface Error { - name: string; + name: string; - message: string; + message: string; - stack?: string; + stack?: string; } interface ErrorConstructor { - new (message?: string): Error; + new (message?: string): Error; - (message?: string): Error; + (message?: string): Error; - readonly prototype: Error; + readonly prototype: Error; } declare var Error: ErrorConstructor; @@ -6739,11 +6739,11 @@ interface EvalError extends Error { } interface EvalErrorConstructor extends ErrorConstructor { - new (message?: string): EvalError; + new (message?: string): EvalError; - (message?: string): EvalError; + (message?: string): EvalError; - readonly prototype: EvalError; + readonly prototype: EvalError; } declare var EvalError: EvalErrorConstructor; @@ -6752,11 +6752,11 @@ interface RangeError extends Error { } interface RangeErrorConstructor extends ErrorConstructor { - new (message?: string): RangeError; + new (message?: string): RangeError; - (message?: string): RangeError; + (message?: string): RangeError; - readonly prototype: RangeError; + readonly prototype: RangeError; } declare var RangeError: RangeErrorConstructor; @@ -6765,11 +6765,11 @@ interface ReferenceError extends Error { } interface ReferenceErrorConstructor extends ErrorConstructor { - new (message?: string): ReferenceError; + new (message?: string): ReferenceError; - (message?: string): ReferenceError; + (message?: string): ReferenceError; - readonly prototype: ReferenceError; + readonly prototype: ReferenceError; } declare var ReferenceError: ReferenceErrorConstructor; @@ -6778,11 +6778,11 @@ interface SyntaxError extends Error { } interface SyntaxErrorConstructor extends ErrorConstructor { - new (message?: string): SyntaxError; + new (message?: string): SyntaxError; - (message?: string): SyntaxError; + (message?: string): SyntaxError; - readonly prototype: SyntaxError; + readonly prototype: SyntaxError; } declare var SyntaxError: SyntaxErrorConstructor; @@ -6791,11 +6791,11 @@ interface TypeError extends Error { } interface TypeErrorConstructor extends ErrorConstructor { - new (message?: string): TypeError; + new (message?: string): TypeError; - (message?: string): TypeError; + (message?: string): TypeError; - readonly prototype: TypeError; + readonly prototype: TypeError; } declare var TypeError: TypeErrorConstructor; @@ -6804,42 +6804,42 @@ interface URIError extends Error { } interface URIErrorConstructor extends ErrorConstructor { - new (message?: string): URIError; + new (message?: string): URIError; - (message?: string): URIError; + (message?: string): URIError; - readonly prototype: URIError; + readonly prototype: URIError; } declare var URIError: URIErrorConstructor; interface JSON { - /** - * Converts a JavaScript Object Notation (JSON) string into an object. - * @param text A valid JSON string. - * @param reviver A function that transforms the results. This function is called for each member of the object. - * If a member contains nested objects, the nested objects are transformed before the parent object is. - * @throws {SyntaxError} If `text` is not valid JSON. - */ - parse(text: string, reviver?: (this: any, key: string, value: any) => any): any; + /** + * Converts a JavaScript Object Notation (JSON) string into an object. + * @param text A valid JSON string. + * @param reviver A function that transforms the results. This function is called for each member of the object. + * If a member contains nested objects, the nested objects are transformed before the parent object is. + * @throws {SyntaxError} If `text` is not valid JSON. + */ + parse(text: string, reviver?: (this: any, key: string, value: any) => any): any; - /** - * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. - * @param value A JavaScript value, usually an object or array, to be converted. - * @param replacer A function that transforms the results. - * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. - * @throws {TypeError} If a circular reference or a BigInt value is found. - */ - stringify(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string; + /** + * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. + * @param value A JavaScript value, usually an object or array, to be converted. + * @param replacer A function that transforms the results. + * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. + * @throws {TypeError} If a circular reference or a BigInt value is found. + */ + stringify(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string; - /** - * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. - * @param value A JavaScript value, usually an object or array, to be converted. - * @param replacer An array of strings and numbers that acts as an approved list for selecting the object properties that will be stringified. - * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. - * @throws {TypeError} If a circular reference or a BigInt value is found. - */ - stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string; + /** + * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. + * @param value A JavaScript value, usually an object or array, to be converted. + * @param replacer An array of strings and numbers that acts as an approved list for selecting the object properties that will be stringified. + * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. + * @throws {TypeError} If a circular reference or a BigInt value is found. + */ + stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string; } /** @@ -6852,444 +6852,444 @@ declare var JSON: JSON; ///////////////////////////// interface ReadonlyArray { - /** - * Gets the length of the array. This is a number one higher than the highest element defined in an array. - */ - readonly length: number; + /** + * Gets the length of the array. This is a number one higher than the highest element defined in an array. + */ + readonly length: number; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** - * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods. - */ - toLocaleString(): string; + /** + * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods. + */ + toLocaleString(): string; - /** - * Combines two or more arrays. - * @param items Additional items to add to the end of array1. - */ - concat(...items: ConcatArray[]): T[]; + /** + * Combines two or more arrays. + * @param items Additional items to add to the end of array1. + */ + concat(...items: ConcatArray[]): T[]; - /** - * Combines two or more arrays. - * @param items Additional items to add to the end of array1. - */ - concat(...items: (T | ConcatArray)[]): T[]; + /** + * Combines two or more arrays. + * @param items Additional items to add to the end of array1. + */ + concat(...items: (T | ConcatArray)[]): T[]; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): T[]; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): T[]; - /** - * Returns the index of the first occurrence of a value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. - */ - indexOf(searchElement: T, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. + */ + indexOf(searchElement: T, fromIndex?: number): number; - /** - * Returns the index of the last occurrence of a specified value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array. - */ - lastIndexOf(searchElement: T, fromIndex?: number): number; + /** + * Returns the index of the last occurrence of a specified value in an array. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array. + */ + lastIndexOf(searchElement: T, fromIndex?: number): number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): this is readonly S[]; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): this is readonly S[]; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: T, index: number, array: readonly T[]) => void, thisArg?: any): void; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: T, index: number, array: readonly T[]) => void, thisArg?: any): void; - /** - * Calls a defined callback function on each element of an array, and returns an array that contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: T, index: number, array: readonly T[]) => U, thisArg?: any): U[]; + /** + * Calls a defined callback function on each element of an array, and returns an array that contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: T, index: number, array: readonly T[]) => U, thisArg?: any): U[]; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): S[]; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): S[]; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): T[]; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): T[]; - /** - * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T; + /** + * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T; - reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T; + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T; - /** - * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U; - /** - * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T; + /** + * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T; - reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T; + reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T; - /** - * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U; - readonly [n: number]: T; + readonly [n: number]: T; } interface ConcatArray { - readonly length: number; + readonly length: number; - readonly [n: number]: T; + readonly [n: number]: T; - join(separator?: string): string; + join(separator?: string): string; - slice(start?: number, end?: number): T[]; + slice(start?: number, end?: number): T[]; } interface Array { - /** - * Gets or sets the length of the array. This is a number one higher than the highest index in the array. - */ - length: number; + /** + * Gets or sets the length of the array. This is a number one higher than the highest index in the array. + */ + length: number; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** - * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods. - */ - toLocaleString(): string; + /** + * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods. + */ + toLocaleString(): string; - /** - * Removes the last element from an array and returns it. - * If the array is empty, undefined is returned and the array is not modified. - */ - pop(): T | undefined; + /** + * Removes the last element from an array and returns it. + * If the array is empty, undefined is returned and the array is not modified. + */ + pop(): T | undefined; - /** - * Appends new elements to the end of an array, and returns the new length of the array. - * @param items New elements to add to the array. - */ - push(...items: T[]): number; + /** + * Appends new elements to the end of an array, and returns the new length of the array. + * @param items New elements to add to the array. + */ + push(...items: T[]): number; - /** - * Combines two or more arrays. - * This method returns a new array without modifying any existing arrays. - * @param items Additional arrays and/or items to add to the end of the array. - */ - concat(...items: ConcatArray[]): T[]; + /** + * Combines two or more arrays. + * This method returns a new array without modifying any existing arrays. + * @param items Additional arrays and/or items to add to the end of the array. + */ + concat(...items: ConcatArray[]): T[]; - /** - * Combines two or more arrays. - * This method returns a new array without modifying any existing arrays. - * @param items Additional arrays and/or items to add to the end of the array. - */ - concat(...items: (T | ConcatArray)[]): T[]; + /** + * Combines two or more arrays. + * This method returns a new array without modifying any existing arrays. + * @param items Additional arrays and/or items to add to the end of the array. + */ + concat(...items: (T | ConcatArray)[]): T[]; - /** - * Adds all the elements of an array into a string, separated by the specified separator string. - * @param separator A string used to separate one element of the array from the next in the resulting string. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Adds all the elements of an array into a string, separated by the specified separator string. + * @param separator A string used to separate one element of the array from the next in the resulting string. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Reverses the elements in an array in place. - * This method mutates the array and returns a reference to the same array. - */ - reverse(): T[]; + /** + * Reverses the elements in an array in place. + * This method mutates the array and returns a reference to the same array. + */ + reverse(): T[]; - /** - * Removes the first element from an array and returns it. - * If the array is empty, undefined is returned and the array is not modified. - */ - shift(): T | undefined; + /** + * Removes the first element from an array and returns it. + * If the array is empty, undefined is returned and the array is not modified. + */ + shift(): T | undefined; - /** - * Returns a copy of a section of an array. - * For both start and end, a negative index can be used to indicate an offset from the end of the array. - * For example, -2 refers to the second to last element of the array. - * @param start The beginning index of the specified portion of the array. - * If start is undefined, then the slice begins at index 0. - * @param end The end index of the specified portion of the array. This is exclusive of the element at the index 'end'. - * If end is undefined, then the slice extends to the end of the array. - */ - slice(start?: number, end?: number): T[]; + /** + * Returns a copy of a section of an array. + * For both start and end, a negative index can be used to indicate an offset from the end of the array. + * For example, -2 refers to the second to last element of the array. + * @param start The beginning index of the specified portion of the array. + * If start is undefined, then the slice begins at index 0. + * @param end The end index of the specified portion of the array. This is exclusive of the element at the index 'end'. + * If end is undefined, then the slice extends to the end of the array. + */ + slice(start?: number, end?: number): T[]; - /** - * Sorts an array in place. - * This method mutates the array and returns a reference to the same array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: T, b: T) => number): this; + /** + * Sorts an array in place. + * This method mutates the array and returns a reference to the same array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: T, b: T) => number): this; - /** - * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. - * @param start The zero-based location in the array from which to start removing elements. - * @param deleteCount The number of elements to remove. Omitting this argument will remove all elements from the start - * paramater location to end of the array. If value of this argument is either a negative number, zero, undefined, or a type - * that cannot be converted to an integer, the function will evaluate the argument as zero and not remove any elements. - * @returns An array containing the elements that were deleted. - */ - splice(start: number, deleteCount?: number): T[]; + /** + * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. + * @param start The zero-based location in the array from which to start removing elements. + * @param deleteCount The number of elements to remove. Omitting this argument will remove all elements from the start + * paramater location to end of the array. If value of this argument is either a negative number, zero, undefined, or a type + * that cannot be converted to an integer, the function will evaluate the argument as zero and not remove any elements. + * @returns An array containing the elements that were deleted. + */ + splice(start: number, deleteCount?: number): T[]; - /** - * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. - * @param start The zero-based location in the array from which to start removing elements. - * @param deleteCount The number of elements to remove. If value of this argument is either a negative number, zero, - * undefined, or a type that cannot be converted to an integer, the function will evaluate the argument as zero and - * not remove any elements. - * @param items Elements to insert into the array in place of the deleted elements. - * @returns An array containing the elements that were deleted. - */ - splice(start: number, deleteCount: number, ...items: T[]): T[]; + /** + * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. + * @param start The zero-based location in the array from which to start removing elements. + * @param deleteCount The number of elements to remove. If value of this argument is either a negative number, zero, + * undefined, or a type that cannot be converted to an integer, the function will evaluate the argument as zero and + * not remove any elements. + * @param items Elements to insert into the array in place of the deleted elements. + * @returns An array containing the elements that were deleted. + */ + splice(start: number, deleteCount: number, ...items: T[]): T[]; - /** - * Inserts new elements at the start of an array, and returns the new length of the array. - * @param items Elements to insert at the start of the array. - */ - unshift(...items: T[]): number; + /** + * Inserts new elements at the start of an array, and returns the new length of the array. + * @param items Elements to insert at the start of the array. + */ + unshift(...items: T[]): number; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. - */ - indexOf(searchElement: T, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. + */ + indexOf(searchElement: T, fromIndex?: number): number; - /** - * Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin searching backward. If fromIndex is omitted, the search starts at the last index in the array. - */ - lastIndexOf(searchElement: T, fromIndex?: number): number; + /** + * Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin searching backward. If fromIndex is omitted, the search starts at the last index in the array. + */ + lastIndexOf(searchElement: T, fromIndex?: number): number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): this is S[]; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): this is S[]; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void; - /** - * Calls a defined callback function on each element of an array, and returns an array that contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[]; + /** + * Calls a defined callback function on each element of an array, and returns an array that contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[]; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T[]; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T[]; - /** - * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; + /** + * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; - reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; - /** - * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; - /** - * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; + /** + * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; - reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; + reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; - /** - * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; - [n: number]: T; + [n: number]: T; } interface ArrayConstructor { - new (arrayLength?: number): any[]; + new (arrayLength?: number): any[]; - new (arrayLength: number): T[]; + new (arrayLength: number): T[]; - new (...items: T[]): T[]; + new (...items: T[]): T[]; - (arrayLength?: number): any[]; + (arrayLength?: number): any[]; - (arrayLength: number): T[]; + (arrayLength: number): T[]; - (...items: T[]): T[]; + (...items: T[]): T[]; - isArray(arg: any): arg is any[]; + isArray(arg: any): arg is any[]; - readonly prototype: any[]; + readonly prototype: any[]; } declare var Array: ArrayConstructor; interface TypedPropertyDescriptor { - enumerable?: boolean; + enumerable?: boolean; - configurable?: boolean; + configurable?: boolean; - writable?: boolean; + writable?: boolean; - value?: T; + value?: T; - get?: () => T; + get?: () => T; - set?: (value: T) => void; + set?: (value: T) => void; } declare type PromiseConstructorLike = new (executor: (resolve: (value: T | PromiseLike) => void, reject: (reason?: any) => void) => void) => PromiseLike; interface PromiseLike { - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): PromiseLike; + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): PromiseLike; } /** * Represents the completion of an asynchronous operation */ interface Promise { - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise; + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise; - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise; + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise; } /** @@ -7305,9 +7305,9 @@ type Awaited = T extends null | undefined ? T : // special case for `null | u // non-object or non-thenable interface ArrayLike { - readonly length: number; + readonly length: number; - readonly [n: number]: T; + readonly [n: number]: T; } /** @@ -7420,7 +7420,7 @@ interface ThisType { * Stores types to be used with WeakSet, WeakMap, WeakRef, and FinalizationRegistry */ interface WeakKeyTypes { - object: object; + object: object; } type WeakKey = WeakKeyTypes[keyof WeakKeyTypes]; @@ -7432,189 +7432,189 @@ type WeakKey = WeakKeyTypes[keyof WeakKeyTypes]; * buffer as needed. */ interface ArrayBuffer { - /** - * Read-only. The length of the ArrayBuffer (in bytes). - */ - readonly byteLength: number; + /** + * Read-only. The length of the ArrayBuffer (in bytes). + */ + readonly byteLength: number; - /** - * Returns a section of an ArrayBuffer. - */ - slice(begin?: number, end?: number): ArrayBuffer; + /** + * Returns a section of an ArrayBuffer. + */ + slice(begin?: number, end?: number): ArrayBuffer; } /** * Allowed ArrayBuffer types for the buffer of an ArrayBufferView and related Typed Arrays. */ interface ArrayBufferTypes { - ArrayBuffer: ArrayBuffer; + ArrayBuffer: ArrayBuffer; } type ArrayBufferLike = ArrayBufferTypes[keyof ArrayBufferTypes]; interface ArrayBufferConstructor { - readonly prototype: ArrayBuffer; + readonly prototype: ArrayBuffer; - new (byteLength: number): ArrayBuffer; + new (byteLength: number): ArrayBuffer; - isView(arg: any): arg is ArrayBufferView; + isView(arg: any): arg is ArrayBufferView; } declare var ArrayBuffer: ArrayBufferConstructor; interface ArrayBufferView { - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; } interface DataView { - readonly buffer: TArrayBuffer; + readonly buffer: TArrayBuffer; - readonly byteLength: number; + readonly byteLength: number; - readonly byteOffset: number; + readonly byteOffset: number; - /** - * Gets the Float32 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getFloat32(byteOffset: number, littleEndian?: boolean): number; + /** + * Gets the Float32 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getFloat32(byteOffset: number, littleEndian?: boolean): number; - /** - * Gets the Float64 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getFloat64(byteOffset: number, littleEndian?: boolean): number; + /** + * Gets the Float64 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getFloat64(byteOffset: number, littleEndian?: boolean): number; - /** - * Gets the Int8 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - */ - getInt8(byteOffset: number): number; + /** + * Gets the Int8 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + */ + getInt8(byteOffset: number): number; - /** - * Gets the Int16 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getInt16(byteOffset: number, littleEndian?: boolean): number; + /** + * Gets the Int16 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getInt16(byteOffset: number, littleEndian?: boolean): number; - /** - * Gets the Int32 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getInt32(byteOffset: number, littleEndian?: boolean): number; + /** + * Gets the Int32 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getInt32(byteOffset: number, littleEndian?: boolean): number; - /** - * Gets the Uint8 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - */ - getUint8(byteOffset: number): number; + /** + * Gets the Uint8 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + */ + getUint8(byteOffset: number): number; - /** - * Gets the Uint16 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getUint16(byteOffset: number, littleEndian?: boolean): number; + /** + * Gets the Uint16 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getUint16(byteOffset: number, littleEndian?: boolean): number; - /** - * Gets the Uint32 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getUint32(byteOffset: number, littleEndian?: boolean): number; + /** + * Gets the Uint32 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getUint32(byteOffset: number, littleEndian?: boolean): number; - /** - * Stores an Float32 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void; + /** + * Stores an Float32 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void; - /** - * Stores an Float64 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void; + /** + * Stores an Float64 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void; - /** - * Stores an Int8 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - */ - setInt8(byteOffset: number, value: number): void; + /** + * Stores an Int8 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + */ + setInt8(byteOffset: number, value: number): void; - /** - * Stores an Int16 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setInt16(byteOffset: number, value: number, littleEndian?: boolean): void; + /** + * Stores an Int16 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setInt16(byteOffset: number, value: number, littleEndian?: boolean): void; - /** - * Stores an Int32 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setInt32(byteOffset: number, value: number, littleEndian?: boolean): void; + /** + * Stores an Int32 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setInt32(byteOffset: number, value: number, littleEndian?: boolean): void; - /** - * Stores an Uint8 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - */ - setUint8(byteOffset: number, value: number): void; + /** + * Stores an Uint8 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + */ + setUint8(byteOffset: number, value: number): void; - /** - * Stores an Uint16 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setUint16(byteOffset: number, value: number, littleEndian?: boolean): void; + /** + * Stores an Uint16 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setUint16(byteOffset: number, value: number, littleEndian?: boolean): void; - /** - * Stores an Uint32 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setUint32(byteOffset: number, value: number, littleEndian?: boolean): void; + /** + * Stores an Uint32 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setUint32(byteOffset: number, value: number, littleEndian?: boolean): void; } interface DataViewConstructor { - readonly prototype: DataView; + readonly prototype: DataView; - new (buffer: TArrayBuffer, byteOffset?: number, byteLength?: number): DataView; + new (buffer: TArrayBuffer, byteOffset?: number, byteLength?: number): DataView; } declare var DataView: DataViewConstructor; @@ -7624,288 +7624,288 @@ declare var DataView: DataViewConstructor; * number of bytes could not be allocated an exception is raised. */ interface Int8Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int8Array; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int8Array; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int8Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int8Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Int8Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Int8Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Int8Array; + /** + * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Int8Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Int8ArrayConstructor { - readonly prototype: Int8Array; + readonly prototype: Int8Array; - new (length: number): Int8Array; + new (length: number): Int8Array; - new (array: ArrayLike): Int8Array; + new (array: ArrayLike): Int8Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int8Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int8Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int8Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int8Array; - new (array: ArrayLike | ArrayBuffer): Int8Array; + new (array: ArrayLike | ArrayBuffer): Int8Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Int8Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Int8Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Int8Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Int8Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } declare var Int8Array: Int8ArrayConstructor; @@ -7915,288 +7915,288 @@ declare var Int8Array: Int8ArrayConstructor; * requested number of bytes could not be allocated an exception is raised. */ interface Uint8Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint8Array; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint8Array; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; - - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; - - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint8Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint8Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Uint8Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Uint8Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Uint8Array; + /** + * Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Uint8Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Uint8ArrayConstructor { - readonly prototype: Uint8Array; + readonly prototype: Uint8Array; - new (length: number): Uint8Array; + new (length: number): Uint8Array; - new (array: ArrayLike): Uint8Array; + new (array: ArrayLike): Uint8Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint8Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint8Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8Array; - new (array: ArrayLike | ArrayBuffer): Uint8Array; + new (array: ArrayLike | ArrayBuffer): Uint8Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Uint8Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Uint8Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Uint8Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Uint8Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } declare var Uint8Array: Uint8ArrayConstructor; @@ -8206,288 +8206,288 @@ declare var Uint8Array: Uint8ArrayConstructor; * If the requested number of bytes could not be allocated an exception is raised. */ interface Uint8ClampedArray { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint8ClampedArray; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint8ClampedArray; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint8ClampedArray; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint8ClampedArray; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Uint8ClampedArray; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Uint8ClampedArray; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Uint8ClampedArray; + /** + * Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Uint8ClampedArray; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Uint8ClampedArrayConstructor { - readonly prototype: Uint8ClampedArray; + readonly prototype: Uint8ClampedArray; - new (length: number): Uint8ClampedArray; + new (length: number): Uint8ClampedArray; - new (array: ArrayLike): Uint8ClampedArray; + new (array: ArrayLike): Uint8ClampedArray; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray; - new (array: ArrayLike | ArrayBuffer): Uint8ClampedArray; + new (array: ArrayLike | ArrayBuffer): Uint8ClampedArray; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Uint8ClampedArray; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Uint8ClampedArray; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Uint8ClampedArray; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Uint8ClampedArray; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } declare var Uint8ClampedArray: Uint8ClampedArrayConstructor; @@ -8497,288 +8497,288 @@ declare var Uint8ClampedArray: Uint8ClampedArrayConstructor; * requested number of bytes could not be allocated an exception is raised. */ interface Int16Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int16Array; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int16Array; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int16Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int16Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Int16Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Int16Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Int16Array; + /** + * Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Int16Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Int16ArrayConstructor { - readonly prototype: Int16Array; + readonly prototype: Int16Array; - new (length: number): Int16Array; + new (length: number): Int16Array; - new (array: ArrayLike): Int16Array; + new (array: ArrayLike): Int16Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int16Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int16Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int16Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int16Array; - new (array: ArrayLike | ArrayBuffer): Int16Array; + new (array: ArrayLike | ArrayBuffer): Int16Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Int16Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Int16Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Int16Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Int16Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } declare var Int16Array: Int16ArrayConstructor; @@ -8788,288 +8788,288 @@ declare var Int16Array: Int16ArrayConstructor; * requested number of bytes could not be allocated an exception is raised. */ interface Uint16Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint16Array; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint16Array; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint16Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint16Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Uint16Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Uint16Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Uint16Array; + /** + * Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Uint16Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Uint16ArrayConstructor { - readonly prototype: Uint16Array; + readonly prototype: Uint16Array; - new (length: number): Uint16Array; + new (length: number): Uint16Array; - new (array: ArrayLike): Uint16Array; + new (array: ArrayLike): Uint16Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint16Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint16Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint16Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint16Array; - new (array: ArrayLike | ArrayBuffer): Uint16Array; + new (array: ArrayLike | ArrayBuffer): Uint16Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Uint16Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Uint16Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Uint16Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Uint16Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } declare var Uint16Array: Uint16ArrayConstructor; @@ -9079,288 +9079,288 @@ declare var Uint16Array: Uint16ArrayConstructor; * requested number of bytes could not be allocated an exception is raised. */ interface Int32Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int32Array; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int32Array; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int32Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int32Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Int32Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Int32Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Int32Array; + /** + * Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Int32Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Int32ArrayConstructor { - readonly prototype: Int32Array; + readonly prototype: Int32Array; - new (length: number): Int32Array; + new (length: number): Int32Array; - new (array: ArrayLike): Int32Array; + new (array: ArrayLike): Int32Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int32Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int32Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int32Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int32Array; - new (array: ArrayLike | ArrayBuffer): Int32Array; + new (array: ArrayLike | ArrayBuffer): Int32Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Int32Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Int32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Int32Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Int32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } declare var Int32Array: Int32ArrayConstructor; @@ -9370,288 +9370,288 @@ declare var Int32Array: Int32ArrayConstructor; * requested number of bytes could not be allocated an exception is raised. */ interface Uint32Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint32Array; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint32Array; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint32Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint32Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Uint32Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Uint32Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Uint32Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Uint32Array; + /** + * Gets a new Uint32Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Uint32Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Uint32ArrayConstructor { - readonly prototype: Uint32Array; + readonly prototype: Uint32Array; - new (length: number): Uint32Array; + new (length: number): Uint32Array; - new (array: ArrayLike): Uint32Array; + new (array: ArrayLike): Uint32Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint32Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint32Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint32Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint32Array; - new (array: ArrayLike | ArrayBuffer): Uint32Array; + new (array: ArrayLike | ArrayBuffer): Uint32Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Uint32Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Uint32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Uint32Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Uint32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } declare var Uint32Array: Uint32ArrayConstructor; @@ -9661,288 +9661,288 @@ declare var Uint32Array: Uint32ArrayConstructor; * of bytes could not be allocated an exception is raised. */ interface Float32Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float32Array; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float32Array; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float32Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float32Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Float32Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Float32Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Float32Array; + /** + * Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Float32Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Float32ArrayConstructor { - readonly prototype: Float32Array; + readonly prototype: Float32Array; - new (length: number): Float32Array; + new (length: number): Float32Array; - new (array: ArrayLike): Float32Array; + new (array: ArrayLike): Float32Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Float32Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Float32Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float32Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float32Array; - new (array: ArrayLike | ArrayBuffer): Float32Array; + new (array: ArrayLike | ArrayBuffer): Float32Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Float32Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Float32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Float32Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Float32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } declare var Float32Array: Float32ArrayConstructor; @@ -9952,288 +9952,288 @@ declare var Float32Array: Float32ArrayConstructor; * number of bytes could not be allocated an exception is raised. */ interface Float64Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float64Array; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float64Array; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float64Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float64Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Float64Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Float64Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Float64Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Float64Array; + /** + * Gets a new Float64Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Float64Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Float64ArrayConstructor { - readonly prototype: Float64Array; + readonly prototype: Float64Array; - new (length: number): Float64Array; + new (length: number): Float64Array; - new (array: ArrayLike): Float64Array; + new (array: ArrayLike): Float64Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Float64Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Float64Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float64Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float64Array; - new (array: ArrayLike | ArrayBuffer): Float64Array; + new (array: ArrayLike | ArrayBuffer): Float64Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Float64Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Float64Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Float64Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Float64Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } declare var Float64Array: Float64ArrayConstructor; @@ -10243,281 +10243,281 @@ declare var Float64Array: Float64ArrayConstructor; ///////////////////////////// declare namespace Intl { - interface CollatorOptions { - usage?: "sort" | "search" | undefined; +interface CollatorOptions { + usage?: "sort" | "search" | undefined; - localeMatcher?: "lookup" | "best fit" | undefined; + localeMatcher?: "lookup" | "best fit" | undefined; - numeric?: boolean | undefined; + numeric?: boolean | undefined; - caseFirst?: "upper" | "lower" | "false" | undefined; + caseFirst?: "upper" | "lower" | "false" | undefined; - sensitivity?: "base" | "accent" | "case" | "variant" | undefined; + sensitivity?: "base" | "accent" | "case" | "variant" | undefined; - collation?: "big5han" | "compat" | "default" | "dict" | "direct" | "ducet" | "emoji" | "eor" | "gb2312" | "phonebk" | "phonetic" | "pinyin" | "reformed" | "searchjl" | "stroke" | "trad" | "unihan" | "zhuyin" | undefined; + collation?: "big5han" | "compat" | "default" | "dict" | "direct" | "ducet" | "emoji" | "eor" | "gb2312" | "phonebk" | "phonetic" | "pinyin" | "reformed" | "searchjl" | "stroke" | "trad" | "unihan" | "zhuyin" | undefined; - ignorePunctuation?: boolean | undefined; - } + ignorePunctuation?: boolean | undefined; +} - interface ResolvedCollatorOptions { - locale: string; +interface ResolvedCollatorOptions { + locale: string; - usage: string; + usage: string; - sensitivity: string; + sensitivity: string; - ignorePunctuation: boolean; + ignorePunctuation: boolean; - collation: string; + collation: string; - caseFirst: string; + caseFirst: string; - numeric: boolean; - } + numeric: boolean; +} - interface Collator { - compare(x: string, y: string): number; +interface Collator { + compare(x: string, y: string): number; - resolvedOptions(): ResolvedCollatorOptions; - } + resolvedOptions(): ResolvedCollatorOptions; +} - interface CollatorConstructor { - new (locales?: string | string[], options?: CollatorOptions): Collator; +interface CollatorConstructor { + new (locales?: string | string[], options?: CollatorOptions): Collator; - (locales?: string | string[], options?: CollatorOptions): Collator; + (locales?: string | string[], options?: CollatorOptions): Collator; - supportedLocalesOf(locales: string | string[], options?: CollatorOptions): string[]; - } + supportedLocalesOf(locales: string | string[], options?: CollatorOptions): string[]; +} - var Collator: CollatorConstructor; +var Collator: CollatorConstructor; - interface NumberFormatOptionsStyleRegistry { - decimal: never; +interface NumberFormatOptionsStyleRegistry { + decimal: never; - percent: never; + percent: never; - currency: never; - } + currency: never; +} - type NumberFormatOptionsStyle = keyof NumberFormatOptionsStyleRegistry; +type NumberFormatOptionsStyle = keyof NumberFormatOptionsStyleRegistry; - interface NumberFormatOptionsCurrencyDisplayRegistry { - code: never; +interface NumberFormatOptionsCurrencyDisplayRegistry { + code: never; - symbol: never; + symbol: never; - name: never; - } + name: never; +} - type NumberFormatOptionsCurrencyDisplay = keyof NumberFormatOptionsCurrencyDisplayRegistry; +type NumberFormatOptionsCurrencyDisplay = keyof NumberFormatOptionsCurrencyDisplayRegistry; - interface NumberFormatOptionsUseGroupingRegistry { - } +interface NumberFormatOptionsUseGroupingRegistry { +} - type NumberFormatOptionsUseGrouping = {} extends NumberFormatOptionsUseGroupingRegistry ? boolean : keyof NumberFormatOptionsUseGroupingRegistry | "true" | "false" | boolean; +type NumberFormatOptionsUseGrouping = {} extends NumberFormatOptionsUseGroupingRegistry ? boolean : keyof NumberFormatOptionsUseGroupingRegistry | "true" | "false" | boolean; - type ResolvedNumberFormatOptionsUseGrouping = {} extends NumberFormatOptionsUseGroupingRegistry ? boolean : keyof NumberFormatOptionsUseGroupingRegistry | false; +type ResolvedNumberFormatOptionsUseGrouping = {} extends NumberFormatOptionsUseGroupingRegistry ? boolean : keyof NumberFormatOptionsUseGroupingRegistry | false; - interface NumberFormatOptions { - localeMatcher?: "lookup" | "best fit" | undefined; +interface NumberFormatOptions { + localeMatcher?: "lookup" | "best fit" | undefined; - style?: NumberFormatOptionsStyle | undefined; + style?: NumberFormatOptionsStyle | undefined; - currency?: string | undefined; + currency?: string | undefined; - currencyDisplay?: NumberFormatOptionsCurrencyDisplay | undefined; + currencyDisplay?: NumberFormatOptionsCurrencyDisplay | undefined; - useGrouping?: NumberFormatOptionsUseGrouping | undefined; + useGrouping?: NumberFormatOptionsUseGrouping | undefined; - minimumIntegerDigits?: number | undefined; + minimumIntegerDigits?: number | undefined; - minimumFractionDigits?: number | undefined; + minimumFractionDigits?: number | undefined; - maximumFractionDigits?: number | undefined; + maximumFractionDigits?: number | undefined; - minimumSignificantDigits?: number | undefined; + minimumSignificantDigits?: number | undefined; - maximumSignificantDigits?: number | undefined; - } + maximumSignificantDigits?: number | undefined; +} - interface ResolvedNumberFormatOptions { - locale: string; +interface ResolvedNumberFormatOptions { + locale: string; - numberingSystem: string; + numberingSystem: string; - style: NumberFormatOptionsStyle; + style: NumberFormatOptionsStyle; - currency?: string; + currency?: string; - currencyDisplay?: NumberFormatOptionsCurrencyDisplay; + currencyDisplay?: NumberFormatOptionsCurrencyDisplay; - minimumIntegerDigits: number; + minimumIntegerDigits: number; - minimumFractionDigits?: number; + minimumFractionDigits?: number; - maximumFractionDigits?: number; + maximumFractionDigits?: number; - minimumSignificantDigits?: number; + minimumSignificantDigits?: number; - maximumSignificantDigits?: number; + maximumSignificantDigits?: number; - useGrouping: ResolvedNumberFormatOptionsUseGrouping; - } + useGrouping: ResolvedNumberFormatOptionsUseGrouping; +} - interface NumberFormat { - format(value: number): string; +interface NumberFormat { + format(value: number): string; - resolvedOptions(): ResolvedNumberFormatOptions; - } + resolvedOptions(): ResolvedNumberFormatOptions; +} - interface NumberFormatConstructor { - new (locales?: string | string[], options?: NumberFormatOptions): NumberFormat; +interface NumberFormatConstructor { + new (locales?: string | string[], options?: NumberFormatOptions): NumberFormat; - (locales?: string | string[], options?: NumberFormatOptions): NumberFormat; + (locales?: string | string[], options?: NumberFormatOptions): NumberFormat; - supportedLocalesOf(locales: string | string[], options?: NumberFormatOptions): string[]; + supportedLocalesOf(locales: string | string[], options?: NumberFormatOptions): string[]; - readonly prototype: NumberFormat; - } + readonly prototype: NumberFormat; +} - var NumberFormat: NumberFormatConstructor; +var NumberFormat: NumberFormatConstructor; - interface DateTimeFormatOptions { - localeMatcher?: "best fit" | "lookup" | undefined; +interface DateTimeFormatOptions { + localeMatcher?: "best fit" | "lookup" | undefined; - weekday?: "long" | "short" | "narrow" | undefined; + weekday?: "long" | "short" | "narrow" | undefined; - era?: "long" | "short" | "narrow" | undefined; + era?: "long" | "short" | "narrow" | undefined; - year?: "numeric" | "2-digit" | undefined; + year?: "numeric" | "2-digit" | undefined; - month?: "numeric" | "2-digit" | "long" | "short" | "narrow" | undefined; + month?: "numeric" | "2-digit" | "long" | "short" | "narrow" | undefined; - day?: "numeric" | "2-digit" | undefined; + day?: "numeric" | "2-digit" | undefined; - hour?: "numeric" | "2-digit" | undefined; + hour?: "numeric" | "2-digit" | undefined; - minute?: "numeric" | "2-digit" | undefined; + minute?: "numeric" | "2-digit" | undefined; - second?: "numeric" | "2-digit" | undefined; + second?: "numeric" | "2-digit" | undefined; - timeZoneName?: "short" | "long" | "shortOffset" | "longOffset" | "shortGeneric" | "longGeneric" | undefined; + timeZoneName?: "short" | "long" | "shortOffset" | "longOffset" | "shortGeneric" | "longGeneric" | undefined; - formatMatcher?: "best fit" | "basic" | undefined; + formatMatcher?: "best fit" | "basic" | undefined; - hour12?: boolean | undefined; + hour12?: boolean | undefined; - timeZone?: string | undefined; - } + timeZone?: string | undefined; +} - interface ResolvedDateTimeFormatOptions { - locale: string; +interface ResolvedDateTimeFormatOptions { + locale: string; - calendar: string; + calendar: string; - numberingSystem: string; + numberingSystem: string; - timeZone: string; + timeZone: string; - hour12?: boolean; + hour12?: boolean; - weekday?: string; + weekday?: string; - era?: string; + era?: string; - year?: string; + year?: string; - month?: string; + month?: string; - day?: string; + day?: string; - hour?: string; + hour?: string; - minute?: string; + minute?: string; - second?: string; + second?: string; - timeZoneName?: string; - } + timeZoneName?: string; +} - interface DateTimeFormat { - format(date?: Date | number): string; +interface DateTimeFormat { + format(date?: Date | number): string; - resolvedOptions(): ResolvedDateTimeFormatOptions; - } + resolvedOptions(): ResolvedDateTimeFormatOptions; +} - interface DateTimeFormatConstructor { - new (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat; +interface DateTimeFormatConstructor { + new (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat; - (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat; + (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat; - supportedLocalesOf(locales: string | string[], options?: DateTimeFormatOptions): string[]; + supportedLocalesOf(locales: string | string[], options?: DateTimeFormatOptions): string[]; - readonly prototype: DateTimeFormat; - } + readonly prototype: DateTimeFormat; +} - var DateTimeFormat: DateTimeFormatConstructor; +var DateTimeFormat: DateTimeFormatConstructor; } interface String { - /** - * Determines whether two strings are equivalent in the current or specified locale. - * @param that String to compare to target string - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details. - * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details. - */ - localeCompare(that: string, locales?: string | string[], options?: Intl.CollatorOptions): number; + /** + * Determines whether two strings are equivalent in the current or specified locale. + * @param that String to compare to target string + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details. + * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details. + */ + localeCompare(that: string, locales?: string | string[], options?: Intl.CollatorOptions): number; } interface Number { - /** - * Converts a number to a string by using the current or specified locale. - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; + /** + * Converts a number to a string by using the current or specified locale. + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; } interface Date { - /** - * Converts a date and time to a string by using the current or specified locale. - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; + /** + * Converts a date and time to a string by using the current or specified locale. + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; - /** - * Converts a date to a string by using the current or specified locale. - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleDateString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; + /** + * Converts a date to a string by using the current or specified locale. + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleDateString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; - /** - * Converts a time to a string by using the current or specified locale. - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleTimeString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; + /** + * Converts a time to a string by using the current or specified locale. + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleTimeString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; } ///////////////////////////// // lib.esnext.array.d.ts ///////////////////////////// interface ArrayConstructor { - /** - * Creates an array from an async iterator or iterable object. - * @param iterableOrArrayLike An async iterator or array-like object to convert to an array. - */ - fromAsync(iterableOrArrayLike: AsyncIterable | Iterable> | ArrayLike>): Promise; + /** + * Creates an array from an async iterator or iterable object. + * @param iterableOrArrayLike An async iterator or array-like object to convert to an array. + */ + fromAsync(iterableOrArrayLike: AsyncIterable | Iterable> | ArrayLike>): Promise; - /** - * Creates an array from an async iterator or iterable object. - * - * @param iterableOrArrayLike An async iterator or array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of itarableOrArrayLike. - * Each return value is awaited before being added to result array. - * @param thisArg Value of 'this' used when executing mapfn. - */ - fromAsync(iterableOrArrayLike: AsyncIterable | Iterable | ArrayLike, mapFn: (value: Awaited, index: number) => U, thisArg?: any): Promise[]>; + /** + * Creates an array from an async iterator or iterable object. + * + * @param iterableOrArrayLike An async iterator or array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of itarableOrArrayLike. + * Each return value is awaited before being added to result array. + * @param thisArg Value of 'this' used when executing mapfn. + */ + fromAsync(iterableOrArrayLike: AsyncIterable | Iterable | ArrayLike, mapFn: (value: Awaited, index: number) => U, thisArg?: any): Promise[]>; } diff --git a/generated/current/year/2020/index.d.ts b/generated/current/year/2020/index.d.ts index 3f55665..19a96ec 100644 --- a/generated/current/year/2020/index.d.ts +++ b/generated/current/year/2020/index.d.ts @@ -22,175 +22,175 @@ and limitations under the License. // lib.es2015.collection.d.ts ///////////////////////////// interface Map { - /** - * Removes all elements from the Map. - */ - clear(): void; + /** + * Removes all elements from the Map. + */ + clear(): void; - /** - * @returns true if an element in the Map existed and has been removed, or false if the element does not exist. - */ - delete(key: K): boolean; + /** + * @returns true if an element in the Map existed and has been removed, or false if the element does not exist. + */ + delete(key: K): boolean; - /** - * Executes a provided function once per each key/value pair in the Map, in insertion order. - */ - forEach(callbackfn: (value: V, key: K, map: Map) => void, thisArg?: any): void; + /** + * Executes a provided function once per each key/value pair in the Map, in insertion order. + */ + forEach(callbackfn: (value: V, key: K, map: Map) => void, thisArg?: any): void; - /** - * Returns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map. - * @returns Returns the element associated with the specified key. If no element is associated with the specified key, undefined is returned. - */ - get(key: K): V | undefined; + /** + * Returns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map. + * @returns Returns the element associated with the specified key. If no element is associated with the specified key, undefined is returned. + */ + get(key: K): V | undefined; - /** - * @returns boolean indicating whether an element with the specified key exists or not. - */ - has(key: K): boolean; + /** + * @returns boolean indicating whether an element with the specified key exists or not. + */ + has(key: K): boolean; - /** - * Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated. - */ - set(key: K, value: V): this; + /** + * Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated. + */ + set(key: K, value: V): this; - /** - * @returns the number of elements in the Map. - */ - readonly size: number; + /** + * @returns the number of elements in the Map. + */ + readonly size: number; } interface MapConstructor { - new (): Map; + new (): Map; - new (entries?: readonly (readonly [K, V])[] | null): Map; + new (entries?: readonly (readonly [K, V])[] | null): Map; - readonly prototype: Map; + readonly prototype: Map; } declare var Map: MapConstructor; interface ReadonlyMap { - forEach(callbackfn: (value: V, key: K, map: ReadonlyMap) => void, thisArg?: any): void; + forEach(callbackfn: (value: V, key: K, map: ReadonlyMap) => void, thisArg?: any): void; - get(key: K): V | undefined; + get(key: K): V | undefined; - has(key: K): boolean; + has(key: K): boolean; - readonly size: number; + readonly size: number; } interface WeakMap { - /** - * Removes the specified element from the WeakMap. - * @returns true if the element was successfully removed, or false if it was not present. - */ - delete(key: K): boolean; + /** + * Removes the specified element from the WeakMap. + * @returns true if the element was successfully removed, or false if it was not present. + */ + delete(key: K): boolean; - /** - * @returns a specified element. - */ - get(key: K): V | undefined; + /** + * @returns a specified element. + */ + get(key: K): V | undefined; - /** - * @returns a boolean indicating whether an element with the specified key exists or not. - */ - has(key: K): boolean; + /** + * @returns a boolean indicating whether an element with the specified key exists or not. + */ + has(key: K): boolean; - /** - * Adds a new element with a specified key and value. - * @param key Must be an object or symbol. - */ - set(key: K, value: V): this; + /** + * Adds a new element with a specified key and value. + * @param key Must be an object or symbol. + */ + set(key: K, value: V): this; } interface WeakMapConstructor { - new (entries?: readonly (readonly [K, V])[] | null): WeakMap; + new (entries?: readonly (readonly [K, V])[] | null): WeakMap; - readonly prototype: WeakMap; + readonly prototype: WeakMap; } declare var WeakMap: WeakMapConstructor; interface Set { - /** - * Appends a new element with a specified value to the end of the Set. - */ - add(value: T): this; + /** + * Appends a new element with a specified value to the end of the Set. + */ + add(value: T): this; - /** - * Removes all elements from the Set. - */ - clear(): void; + /** + * Removes all elements from the Set. + */ + clear(): void; - /** - * Removes a specified value from the Set. - * @returns Returns true if an element in the Set existed and has been removed, or false if the element does not exist. - */ - delete(value: T): boolean; + /** + * Removes a specified value from the Set. + * @returns Returns true if an element in the Set existed and has been removed, or false if the element does not exist. + */ + delete(value: T): boolean; - /** - * Executes a provided function once per each value in the Set object, in insertion order. - */ - forEach(callbackfn: (value: T, value2: T, set: Set) => void, thisArg?: any): void; + /** + * Executes a provided function once per each value in the Set object, in insertion order. + */ + forEach(callbackfn: (value: T, value2: T, set: Set) => void, thisArg?: any): void; - /** - * @returns a boolean indicating whether an element with the specified value exists in the Set or not. - */ - has(value: T): boolean; + /** + * @returns a boolean indicating whether an element with the specified value exists in the Set or not. + */ + has(value: T): boolean; - /** - * @returns the number of (unique) elements in the Set. - */ - readonly size: number; + /** + * @returns the number of (unique) elements in the Set. + */ + readonly size: number; } interface SetConstructor { - new (values?: readonly T[] | null): Set; + new (values?: readonly T[] | null): Set; - readonly prototype: Set; + readonly prototype: Set; } declare var Set: SetConstructor; interface ReadonlySet { - /** - * Executes a provided function once per each value in the ReadonlySet object, in insertion order. - */ - forEach(callbackfn: (value: T, value2: T, set: ReadonlySet) => void, thisArg?: any): void; + /** + * Executes a provided function once per each value in the ReadonlySet object, in insertion order. + */ + forEach(callbackfn: (value: T, value2: T, set: ReadonlySet) => void, thisArg?: any): void; - /** - * @returns a boolean indicating whether an element with the specified value exists in the Set or not. - */ - has(value: T): boolean; + /** + * @returns a boolean indicating whether an element with the specified value exists in the Set or not. + */ + has(value: T): boolean; - /** - * @returns the number of (unique) elements in the Set. - */ - readonly size: number; + /** + * @returns the number of (unique) elements in the Set. + */ + readonly size: number; } interface WeakSet { - /** - * Appends a new value to the end of the WeakSet. - */ - add(value: T): this; + /** + * Appends a new value to the end of the WeakSet. + */ + add(value: T): this; - /** - * Removes the specified element from the WeakSet. - * @returns Returns true if the element existed and has been removed, or false if the element does not exist. - */ - delete(value: T): boolean; + /** + * Removes the specified element from the WeakSet. + * @returns Returns true if the element existed and has been removed, or false if the element does not exist. + */ + delete(value: T): boolean; - /** - * @returns a boolean indicating whether a value exists in the WeakSet or not. - */ - has(value: T): boolean; + /** + * @returns a boolean indicating whether a value exists in the WeakSet or not. + */ + has(value: T): boolean; } interface WeakSetConstructor { - new (values?: readonly T[] | null): WeakSet; + new (values?: readonly T[] | null): WeakSet; - readonly prototype: WeakSet; + readonly prototype: WeakSet; } declare var WeakSet: WeakSetConstructor; @@ -199,596 +199,596 @@ declare var WeakSet: WeakSetConstructor; // lib.es2015.core.d.ts ///////////////////////////// interface Array { - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: T, index: number, obj: T[]) => value is S, thisArg?: any): S | undefined; - - find(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): T | undefined; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: T, index: number, obj: T[]) => value is S, thisArg?: any): S | undefined; + + find(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): T | undefined; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: T, start?: number, end?: number): this; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: T, start?: number, end?: number): this; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } interface ArrayConstructor { - /** - * Creates an array from an array-like object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): T[]; + /** + * Creates an array from an array-like object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): T[]; - /** - * Creates an array from an iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; + /** + * Creates an array from an iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: T[]): T[]; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: T[]): T[]; } interface DateConstructor { - new (value: number | string | Date): Date; + new (value: number | string | Date): Date; } interface Function { - /** - * Returns the name of the function. Function names are read-only and can not be changed. - */ - readonly name: string; + /** + * Returns the name of the function. Function names are read-only and can not be changed. + */ + readonly name: string; } interface Math { - /** - * Returns the number of leading zero bits in the 32-bit binary representation of a number. - * @param x A numeric expression. - */ - clz32(x: number): number; + /** + * Returns the number of leading zero bits in the 32-bit binary representation of a number. + * @param x A numeric expression. + */ + clz32(x: number): number; - /** - * Returns the result of 32-bit multiplication of two numbers. - * @param x First number - * @param y Second number - */ - imul(x: number, y: number): number; + /** + * Returns the result of 32-bit multiplication of two numbers. + * @param x First number + * @param y Second number + */ + imul(x: number, y: number): number; - /** - * Returns the sign of x, indicating whether x is positive, negative, or zero. - * @param x The numeric expression to test - */ - sign(x: number): number; + /** + * Returns the sign of x, indicating whether x is positive, negative, or zero. + * @param x The numeric expression to test + */ + sign(x: number): number; - /** - * Returns the base 10 logarithm of a number. - * @param x A numeric expression. - */ - log10(x: number): number; + /** + * Returns the base 10 logarithm of a number. + * @param x A numeric expression. + */ + log10(x: number): number; - /** - * Returns the base 2 logarithm of a number. - * @param x A numeric expression. - */ - log2(x: number): number; + /** + * Returns the base 2 logarithm of a number. + * @param x A numeric expression. + */ + log2(x: number): number; - /** - * Returns the natural logarithm of 1 + x. - * @param x A numeric expression. - */ - log1p(x: number): number; + /** + * Returns the natural logarithm of 1 + x. + * @param x A numeric expression. + */ + log1p(x: number): number; - /** - * Returns the result of (e^x - 1), which is an implementation-dependent approximation to - * subtracting 1 from the exponential function of x (e raised to the power of x, where e - * is the base of the natural logarithms). - * @param x A numeric expression. - */ - expm1(x: number): number; + /** + * Returns the result of (e^x - 1), which is an implementation-dependent approximation to + * subtracting 1 from the exponential function of x (e raised to the power of x, where e + * is the base of the natural logarithms). + * @param x A numeric expression. + */ + expm1(x: number): number; - /** - * Returns the hyperbolic cosine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - cosh(x: number): number; + /** + * Returns the hyperbolic cosine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + cosh(x: number): number; - /** - * Returns the hyperbolic sine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - sinh(x: number): number; + /** + * Returns the hyperbolic sine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + sinh(x: number): number; - /** - * Returns the hyperbolic tangent of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - tanh(x: number): number; + /** + * Returns the hyperbolic tangent of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + tanh(x: number): number; - /** - * Returns the inverse hyperbolic cosine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - acosh(x: number): number; + /** + * Returns the inverse hyperbolic cosine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + acosh(x: number): number; - /** - * Returns the inverse hyperbolic sine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - asinh(x: number): number; + /** + * Returns the inverse hyperbolic sine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + asinh(x: number): number; - /** - * Returns the inverse hyperbolic tangent of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - atanh(x: number): number; + /** + * Returns the inverse hyperbolic tangent of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + atanh(x: number): number; - /** - * Returns the square root of the sum of squares of its arguments. - * @param values Values to compute the square root for. - * If no arguments are passed, the result is +0. - * If there is only one argument, the result is the absolute value. - * If any argument is +Infinity or -Infinity, the result is +Infinity. - * If any argument is NaN, the result is NaN. - * If all arguments are either +0 or −0, the result is +0. - */ - hypot(...values: number[]): number; + /** + * Returns the square root of the sum of squares of its arguments. + * @param values Values to compute the square root for. + * If no arguments are passed, the result is +0. + * If there is only one argument, the result is the absolute value. + * If any argument is +Infinity or -Infinity, the result is +Infinity. + * If any argument is NaN, the result is NaN. + * If all arguments are either +0 or −0, the result is +0. + */ + hypot(...values: number[]): number; - /** - * Returns the integral part of the numeric expression x, removing any fractional digits. - * If x is already an integer, the result is x. - * @param x A numeric expression. - */ - trunc(x: number): number; + /** + * Returns the integral part of the numeric expression x, removing any fractional digits. + * If x is already an integer, the result is x. + * @param x A numeric expression. + */ + trunc(x: number): number; - /** - * Returns the nearest single precision float representation of a number. - * @param x A numeric expression. - */ - fround(x: number): number; + /** + * Returns the nearest single precision float representation of a number. + * @param x A numeric expression. + */ + fround(x: number): number; - /** - * Returns an implementation-dependent approximation to the cube root of number. - * @param x A numeric expression. - */ - cbrt(x: number): number; + /** + * Returns an implementation-dependent approximation to the cube root of number. + * @param x A numeric expression. + */ + cbrt(x: number): number; } interface NumberConstructor { - /** - * The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1 - * that is representable as a Number value, which is approximately: - * 2.2204460492503130808472633361816 x 10‍−‍16. - */ - readonly EPSILON: number; + /** + * The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1 + * that is representable as a Number value, which is approximately: + * 2.2204460492503130808472633361816 x 10‍−‍16. + */ + readonly EPSILON: number; - /** - * Returns true if passed value is finite. - * Unlike the global isFinite, Number.isFinite doesn't forcibly convert the parameter to a - * number. Only finite values of the type number, result in true. - * @param number A numeric value. - */ - isFinite(number: unknown): boolean; + /** + * Returns true if passed value is finite. + * Unlike the global isFinite, Number.isFinite doesn't forcibly convert the parameter to a + * number. Only finite values of the type number, result in true. + * @param number A numeric value. + */ + isFinite(number: unknown): boolean; - /** - * Returns true if the value passed is an integer, false otherwise. - * @param number A numeric value. - */ - isInteger(number: unknown): boolean; + /** + * Returns true if the value passed is an integer, false otherwise. + * @param number A numeric value. + */ + isInteger(number: unknown): boolean; - /** - * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a - * number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter - * to a number. Only values of the type number, that are also NaN, result in true. - * @param number A numeric value. - */ - isNaN(number: unknown): boolean; + /** + * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a + * number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter + * to a number. Only values of the type number, that are also NaN, result in true. + * @param number A numeric value. + */ + isNaN(number: unknown): boolean; - /** - * Returns true if the value passed is a safe integer. - * @param number A numeric value. - */ - isSafeInteger(number: unknown): boolean; + /** + * Returns true if the value passed is a safe integer. + * @param number A numeric value. + */ + isSafeInteger(number: unknown): boolean; - /** - * The value of the largest integer n such that n and n + 1 are both exactly representable as - * a Number value. - * The value of Number.MAX_SAFE_INTEGER is 9007199254740991 2^53 − 1. - */ - readonly MAX_SAFE_INTEGER: number; + /** + * The value of the largest integer n such that n and n + 1 are both exactly representable as + * a Number value. + * The value of Number.MAX_SAFE_INTEGER is 9007199254740991 2^53 − 1. + */ + readonly MAX_SAFE_INTEGER: number; - /** - * The value of the smallest integer n such that n and n − 1 are both exactly representable as - * a Number value. - * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)). - */ - readonly MIN_SAFE_INTEGER: number; + /** + * The value of the smallest integer n such that n and n − 1 are both exactly representable as + * a Number value. + * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)). + */ + readonly MIN_SAFE_INTEGER: number; - /** - * Converts a string to a floating-point number. - * @param string A string that contains a floating-point number. - */ - parseFloat(string: string): number; + /** + * Converts a string to a floating-point number. + * @param string A string that contains a floating-point number. + */ + parseFloat(string: string): number; - /** - * Converts A string to an integer. - * @param string A string to convert into a number. - * @param radix A value between 2 and 36 that specifies the base of the number in `string`. - * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. - * All other strings are considered decimal. - */ - parseInt(string: string, radix?: number): number; + /** + * Converts A string to an integer. + * @param string A string to convert into a number. + * @param radix A value between 2 and 36 that specifies the base of the number in `string`. + * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. + * All other strings are considered decimal. + */ + parseInt(string: string, radix?: number): number; } interface ObjectConstructor { - /** - * Copy the values of all of the enumerable own properties from one or more source objects to a - * target object. Returns the target object. - * @param target The target object to copy to. - * @param source The source object from which to copy properties. - */ - assign(target: T, source: U): T & U; + /** + * Copy the values of all of the enumerable own properties from one or more source objects to a + * target object. Returns the target object. + * @param target The target object to copy to. + * @param source The source object from which to copy properties. + */ + assign(target: T, source: U): T & U; - /** - * Copy the values of all of the enumerable own properties from one or more source objects to a - * target object. Returns the target object. - * @param target The target object to copy to. - * @param source1 The first source object from which to copy properties. - * @param source2 The second source object from which to copy properties. - */ - assign(target: T, source1: U, source2: V): T & U & V; + /** + * Copy the values of all of the enumerable own properties from one or more source objects to a + * target object. Returns the target object. + * @param target The target object to copy to. + * @param source1 The first source object from which to copy properties. + * @param source2 The second source object from which to copy properties. + */ + assign(target: T, source1: U, source2: V): T & U & V; - /** - * Copy the values of all of the enumerable own properties from one or more source objects to a - * target object. Returns the target object. - * @param target The target object to copy to. - * @param source1 The first source object from which to copy properties. - * @param source2 The second source object from which to copy properties. - * @param source3 The third source object from which to copy properties. - */ - assign(target: T, source1: U, source2: V, source3: W): T & U & V & W; + /** + * Copy the values of all of the enumerable own properties from one or more source objects to a + * target object. Returns the target object. + * @param target The target object to copy to. + * @param source1 The first source object from which to copy properties. + * @param source2 The second source object from which to copy properties. + * @param source3 The third source object from which to copy properties. + */ + assign(target: T, source1: U, source2: V, source3: W): T & U & V & W; - /** - * Copy the values of all of the enumerable own properties from one or more source objects to a - * target object. Returns the target object. - * @param target The target object to copy to. - * @param sources One or more source objects from which to copy properties - */ - assign(target: object, ...sources: any[]): any; + /** + * Copy the values of all of the enumerable own properties from one or more source objects to a + * target object. Returns the target object. + * @param target The target object to copy to. + * @param sources One or more source objects from which to copy properties + */ + assign(target: object, ...sources: any[]): any; - /** - * Returns an array of all symbol properties found directly on object o. - * @param o Object to retrieve the symbols from. - */ - getOwnPropertySymbols(o: any): symbol[]; + /** + * Returns an array of all symbol properties found directly on object o. + * @param o Object to retrieve the symbols from. + */ + getOwnPropertySymbols(o: any): symbol[]; - /** - * Returns the names of the enumerable string properties and methods of an object. - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - keys(o: {}): string[]; + /** + * Returns the names of the enumerable string properties and methods of an object. + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + keys(o: {}): string[]; - /** - * Returns true if the values are the same value, false otherwise. - * @param value1 The first value. - * @param value2 The second value. - */ - is(value1: any, value2: any): boolean; + /** + * Returns true if the values are the same value, false otherwise. + * @param value1 The first value. + * @param value2 The second value. + */ + is(value1: any, value2: any): boolean; - /** - * Sets the prototype of a specified object o to object proto or null. Returns the object o. - * @param o The object to change its prototype. - * @param proto The value of the new prototype or null. - */ - setPrototypeOf(o: any, proto: object | null): any; + /** + * Sets the prototype of a specified object o to object proto or null. Returns the object o. + * @param o The object to change its prototype. + * @param proto The value of the new prototype or null. + */ + setPrototypeOf(o: any, proto: object | null): any; } interface ReadonlyArray { - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: T, index: number, obj: readonly T[]) => value is S, thisArg?: any): S | undefined; - - find(predicate: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): T | undefined; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: T, index: number, obj: readonly T[]) => value is S, thisArg?: any): S | undefined; + + find(predicate: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): T | undefined; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): number; - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } interface RegExp { - /** - * Returns a string indicating the flags of the regular expression in question. This field is read-only. - * The characters in this string are sequenced and concatenated in the following order: - * - * - "g" for global - * - "i" for ignoreCase - * - "m" for multiline - * - "u" for unicode - * - "y" for sticky - * - * If no flags are set, the value is the empty string. - */ - readonly flags: string; + /** + * Returns a string indicating the flags of the regular expression in question. This field is read-only. + * The characters in this string are sequenced and concatenated in the following order: + * + * - "g" for global + * - "i" for ignoreCase + * - "m" for multiline + * - "u" for unicode + * - "y" for sticky + * + * If no flags are set, the value is the empty string. + */ + readonly flags: string; - /** - * Returns a Boolean value indicating the state of the sticky flag (y) used with a regular - * expression. Default is false. Read-only. - */ - readonly sticky: boolean; + /** + * Returns a Boolean value indicating the state of the sticky flag (y) used with a regular + * expression. Default is false. Read-only. + */ + readonly sticky: boolean; - /** - * Returns a Boolean value indicating the state of the Unicode flag (u) used with a regular - * expression. Default is false. Read-only. - */ - readonly unicode: boolean; + /** + * Returns a Boolean value indicating the state of the Unicode flag (u) used with a regular + * expression. Default is false. Read-only. + */ + readonly unicode: boolean; } interface RegExpConstructor { - new (pattern: RegExp | string, flags?: string): RegExp; + new (pattern: RegExp | string, flags?: string): RegExp; - (pattern: RegExp | string, flags?: string): RegExp; + (pattern: RegExp | string, flags?: string): RegExp; } interface String { - /** - * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point - * value of the UTF-16 encoded code point starting at the string element at position pos in - * the String resulting from converting this object to a String. - * If there is no element at that position, the result is undefined. - * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos. - */ - codePointAt(pos: number): number | undefined; + /** + * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point + * value of the UTF-16 encoded code point starting at the string element at position pos in + * the String resulting from converting this object to a String. + * If there is no element at that position, the result is undefined. + * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos. + */ + codePointAt(pos: number): number | undefined; - /** - * Returns true if searchString appears as a substring of the result of converting this - * object to a String, at one or more positions that are - * greater than or equal to position; otherwise, returns false. - * @param searchString search string - * @param position If position is undefined, 0 is assumed, so as to search all of the String. - */ - includes(searchString: string, position?: number): boolean; + /** + * Returns true if searchString appears as a substring of the result of converting this + * object to a String, at one or more positions that are + * greater than or equal to position; otherwise, returns false. + * @param searchString search string + * @param position If position is undefined, 0 is assumed, so as to search all of the String. + */ + includes(searchString: string, position?: number): boolean; - /** - * Returns true if the sequence of elements of searchString converted to a String is the - * same as the corresponding elements of this object (converted to a String) starting at - * endPosition – length(this). Otherwise returns false. - */ - endsWith(searchString: string, endPosition?: number): boolean; + /** + * Returns true if the sequence of elements of searchString converted to a String is the + * same as the corresponding elements of this object (converted to a String) starting at + * endPosition – length(this). Otherwise returns false. + */ + endsWith(searchString: string, endPosition?: number): boolean; - /** - * Returns the String value result of normalizing the string into the normalization form - * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms. - * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default - * is "NFC" - */ - normalize(form: "NFC" | "NFD" | "NFKC" | "NFKD"): string; + /** + * Returns the String value result of normalizing the string into the normalization form + * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms. + * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default + * is "NFC" + */ + normalize(form: "NFC" | "NFD" | "NFKC" | "NFKD"): string; - /** - * Returns the String value result of normalizing the string into the normalization form - * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms. - * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default - * is "NFC" - */ - normalize(form?: string): string; + /** + * Returns the String value result of normalizing the string into the normalization form + * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms. + * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default + * is "NFC" + */ + normalize(form?: string): string; - /** - * Returns a String value that is made from count copies appended together. If count is 0, - * the empty string is returned. - * @param count number of copies to append - */ - repeat(count: number): string; + /** + * Returns a String value that is made from count copies appended together. If count is 0, + * the empty string is returned. + * @param count number of copies to append + */ + repeat(count: number): string; - /** - * Returns true if the sequence of elements of searchString converted to a String is the - * same as the corresponding elements of this object (converted to a String) starting at - * position. Otherwise returns false. - */ - startsWith(searchString: string, position?: number): boolean; + /** + * Returns true if the sequence of elements of searchString converted to a String is the + * same as the corresponding elements of this object (converted to a String) starting at + * position. Otherwise returns false. + */ + startsWith(searchString: string, position?: number): boolean; } interface StringConstructor { - /** - * Return the String value whose elements are, in order, the elements in the List elements. - * If length is 0, the empty string is returned. - */ - fromCodePoint(...codePoints: number[]): string; + /** + * Return the String value whose elements are, in order, the elements in the List elements. + * If length is 0, the empty string is returned. + */ + fromCodePoint(...codePoints: number[]): string; - /** - * String.raw is usually used as a tag function of a Tagged Template String. When called as - * such, the first argument will be a well formed template call site object and the rest - * parameter will contain the substitution values. It can also be called directly, for example, - * to interleave strings and values from your own tag function, and in this case the only thing - * it needs from the first argument is the raw property. - * @param template A well-formed template string call site representation. - * @param substitutions A set of substitution values. - */ - raw(template: { raw: readonly string[] | ArrayLike; }, ...substitutions: any[]): string; + /** + * String.raw is usually used as a tag function of a Tagged Template String. When called as + * such, the first argument will be a well formed template call site object and the rest + * parameter will contain the substitution values. It can also be called directly, for example, + * to interleave strings and values from your own tag function, and in this case the only thing + * it needs from the first argument is the raw property. + * @param template A well-formed template string call site representation. + * @param substitutions A set of substitution values. + */ + raw(template: { raw: readonly string[] | ArrayLike; }, ...substitutions: any[]): string; } interface Int8Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Uint8Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Uint8ClampedArray { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Int16Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Uint16Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Int32Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Uint32Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Float32Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Float64Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } ///////////////////////////// // lib.es2015.generator.d.ts ///////////////////////////// interface Generator extends IteratorObject { - // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. - next(...[value]: [] | [TNext]): IteratorResult; + // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. + next(...[value]: [] | [TNext]): IteratorResult; - return(value: TReturn): IteratorResult; + return(value: TReturn): IteratorResult; - throw(e: any): IteratorResult; + throw(e: any): IteratorResult; - [Symbol.iterator](): Generator; + [Symbol.iterator](): Generator; } interface GeneratorFunction { - /** - * Creates a new Generator object. - * @param args A list of arguments the function accepts. - */ - new (...args: any[]): Generator; + /** + * Creates a new Generator object. + * @param args A list of arguments the function accepts. + */ + new (...args: any[]): Generator; - /** - * Creates a new Generator object. - * @param args A list of arguments the function accepts. - */ - (...args: any[]): Generator; + /** + * Creates a new Generator object. + * @param args A list of arguments the function accepts. + */ + (...args: any[]): Generator; - /** - * The length of the arguments. - */ - readonly length: number; + /** + * The length of the arguments. + */ + readonly length: number; - /** - * Returns the name of the function. - */ - readonly name: string; + /** + * Returns the name of the function. + */ + readonly name: string; - /** - * A reference to the prototype. - */ - readonly prototype: Generator; + /** + * A reference to the prototype. + */ + readonly prototype: Generator; } ///////////////////////////// // lib.es2015.iterable.d.ts ///////////////////////////// interface SymbolConstructor { - /** - * A method that returns the default iterator for an object. Called by the semantics of the - * for-of statement. - */ - readonly iterator: unique symbol; + /** + * A method that returns the default iterator for an object. Called by the semantics of the + * for-of statement. + */ + readonly iterator: unique symbol; } interface IteratorYieldResult { - done?: false; + done?: false; - value: TYield; + value: TYield; } interface IteratorReturnResult { - done: true; + done: true; - value: TReturn; + value: TReturn; } type IteratorResult = IteratorYieldResult | IteratorReturnResult; interface Iterator { - // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. - next(...[value]: [] | [TNext]): IteratorResult; + // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. + next(...[value]: [] | [TNext]): IteratorResult; - return?(value?: TReturn): IteratorResult; + return?(value?: TReturn): IteratorResult; - throw?(e?: any): IteratorResult; + throw?(e?: any): IteratorResult; } interface Iterable { - [Symbol.iterator](): Iterator; + [Symbol.iterator](): Iterator; } /** * Describes a user-defined {@link Iterator} that is also iterable. */ interface IterableIterator extends Iterator { - [Symbol.iterator](): IterableIterator; + [Symbol.iterator](): IterableIterator; } /** * Describes an {@link Iterator} produced by the runtime that inherits from the intrinsic `Iterator.prototype`. */ interface IteratorObject extends Iterator { - [Symbol.iterator](): IteratorObject; + [Symbol.iterator](): IteratorObject; } /** @@ -798,589 +798,589 @@ interface IteratorObject extends Iterator type BuiltinIteratorReturn = intrinsic; interface ArrayIterator extends IteratorObject { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; } interface Array { - /** Iterator */ - [Symbol.iterator](): ArrayIterator; + /** Iterator */ + [Symbol.iterator](): ArrayIterator; - /** - * Returns an iterable of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, T]>; + /** + * Returns an iterable of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, T]>; - /** - * Returns an iterable of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an iterable of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an iterable of values in the array - */ - values(): ArrayIterator; + /** + * Returns an iterable of values in the array + */ + values(): ArrayIterator; } interface ArrayConstructor { - /** - * Creates an array from an iterable object. - * @param iterable An iterable object to convert to an array. - */ - from(iterable: Iterable | ArrayLike): T[]; + /** + * Creates an array from an iterable object. + * @param iterable An iterable object to convert to an array. + */ + from(iterable: Iterable | ArrayLike): T[]; - /** - * Creates an array from an iterable object. - * @param iterable An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; + /** + * Creates an array from an iterable object. + * @param iterable An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } interface ReadonlyArray { - /** Iterator of values in the array. */ - [Symbol.iterator](): ArrayIterator; + /** Iterator of values in the array. */ + [Symbol.iterator](): ArrayIterator; - /** - * Returns an iterable of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, T]>; + /** + * Returns an iterable of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, T]>; - /** - * Returns an iterable of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an iterable of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an iterable of values in the array - */ - values(): ArrayIterator; + /** + * Returns an iterable of values in the array + */ + values(): ArrayIterator; } interface IArguments { - /** Iterator */ - [Symbol.iterator](): ArrayIterator; + /** Iterator */ + [Symbol.iterator](): ArrayIterator; } interface MapIterator extends IteratorObject { - [Symbol.iterator](): MapIterator; + [Symbol.iterator](): MapIterator; } interface Map { - /** Returns an iterable of entries in the map. */ - [Symbol.iterator](): MapIterator<[K, V]>; + /** Returns an iterable of entries in the map. */ + [Symbol.iterator](): MapIterator<[K, V]>; - /** - * Returns an iterable of key, value pairs for every entry in the map. - */ - entries(): MapIterator<[K, V]>; + /** + * Returns an iterable of key, value pairs for every entry in the map. + */ + entries(): MapIterator<[K, V]>; - /** - * Returns an iterable of keys in the map - */ - keys(): MapIterator; + /** + * Returns an iterable of keys in the map + */ + keys(): MapIterator; - /** - * Returns an iterable of values in the map - */ - values(): MapIterator; + /** + * Returns an iterable of values in the map + */ + values(): MapIterator; } interface ReadonlyMap { - /** Returns an iterable of entries in the map. */ - [Symbol.iterator](): MapIterator<[K, V]>; + /** Returns an iterable of entries in the map. */ + [Symbol.iterator](): MapIterator<[K, V]>; - /** - * Returns an iterable of key, value pairs for every entry in the map. - */ - entries(): MapIterator<[K, V]>; + /** + * Returns an iterable of key, value pairs for every entry in the map. + */ + entries(): MapIterator<[K, V]>; - /** - * Returns an iterable of keys in the map - */ - keys(): MapIterator; + /** + * Returns an iterable of keys in the map + */ + keys(): MapIterator; - /** - * Returns an iterable of values in the map - */ - values(): MapIterator; + /** + * Returns an iterable of values in the map + */ + values(): MapIterator; } interface MapConstructor { - new (): Map; + new (): Map; - new (iterable?: Iterable | null): Map; + new (iterable?: Iterable | null): Map; } interface WeakMap { } interface WeakMapConstructor { - new (iterable?: Iterable | null): WeakMap; + new (iterable?: Iterable | null): WeakMap; } interface SetIterator extends IteratorObject { - [Symbol.iterator](): SetIterator; + [Symbol.iterator](): SetIterator; } interface Set { - /** Iterates over values in the set. */ - [Symbol.iterator](): SetIterator; + /** Iterates over values in the set. */ + [Symbol.iterator](): SetIterator; - /** - * Returns an iterable of [v,v] pairs for every value `v` in the set. - */ - entries(): SetIterator<[T, T]>; + /** + * Returns an iterable of [v,v] pairs for every value `v` in the set. + */ + entries(): SetIterator<[T, T]>; - /** - * Despite its name, returns an iterable of the values in the set. - */ - keys(): SetIterator; + /** + * Despite its name, returns an iterable of the values in the set. + */ + keys(): SetIterator; - /** - * Returns an iterable of values in the set. - */ - values(): SetIterator; + /** + * Returns an iterable of values in the set. + */ + values(): SetIterator; } interface ReadonlySet { - /** Iterates over values in the set. */ - [Symbol.iterator](): SetIterator; + /** Iterates over values in the set. */ + [Symbol.iterator](): SetIterator; - /** - * Returns an iterable of [v,v] pairs for every value `v` in the set. - */ - entries(): SetIterator<[T, T]>; + /** + * Returns an iterable of [v,v] pairs for every value `v` in the set. + */ + entries(): SetIterator<[T, T]>; - /** - * Despite its name, returns an iterable of the values in the set. - */ - keys(): SetIterator; + /** + * Despite its name, returns an iterable of the values in the set. + */ + keys(): SetIterator; - /** - * Returns an iterable of values in the set. - */ - values(): SetIterator; + /** + * Returns an iterable of values in the set. + */ + values(): SetIterator; } interface SetConstructor { - new (iterable?: Iterable | null): Set; + new (iterable?: Iterable | null): Set; } interface WeakSet { } interface WeakSetConstructor { - new (iterable: Iterable): WeakSet; + new (iterable: Iterable): WeakSet; } interface PromiseConstructor { - /** - * Creates a Promise that is resolved with an array of results when all of the provided Promises - * resolve, or rejected when any Promise is rejected. - * @param values An iterable of Promises. - * @returns A new Promise. - */ - all(values: Iterable>): Promise[]>; + /** + * Creates a Promise that is resolved with an array of results when all of the provided Promises + * resolve, or rejected when any Promise is rejected. + * @param values An iterable of Promises. + * @returns A new Promise. + */ + all(values: Iterable>): Promise[]>; - /** - * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved - * or rejected. - * @param values An iterable of Promises. - * @returns A new Promise. - */ - race(values: Iterable>): Promise>; + /** + * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved + * or rejected. + * @param values An iterable of Promises. + * @returns A new Promise. + */ + race(values: Iterable>): Promise>; } interface StringIterator extends IteratorObject { - [Symbol.iterator](): StringIterator; + [Symbol.iterator](): StringIterator; } interface String { - /** Iterator */ - [Symbol.iterator](): StringIterator; + /** Iterator */ + [Symbol.iterator](): StringIterator; } interface Int8Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Int8ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Int8Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Int8Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int8Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int8Array; } interface Uint8Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Uint8ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Uint8Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Uint8Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8Array; } interface Uint8ClampedArray { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Uint8ClampedArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Uint8ClampedArray; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Uint8ClampedArray; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } interface Int16Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Int16ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Int16Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Int16Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int16Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int16Array; } interface Uint16Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Uint16ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Uint16Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Uint16Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint16Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint16Array; } interface Int32Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Int32ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Int32Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Int32Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int32Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int32Array; } interface Uint32Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Uint32ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Uint32Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Uint32Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint32Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint32Array; } interface Float32Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Float32ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Float32Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Float32Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Float32Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Float32Array; } interface Float64Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Float64ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Float64Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Float64Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Float64Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Float64Array; } ///////////////////////////// // lib.es2015.promise.d.ts ///////////////////////////// interface PromiseConstructor { - /** - * A reference to the prototype. - */ - readonly prototype: Promise; + /** + * A reference to the prototype. + */ + readonly prototype: Promise; - /** - * Creates a new Promise. - * @param executor A callback used to initialize the promise. This callback is passed two arguments: - * a resolve callback used to resolve the promise with a value or the result of another promise, - * and a reject callback used to reject the promise with a provided reason or error. - */ - new (executor: (resolve: (value: T | PromiseLike) => void, reject: (reason?: any) => void) => void): Promise; + /** + * Creates a new Promise. + * @param executor A callback used to initialize the promise. This callback is passed two arguments: + * a resolve callback used to resolve the promise with a value or the result of another promise, + * and a reject callback used to reject the promise with a provided reason or error. + */ + new (executor: (resolve: (value: T | PromiseLike) => void, reject: (reason?: any) => void) => void): Promise; - /** - * Creates a Promise that is resolved with an array of results when all of the provided Promises - * resolve, or rejected when any Promise is rejected. - * @param values An array of Promises. - * @returns A new Promise. - */ - all(values: T): Promise<{ -readonly [P in keyof T]: Awaited; }>; + /** + * Creates a Promise that is resolved with an array of results when all of the provided Promises + * resolve, or rejected when any Promise is rejected. + * @param values An array of Promises. + * @returns A new Promise. + */ + all(values: T): Promise<{ -readonly [P in keyof T]: Awaited; }>; - // see: lib.es2015.iterable.d.ts - // all(values: Iterable>): Promise[]>; + // see: lib.es2015.iterable.d.ts + // all(values: Iterable>): Promise[]>; - /** - * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved - * or rejected. - * @param values An array of Promises. - * @returns A new Promise. - */ - race(values: T): Promise>; + /** + * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved + * or rejected. + * @param values An array of Promises. + * @returns A new Promise. + */ + race(values: T): Promise>; - // see: lib.es2015.iterable.d.ts - // race(values: Iterable>): Promise>; + // see: lib.es2015.iterable.d.ts + // race(values: Iterable>): Promise>; - /** - * Creates a new rejected promise for the provided reason. - * @param reason The reason the promise was rejected. - * @returns A new rejected Promise. - */ - reject(reason?: any): Promise; + /** + * Creates a new rejected promise for the provided reason. + * @param reason The reason the promise was rejected. + * @returns A new rejected Promise. + */ + reject(reason?: any): Promise; - /** - * Creates a new resolved promise. - * @returns A resolved promise. - */ - resolve(): Promise; + /** + * Creates a new resolved promise. + * @returns A resolved promise. + */ + resolve(): Promise; - /** - * Creates a new resolved promise for the provided value. - * @param value A promise. - * @returns A promise whose internal state matches the provided promise. - */ - resolve(value: T): Promise>; + /** + * Creates a new resolved promise for the provided value. + * @param value A promise. + * @returns A promise whose internal state matches the provided promise. + */ + resolve(value: T): Promise>; - /** - * Creates a new resolved promise for the provided value. - * @param value A promise. - * @returns A promise whose internal state matches the provided promise. - */ - resolve(value: T | PromiseLike): Promise>; + /** + * Creates a new resolved promise for the provided value. + * @param value A promise. + * @returns A promise whose internal state matches the provided promise. + */ + resolve(value: T | PromiseLike): Promise>; } declare var Promise: PromiseConstructor; @@ -1389,113 +1389,113 @@ declare var Promise: PromiseConstructor; // lib.es2015.proxy.d.ts ///////////////////////////// interface ProxyHandler { - /** - * A trap method for a function call. - * @param target The original callable object which is being proxied. - */ - apply?(target: T, thisArg: any, argArray: any[]): any; + /** + * A trap method for a function call. + * @param target The original callable object which is being proxied. + */ + apply?(target: T, thisArg: any, argArray: any[]): any; - /** - * A trap for the `new` operator. - * @param target The original object which is being proxied. - * @param newTarget The constructor that was originally called. - */ - construct?(target: T, argArray: any[], newTarget: Function): object; + /** + * A trap for the `new` operator. + * @param target The original object which is being proxied. + * @param newTarget The constructor that was originally called. + */ + construct?(target: T, argArray: any[], newTarget: Function): object; - /** - * A trap for `Object.defineProperty()`. - * @param target The original object which is being proxied. - * @returns A `Boolean` indicating whether or not the property has been defined. - */ - defineProperty?(target: T, property: string | symbol, attributes: PropertyDescriptor): boolean; + /** + * A trap for `Object.defineProperty()`. + * @param target The original object which is being proxied. + * @returns A `Boolean` indicating whether or not the property has been defined. + */ + defineProperty?(target: T, property: string | symbol, attributes: PropertyDescriptor): boolean; - /** - * A trap for the `delete` operator. - * @param target The original object which is being proxied. - * @param p The name or `Symbol` of the property to delete. - * @returns A `Boolean` indicating whether or not the property was deleted. - */ - deleteProperty?(target: T, p: string | symbol): boolean; + /** + * A trap for the `delete` operator. + * @param target The original object which is being proxied. + * @param p The name or `Symbol` of the property to delete. + * @returns A `Boolean` indicating whether or not the property was deleted. + */ + deleteProperty?(target: T, p: string | symbol): boolean; - /** - * A trap for getting a property value. - * @param target The original object which is being proxied. - * @param p The name or `Symbol` of the property to get. - * @param receiver The proxy or an object that inherits from the proxy. - */ - get?(target: T, p: string | symbol, receiver: any): any; + /** + * A trap for getting a property value. + * @param target The original object which is being proxied. + * @param p The name or `Symbol` of the property to get. + * @param receiver The proxy or an object that inherits from the proxy. + */ + get?(target: T, p: string | symbol, receiver: any): any; - /** - * A trap for `Object.getOwnPropertyDescriptor()`. - * @param target The original object which is being proxied. - * @param p The name of the property whose description should be retrieved. - */ - getOwnPropertyDescriptor?(target: T, p: string | symbol): PropertyDescriptor | undefined; + /** + * A trap for `Object.getOwnPropertyDescriptor()`. + * @param target The original object which is being proxied. + * @param p The name of the property whose description should be retrieved. + */ + getOwnPropertyDescriptor?(target: T, p: string | symbol): PropertyDescriptor | undefined; - /** - * A trap for the `[[GetPrototypeOf]]` internal method. - * @param target The original object which is being proxied. - */ - getPrototypeOf?(target: T): object | null; + /** + * A trap for the `[[GetPrototypeOf]]` internal method. + * @param target The original object which is being proxied. + */ + getPrototypeOf?(target: T): object | null; - /** - * A trap for the `in` operator. - * @param target The original object which is being proxied. - * @param p The name or `Symbol` of the property to check for existence. - */ - has?(target: T, p: string | symbol): boolean; + /** + * A trap for the `in` operator. + * @param target The original object which is being proxied. + * @param p The name or `Symbol` of the property to check for existence. + */ + has?(target: T, p: string | symbol): boolean; - /** - * A trap for `Object.isExtensible()`. - * @param target The original object which is being proxied. - */ - isExtensible?(target: T): boolean; + /** + * A trap for `Object.isExtensible()`. + * @param target The original object which is being proxied. + */ + isExtensible?(target: T): boolean; - /** - * A trap for `Reflect.ownKeys()`. - * @param target The original object which is being proxied. - */ - ownKeys?(target: T): ArrayLike; + /** + * A trap for `Reflect.ownKeys()`. + * @param target The original object which is being proxied. + */ + ownKeys?(target: T): ArrayLike; - /** - * A trap for `Object.preventExtensions()`. - * @param target The original object which is being proxied. - */ - preventExtensions?(target: T): boolean; + /** + * A trap for `Object.preventExtensions()`. + * @param target The original object which is being proxied. + */ + preventExtensions?(target: T): boolean; - /** - * A trap for setting a property value. - * @param target The original object which is being proxied. - * @param p The name or `Symbol` of the property to set. - * @param receiver The object to which the assignment was originally directed. - * @returns A `Boolean` indicating whether or not the property was set. - */ - set?(target: T, p: string | symbol, newValue: any, receiver: any): boolean; + /** + * A trap for setting a property value. + * @param target The original object which is being proxied. + * @param p The name or `Symbol` of the property to set. + * @param receiver The object to which the assignment was originally directed. + * @returns A `Boolean` indicating whether or not the property was set. + */ + set?(target: T, p: string | symbol, newValue: any, receiver: any): boolean; - /** - * A trap for `Object.setPrototypeOf()`. - * @param target The original object which is being proxied. - * @param newPrototype The object's new prototype or `null`. - */ - setPrototypeOf?(target: T, v: object | null): boolean; + /** + * A trap for `Object.setPrototypeOf()`. + * @param target The original object which is being proxied. + * @param newPrototype The object's new prototype or `null`. + */ + setPrototypeOf?(target: T, v: object | null): boolean; } interface ProxyConstructor { - /** - * Creates a revocable Proxy object. - * @param target A target object to wrap with Proxy. - * @param handler An object whose properties define the behavior of Proxy when an operation is attempted on it. - */ - revocable(target: T, handler: ProxyHandler): { proxy: T; revoke: () => void; }; + /** + * Creates a revocable Proxy object. + * @param target A target object to wrap with Proxy. + * @param handler An object whose properties define the behavior of Proxy when an operation is attempted on it. + */ + revocable(target: T, handler: ProxyHandler): { proxy: T; revoke: () => void; }; - /** - * Creates a Proxy object. The Proxy object allows you to create an object that can be used in place of the - * original object, but which may redefine fundamental Object operations like getting, setting, and defining - * properties. Proxy objects are commonly used to log property accesses, validate, format, or sanitize inputs. - * @param target A target object to wrap with Proxy. - * @param handler An object whose properties define the behavior of Proxy when an operation is attempted on it. - */ - new (target: T, handler: ProxyHandler): T; + /** + * Creates a Proxy object. The Proxy object allows you to create an object that can be used in place of the + * original object, but which may redefine fundamental Object operations like getting, setting, and defining + * properties. Proxy objects are commonly used to log property accesses, validate, format, or sanitize inputs. + * @param target A target object to wrap with Proxy. + * @param handler An object whose properties define the behavior of Proxy when an operation is attempted on it. + */ + new (target: T, handler: ProxyHandler): T; } declare var Proxy: ProxyConstructor; @@ -1504,163 +1504,163 @@ declare var Proxy: ProxyConstructor; // lib.es2015.reflect.d.ts ///////////////////////////// declare namespace Reflect { - /** - * Calls the function with the specified object as the this value - * and the elements of specified array as the arguments. - * @param target The function to call. - * @param thisArgument The object to be used as the this object. - * @param argumentsList An array of argument values to be passed to the function. - */ - function apply( - target: (this: T, ...args: A) => R, - thisArgument: T, - argumentsList: Readonly, - ): R; - - function apply(target: Function, thisArgument: any, argumentsList: ArrayLike): any; - - /** - * Constructs the target with the elements of specified array as the arguments - * and the specified constructor as the `new.target` value. - * @param target The constructor to invoke. - * @param argumentsList An array of argument values to be passed to the constructor. - * @param newTarget The constructor to be used as the `new.target` object. - */ - function construct( - target: new (...args: A) => R, - argumentsList: Readonly, - newTarget?: new (...args: any) => any, - ): R; - - function construct(target: Function, argumentsList: ArrayLike, newTarget?: Function): any; +/** + * Calls the function with the specified object as the this value + * and the elements of specified array as the arguments. + * @param target The function to call. + * @param thisArgument The object to be used as the this object. + * @param argumentsList An array of argument values to be passed to the function. + */ + function apply( + target: (this: T, ...args: A) => R, + thisArgument: T, + argumentsList: Readonly, + ): R; + +function apply(target: Function, thisArgument: any, argumentsList: ArrayLike): any; - /** - * Adds a property to an object, or modifies attributes of an existing property. - * @param target Object on which to add or modify the property. This can be a native JavaScript object - * (that is, a user-defined object or a built in object) or a DOM object. - * @param propertyKey The property name. - * @param attributes Descriptor for the property. It can be for a data property or an accessor property. - */ - function defineProperty(target: object, propertyKey: PropertyKey, attributes: PropertyDescriptor & ThisType): boolean; +/** + * Constructs the target with the elements of specified array as the arguments + * and the specified constructor as the `new.target` value. + * @param target The constructor to invoke. + * @param argumentsList An array of argument values to be passed to the constructor. + * @param newTarget The constructor to be used as the `new.target` object. + */ + function construct( + target: new (...args: A) => R, + argumentsList: Readonly, + newTarget?: new (...args: any) => any, + ): R; + +function construct(target: Function, argumentsList: ArrayLike, newTarget?: Function): any; - /** - * Removes a property from an object, equivalent to `delete target[propertyKey]`, - * except it won't throw if `target[propertyKey]` is non-configurable. - * @param target Object from which to remove the own property. - * @param propertyKey The property name. - */ - function deleteProperty(target: object, propertyKey: PropertyKey): boolean; +/** + * Adds a property to an object, or modifies attributes of an existing property. + * @param target Object on which to add or modify the property. This can be a native JavaScript object + * (that is, a user-defined object or a built in object) or a DOM object. + * @param propertyKey The property name. + * @param attributes Descriptor for the property. It can be for a data property or an accessor property. + */ + function defineProperty(target: object, propertyKey: PropertyKey, attributes: PropertyDescriptor & ThisType): boolean; - /** - * Gets the property of target, equivalent to `target[propertyKey]` when `receiver === target`. - * @param target Object that contains the property on itself or in its prototype chain. - * @param propertyKey The property name. - * @param receiver The reference to use as the `this` value in the getter function, - * if `target[propertyKey]` is an accessor property. - */ - function get( - target: T, - propertyKey: P, - receiver?: unknown, - ): P extends keyof T ? T[P] : any; +/** + * Removes a property from an object, equivalent to `delete target[propertyKey]`, + * except it won't throw if `target[propertyKey]` is non-configurable. + * @param target Object from which to remove the own property. + * @param propertyKey The property name. + */ + function deleteProperty(target: object, propertyKey: PropertyKey): boolean; - /** - * Gets the own property descriptor of the specified object. - * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype. - * @param target Object that contains the property. - * @param propertyKey The property name. - */ - function getOwnPropertyDescriptor( - target: T, - propertyKey: P, - ): TypedPropertyDescriptor

| undefined; +/** + * Gets the property of target, equivalent to `target[propertyKey]` when `receiver === target`. + * @param target Object that contains the property on itself or in its prototype chain. + * @param propertyKey The property name. + * @param receiver The reference to use as the `this` value in the getter function, + * if `target[propertyKey]` is an accessor property. + */ + function get( + target: T, + propertyKey: P, + receiver?: unknown, + ): P extends keyof T ? T[P] : any; - /** - * Returns the prototype of an object. - * @param target The object that references the prototype. - */ - function getPrototypeOf(target: object): object | null; +/** + * Gets the own property descriptor of the specified object. + * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype. + * @param target Object that contains the property. + * @param propertyKey The property name. + */ + function getOwnPropertyDescriptor( + target: T, + propertyKey: P, + ): TypedPropertyDescriptor

| undefined; - /** - * Equivalent to `propertyKey in target`. - * @param target Object that contains the property on itself or in its prototype chain. - * @param propertyKey Name of the property. - */ - function has(target: object, propertyKey: PropertyKey): boolean; +/** + * Returns the prototype of an object. + * @param target The object that references the prototype. + */ + function getPrototypeOf(target: object): object | null; - /** - * Returns a value that indicates whether new properties can be added to an object. - * @param target Object to test. - */ - function isExtensible(target: object): boolean; +/** + * Equivalent to `propertyKey in target`. + * @param target Object that contains the property on itself or in its prototype chain. + * @param propertyKey Name of the property. + */ + function has(target: object, propertyKey: PropertyKey): boolean; - /** - * Returns the string and symbol keys of the own properties of an object. The own properties of an object - * are those that are defined directly on that object, and are not inherited from the object's prototype. - * @param target Object that contains the own properties. - */ - function ownKeys(target: object): (string | symbol)[]; +/** + * Returns a value that indicates whether new properties can be added to an object. + * @param target Object to test. + */ + function isExtensible(target: object): boolean; - /** - * Prevents the addition of new properties to an object. - * @param target Object to make non-extensible. - * @return Whether the object has been made non-extensible. - */ - function preventExtensions(target: object): boolean; +/** + * Returns the string and symbol keys of the own properties of an object. The own properties of an object + * are those that are defined directly on that object, and are not inherited from the object's prototype. + * @param target Object that contains the own properties. + */ + function ownKeys(target: object): (string | symbol)[]; - /** - * Sets the property of target, equivalent to `target[propertyKey] = value` when `receiver === target`. - * @param target Object that contains the property on itself or in its prototype chain. - * @param propertyKey Name of the property. - * @param receiver The reference to use as the `this` value in the setter function, - * if `target[propertyKey]` is an accessor property. - */ - function set( - target: T, - propertyKey: P, - value: P extends keyof T ? T[P] : any, - receiver?: any, - ): boolean; +/** + * Prevents the addition of new properties to an object. + * @param target Object to make non-extensible. + * @return Whether the object has been made non-extensible. + */ + function preventExtensions(target: object): boolean; - function set(target: object, propertyKey: PropertyKey, value: any, receiver?: any): boolean; +/** + * Sets the property of target, equivalent to `target[propertyKey] = value` when `receiver === target`. + * @param target Object that contains the property on itself or in its prototype chain. + * @param propertyKey Name of the property. + * @param receiver The reference to use as the `this` value in the setter function, + * if `target[propertyKey]` is an accessor property. + */ + function set( + target: T, + propertyKey: P, + value: P extends keyof T ? T[P] : any, + receiver?: any, + ): boolean; + +function set(target: object, propertyKey: PropertyKey, value: any, receiver?: any): boolean; - /** - * Sets the prototype of a specified object o to object proto or null. - * @param target The object to change its prototype. - * @param proto The value of the new prototype or null. - * @return Whether setting the prototype was successful. - */ - function setPrototypeOf(target: object, proto: object | null): boolean; +/** + * Sets the prototype of a specified object o to object proto or null. + * @param target The object to change its prototype. + * @param proto The value of the new prototype or null. + * @return Whether setting the prototype was successful. + */ + function setPrototypeOf(target: object, proto: object | null): boolean; } ///////////////////////////// // lib.es2015.symbol.d.ts ///////////////////////////// interface SymbolConstructor { - /** - * A reference to the prototype. - */ - readonly prototype: Symbol; + /** + * A reference to the prototype. + */ + readonly prototype: Symbol; - /** - * Returns a new unique Symbol value. - * @param description Description of the new Symbol object. - */ - (description?: string | number): symbol; + /** + * Returns a new unique Symbol value. + * @param description Description of the new Symbol object. + */ + (description?: string | number): symbol; - /** - * Returns a Symbol object from the global symbol registry matching the given key if found. - * Otherwise, returns a new symbol with this key. - * @param key key to search for. - */ - for(key: string): symbol; + /** + * Returns a Symbol object from the global symbol registry matching the given key if found. + * Otherwise, returns a new symbol with this key. + * @param key key to search for. + */ + for(key: string): symbol; - /** - * Returns a key from the global symbol registry matching the given Symbol if found. - * Otherwise, returns undefined. - * @param sym Symbol to find the key for. - */ - keyFor(sym: symbol): string | undefined; + /** + * Returns a key from the global symbol registry matching the given Symbol if found. + * Otherwise, returns undefined. + * @param sym Symbol to find the key for. + */ + keyFor(sym: symbol): string | undefined; } declare var Symbol: SymbolConstructor; @@ -1669,719 +1669,719 @@ declare var Symbol: SymbolConstructor; // lib.es2015.symbol.wellknown.d.ts ///////////////////////////// interface SymbolConstructor { - /** - * A method that determines if a constructor object recognizes an object as one of the - * constructor’s instances. Called by the semantics of the instanceof operator. - */ - readonly hasInstance: unique symbol; + /** + * A method that determines if a constructor object recognizes an object as one of the + * constructor’s instances. Called by the semantics of the instanceof operator. + */ + readonly hasInstance: unique symbol; - /** - * A Boolean value that if true indicates that an object should flatten to its array elements - * by Array.prototype.concat. - */ - readonly isConcatSpreadable: unique symbol; + /** + * A Boolean value that if true indicates that an object should flatten to its array elements + * by Array.prototype.concat. + */ + readonly isConcatSpreadable: unique symbol; - /** - * A regular expression method that matches the regular expression against a string. Called - * by the String.prototype.match method. - */ - readonly match: unique symbol; + /** + * A regular expression method that matches the regular expression against a string. Called + * by the String.prototype.match method. + */ + readonly match: unique symbol; - /** - * A regular expression method that replaces matched substrings of a string. Called by the - * String.prototype.replace method. - */ - readonly replace: unique symbol; + /** + * A regular expression method that replaces matched substrings of a string. Called by the + * String.prototype.replace method. + */ + readonly replace: unique symbol; - /** - * A regular expression method that returns the index within a string that matches the - * regular expression. Called by the String.prototype.search method. - */ - readonly search: unique symbol; + /** + * A regular expression method that returns the index within a string that matches the + * regular expression. Called by the String.prototype.search method. + */ + readonly search: unique symbol; - /** - * A function valued property that is the constructor function that is used to create - * derived objects. - */ - readonly species: unique symbol; + /** + * A function valued property that is the constructor function that is used to create + * derived objects. + */ + readonly species: unique symbol; - /** - * A regular expression method that splits a string at the indices that match the regular - * expression. Called by the String.prototype.split method. - */ - readonly split: unique symbol; + /** + * A regular expression method that splits a string at the indices that match the regular + * expression. Called by the String.prototype.split method. + */ + readonly split: unique symbol; - /** - * A method that converts an object to a corresponding primitive value. - * Called by the ToPrimitive abstract operation. - */ - readonly toPrimitive: unique symbol; + /** + * A method that converts an object to a corresponding primitive value. + * Called by the ToPrimitive abstract operation. + */ + readonly toPrimitive: unique symbol; - /** - * A String value that is used in the creation of the default string description of an object. - * Called by the built-in method Object.prototype.toString. - */ - readonly toStringTag: unique symbol; + /** + * A String value that is used in the creation of the default string description of an object. + * Called by the built-in method Object.prototype.toString. + */ + readonly toStringTag: unique symbol; - /** - * An Object whose truthy properties are properties that are excluded from the 'with' - * environment bindings of the associated objects. - */ - readonly unscopables: unique symbol; + /** + * An Object whose truthy properties are properties that are excluded from the 'with' + * environment bindings of the associated objects. + */ + readonly unscopables: unique symbol; } interface Symbol { - /** - * Converts a Symbol object to a symbol. - */ - [Symbol.toPrimitive](hint: string): symbol; + /** + * Converts a Symbol object to a symbol. + */ + [Symbol.toPrimitive](hint: string): symbol; } interface Array { - /** - * Is an object whose properties have the value 'true' - * when they will be absent when used in a 'with' statement. - */ - readonly [Symbol.unscopables]: { - [K in keyof any[]]?: boolean; - }; + /** + * Is an object whose properties have the value 'true' + * when they will be absent when used in a 'with' statement. + */ + readonly [Symbol.unscopables]: { + [K in keyof any[]]?: boolean; + }; } interface ReadonlyArray { - /** - * Is an object whose properties have the value 'true' - * when they will be absent when used in a 'with' statement. - */ - readonly [Symbol.unscopables]: { - [K in keyof readonly any[]]?: boolean; - }; + /** + * Is an object whose properties have the value 'true' + * when they will be absent when used in a 'with' statement. + */ + readonly [Symbol.unscopables]: { + [K in keyof readonly any[]]?: boolean; + }; } interface Date { - /** - * Converts a Date object to a string. - */ - [Symbol.toPrimitive](hint: "default"): string; + /** + * Converts a Date object to a string. + */ + [Symbol.toPrimitive](hint: "default"): string; - /** - * Converts a Date object to a string. - */ - [Symbol.toPrimitive](hint: "string"): string; + /** + * Converts a Date object to a string. + */ + [Symbol.toPrimitive](hint: "string"): string; - /** - * Converts a Date object to a number. - */ - [Symbol.toPrimitive](hint: "number"): number; + /** + * Converts a Date object to a number. + */ + [Symbol.toPrimitive](hint: "number"): number; - /** - * Converts a Date object to a string or number. - * - * @param hint The strings "number", "string", or "default" to specify what primitive to return. - * - * @throws {TypeError} If 'hint' was given something other than "number", "string", or "default". - * @returns A number if 'hint' was "number", a string if 'hint' was "string" or "default". - */ - [Symbol.toPrimitive](hint: string): string | number; + /** + * Converts a Date object to a string or number. + * + * @param hint The strings "number", "string", or "default" to specify what primitive to return. + * + * @throws {TypeError} If 'hint' was given something other than "number", "string", or "default". + * @returns A number if 'hint' was "number", a string if 'hint' was "string" or "default". + */ + [Symbol.toPrimitive](hint: string): string | number; } interface Map { - readonly [Symbol.toStringTag]: string; + readonly [Symbol.toStringTag]: string; } interface WeakMap { - readonly [Symbol.toStringTag]: string; + readonly [Symbol.toStringTag]: string; } interface Set { - readonly [Symbol.toStringTag]: string; + readonly [Symbol.toStringTag]: string; } interface WeakSet { - readonly [Symbol.toStringTag]: string; + readonly [Symbol.toStringTag]: string; } interface Function { - /** - * Determines whether the given value inherits from this function if this function was used - * as a constructor function. - * - * A constructor function can control which objects are recognized as its instances by - * 'instanceof' by overriding this method. - */ - [Symbol.hasInstance](value: any): boolean; + /** + * Determines whether the given value inherits from this function if this function was used + * as a constructor function. + * + * A constructor function can control which objects are recognized as its instances by + * 'instanceof' by overriding this method. + */ + [Symbol.hasInstance](value: any): boolean; } interface GeneratorFunction { - readonly [Symbol.toStringTag]: string; + readonly [Symbol.toStringTag]: string; } interface PromiseConstructor { - readonly [Symbol.species]: PromiseConstructor; + readonly [Symbol.species]: PromiseConstructor; } interface RegExp { - /** - * Matches a string with this regular expression, and returns an array containing the results of - * that search. - * @param string A string to search within. - */ - [Symbol.match](string: string): RegExpMatchArray | null; + /** + * Matches a string with this regular expression, and returns an array containing the results of + * that search. + * @param string A string to search within. + */ + [Symbol.match](string: string): RegExpMatchArray | null; - /** - * Replaces text in a string, using this regular expression. - * @param string A String object or string literal whose contents matching against - * this regular expression will be replaced - * @param replaceValue A String object or string literal containing the text to replace for every - * successful match of this regular expression. - */ - [Symbol.replace](string: string, replaceValue: string): string; + /** + * Replaces text in a string, using this regular expression. + * @param string A String object or string literal whose contents matching against + * this regular expression will be replaced + * @param replaceValue A String object or string literal containing the text to replace for every + * successful match of this regular expression. + */ + [Symbol.replace](string: string, replaceValue: string): string; - /** - * Replaces text in a string, using this regular expression. - * @param string A String object or string literal whose contents matching against - * this regular expression will be replaced - * @param replacer A function that returns the replacement text. - */ - [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; + /** + * Replaces text in a string, using this regular expression. + * @param string A String object or string literal whose contents matching against + * this regular expression will be replaced + * @param replacer A function that returns the replacement text. + */ + [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; - /** - * Finds the position beginning first substring match in a regular expression search - * using this regular expression. - * - * @param string The string to search within. - */ - [Symbol.search](string: string): number; + /** + * Finds the position beginning first substring match in a regular expression search + * using this regular expression. + * + * @param string The string to search within. + */ + [Symbol.search](string: string): number; - /** - * Returns an array of substrings that were delimited by strings in the original input that - * match against this regular expression. - * - * If the regular expression contains capturing parentheses, then each time this - * regular expression matches, the results (including any undefined results) of the - * capturing parentheses are spliced. - * - * @param string string value to split - * @param limit if not undefined, the output array is truncated so that it contains no more - * than 'limit' elements. - */ - [Symbol.split](string: string, limit?: number): string[]; + /** + * Returns an array of substrings that were delimited by strings in the original input that + * match against this regular expression. + * + * If the regular expression contains capturing parentheses, then each time this + * regular expression matches, the results (including any undefined results) of the + * capturing parentheses are spliced. + * + * @param string string value to split + * @param limit if not undefined, the output array is truncated so that it contains no more + * than 'limit' elements. + */ + [Symbol.split](string: string, limit?: number): string[]; } interface RegExpConstructor { - readonly [Symbol.species]: RegExpConstructor; + readonly [Symbol.species]: RegExpConstructor; } interface String { - /** - * Matches a string or an object that supports being matched against, and returns an array - * containing the results of that search, or null if no matches are found. - * @param matcher An object that supports being matched against. - */ - match(matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null; + /** + * Matches a string or an object that supports being matched against, and returns an array + * containing the results of that search, or null if no matches are found. + * @param matcher An object that supports being matched against. + */ + match(matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null; - /** - * Passes a string and {@linkcode replaceValue} to the `[Symbol.replace]` method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. - * @param searchValue An object that supports searching for and replacing matches within a string. - * @param replaceValue The replacement text. - */ - replace(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string; + /** + * Passes a string and {@linkcode replaceValue} to the `[Symbol.replace]` method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. + * @param searchValue An object that supports searching for and replacing matches within a string. + * @param replaceValue The replacement text. + */ + replace(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string; - /** - * Replaces text in a string, using an object that supports replacement within a string. - * @param searchValue A object can search for and replace matches within a string. - * @param replacer A function that returns the replacement text. - */ - replace(searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string; + /** + * Replaces text in a string, using an object that supports replacement within a string. + * @param searchValue A object can search for and replace matches within a string. + * @param replacer A function that returns the replacement text. + */ + replace(searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string; - /** - * Finds the first substring match in a regular expression search. - * @param searcher An object which supports searching within a string. - */ - search(searcher: { [Symbol.search](string: string): number; }): number; + /** + * Finds the first substring match in a regular expression search. + * @param searcher An object which supports searching within a string. + */ + search(searcher: { [Symbol.search](string: string): number; }): number; - /** - * Split a string into substrings using the specified separator and return them as an array. - * @param splitter An object that can split a string. - * @param limit A value used to limit the number of elements returned in the array. - */ - split(splitter: { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number): string[]; + /** + * Split a string into substrings using the specified separator and return them as an array. + * @param splitter An object that can split a string. + * @param limit A value used to limit the number of elements returned in the array. + */ + split(splitter: { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number): string[]; } interface ArrayConstructor { - readonly [Symbol.species]: ArrayConstructor; + readonly [Symbol.species]: ArrayConstructor; } interface MapConstructor { - readonly [Symbol.species]: MapConstructor; + readonly [Symbol.species]: MapConstructor; } interface SetConstructor { - readonly [Symbol.species]: SetConstructor; + readonly [Symbol.species]: SetConstructor; } interface ArrayBufferConstructor { - readonly [Symbol.species]: ArrayBufferConstructor; + readonly [Symbol.species]: ArrayBufferConstructor; } ///////////////////////////// // lib.es2016.array.include.d.ts ///////////////////////////// interface Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: T, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: T, fromIndex?: number): boolean; } interface ReadonlyArray { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: T, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: T, fromIndex?: number): boolean; } interface Int8Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Uint8Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Uint8ClampedArray { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Int16Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Uint16Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Int32Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Uint32Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Float32Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Float64Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } ///////////////////////////// // lib.es2016.intl.d.ts ///////////////////////////// declare namespace Intl { - /** - * The `Intl.getCanonicalLocales()` method returns an array containing - * the canonical locale names. Duplicates will be omitted and elements - * will be validated as structurally valid language tags. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/getCanonicalLocales) - * - * @param locale A list of String values for which to get the canonical locale names - * @returns An array containing the canonical and validated locale names. - */ - function getCanonicalLocales(locale?: string | readonly string[]): string[]; +/** + * The `Intl.getCanonicalLocales()` method returns an array containing + * the canonical locale names. Duplicates will be omitted and elements + * will be validated as structurally valid language tags. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/getCanonicalLocales) + * + * @param locale A list of String values for which to get the canonical locale names + * @returns An array containing the canonical and validated locale names. + */ + function getCanonicalLocales(locale?: string | readonly string[]): string[]; } ///////////////////////////// // lib.es2017.date.d.ts ///////////////////////////// interface DateConstructor { - /** - * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. - * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. - * @param monthIndex The month as a number between 0 and 11 (January to December). - * @param date The date as a number between 1 and 31. - * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. - * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. - * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. - * @param ms A number from 0 to 999 that specifies the milliseconds. - */ - UTC(year: number, monthIndex?: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; + /** + * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. + * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. + * @param monthIndex The month as a number between 0 and 11 (January to December). + * @param date The date as a number between 1 and 31. + * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. + * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. + * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. + * @param ms A number from 0 to 999 that specifies the milliseconds. + */ + UTC(year: number, monthIndex?: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; } ///////////////////////////// // lib.es2017.intl.d.ts ///////////////////////////// declare namespace Intl { - interface DateTimeFormatPartTypesRegistry { - day: any; +interface DateTimeFormatPartTypesRegistry { + day: any; - dayPeriod: any; + dayPeriod: any; - era: any; + era: any; - hour: any; + hour: any; - literal: any; + literal: any; - minute: any; + minute: any; - month: any; + month: any; - second: any; + second: any; - timeZoneName: any; + timeZoneName: any; - weekday: any; + weekday: any; - year: any; - } + year: any; +} - type DateTimeFormatPartTypes = keyof DateTimeFormatPartTypesRegistry; +type DateTimeFormatPartTypes = keyof DateTimeFormatPartTypesRegistry; - interface DateTimeFormatPart { - type: DateTimeFormatPartTypes; +interface DateTimeFormatPart { + type: DateTimeFormatPartTypes; - value: string; - } + value: string; +} - interface DateTimeFormat { - formatToParts(date?: Date | number): DateTimeFormatPart[]; - } +interface DateTimeFormat { + formatToParts(date?: Date | number): DateTimeFormatPart[]; +} } ///////////////////////////// // lib.es2017.object.d.ts ///////////////////////////// interface ObjectConstructor { - /** - * Returns an array of values of the enumerable own properties of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - values(o: { [s: string]: T; } | ArrayLike): T[]; + /** + * Returns an array of values of the enumerable own properties of an object + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + values(o: { [s: string]: T; } | ArrayLike): T[]; - /** - * Returns an array of values of the enumerable own properties of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - values(o: {}): any[]; + /** + * Returns an array of values of the enumerable own properties of an object + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + values(o: {}): any[]; - /** - * Returns an array of key/values of the enumerable own properties of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - entries(o: { [s: string]: T; } | ArrayLike): [string, T][]; + /** + * Returns an array of key/values of the enumerable own properties of an object + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + entries(o: { [s: string]: T; } | ArrayLike): [string, T][]; - /** - * Returns an array of key/values of the enumerable own properties of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - entries(o: {}): [string, any][]; + /** + * Returns an array of key/values of the enumerable own properties of an object + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + entries(o: {}): [string, any][]; - /** - * Returns an object containing all own property descriptors of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - getOwnPropertyDescriptors(o: T): { [P in keyof T]: TypedPropertyDescriptor; } & { [x: string]: PropertyDescriptor; }; + /** + * Returns an object containing all own property descriptors of an object + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + getOwnPropertyDescriptors(o: T): { [P in keyof T]: TypedPropertyDescriptor; } & { [x: string]: PropertyDescriptor; }; } ///////////////////////////// // lib.es2017.string.d.ts ///////////////////////////// interface String { - /** - * Pads the current string with a given string (repeated and/or truncated, if needed) so that the resulting string has a given length. - * The padding is applied from the start of the current string. - * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart) - * - * @param targetLength The length of the resulting string once the current `str` has been padded. - * If the value is less than or equal to `str.length`, then `str` is returned as-is. - * - * @param padString The string to pad the current `str` with. - * If `padString` is too long to stay within `targetLength`, it will be truncated from the end. - * The default value is the space character (U+0020). - */ - padStart(targetLength: number, padString?: string): string; + /** + * Pads the current string with a given string (repeated and/or truncated, if needed) so that the resulting string has a given length. + * The padding is applied from the start of the current string. + * + * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart) + * + * @param targetLength The length of the resulting string once the current `str` has been padded. + * If the value is less than or equal to `str.length`, then `str` is returned as-is. + * + * @param padString The string to pad the current `str` with. + * If `padString` is too long to stay within `targetLength`, it will be truncated from the end. + * The default value is the space character (U+0020). + */ + padStart(targetLength: number, padString?: string): string; - /** - * Pads the current string with a given string (repeated and/or truncated, if needed) so that the resulting string has a given length. - * The padding is applied from the end of the current string. - * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padEnd) - * - * @param targetLength The length of the resulting string once the current `str` has been padded. - * If the value is less than or equal to `str.length`, then `str` is returned as-is. - * - * @param padString The string to pad the current `str` with. - * If `padString` is too long to stay within `targetLength`, it will be truncated from the end. - * The default value is the space character (U+0020). - */ - padEnd(targetLength: number, padString?: string): string; + /** + * Pads the current string with a given string (repeated and/or truncated, if needed) so that the resulting string has a given length. + * The padding is applied from the end of the current string. + * + * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padEnd) + * + * @param targetLength The length of the resulting string once the current `str` has been padded. + * If the value is less than or equal to `str.length`, then `str` is returned as-is. + * + * @param padString The string to pad the current `str` with. + * If `padString` is too long to stay within `targetLength`, it will be truncated from the end. + * The default value is the space character (U+0020). + */ + padEnd(targetLength: number, padString?: string): string; } ///////////////////////////// // lib.es2017.typedarrays.d.ts ///////////////////////////// interface Int8ArrayConstructor { - new (): Int8Array; + new (): Int8Array; } interface Uint8ArrayConstructor { - new (): Uint8Array; + new (): Uint8Array; } interface Uint8ClampedArrayConstructor { - new (): Uint8ClampedArray; + new (): Uint8ClampedArray; } interface Int16ArrayConstructor { - new (): Int16Array; + new (): Int16Array; } interface Uint16ArrayConstructor { - new (): Uint16Array; + new (): Uint16Array; } interface Int32ArrayConstructor { - new (): Int32Array; + new (): Int32Array; } interface Uint32ArrayConstructor { - new (): Uint32Array; + new (): Uint32Array; } interface Float32ArrayConstructor { - new (): Float32Array; + new (): Float32Array; } interface Float64ArrayConstructor { - new (): Float64Array; + new (): Float64Array; } ///////////////////////////// // lib.es2018.asyncgenerator.d.ts ///////////////////////////// interface AsyncGenerator extends AsyncIteratorObject { - // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. - next(...[value]: [] | [TNext]): Promise>; + // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. + next(...[value]: [] | [TNext]): Promise>; - return(value: TReturn | PromiseLike): Promise>; + return(value: TReturn | PromiseLike): Promise>; - throw(e: any): Promise>; + throw(e: any): Promise>; - [Symbol.asyncIterator](): AsyncGenerator; + [Symbol.asyncIterator](): AsyncGenerator; } interface AsyncGeneratorFunction { - /** - * Creates a new AsyncGenerator object. - * @param args A list of arguments the function accepts. - */ - new (...args: any[]): AsyncGenerator; + /** + * Creates a new AsyncGenerator object. + * @param args A list of arguments the function accepts. + */ + new (...args: any[]): AsyncGenerator; - /** - * Creates a new AsyncGenerator object. - * @param args A list of arguments the function accepts. - */ - (...args: any[]): AsyncGenerator; + /** + * Creates a new AsyncGenerator object. + * @param args A list of arguments the function accepts. + */ + (...args: any[]): AsyncGenerator; - /** - * The length of the arguments. - */ - readonly length: number; + /** + * The length of the arguments. + */ + readonly length: number; - /** - * Returns the name of the function. - */ - readonly name: string; + /** + * Returns the name of the function. + */ + readonly name: string; - /** - * A reference to the prototype. - */ - readonly prototype: AsyncGenerator; + /** + * A reference to the prototype. + */ + readonly prototype: AsyncGenerator; } ///////////////////////////// // lib.es2018.asynciterable.d.ts ///////////////////////////// interface SymbolConstructor { - /** - * A method that returns the default async iterator for an object. Called by the semantics of - * the for-await-of statement. - */ - readonly asyncIterator: unique symbol; + /** + * A method that returns the default async iterator for an object. Called by the semantics of + * the for-await-of statement. + */ + readonly asyncIterator: unique symbol; } interface AsyncIterator { - // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. - next(...[value]: [] | [TNext]): Promise>; + // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. + next(...[value]: [] | [TNext]): Promise>; - return?(value?: TReturn | PromiseLike): Promise>; + return?(value?: TReturn | PromiseLike): Promise>; - throw?(e?: any): Promise>; + throw?(e?: any): Promise>; } interface AsyncIterable { - [Symbol.asyncIterator](): AsyncIterator; + [Symbol.asyncIterator](): AsyncIterator; } /** * Describes a user-defined {@link AsyncIterator} that is also async iterable. */ interface AsyncIterableIterator extends AsyncIterator { - [Symbol.asyncIterator](): AsyncIterableIterator; + [Symbol.asyncIterator](): AsyncIterableIterator; } /** * Describes an {@link AsyncIterator} produced by the runtime that inherits from the intrinsic `AsyncIterator.prototype`. */ interface AsyncIteratorObject extends AsyncIterator { - [Symbol.asyncIterator](): AsyncIteratorObject; + [Symbol.asyncIterator](): AsyncIteratorObject; } ///////////////////////////// // lib.es2018.intl.d.ts ///////////////////////////// declare namespace Intl { - // http://cldr.unicode.org/index/cldr-spec/plural-rules#TOC-Determining-Plural-Categories - type LDMLPluralRule = "zero" | "one" | "two" | "few" | "many" | "other"; +// http://cldr.unicode.org/index/cldr-spec/plural-rules#TOC-Determining-Plural-Categories + type LDMLPluralRule = "zero" | "one" | "two" | "few" | "many" | "other"; - type PluralRuleType = "cardinal" | "ordinal"; +type PluralRuleType = "cardinal" | "ordinal"; - interface PluralRulesOptions { - localeMatcher?: "lookup" | "best fit" | undefined; +interface PluralRulesOptions { + localeMatcher?: "lookup" | "best fit" | undefined; - type?: PluralRuleType | undefined; + type?: PluralRuleType | undefined; - minimumIntegerDigits?: number | undefined; + minimumIntegerDigits?: number | undefined; - minimumFractionDigits?: number | undefined; + minimumFractionDigits?: number | undefined; - maximumFractionDigits?: number | undefined; + maximumFractionDigits?: number | undefined; - minimumSignificantDigits?: number | undefined; + minimumSignificantDigits?: number | undefined; - maximumSignificantDigits?: number | undefined; - } + maximumSignificantDigits?: number | undefined; +} - interface ResolvedPluralRulesOptions { - locale: string; +interface ResolvedPluralRulesOptions { + locale: string; - pluralCategories: LDMLPluralRule[]; + pluralCategories: LDMLPluralRule[]; - type: PluralRuleType; + type: PluralRuleType; - minimumIntegerDigits: number; + minimumIntegerDigits: number; - minimumFractionDigits: number; + minimumFractionDigits: number; - maximumFractionDigits: number; + maximumFractionDigits: number; - minimumSignificantDigits?: number; + minimumSignificantDigits?: number; - maximumSignificantDigits?: number; - } + maximumSignificantDigits?: number; +} - interface PluralRules { - resolvedOptions(): ResolvedPluralRulesOptions; +interface PluralRules { + resolvedOptions(): ResolvedPluralRulesOptions; - select(n: number): LDMLPluralRule; - } + select(n: number): LDMLPluralRule; +} - interface PluralRulesConstructor { - new (locales?: string | readonly string[], options?: PluralRulesOptions): PluralRules; +interface PluralRulesConstructor { + new (locales?: string | readonly string[], options?: PluralRulesOptions): PluralRules; - (locales?: string | readonly string[], options?: PluralRulesOptions): PluralRules; + (locales?: string | readonly string[], options?: PluralRulesOptions): PluralRules; - supportedLocalesOf(locales: string | readonly string[], options?: { localeMatcher?: "lookup" | "best fit"; }): string[]; - } + supportedLocalesOf(locales: string | readonly string[], options?: { localeMatcher?: "lookup" | "best fit"; }): string[]; +} - const PluralRules: PluralRulesConstructor; +const PluralRules: PluralRulesConstructor; - interface NumberFormatPartTypeRegistry { - literal: never; +interface NumberFormatPartTypeRegistry { + literal: never; - nan: never; + nan: never; - infinity: never; + infinity: never; - percent: never; + percent: never; - integer: never; + integer: never; - group: never; + group: never; - decimal: never; + decimal: never; - fraction: never; + fraction: never; - plusSign: never; + plusSign: never; - minusSign: never; + minusSign: never; - percentSign: never; + percentSign: never; - currency: never; - } + currency: never; +} - type NumberFormatPartTypes = keyof NumberFormatPartTypeRegistry; +type NumberFormatPartTypes = keyof NumberFormatPartTypeRegistry; - interface NumberFormatPart { - type: NumberFormatPartTypes; +interface NumberFormatPart { + type: NumberFormatPartTypes; - value: string; - } + value: string; +} } ///////////////////////////// @@ -2391,24 +2391,24 @@ declare namespace Intl { * Represents the completion of an asynchronous operation */ interface Promise { - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): Promise; + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): Promise; } ///////////////////////////// // lib.es2018.regexp.d.ts ///////////////////////////// interface RegExp { - /** - * Returns a Boolean value indicating the state of the dotAll flag (s) used with a regular expression. - * Default is false. Read-only. - */ - readonly dotAll: boolean; + /** + * Returns a Boolean value indicating the state of the dotAll flag (s) used with a regular expression. + * Default is false. Read-only. + */ + readonly dotAll: boolean; } ///////////////////////////// @@ -2421,226 +2421,226 @@ type FlatArray = { }[Depth extends -1 ? "done" : "recur"]; interface ReadonlyArray { - /** - * Calls a defined callback function on each element of an array. Then, flattens the result into - * a new array. - * This is identical to a map followed by flat with depth 1. - * - * @param callback A function that accepts up to three arguments. The flatMap method calls the - * callback function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callback function. If - * thisArg is omitted, undefined is used as the this value. - */ - flatMap( - callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray, - thisArg?: This, - ): U[]; + /** + * Calls a defined callback function on each element of an array. Then, flattens the result into + * a new array. + * This is identical to a map followed by flat with depth 1. + * + * @param callback A function that accepts up to three arguments. The flatMap method calls the + * callback function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callback function. If + * thisArg is omitted, undefined is used as the this value. + */ + flatMap( + callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray, + thisArg?: This, + ): U[]; - /** - * Returns a new array with all sub-array elements concatenated into it recursively up to the - * specified depth. - * - * @param depth The maximum recursion depth - */ - flat( - this: A, - depth?: D, - ): FlatArray[]; + /** + * Returns a new array with all sub-array elements concatenated into it recursively up to the + * specified depth. + * + * @param depth The maximum recursion depth + */ + flat( + this: A, + depth?: D, + ): FlatArray[]; } interface Array { - /** - * Calls a defined callback function on each element of an array. Then, flattens the result into - * a new array. - * This is identical to a map followed by flat with depth 1. - * - * @param callback A function that accepts up to three arguments. The flatMap method calls the - * callback function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callback function. If - * thisArg is omitted, undefined is used as the this value. - */ - flatMap( - callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray, - thisArg?: This, - ): U[]; + /** + * Calls a defined callback function on each element of an array. Then, flattens the result into + * a new array. + * This is identical to a map followed by flat with depth 1. + * + * @param callback A function that accepts up to three arguments. The flatMap method calls the + * callback function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callback function. If + * thisArg is omitted, undefined is used as the this value. + */ + flatMap( + callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray, + thisArg?: This, + ): U[]; - /** - * Returns a new array with all sub-array elements concatenated into it recursively up to the - * specified depth. - * - * @param depth The maximum recursion depth - */ - flat( - this: A, - depth?: D, - ): FlatArray[]; + /** + * Returns a new array with all sub-array elements concatenated into it recursively up to the + * specified depth. + * + * @param depth The maximum recursion depth + */ + flat( + this: A, + depth?: D, + ): FlatArray[]; } ///////////////////////////// // lib.es2019.object.d.ts ///////////////////////////// interface ObjectConstructor { - /** - * Returns an object created by key-value entries for properties and methods - * @param entries An iterable object that contains key-value entries for properties and methods. - */ - fromEntries(entries: Iterable): { [k: string]: T; }; + /** + * Returns an object created by key-value entries for properties and methods + * @param entries An iterable object that contains key-value entries for properties and methods. + */ + fromEntries(entries: Iterable): { [k: string]: T; }; - /** - * Returns an object created by key-value entries for properties and methods - * @param entries An iterable object that contains key-value entries for properties and methods. - */ - fromEntries(entries: Iterable): any; + /** + * Returns an object created by key-value entries for properties and methods + * @param entries An iterable object that contains key-value entries for properties and methods. + */ + fromEntries(entries: Iterable): any; } ///////////////////////////// // lib.es2019.string.d.ts ///////////////////////////// interface String { - /** Removes the trailing white space and line terminator characters from a string. */ - trimEnd(): string; + /** Removes the trailing white space and line terminator characters from a string. */ + trimEnd(): string; - /** Removes the leading white space and line terminator characters from a string. */ - trimStart(): string; + /** Removes the leading white space and line terminator characters from a string. */ + trimStart(): string; } ///////////////////////////// // lib.es2019.symbol.d.ts ///////////////////////////// interface Symbol { - /** - * Expose the [[Description]] internal slot of a symbol directly. - */ - readonly description: string | undefined; + /** + * Expose the [[Description]] internal slot of a symbol directly. + */ + readonly description: string | undefined; } ///////////////////////////// // lib.es2020.bigint.d.ts ///////////////////////////// interface BigIntToLocaleStringOptions { - /** - * The locale matching algorithm to use.The default is "best fit". For information about this option, see the {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation Intl page}. - */ - localeMatcher?: string; + /** + * The locale matching algorithm to use.The default is "best fit". For information about this option, see the {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation Intl page}. + */ + localeMatcher?: string; - /** - * The formatting style to use , the default is "decimal". - */ - style?: string; + /** + * The formatting style to use , the default is "decimal". + */ + style?: string; - numberingSystem?: string; + numberingSystem?: string; - /** - * The unit to use in unit formatting, Possible values are core unit identifiers, defined in UTS #35, Part 2, Section 6. A subset of units from the full list was selected for use in ECMAScript. Pairs of simple units can be concatenated with "-per-" to make a compound unit. There is no default value; if the style is "unit", the unit property must be provided. - */ - unit?: string; + /** + * The unit to use in unit formatting, Possible values are core unit identifiers, defined in UTS #35, Part 2, Section 6. A subset of units from the full list was selected for use in ECMAScript. Pairs of simple units can be concatenated with "-per-" to make a compound unit. There is no default value; if the style is "unit", the unit property must be provided. + */ + unit?: string; - /** - * The unit formatting style to use in unit formatting, the defaults is "short". - */ - unitDisplay?: string; + /** + * The unit formatting style to use in unit formatting, the defaults is "short". + */ + unitDisplay?: string; - /** - * The currency to use in currency formatting. Possible values are the ISO 4217 currency codes, such as "USD" for the US dollar, "EUR" for the euro, or "CNY" for the Chinese RMB — see the Current currency & funds code list. There is no default value; if the style is "currency", the currency property must be provided. It is only used when [[Style]] has the value "currency". - */ - currency?: string; + /** + * The currency to use in currency formatting. Possible values are the ISO 4217 currency codes, such as "USD" for the US dollar, "EUR" for the euro, or "CNY" for the Chinese RMB — see the Current currency & funds code list. There is no default value; if the style is "currency", the currency property must be provided. It is only used when [[Style]] has the value "currency". + */ + currency?: string; - /** - * How to display the currency in currency formatting. It is only used when [[Style]] has the value "currency". The default is "symbol". - * - * "symbol" to use a localized currency symbol such as €, - * - * "code" to use the ISO currency code, - * - * "name" to use a localized currency name such as "dollar" - */ - currencyDisplay?: string; + /** + * How to display the currency in currency formatting. It is only used when [[Style]] has the value "currency". The default is "symbol". + * + * "symbol" to use a localized currency symbol such as €, + * + * "code" to use the ISO currency code, + * + * "name" to use a localized currency name such as "dollar" + */ + currencyDisplay?: string; - /** - * Whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators. The default is true. - */ - useGrouping?: boolean; + /** + * Whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators. The default is true. + */ + useGrouping?: boolean; - /** - * The minimum number of integer digits to use. Possible values are from 1 to 21; the default is 1. - */ - minimumIntegerDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; + /** + * The minimum number of integer digits to use. Possible values are from 1 to 21; the default is 1. + */ + minimumIntegerDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; - /** - * The minimum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number and percent formatting is 0; the default for currency formatting is the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html ISO 4217 currency codes list} (2 if the list doesn't provide that information). - */ - minimumFractionDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20; + /** + * The minimum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number and percent formatting is 0; the default for currency formatting is the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html ISO 4217 currency codes list} (2 if the list doesn't provide that information). + */ + minimumFractionDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20; - /** - * The maximum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number formatting is the larger of minimumFractionDigits and 3; the default for currency formatting is the larger of minimumFractionDigits and the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html ISO 4217 currency codes list} (2 if the list doesn't provide that information); the default for percent formatting is the larger of minimumFractionDigits and 0. - */ - maximumFractionDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20; + /** + * The maximum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number formatting is the larger of minimumFractionDigits and 3; the default for currency formatting is the larger of minimumFractionDigits and the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html ISO 4217 currency codes list} (2 if the list doesn't provide that information); the default for percent formatting is the larger of minimumFractionDigits and 0. + */ + maximumFractionDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20; - /** - * The minimum number of significant digits to use. Possible values are from 1 to 21; the default is 1. - */ - minimumSignificantDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; + /** + * The minimum number of significant digits to use. Possible values are from 1 to 21; the default is 1. + */ + minimumSignificantDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; - /** - * The maximum number of significant digits to use. Possible values are from 1 to 21; the default is 21. - */ - maximumSignificantDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; + /** + * The maximum number of significant digits to use. Possible values are from 1 to 21; the default is 21. + */ + maximumSignificantDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; - /** - * The formatting that should be displayed for the number, the defaults is "standard" - * - * "standard" plain number formatting - * - * "scientific" return the order-of-magnitude for formatted number. - * - * "engineering" return the exponent of ten when divisible by three - * - * "compact" string representing exponent, defaults is using the "short" form - */ - notation?: string; + /** + * The formatting that should be displayed for the number, the defaults is "standard" + * + * "standard" plain number formatting + * + * "scientific" return the order-of-magnitude for formatted number. + * + * "engineering" return the exponent of ten when divisible by three + * + * "compact" string representing exponent, defaults is using the "short" form + */ + notation?: string; - /** - * used only when notation is "compact" - */ - compactDisplay?: string; + /** + * used only when notation is "compact" + */ + compactDisplay?: string; } interface BigInt { - /** - * Returns a string representation of an object. - * @param radix Specifies a radix for converting numeric values to strings. - */ - toString(radix?: number): string; + /** + * Returns a string representation of an object. + * @param radix Specifies a radix for converting numeric values to strings. + */ + toString(radix?: number): string; - /** Returns a string representation appropriate to the host environment's current locale. */ - toLocaleString(locales?: Intl.LocalesArgument, options?: BigIntToLocaleStringOptions): string; + /** Returns a string representation appropriate to the host environment's current locale. */ + toLocaleString(locales?: Intl.LocalesArgument, options?: BigIntToLocaleStringOptions): string; - /** Returns the primitive value of the specified object. */ - valueOf(): bigint; + /** Returns the primitive value of the specified object. */ + valueOf(): bigint; - readonly [Symbol.toStringTag]: "BigInt"; + readonly [Symbol.toStringTag]: "BigInt"; } interface BigIntConstructor { - (value: bigint | boolean | number | string): bigint; + (value: bigint | boolean | number | string): bigint; - readonly prototype: BigInt; + readonly prototype: BigInt; - /** - * Interprets the low bits of a BigInt as a 2's-complement signed integer. - * All higher bits are discarded. - * @param bits The number of low bits to use - * @param int The BigInt whose bits to extract - */ - asIntN(bits: number, int: bigint): bigint; + /** + * Interprets the low bits of a BigInt as a 2's-complement signed integer. + * All higher bits are discarded. + * @param bits The number of low bits to use + * @param int The BigInt whose bits to extract + */ + asIntN(bits: number, int: bigint): bigint; - /** - * Interprets the low bits of a BigInt as an unsigned integer. - * All higher bits are discarded. - * @param bits The number of low bits to use - * @param int The BigInt whose bits to extract - */ - asUintN(bits: number, int: bigint): bigint; + /** + * Interprets the low bits of a BigInt as an unsigned integer. + * All higher bits are discarded. + * @param bits The number of low bits to use + * @param int The BigInt whose bits to extract + */ + asUintN(bits: number, int: bigint): bigint; } declare var BigInt: BigIntConstructor; @@ -2649,474 +2649,474 @@ declare var BigInt: BigIntConstructor; // lib.es2020.date.d.ts ///////////////////////////// interface Date { - /** - * Converts a date and time to a string by using the current or specified locale. - * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; + /** + * Converts a date and time to a string by using the current or specified locale. + * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; - /** - * Converts a date to a string by using the current or specified locale. - * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleDateString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; + /** + * Converts a date to a string by using the current or specified locale. + * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleDateString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; - /** - * Converts a time to a string by using the current or specified locale. - * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleTimeString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; + /** + * Converts a time to a string by using the current or specified locale. + * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleTimeString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; } ///////////////////////////// // lib.es2020.intl.d.ts ///////////////////////////// declare namespace Intl { - /** - * A string that is a valid [Unicode BCP 47 Locale Identifier](https://unicode.org/reports/tr35/#Unicode_locale_identifier). +/** + * A string that is a valid [Unicode BCP 47 Locale Identifier](https://unicode.org/reports/tr35/#Unicode_locale_identifier). + * + * For example: "fa", "es-MX", "zh-Hant-TW". + * + * See [MDN - Intl - locales argument](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). + */ + type UnicodeBCP47LocaleIdentifier = string; + +/** + * Unit to use in the relative time internationalized message. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format#Parameters). + */ + type RelativeTimeFormatUnit = + | "year" + | "years" + | "quarter" + | "quarters" + | "month" + | "months" + | "week" + | "weeks" + | "day" + | "days" + | "hour" + | "hours" + | "minute" + | "minutes" + | "second" + | "seconds"; + +/** + * Value of the `unit` property in objects returned by + * `Intl.RelativeTimeFormat.prototype.formatToParts()`. `formatToParts` and + * `format` methods accept either singular or plural unit names as input, + * but `formatToParts` only outputs singular (e.g. "day") not plural (e.g. + * "days"). + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts). + */ + type RelativeTimeFormatUnitSingular = + | "year" + | "quarter" + | "month" + | "week" + | "day" + | "hour" + | "minute" + | "second"; + +/** + * The locale matching algorithm to use. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). + */ + type RelativeTimeFormatLocaleMatcher = "lookup" | "best fit"; + +/** + * The format of output message. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). + */ + type RelativeTimeFormatNumeric = "always" | "auto"; + +/** + * The length of the internationalized message. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). + */ + type RelativeTimeFormatStyle = "long" | "short" | "narrow"; + +/** + * The locale or locales to use + * + * See [MDN - Intl - locales argument](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). + */ + type LocalesArgument = UnicodeBCP47LocaleIdentifier | Locale | readonly (UnicodeBCP47LocaleIdentifier | Locale)[] | undefined; + +/** + * An object with some or all of properties of `options` parameter + * of `Intl.RelativeTimeFormat` constructor. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). + */ + interface RelativeTimeFormatOptions { + /** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */ + localeMatcher?: RelativeTimeFormatLocaleMatcher; + + /** The format of output message. */ + numeric?: RelativeTimeFormatNumeric; +} + +/** + * An object with properties reflecting the locale + * and formatting options computed during initialization + * of the `Intl.RelativeTimeFormat` object + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions#Description). + */ + interface ResolvedRelativeTimeFormatOptions { + numeric: RelativeTimeFormatNumeric; + + numberingSystem: string; +} + +/** + * An object representing the relative time format in parts + * that can be used for custom locale-aware formatting. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts). + */ + type RelativeTimeFormatPart = + | { + type: "literal"; + value: string; + } + | { + type: Exclude; + value: string; + unit: RelativeTimeFormatUnitSingular; + }; + +interface RelativeTimeFormat { + /** + * Formats a value and a unit according to the locale + * and formatting options of the given + * [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) + * object. * - * For example: "fa", "es-MX", "zh-Hant-TW". + * While this method automatically provides the correct plural forms, + * the grammatical form is otherwise as neutral as possible. * - * See [MDN - Intl - locales argument](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). - */ - type UnicodeBCP47LocaleIdentifier = string; - - /** - * Unit to use in the relative time internationalized message. + * It is the caller's responsibility to handle cut-off logic + * such as deciding between displaying "in 7 days" or "in 1 week". + * This API does not support relative dates involving compound units. + * e.g "in 5 days and 4 hours". * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format#Parameters). - */ - type RelativeTimeFormatUnit = - | "year" - | "years" - | "quarter" - | "quarters" - | "month" - | "months" - | "week" - | "weeks" - | "day" - | "days" - | "hour" - | "hours" - | "minute" - | "minutes" - | "second" - | "seconds"; - - /** - * Value of the `unit` property in objects returned by - * `Intl.RelativeTimeFormat.prototype.formatToParts()`. `formatToParts` and - * `format` methods accept either singular or plural unit names as input, - * but `formatToParts` only outputs singular (e.g. "day") not plural (e.g. - * "days"). + * @param value - Numeric value to use in the internationalized relative time message * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts). - */ - type RelativeTimeFormatUnitSingular = - | "year" - | "quarter" - | "month" - | "week" - | "day" - | "hour" - | "minute" - | "second"; - - /** - * The locale matching algorithm to use. + * @param unit - [Unit](https://tc39.es/ecma402/#sec-singularrelativetimeunit) to use in the relative time internationalized message. * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). - */ - type RelativeTimeFormatLocaleMatcher = "lookup" | "best fit"; - - /** - * The format of output message. + * @throws `RangeError` if `unit` was given something other than `unit` possible values * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). - */ - type RelativeTimeFormatNumeric = "always" | "auto"; - - /** - * The length of the internationalized message. + * @returns {string} Internationalized relative time message as string * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format). */ - type RelativeTimeFormatStyle = "long" | "short" | "narrow"; + format(value: number, unit: RelativeTimeFormatUnit): string; - /** - * The locale or locales to use + /** + * Returns an array of objects representing the relative time format in parts that can be used for custom locale-aware formatting. * - * See [MDN - Intl - locales argument](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). + * @param value - Numeric value to use in the internationalized relative time message + * + * @param unit - [Unit](https://tc39.es/ecma402/#sec-singularrelativetimeunit) to use in the relative time internationalized message. + * + * @throws `RangeError` if `unit` was given something other than `unit` possible values + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts). */ - type LocalesArgument = UnicodeBCP47LocaleIdentifier | Locale | readonly (UnicodeBCP47LocaleIdentifier | Locale)[] | undefined; + formatToParts(value: number, unit: RelativeTimeFormatUnit): RelativeTimeFormatPart[]; - /** - * An object with some or all of properties of `options` parameter - * of `Intl.RelativeTimeFormat` constructor. + /** + * Provides access to the locale and options computed during initialization of this `Intl.RelativeTimeFormat` object. * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions). */ - interface RelativeTimeFormatOptions { - /** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */ - localeMatcher?: RelativeTimeFormatLocaleMatcher; - - /** The format of output message. */ - numeric?: RelativeTimeFormatNumeric; - } + resolvedOptions(): ResolvedRelativeTimeFormatOptions; +} - /** - * An object with properties reflecting the locale - * and formatting options computed during initialization - * of the `Intl.RelativeTimeFormat` object +/** + * The [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) + * object is a constructor for objects that enable language-sensitive relative time formatting. + * + * [Compatibility](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat#Browser_compatibility). + */ + const RelativeTimeFormat: { + /** + * Creates [Intl.RelativeTimeFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) objects + * + * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. + * For the general form and interpretation of the locales argument, + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions#Description). + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters) + * with some or all of options of `RelativeTimeFormatOptions`. + * + * @returns [Intl.RelativeTimeFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat). */ - interface ResolvedRelativeTimeFormatOptions { - numeric: RelativeTimeFormatNumeric; - - numberingSystem: string; - } + new ( + locales?: LocalesArgument, + options?: RelativeTimeFormatOptions, + ): RelativeTimeFormat; - /** - * An object representing the relative time format in parts - * that can be used for custom locale-aware formatting. + /** + * Returns an array containing those of the provided locales + * that are supported in date and time formatting + * without having to fall back to the runtime's default locale. * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts). - */ - type RelativeTimeFormatPart = - | { - type: "literal"; - value: string; - } - | { - type: Exclude; - value: string; - unit: RelativeTimeFormatUnitSingular; - }; - - interface RelativeTimeFormat { - /** - * Formats a value and a unit according to the locale - * and formatting options of the given - * [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) - * object. - * - * While this method automatically provides the correct plural forms, - * the grammatical form is otherwise as neutral as possible. - * - * It is the caller's responsibility to handle cut-off logic - * such as deciding between displaying "in 7 days" or "in 1 week". - * This API does not support relative dates involving compound units. - * e.g "in 5 days and 4 hours". - * - * @param value - Numeric value to use in the internationalized relative time message - * - * @param unit - [Unit](https://tc39.es/ecma402/#sec-singularrelativetimeunit) to use in the relative time internationalized message. - * - * @throws `RangeError` if `unit` was given something other than `unit` possible values - * - * @returns {string} Internationalized relative time message as string - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format). - */ - format(value: number, unit: RelativeTimeFormatUnit): string; - - /** - * Returns an array of objects representing the relative time format in parts that can be used for custom locale-aware formatting. - * - * @param value - Numeric value to use in the internationalized relative time message - * - * @param unit - [Unit](https://tc39.es/ecma402/#sec-singularrelativetimeunit) to use in the relative time internationalized message. - * - * @throws `RangeError` if `unit` was given something other than `unit` possible values - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts). - */ - formatToParts(value: number, unit: RelativeTimeFormatUnit): RelativeTimeFormatPart[]; - - /** - * Provides access to the locale and options computed during initialization of this `Intl.RelativeTimeFormat` object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions). - */ - resolvedOptions(): ResolvedRelativeTimeFormatOptions; - } - - /** - * The [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) - * object is a constructor for objects that enable language-sensitive relative time formatting. + * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. + * For the general form and interpretation of the locales argument, + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters) + * with some or all of options of the formatting. * - * [Compatibility](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat#Browser_compatibility). + * @returns An array containing those of the provided locales + * that are supported in date and time formatting + * without having to fall back to the runtime's default locale. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/supportedLocalesOf). */ - const RelativeTimeFormat: { - /** - * Creates [Intl.RelativeTimeFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) objects - * - * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. - * For the general form and interpretation of the locales argument, - * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). - * - * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters) - * with some or all of options of `RelativeTimeFormatOptions`. - * - * @returns [Intl.RelativeTimeFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat). - */ - new ( - locales?: LocalesArgument, - options?: RelativeTimeFormatOptions, - ): RelativeTimeFormat; - - /** - * Returns an array containing those of the provided locales - * that are supported in date and time formatting - * without having to fall back to the runtime's default locale. - * - * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. - * For the general form and interpretation of the locales argument, - * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). - * - * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters) - * with some or all of options of the formatting. - * - * @returns An array containing those of the provided locales - * that are supported in date and time formatting - * without having to fall back to the runtime's default locale. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/supportedLocalesOf). - */ - supportedLocalesOf( - locales?: LocalesArgument, - options?: RelativeTimeFormatOptions, - ): UnicodeBCP47LocaleIdentifier[]; - }; + supportedLocalesOf( + locales?: LocalesArgument, + options?: RelativeTimeFormatOptions, + ): UnicodeBCP47LocaleIdentifier[]; +}; - interface DateTimeFormatOptions { - hourCycle?: "h11" | "h12" | "h23" | "h24" | undefined; - } +interface DateTimeFormatOptions { + hourCycle?: "h11" | "h12" | "h23" | "h24" | undefined; +} - type LocaleHourCycleKey = "h12" | "h23" | "h11" | "h24"; +type LocaleHourCycleKey = "h12" | "h23" | "h11" | "h24"; - type LocaleCollationCaseFirst = "upper" | "lower" | "false"; +type LocaleCollationCaseFirst = "upper" | "lower" | "false"; - interface LocaleOptions { - /** The part of the Locale that indicates the locale's calendar era. */ - calendar?: string; +interface LocaleOptions { + /** The part of the Locale that indicates the locale's calendar era. */ + calendar?: string; - /** Flag that defines whether case is taken into account for the locale's collation rules. */ - caseFirst?: LocaleCollationCaseFirst; + /** Flag that defines whether case is taken into account for the locale's collation rules. */ + caseFirst?: LocaleCollationCaseFirst; - /** The collation type used for sorting */ - collation?: string; + /** The collation type used for sorting */ + collation?: string; - /** The time keeping format convention used by the locale. */ - hourCycle?: LocaleHourCycleKey; + /** The time keeping format convention used by the locale. */ + hourCycle?: LocaleHourCycleKey; - /** The numeral system used by the locale. */ - numberingSystem?: string; + /** The numeral system used by the locale. */ + numberingSystem?: string; - /** Flag that defines whether the locale has special collation handling for numeric characters. */ - numeric?: boolean; + /** Flag that defines whether the locale has special collation handling for numeric characters. */ + numeric?: boolean; - /** The region of the world (usually a country) associated with the locale. Possible values are region codes as defined by ISO 3166-1. */ - region?: string; + /** The region of the world (usually a country) associated with the locale. Possible values are region codes as defined by ISO 3166-1. */ + region?: string; - /** The script used for writing the particular language used in the locale. Possible values are script codes as defined by ISO 15924. */ - script?: string; - } + /** The script used for writing the particular language used in the locale. Possible values are script codes as defined by ISO 15924. */ + script?: string; +} - interface Locale extends LocaleOptions { - /** A string containing the language, and the script and region if available. */ - baseName: string; +interface Locale extends LocaleOptions { + /** A string containing the language, and the script and region if available. */ + baseName: string; - /** The primary language subtag associated with the locale. */ - language: string; + /** The primary language subtag associated with the locale. */ + language: string; - /** Gets the most likely values for the language, script, and region of the locale based on existing values. */ - maximize(): Locale; + /** Gets the most likely values for the language, script, and region of the locale based on existing values. */ + maximize(): Locale; - /** Attempts to remove information about the locale that would be added by calling `Locale.maximize()`. */ - minimize(): Locale; + /** Attempts to remove information about the locale that would be added by calling `Locale.maximize()`. */ + minimize(): Locale; - /** Returns the locale's full locale identifier string. */ - toString(): UnicodeBCP47LocaleIdentifier; - } + /** Returns the locale's full locale identifier string. */ + toString(): UnicodeBCP47LocaleIdentifier; +} - /** - * Constructor creates [Intl.Locale](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) - * objects - * - * @param tag - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646). - * For the general form and interpretation of the locales argument, - * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). - * - * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/Locale#Parameters) with some or all of options of the locale. - * - * @returns [Intl.Locale](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale). - */ - const Locale: { - new (tag: UnicodeBCP47LocaleIdentifier | Locale, options?: LocaleOptions): Locale; - }; +/** + * Constructor creates [Intl.Locale](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) + * objects + * + * @param tag - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646). + * For the general form and interpretation of the locales argument, + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/Locale#Parameters) with some or all of options of the locale. + * + * @returns [Intl.Locale](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale). + */ + const Locale: { + new (tag: UnicodeBCP47LocaleIdentifier | Locale, options?: LocaleOptions): Locale; +}; - interface CollatorConstructor { - new (locales?: LocalesArgument, options?: CollatorOptions): Collator; +interface CollatorConstructor { + new (locales?: LocalesArgument, options?: CollatorOptions): Collator; - (locales?: LocalesArgument, options?: CollatorOptions): Collator; + (locales?: LocalesArgument, options?: CollatorOptions): Collator; - supportedLocalesOf(locales: LocalesArgument, options?: CollatorOptions): string[]; - } + supportedLocalesOf(locales: LocalesArgument, options?: CollatorOptions): string[]; +} - interface DateTimeFormatConstructor { - new (locales?: LocalesArgument, options?: DateTimeFormatOptions): DateTimeFormat; +interface DateTimeFormatConstructor { + new (locales?: LocalesArgument, options?: DateTimeFormatOptions): DateTimeFormat; - (locales?: LocalesArgument, options?: DateTimeFormatOptions): DateTimeFormat; + (locales?: LocalesArgument, options?: DateTimeFormatOptions): DateTimeFormat; - supportedLocalesOf(locales: LocalesArgument, options?: DateTimeFormatOptions): string[]; - } + supportedLocalesOf(locales: LocalesArgument, options?: DateTimeFormatOptions): string[]; +} - interface NumberFormatConstructor { - new (locales?: LocalesArgument, options?: NumberFormatOptions): NumberFormat; +interface NumberFormatConstructor { + new (locales?: LocalesArgument, options?: NumberFormatOptions): NumberFormat; - (locales?: LocalesArgument, options?: NumberFormatOptions): NumberFormat; + (locales?: LocalesArgument, options?: NumberFormatOptions): NumberFormat; - supportedLocalesOf(locales: LocalesArgument, options?: NumberFormatOptions): string[]; - } + supportedLocalesOf(locales: LocalesArgument, options?: NumberFormatOptions): string[]; +} - interface PluralRulesConstructor { - new (locales?: LocalesArgument, options?: PluralRulesOptions): PluralRules; +interface PluralRulesConstructor { + new (locales?: LocalesArgument, options?: PluralRulesOptions): PluralRules; - (locales?: LocalesArgument, options?: PluralRulesOptions): PluralRules; + (locales?: LocalesArgument, options?: PluralRulesOptions): PluralRules; - supportedLocalesOf(locales: LocalesArgument, options?: { localeMatcher?: "lookup" | "best fit"; }): string[]; - } + supportedLocalesOf(locales: LocalesArgument, options?: { localeMatcher?: "lookup" | "best fit"; }): string[]; +} } ///////////////////////////// // lib.es2020.number.d.ts ///////////////////////////// interface Number { - /** - * Converts a number to a string by using the current or specified locale. - * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.NumberFormatOptions): string; + /** + * Converts a number to a string by using the current or specified locale. + * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.NumberFormatOptions): string; } ///////////////////////////// // lib.es2020.promise.d.ts ///////////////////////////// interface PromiseFulfilledResult { - status: "fulfilled"; + status: "fulfilled"; - value: T; + value: T; } interface PromiseRejectedResult { - status: "rejected"; + status: "rejected"; - reason: any; + reason: any; } type PromiseSettledResult = PromiseFulfilledResult | PromiseRejectedResult; interface PromiseConstructor { - /** - * Creates a Promise that is resolved with an array of results when all - * of the provided Promises resolve or reject. - * @param values An array of Promises. - * @returns A new Promise. - */ - allSettled(values: T): Promise<{ -readonly [P in keyof T]: PromiseSettledResult>; }>; + /** + * Creates a Promise that is resolved with an array of results when all + * of the provided Promises resolve or reject. + * @param values An array of Promises. + * @returns A new Promise. + */ + allSettled(values: T): Promise<{ -readonly [P in keyof T]: PromiseSettledResult>; }>; - /** - * Creates a Promise that is resolved with an array of results when all - * of the provided Promises resolve or reject. - * @param values An array of Promises. - * @returns A new Promise. - */ - allSettled(values: Iterable>): Promise>[]>; + /** + * Creates a Promise that is resolved with an array of results when all + * of the provided Promises resolve or reject. + * @param values An array of Promises. + * @returns A new Promise. + */ + allSettled(values: Iterable>): Promise>[]>; } ///////////////////////////// // lib.es2020.string.d.ts ///////////////////////////// interface String { - /** - * Matches a string with a regular expression, and returns an iterable of matches - * containing the results of that search. - * @param regexp A regular expression - */ - matchAll(regexp: RegExp): RegExpStringIterator; + /** + * Matches a string with a regular expression, and returns an iterable of matches + * containing the results of that search. + * @param regexp A regular expression + */ + matchAll(regexp: RegExp): RegExpStringIterator; - /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */ - toLocaleLowerCase(locales?: Intl.LocalesArgument): string; + /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */ + toLocaleLowerCase(locales?: Intl.LocalesArgument): string; - /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */ - toLocaleUpperCase(locales?: Intl.LocalesArgument): string; + /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */ + toLocaleUpperCase(locales?: Intl.LocalesArgument): string; - /** - * Determines whether two strings are equivalent in the current or specified locale. - * @param that String to compare to target string - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details. - * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details. - */ - localeCompare(that: string, locales?: Intl.LocalesArgument, options?: Intl.CollatorOptions): number; + /** + * Determines whether two strings are equivalent in the current or specified locale. + * @param that String to compare to target string + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details. + * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details. + */ + localeCompare(that: string, locales?: Intl.LocalesArgument, options?: Intl.CollatorOptions): number; } ///////////////////////////// // lib.es2020.symbol.wellknown.d.ts ///////////////////////////// interface SymbolConstructor { - /** - * A regular expression method that matches the regular expression against a string. Called - * by the String.prototype.matchAll method. - */ - readonly matchAll: unique symbol; + /** + * A regular expression method that matches the regular expression against a string. Called + * by the String.prototype.matchAll method. + */ + readonly matchAll: unique symbol; } interface RegExpStringIterator extends IteratorObject { - [Symbol.iterator](): RegExpStringIterator; + [Symbol.iterator](): RegExpStringIterator; } interface RegExp { - /** - * Matches a string with this regular expression, and returns an iterable of matches - * containing the results of that search. - * @param string A string to search within. - */ - [Symbol.matchAll](str: string): RegExpStringIterator; + /** + * Matches a string with this regular expression, and returns an iterable of matches + * containing the results of that search. + * @param string A string to search within. + */ + [Symbol.matchAll](str: string): RegExpStringIterator; } ///////////////////////////// // lib.es2021.intl.d.ts ///////////////////////////// declare namespace Intl { - interface ResolvedDateTimeFormatOptions { - hourCycle?: "h11" | "h12" | "h23" | "h24"; - } +interface ResolvedDateTimeFormatOptions { + hourCycle?: "h11" | "h12" | "h23" | "h24"; +} } ///////////////////////////// // lib.es2021.promise.d.ts ///////////////////////////// interface AggregateError extends Error { - errors: any[]; + errors: any[]; } interface AggregateErrorConstructor { - new (errors: Iterable, message?: string): AggregateError; + new (errors: Iterable, message?: string): AggregateError; - (errors: Iterable, message?: string): AggregateError; + (errors: Iterable, message?: string): AggregateError; - readonly prototype: AggregateError; + readonly prototype: AggregateError; } declare var AggregateError: AggregateErrorConstructor; @@ -3125,38 +3125,38 @@ declare var AggregateError: AggregateErrorConstructor; * Represents the completion of an asynchronous operation */ interface PromiseConstructor { - /** - * The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm. - * @param values An array or iterable of Promises. - * @returns A new Promise. - */ - any(values: T): Promise>; + /** + * The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm. + * @param values An array or iterable of Promises. + * @returns A new Promise. + */ + any(values: T): Promise>; - /** - * The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm. - * @param values An array or iterable of Promises. - * @returns A new Promise. - */ - any(values: Iterable>): Promise>; + /** + * The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm. + * @param values An array or iterable of Promises. + * @returns A new Promise. + */ + any(values: Iterable>): Promise>; } ///////////////////////////// // lib.es2021.string.d.ts ///////////////////////////// interface String { - /** - * Replace all instances of a substring in a string, using a regular expression or search string. - * @param searchValue A string to search for. - * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string. - */ - replaceAll(searchValue: string | RegExp, replaceValue: string): string; + /** + * Replace all instances of a substring in a string, using a regular expression or search string. + * @param searchValue A string to search for. + * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string. + */ + replaceAll(searchValue: string | RegExp, replaceValue: string): string; - /** - * Replace all instances of a substring in a string, using a regular expression or search string. - * @param searchValue A string to search for. - * @param replacer A function that returns the replacement text. - */ - replaceAll(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; + /** + * Replace all instances of a substring in a string, using a regular expression or search string. + * @param searchValue A string to search for. + * @param replacer A function that returns the replacement text. + */ + replaceAll(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; } ///////////////////////////// @@ -3166,79 +3166,79 @@ interface ErrorOptions { } interface ErrorConstructor { - new (message?: string, options?: ErrorOptions): Error; + new (message?: string, options?: ErrorOptions): Error; - (message?: string, options?: ErrorOptions): Error; + (message?: string, options?: ErrorOptions): Error; } interface EvalErrorConstructor { - new (message?: string, options?: ErrorOptions): EvalError; + new (message?: string, options?: ErrorOptions): EvalError; - (message?: string, options?: ErrorOptions): EvalError; + (message?: string, options?: ErrorOptions): EvalError; } interface RangeErrorConstructor { - new (message?: string, options?: ErrorOptions): RangeError; + new (message?: string, options?: ErrorOptions): RangeError; - (message?: string, options?: ErrorOptions): RangeError; + (message?: string, options?: ErrorOptions): RangeError; } interface ReferenceErrorConstructor { - new (message?: string, options?: ErrorOptions): ReferenceError; + new (message?: string, options?: ErrorOptions): ReferenceError; - (message?: string, options?: ErrorOptions): ReferenceError; + (message?: string, options?: ErrorOptions): ReferenceError; } interface SyntaxErrorConstructor { - new (message?: string, options?: ErrorOptions): SyntaxError; + new (message?: string, options?: ErrorOptions): SyntaxError; - (message?: string, options?: ErrorOptions): SyntaxError; + (message?: string, options?: ErrorOptions): SyntaxError; } interface TypeErrorConstructor { - new (message?: string, options?: ErrorOptions): TypeError; + new (message?: string, options?: ErrorOptions): TypeError; - (message?: string, options?: ErrorOptions): TypeError; + (message?: string, options?: ErrorOptions): TypeError; } interface URIErrorConstructor { - new (message?: string, options?: ErrorOptions): URIError; + new (message?: string, options?: ErrorOptions): URIError; - (message?: string, options?: ErrorOptions): URIError; + (message?: string, options?: ErrorOptions): URIError; } interface AggregateErrorConstructor { - new ( - errors: Iterable, - message?: string, - options?: ErrorOptions, - ): AggregateError; + new ( + errors: Iterable, + message?: string, + options?: ErrorOptions, + ): AggregateError; - ( - errors: Iterable, - message?: string, - options?: ErrorOptions, - ): AggregateError; + ( + errors: Iterable, + message?: string, + options?: ErrorOptions, + ): AggregateError; } ///////////////////////////// // lib.es2023.intl.d.ts ///////////////////////////// declare namespace Intl { - type StringNumericLiteral = `${number}` | "Infinity" | "-Infinity" | "+Infinity"; +type StringNumericLiteral = `${number}` | "Infinity" | "-Infinity" | "+Infinity"; - interface NumberFormat { - format(value: number | bigint | StringNumericLiteral): string; +interface NumberFormat { + format(value: number | bigint | StringNumericLiteral): string; - formatToParts(value: number | bigint | StringNumericLiteral): NumberFormatPart[]; - } + formatToParts(value: number | bigint | StringNumericLiteral): NumberFormatPart[]; +} } ///////////////////////////// // lib.es2024.arraybuffer.d.ts ///////////////////////////// interface ArrayBufferConstructor { - new (byteLength: number): ArrayBuffer; + new (byteLength: number): ArrayBuffer; } ///////////////////////////// @@ -3310,177 +3310,177 @@ declare function encodeURI(uri: string): string; declare function encodeURIComponent(uriComponent: string | number | boolean): string; interface Symbol { - /** Returns a string representation of an object. */ - toString(): string; + /** Returns a string representation of an object. */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): symbol; + /** Returns the primitive value of the specified object. */ + valueOf(): symbol; } declare type PropertyKey = string | number | symbol; interface PropertyDescriptor { - configurable?: boolean; + configurable?: boolean; - enumerable?: boolean; + enumerable?: boolean; - value?: any; + value?: any; - writable?: boolean; + writable?: boolean; - get?(): any; + get?(): any; - set?(v: any): void; + set?(v: any): void; } interface PropertyDescriptorMap { - [key: PropertyKey]: PropertyDescriptor; + [key: PropertyKey]: PropertyDescriptor; } interface Object { - /** The initial value of Object.prototype.constructor is the standard built-in Object constructor. */ - constructor: Function; + /** The initial value of Object.prototype.constructor is the standard built-in Object constructor. */ + constructor: Function; - /** Returns a string representation of an object. */ - toString(): string; + /** Returns a string representation of an object. */ + toString(): string; - /** Returns a date converted to a string using the current locale. */ - toLocaleString(): string; + /** Returns a date converted to a string using the current locale. */ + toLocaleString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): Object; + /** Returns the primitive value of the specified object. */ + valueOf(): Object; - /** - * Determines whether an object has a property with the specified name. - * @param v A property name. - */ - hasOwnProperty(v: PropertyKey): boolean; + /** + * Determines whether an object has a property with the specified name. + * @param v A property name. + */ + hasOwnProperty(v: PropertyKey): boolean; - /** - * Determines whether an object exists in another object's prototype chain. - * @param v Another object whose prototype chain is to be checked. - */ - isPrototypeOf(v: Object): boolean; + /** + * Determines whether an object exists in another object's prototype chain. + * @param v Another object whose prototype chain is to be checked. + */ + isPrototypeOf(v: Object): boolean; - /** - * Determines whether a specified property is enumerable. - * @param v A property name. - */ - propertyIsEnumerable(v: PropertyKey): boolean; + /** + * Determines whether a specified property is enumerable. + * @param v A property name. + */ + propertyIsEnumerable(v: PropertyKey): boolean; } interface ObjectConstructor { - new (value?: any): Object; + new (value?: any): Object; - (): any; + (): any; - (value: any): any; + (value: any): any; - /** A reference to the prototype for a class of objects. */ - readonly prototype: Object; + /** A reference to the prototype for a class of objects. */ + readonly prototype: Object; - /** - * Returns the prototype of an object. - * @param o The object that references the prototype. - */ - getPrototypeOf(o: any): any; + /** + * Returns the prototype of an object. + * @param o The object that references the prototype. + */ + getPrototypeOf(o: any): any; - /** - * Gets the own property descriptor of the specified object. - * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype. - * @param o Object that contains the property. - * @param p Name of the property. - */ - getOwnPropertyDescriptor(o: any, p: PropertyKey): PropertyDescriptor | undefined; + /** + * Gets the own property descriptor of the specified object. + * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype. + * @param o Object that contains the property. + * @param p Name of the property. + */ + getOwnPropertyDescriptor(o: any, p: PropertyKey): PropertyDescriptor | undefined; - /** - * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly - * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions. - * @param o Object that contains the own properties. - */ - getOwnPropertyNames(o: any): string[]; + /** + * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly + * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions. + * @param o Object that contains the own properties. + */ + getOwnPropertyNames(o: any): string[]; - /** - * Creates an object that has the specified prototype or that has null prototype. - * @param o Object to use as a prototype. May be null. - */ - create(o: object | null): any; + /** + * Creates an object that has the specified prototype or that has null prototype. + * @param o Object to use as a prototype. May be null. + */ + create(o: object | null): any; - /** - * Creates an object that has the specified prototype, and that optionally contains specified properties. - * @param o Object to use as a prototype. May be null - * @param properties JavaScript object that contains one or more property descriptors. - */ - create(o: object | null, properties: PropertyDescriptorMap & ThisType): any; + /** + * Creates an object that has the specified prototype, and that optionally contains specified properties. + * @param o Object to use as a prototype. May be null + * @param properties JavaScript object that contains one or more property descriptors. + */ + create(o: object | null, properties: PropertyDescriptorMap & ThisType): any; - /** - * Adds a property to an object, or modifies attributes of an existing property. - * @param o Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object. - * @param p The property name. - * @param attributes Descriptor for the property. It can be for a data property or an accessor property. - */ - defineProperty(o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType): T; + /** + * Adds a property to an object, or modifies attributes of an existing property. + * @param o Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object. + * @param p The property name. + * @param attributes Descriptor for the property. It can be for a data property or an accessor property. + */ + defineProperty(o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType): T; - /** - * Adds one or more properties to an object, and/or modifies attributes of existing properties. - * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object. - * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property. - */ - defineProperties(o: T, properties: PropertyDescriptorMap & ThisType): T; + /** + * Adds one or more properties to an object, and/or modifies attributes of existing properties. + * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object. + * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property. + */ + defineProperties(o: T, properties: PropertyDescriptorMap & ThisType): T; - /** - * Prevents the modification of attributes of existing properties, and prevents the addition of new properties. - * @param o Object on which to lock the attributes. - */ - seal(o: T): T; + /** + * Prevents the modification of attributes of existing properties, and prevents the addition of new properties. + * @param o Object on which to lock the attributes. + */ + seal(o: T): T; - /** - * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. - * @param f Object on which to lock the attributes. - */ - freeze(f: T): T; + /** + * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. + * @param f Object on which to lock the attributes. + */ + freeze(f: T): T; - /** - * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. - * @param o Object on which to lock the attributes. - */ - freeze(o: T): Readonly; + /** + * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. + * @param o Object on which to lock the attributes. + */ + freeze(o: T): Readonly; - /** - * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. - * @param o Object on which to lock the attributes. - */ - freeze(o: T): Readonly; + /** + * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. + * @param o Object on which to lock the attributes. + */ + freeze(o: T): Readonly; - /** - * Prevents the addition of new properties to an object. - * @param o Object to make non-extensible. - */ - preventExtensions(o: T): T; + /** + * Prevents the addition of new properties to an object. + * @param o Object to make non-extensible. + */ + preventExtensions(o: T): T; - /** - * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object. - * @param o Object to test. - */ - isSealed(o: any): boolean; + /** + * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object. + * @param o Object to test. + */ + isSealed(o: any): boolean; - /** - * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object. - * @param o Object to test. - */ - isFrozen(o: any): boolean; + /** + * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object. + * @param o Object to test. + */ + isFrozen(o: any): boolean; - /** - * Returns a value that indicates whether new properties can be added to an object. - * @param o Object to test. - */ - isExtensible(o: any): boolean; + /** + * Returns a value that indicates whether new properties can be added to an object. + * @param o Object to test. + */ + isExtensible(o: any): boolean; - /** - * Returns the names of the enumerable string properties and methods of an object. - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - keys(o: object): string[]; + /** + * Returns the names of the enumerable string properties and methods of an object. + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + keys(o: object): string[]; } /** @@ -3492,46 +3492,46 @@ declare var Object: ObjectConstructor; * Creates a new function. */ interface Function { - /** - * Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function. - * @param thisArg The object to be used as the this object. - * @param argArray A set of arguments to be passed to the function. - */ - apply(this: Function, thisArg: any, argArray?: any): any; + /** + * Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function. + * @param thisArg The object to be used as the this object. + * @param argArray A set of arguments to be passed to the function. + */ + apply(this: Function, thisArg: any, argArray?: any): any; - /** - * Calls a method of an object, substituting another object for the current object. - * @param thisArg The object to be used as the current object. - * @param argArray A list of arguments to be passed to the method. - */ - call(this: Function, thisArg: any, ...argArray: any[]): any; + /** + * Calls a method of an object, substituting another object for the current object. + * @param thisArg The object to be used as the current object. + * @param argArray A list of arguments to be passed to the method. + */ + call(this: Function, thisArg: any, ...argArray: any[]): any; - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg An object to which the this keyword can refer inside the new function. - * @param argArray A list of arguments to be passed to the new function. - */ - bind(this: Function, thisArg: any, ...argArray: any[]): any; + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg An object to which the this keyword can refer inside the new function. + * @param argArray A list of arguments to be passed to the new function. + */ + bind(this: Function, thisArg: any, ...argArray: any[]): any; - /** Returns a string representation of a function. */ - toString(): string; + /** Returns a string representation of a function. */ + toString(): string; - prototype: any; + prototype: any; - readonly length: number; + readonly length: number; } interface FunctionConstructor { - /** - * Creates a new function. - * @param args A list of arguments the function accepts. - */ - new (...args: string[]): Function; + /** + * Creates a new function. + * @param args A list of arguments the function accepts. + */ + new (...args: string[]): Function; - (...args: string[]): Function; + (...args: string[]): Function; - readonly prototype: Function; + readonly prototype: Function; } declare var Function: FunctionConstructor; @@ -3547,208 +3547,208 @@ type ThisParameterType = T extends (this: infer U, ...args: never) => any ? U type OmitThisParameter = unknown extends ThisParameterType ? T : T extends (...args: infer A) => infer R ? (...args: A) => R : T; interface CallableFunction extends Function { - /** - * Calls the function with the specified object as the this value and the elements of specified array as the arguments. - * @param thisArg The object to be used as the this object. - */ - apply(this: (this: T) => R, thisArg: T): R; + /** + * Calls the function with the specified object as the this value and the elements of specified array as the arguments. + * @param thisArg The object to be used as the this object. + */ + apply(this: (this: T) => R, thisArg: T): R; - /** - * Calls the function with the specified object as the this value and the elements of specified array as the arguments. - * @param thisArg The object to be used as the this object. - * @param args An array of argument values to be passed to the function. - */ - apply(this: (this: T, ...args: A) => R, thisArg: T, args: A): R; + /** + * Calls the function with the specified object as the this value and the elements of specified array as the arguments. + * @param thisArg The object to be used as the this object. + * @param args An array of argument values to be passed to the function. + */ + apply(this: (this: T, ...args: A) => R, thisArg: T, args: A): R; - /** - * Calls the function with the specified object as the this value and the specified rest arguments as the arguments. - * @param thisArg The object to be used as the this object. - * @param args Argument values to be passed to the function. - */ - call(this: (this: T, ...args: A) => R, thisArg: T, ...args: A): R; + /** + * Calls the function with the specified object as the this value and the specified rest arguments as the arguments. + * @param thisArg The object to be used as the this object. + * @param args Argument values to be passed to the function. + */ + call(this: (this: T, ...args: A) => R, thisArg: T, ...args: A): R; - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg The object to be used as the this object. - */ - bind(this: T, thisArg: ThisParameterType): OmitThisParameter; + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg The object to be used as the this object. + */ + bind(this: T, thisArg: ThisParameterType): OmitThisParameter; - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg The object to be used as the this object. - * @param args Arguments to bind to the parameters of the function. - */ - bind(this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg The object to be used as the this object. + * @param args Arguments to bind to the parameters of the function. + */ + bind(this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } interface NewableFunction extends Function { - /** - * Calls the function with the specified object as the this value and the elements of specified array as the arguments. - * @param thisArg The object to be used as the this object. - */ - apply(this: new () => T, thisArg: T): void; + /** + * Calls the function with the specified object as the this value and the elements of specified array as the arguments. + * @param thisArg The object to be used as the this object. + */ + apply(this: new () => T, thisArg: T): void; - /** - * Calls the function with the specified object as the this value and the elements of specified array as the arguments. - * @param thisArg The object to be used as the this object. - * @param args An array of argument values to be passed to the function. - */ - apply(this: new (...args: A) => T, thisArg: T, args: A): void; + /** + * Calls the function with the specified object as the this value and the elements of specified array as the arguments. + * @param thisArg The object to be used as the this object. + * @param args An array of argument values to be passed to the function. + */ + apply(this: new (...args: A) => T, thisArg: T, args: A): void; - /** - * Calls the function with the specified object as the this value and the specified rest arguments as the arguments. - * @param thisArg The object to be used as the this object. - * @param args Argument values to be passed to the function. - */ - call(this: new (...args: A) => T, thisArg: T, ...args: A): void; + /** + * Calls the function with the specified object as the this value and the specified rest arguments as the arguments. + * @param thisArg The object to be used as the this object. + * @param args Argument values to be passed to the function. + */ + call(this: new (...args: A) => T, thisArg: T, ...args: A): void; - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg The object to be used as the this object. - */ - bind(this: T, thisArg: any): T; + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg The object to be used as the this object. + */ + bind(this: T, thisArg: any): T; - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg The object to be used as the this object. - * @param args Arguments to bind to the parameters of the function. - */ - bind(this: new (...args: [...A, ...B]) => R, thisArg: any, ...args: A): new (...args: B) => R; + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg The object to be used as the this object. + * @param args Arguments to bind to the parameters of the function. + */ + bind(this: new (...args: [...A, ...B]) => R, thisArg: any, ...args: A): new (...args: B) => R; } interface IArguments { - [index: number]: any; + [index: number]: any; - length: number; + length: number; } interface String { - /** Returns a string representation of a string. */ - toString(): string; + /** Returns a string representation of a string. */ + toString(): string; - /** - * Returns the character at the specified index. - * @param pos The zero-based index of the desired character. - */ - charAt(pos: number): string; + /** + * Returns the character at the specified index. + * @param pos The zero-based index of the desired character. + */ + charAt(pos: number): string; - /** - * Returns the Unicode value of the character at the specified location, or NaN if the index is out of bounds. - * @param index The zero-based index of the desired character. - */ - charCodeAt(index: number): number; + /** + * Returns the Unicode value of the character at the specified location, or NaN if the index is out of bounds. + * @param index The zero-based index of the desired character. + */ + charCodeAt(index: number): number; - /** - * Returns a string that contains the concatenation of two or more strings. - * @param strings The strings to append to the end of the string. - */ - concat(...strings: string[]): string; + /** + * Returns a string that contains the concatenation of two or more strings. + * @param strings The strings to append to the end of the string. + */ + concat(...strings: string[]): string; - /** - * Returns the position of the first occurrence of a substring, or -1 if it is not present. - * @param searchString The substring to search for in the string - * @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string. - */ - indexOf(searchString: string, position?: number): number; + /** + * Returns the position of the first occurrence of a substring, or -1 if it is not present. + * @param searchString The substring to search for in the string + * @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string. + */ + indexOf(searchString: string, position?: number): number; - /** - * Returns the last occurrence of a substring in the string, or -1 if it is not present. - * @param searchString The substring to search for. - * @param position The index at which to begin searching. If omitted, the search begins at the end of the string. - */ - lastIndexOf(searchString: string, position?: number): number; + /** + * Returns the last occurrence of a substring in the string, or -1 if it is not present. + * @param searchString The substring to search for. + * @param position The index at which to begin searching. If omitted, the search begins at the end of the string. + */ + lastIndexOf(searchString: string, position?: number): number; - /** - * Determines whether two strings are equivalent in the current locale. - * @param that String to compare to target string - */ - localeCompare(that: string): number; + /** + * Determines whether two strings are equivalent in the current locale. + * @param that String to compare to target string + */ + localeCompare(that: string): number; - /** - * Matches a string with a regular expression, and returns an array containing the results of that search. - * @param regexp A variable name or string literal containing the regular expression pattern and flags. - */ - match(regexp: string | RegExp): RegExpMatchArray | null; + /** + * Matches a string with a regular expression, and returns an array containing the results of that search. + * @param regexp A variable name or string literal containing the regular expression pattern and flags. + */ + match(regexp: string | RegExp): RegExpMatchArray | null; - /** - * Replaces text in a string, using a regular expression or search string. - * @param searchValue A string or regular expression to search for. - * @param replaceValue A string containing the text to replace. When the {@linkcode searchValue} is a `RegExp`, all matches are replaced if the `g` flag is set (or only those matches at the beginning, if the `y` flag is also present). Otherwise, only the first match of {@linkcode searchValue} is replaced. - */ - replace(searchValue: string | RegExp, replaceValue: string): string; + /** + * Replaces text in a string, using a regular expression or search string. + * @param searchValue A string or regular expression to search for. + * @param replaceValue A string containing the text to replace. When the {@linkcode searchValue} is a `RegExp`, all matches are replaced if the `g` flag is set (or only those matches at the beginning, if the `y` flag is also present). Otherwise, only the first match of {@linkcode searchValue} is replaced. + */ + replace(searchValue: string | RegExp, replaceValue: string): string; - /** - * Replaces text in a string, using a regular expression or search string. - * @param searchValue A string to search for. - * @param replacer A function that returns the replacement text. - */ - replace(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; + /** + * Replaces text in a string, using a regular expression or search string. + * @param searchValue A string to search for. + * @param replacer A function that returns the replacement text. + */ + replace(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; - /** - * Finds the first substring match in a regular expression search. - * @param regexp The regular expression pattern and applicable flags. - */ - search(regexp: string | RegExp): number; + /** + * Finds the first substring match in a regular expression search. + * @param regexp The regular expression pattern and applicable flags. + */ + search(regexp: string | RegExp): number; - /** - * Returns a section of a string. - * @param start The index to the beginning of the specified portion of stringObj. - * @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end. - * If this value is not specified, the substring continues to the end of stringObj. - */ - slice(start?: number, end?: number): string; + /** + * Returns a section of a string. + * @param start The index to the beginning of the specified portion of stringObj. + * @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end. + * If this value is not specified, the substring continues to the end of stringObj. + */ + slice(start?: number, end?: number): string; - /** - * Split a string into substrings using the specified separator and return them as an array. - * @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned. - * @param limit A value used to limit the number of elements returned in the array. - */ - split(separator: string | RegExp, limit?: number): string[]; + /** + * Split a string into substrings using the specified separator and return them as an array. + * @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned. + * @param limit A value used to limit the number of elements returned in the array. + */ + split(separator: string | RegExp, limit?: number): string[]; - /** - * Returns the substring at the specified location within a String object. - * @param start The zero-based index number indicating the beginning of the substring. - * @param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end. - * If end is omitted, the characters from start through the end of the original string are returned. - */ - substring(start: number, end?: number): string; + /** + * Returns the substring at the specified location within a String object. + * @param start The zero-based index number indicating the beginning of the substring. + * @param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end. + * If end is omitted, the characters from start through the end of the original string are returned. + */ + substring(start: number, end?: number): string; - /** Converts all the alphabetic characters in a string to lowercase. */ - toLowerCase(): string; + /** Converts all the alphabetic characters in a string to lowercase. */ + toLowerCase(): string; - /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */ - toLocaleLowerCase(locales?: string | string[]): string; + /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */ + toLocaleLowerCase(locales?: string | string[]): string; - /** Converts all the alphabetic characters in a string to uppercase. */ - toUpperCase(): string; + /** Converts all the alphabetic characters in a string to uppercase. */ + toUpperCase(): string; - /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */ - toLocaleUpperCase(locales?: string | string[]): string; + /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */ + toLocaleUpperCase(locales?: string | string[]): string; - /** Removes the leading and trailing white space and line terminator characters from a string. */ - trim(): string; + /** Removes the leading and trailing white space and line terminator characters from a string. */ + trim(): string; - /** Returns the length of a String object. */ - readonly length: number; + /** Returns the length of a String object. */ + readonly length: number; - /** Returns the primitive value of the specified object. */ - valueOf(): string; + /** Returns the primitive value of the specified object. */ + valueOf(): string; - readonly [index: number]: string; + readonly [index: number]: string; } interface StringConstructor { - new (value?: any): String; + new (value?: any): String; - (value?: any): string; + (value?: any): string; - readonly prototype: String; + readonly prototype: String; - fromCharCode(...codes: number[]): string; + fromCharCode(...codes: number[]): string; } /** @@ -3757,220 +3757,220 @@ interface StringConstructor { declare var String: StringConstructor; interface Boolean { - /** Returns the primitive value of the specified object. */ - valueOf(): boolean; + /** Returns the primitive value of the specified object. */ + valueOf(): boolean; } interface BooleanConstructor { - new (value?: any): Boolean; + new (value?: any): Boolean; - (value?: T): boolean; + (value?: T): boolean; - readonly prototype: Boolean; + readonly prototype: Boolean; } declare var Boolean: BooleanConstructor; interface Number { - /** - * Returns a string representation of an object. - * @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers. - */ - toString(radix?: number): string; + /** + * Returns a string representation of an object. + * @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers. + */ + toString(radix?: number): string; - /** - * Returns a string representing a number in fixed-point notation. - * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 100, inclusive. - */ - toFixed(fractionDigits?: number): string; + /** + * Returns a string representing a number in fixed-point notation. + * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 100, inclusive. + */ + toFixed(fractionDigits?: number): string; - /** - * Returns a string containing a number represented in exponential notation. - * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 100, inclusive. - */ - toExponential(fractionDigits?: number): string; + /** + * Returns a string containing a number represented in exponential notation. + * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 100, inclusive. + */ + toExponential(fractionDigits?: number): string; - /** - * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits. - * @param precision Number of significant digits. Must be in the range 1 - 100, inclusive. - */ - toPrecision(precision?: number): string; + /** + * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits. + * @param precision Number of significant digits. Must be in the range 1 - 100, inclusive. + */ + toPrecision(precision?: number): string; - /** Returns the primitive value of the specified object. */ - valueOf(): number; + /** Returns the primitive value of the specified object. */ + valueOf(): number; } interface NumberConstructor { - new (value?: any): Number; + new (value?: any): Number; - (value?: any): number; + (value?: any): number; - readonly prototype: Number; + readonly prototype: Number; - /** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */ - readonly MAX_VALUE: number; + /** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */ + readonly MAX_VALUE: number; - /** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */ - readonly MIN_VALUE: number; + /** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */ + readonly MIN_VALUE: number; - /** - * A value that is not a number. - * In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function. - */ - readonly NaN: number; + /** + * A value that is not a number. + * In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function. + */ + readonly NaN: number; - /** - * A value that is less than the largest negative number that can be represented in JavaScript. - * JavaScript displays NEGATIVE_INFINITY values as -infinity. - */ - readonly NEGATIVE_INFINITY: number; + /** + * A value that is less than the largest negative number that can be represented in JavaScript. + * JavaScript displays NEGATIVE_INFINITY values as -infinity. + */ + readonly NEGATIVE_INFINITY: number; - /** - * A value greater than the largest number that can be represented in JavaScript. - * JavaScript displays POSITIVE_INFINITY values as infinity. - */ - readonly POSITIVE_INFINITY: number; + /** + * A value greater than the largest number that can be represented in JavaScript. + * JavaScript displays POSITIVE_INFINITY values as infinity. + */ + readonly POSITIVE_INFINITY: number; } /** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */ declare var Number: NumberConstructor; interface TemplateStringsArray extends ReadonlyArray { - readonly raw: readonly string[]; + readonly raw: readonly string[]; } interface Math { - /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */ - readonly E: number; + /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */ + readonly E: number; - /** The natural logarithm of 10. */ - readonly LN10: number; + /** The natural logarithm of 10. */ + readonly LN10: number; - /** The natural logarithm of 2. */ - readonly LN2: number; + /** The natural logarithm of 2. */ + readonly LN2: number; - /** The base-2 logarithm of e. */ - readonly LOG2E: number; + /** The base-2 logarithm of e. */ + readonly LOG2E: number; - /** The base-10 logarithm of e. */ - readonly LOG10E: number; + /** The base-10 logarithm of e. */ + readonly LOG10E: number; - /** Pi. This is the ratio of the circumference of a circle to its diameter. */ - readonly PI: number; + /** Pi. This is the ratio of the circumference of a circle to its diameter. */ + readonly PI: number; - /** The square root of 0.5, or, equivalently, one divided by the square root of 2. */ - readonly SQRT1_2: number; + /** The square root of 0.5, or, equivalently, one divided by the square root of 2. */ + readonly SQRT1_2: number; - /** The square root of 2. */ - readonly SQRT2: number; + /** The square root of 2. */ + readonly SQRT2: number; - /** - * Returns the absolute value of a number (the value without regard to whether it is positive or negative). - * For example, the absolute value of -5 is the same as the absolute value of 5. - * @param x A numeric expression for which the absolute value is needed. - */ - abs(x: number): number; + /** + * Returns the absolute value of a number (the value without regard to whether it is positive or negative). + * For example, the absolute value of -5 is the same as the absolute value of 5. + * @param x A numeric expression for which the absolute value is needed. + */ + abs(x: number): number; - /** - * Returns the arc cosine (or inverse cosine) of a number. - * @param x A numeric expression. - */ - acos(x: number): number; + /** + * Returns the arc cosine (or inverse cosine) of a number. + * @param x A numeric expression. + */ + acos(x: number): number; - /** - * Returns the arcsine of a number. - * @param x A numeric expression. - */ - asin(x: number): number; + /** + * Returns the arcsine of a number. + * @param x A numeric expression. + */ + asin(x: number): number; - /** - * Returns the arctangent of a number. - * @param x A numeric expression for which the arctangent is needed. - */ - atan(x: number): number; + /** + * Returns the arctangent of a number. + * @param x A numeric expression for which the arctangent is needed. + */ + atan(x: number): number; - /** - * Returns the angle (in radians) between the X axis and the line going through both the origin and the given point. - * @param y A numeric expression representing the cartesian y-coordinate. - * @param x A numeric expression representing the cartesian x-coordinate. - */ - atan2(y: number, x: number): number; + /** + * Returns the angle (in radians) between the X axis and the line going through both the origin and the given point. + * @param y A numeric expression representing the cartesian y-coordinate. + * @param x A numeric expression representing the cartesian x-coordinate. + */ + atan2(y: number, x: number): number; - /** - * Returns the smallest integer greater than or equal to its numeric argument. - * @param x A numeric expression. - */ - ceil(x: number): number; + /** + * Returns the smallest integer greater than or equal to its numeric argument. + * @param x A numeric expression. + */ + ceil(x: number): number; - /** - * Returns the cosine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - cos(x: number): number; + /** + * Returns the cosine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + cos(x: number): number; - /** - * Returns e (the base of natural logarithms) raised to a power. - * @param x A numeric expression representing the power of e. - */ - exp(x: number): number; + /** + * Returns e (the base of natural logarithms) raised to a power. + * @param x A numeric expression representing the power of e. + */ + exp(x: number): number; - /** - * Returns the greatest integer less than or equal to its numeric argument. - * @param x A numeric expression. - */ - floor(x: number): number; + /** + * Returns the greatest integer less than or equal to its numeric argument. + * @param x A numeric expression. + */ + floor(x: number): number; - /** - * Returns the natural logarithm (base e) of a number. - * @param x A numeric expression. - */ - log(x: number): number; + /** + * Returns the natural logarithm (base e) of a number. + * @param x A numeric expression. + */ + log(x: number): number; - /** - * Returns the larger of a set of supplied numeric expressions. - * @param values Numeric expressions to be evaluated. - */ - max(...values: number[]): number; + /** + * Returns the larger of a set of supplied numeric expressions. + * @param values Numeric expressions to be evaluated. + */ + max(...values: number[]): number; - /** - * Returns the smaller of a set of supplied numeric expressions. - * @param values Numeric expressions to be evaluated. - */ - min(...values: number[]): number; + /** + * Returns the smaller of a set of supplied numeric expressions. + * @param values Numeric expressions to be evaluated. + */ + min(...values: number[]): number; - /** - * Returns the value of a base expression taken to a specified power. - * @param x The base value of the expression. - * @param y The exponent value of the expression. - */ - pow(x: number, y: number): number; + /** + * Returns the value of a base expression taken to a specified power. + * @param x The base value of the expression. + * @param y The exponent value of the expression. + */ + pow(x: number, y: number): number; - /** Returns a pseudorandom number between 0 and 1. */ - random(): number; + /** Returns a pseudorandom number between 0 and 1. */ + random(): number; - /** - * Returns a supplied numeric expression rounded to the nearest integer. - * @param x The value to be rounded to the nearest integer. - */ - round(x: number): number; + /** + * Returns a supplied numeric expression rounded to the nearest integer. + * @param x The value to be rounded to the nearest integer. + */ + round(x: number): number; - /** - * Returns the sine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - sin(x: number): number; + /** + * Returns the sine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + sin(x: number): number; - /** - * Returns the square root of a number. - * @param x A numeric expression. - */ - sqrt(x: number): number; + /** + * Returns the square root of a number. + * @param x A numeric expression. + */ + sqrt(x: number): number; - /** - * Returns the tangent of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - tan(x: number): number; + /** + * Returns the tangent of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + tan(x: number): number; } /** An intrinsic object that provides basic mathematics functionality and constants. */ @@ -3978,334 +3978,334 @@ declare var Math: Math; /** Enables basic storage and retrieval of dates and times. */ interface Date { - /** Returns a string representation of a date. The format of the string depends on the locale. */ - toString(): string; + /** Returns a string representation of a date. The format of the string depends on the locale. */ + toString(): string; - /** Returns a date as a string value. */ - toDateString(): string; + /** Returns a date as a string value. */ + toDateString(): string; - /** Returns a time as a string value. */ - toTimeString(): string; + /** Returns a time as a string value. */ + toTimeString(): string; - /** Returns a value as a string value appropriate to the host environment's current locale. */ - toLocaleString(): string; + /** Returns a value as a string value appropriate to the host environment's current locale. */ + toLocaleString(): string; - /** Returns a date as a string value appropriate to the host environment's current locale. */ - toLocaleDateString(): string; + /** Returns a date as a string value appropriate to the host environment's current locale. */ + toLocaleDateString(): string; - /** Returns a time as a string value appropriate to the host environment's current locale. */ - toLocaleTimeString(): string; + /** Returns a time as a string value appropriate to the host environment's current locale. */ + toLocaleTimeString(): string; - /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */ - valueOf(): number; + /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */ + valueOf(): number; - /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */ - getTime(): number; + /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */ + getTime(): number; - /** Gets the year, using local time. */ - getFullYear(): number; + /** Gets the year, using local time. */ + getFullYear(): number; - /** Gets the year using Universal Coordinated Time (UTC). */ - getUTCFullYear(): number; + /** Gets the year using Universal Coordinated Time (UTC). */ + getUTCFullYear(): number; - /** Gets the month, using local time. */ - getMonth(): number; + /** Gets the month, using local time. */ + getMonth(): number; - /** Gets the month of a Date object using Universal Coordinated Time (UTC). */ - getUTCMonth(): number; + /** Gets the month of a Date object using Universal Coordinated Time (UTC). */ + getUTCMonth(): number; - /** Gets the day-of-the-month, using local time. */ - getDate(): number; + /** Gets the day-of-the-month, using local time. */ + getDate(): number; - /** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */ - getUTCDate(): number; + /** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */ + getUTCDate(): number; - /** Gets the day of the week, using local time. */ - getDay(): number; + /** Gets the day of the week, using local time. */ + getDay(): number; - /** Gets the day of the week using Universal Coordinated Time (UTC). */ - getUTCDay(): number; + /** Gets the day of the week using Universal Coordinated Time (UTC). */ + getUTCDay(): number; - /** Gets the hours in a date, using local time. */ - getHours(): number; + /** Gets the hours in a date, using local time. */ + getHours(): number; - /** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */ - getUTCHours(): number; + /** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */ + getUTCHours(): number; - /** Gets the minutes of a Date object, using local time. */ - getMinutes(): number; + /** Gets the minutes of a Date object, using local time. */ + getMinutes(): number; - /** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */ - getUTCMinutes(): number; + /** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */ + getUTCMinutes(): number; - /** Gets the seconds of a Date object, using local time. */ - getSeconds(): number; + /** Gets the seconds of a Date object, using local time. */ + getSeconds(): number; - /** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */ - getUTCSeconds(): number; + /** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */ + getUTCSeconds(): number; - /** Gets the milliseconds of a Date, using local time. */ - getMilliseconds(): number; + /** Gets the milliseconds of a Date, using local time. */ + getMilliseconds(): number; - /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */ - getUTCMilliseconds(): number; + /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */ + getUTCMilliseconds(): number; - /** Gets the difference in minutes between Universal Coordinated Time (UTC) and the time on the local computer. */ - getTimezoneOffset(): number; + /** Gets the difference in minutes between Universal Coordinated Time (UTC) and the time on the local computer. */ + getTimezoneOffset(): number; - /** - * Sets the date and time value in the Date object. - * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT. - */ - setTime(time: number): number; + /** + * Sets the date and time value in the Date object. + * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT. + */ + setTime(time: number): number; - /** - * Sets the milliseconds value in the Date object using local time. - * @param ms A numeric value equal to the millisecond value. - */ - setMilliseconds(ms: number): number; + /** + * Sets the milliseconds value in the Date object using local time. + * @param ms A numeric value equal to the millisecond value. + */ + setMilliseconds(ms: number): number; - /** - * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC). - * @param ms A numeric value equal to the millisecond value. - */ - setUTCMilliseconds(ms: number): number; + /** + * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC). + * @param ms A numeric value equal to the millisecond value. + */ + setUTCMilliseconds(ms: number): number; - /** - * Sets the seconds value in the Date object using local time. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setSeconds(sec: number, ms?: number): number; + /** + * Sets the seconds value in the Date object using local time. + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setSeconds(sec: number, ms?: number): number; - /** - * Sets the seconds value in the Date object using Universal Coordinated Time (UTC). - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setUTCSeconds(sec: number, ms?: number): number; + /** + * Sets the seconds value in the Date object using Universal Coordinated Time (UTC). + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setUTCSeconds(sec: number, ms?: number): number; - /** - * Sets the minutes value in the Date object using local time. - * @param min A numeric value equal to the minutes value. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setMinutes(min: number, sec?: number, ms?: number): number; + /** + * Sets the minutes value in the Date object using local time. + * @param min A numeric value equal to the minutes value. + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setMinutes(min: number, sec?: number, ms?: number): number; - /** - * Sets the minutes value in the Date object using Universal Coordinated Time (UTC). - * @param min A numeric value equal to the minutes value. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setUTCMinutes(min: number, sec?: number, ms?: number): number; + /** + * Sets the minutes value in the Date object using Universal Coordinated Time (UTC). + * @param min A numeric value equal to the minutes value. + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setUTCMinutes(min: number, sec?: number, ms?: number): number; - /** - * Sets the hour value in the Date object using local time. - * @param hours A numeric value equal to the hours value. - * @param min A numeric value equal to the minutes value. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setHours(hours: number, min?: number, sec?: number, ms?: number): number; + /** + * Sets the hour value in the Date object using local time. + * @param hours A numeric value equal to the hours value. + * @param min A numeric value equal to the minutes value. + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setHours(hours: number, min?: number, sec?: number, ms?: number): number; - /** - * Sets the hours value in the Date object using Universal Coordinated Time (UTC). - * @param hours A numeric value equal to the hours value. - * @param min A numeric value equal to the minutes value. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number; + /** + * Sets the hours value in the Date object using Universal Coordinated Time (UTC). + * @param hours A numeric value equal to the hours value. + * @param min A numeric value equal to the minutes value. + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number; - /** - * Sets the numeric day-of-the-month value of the Date object using local time. - * @param date A numeric value equal to the day of the month. - */ - setDate(date: number): number; + /** + * Sets the numeric day-of-the-month value of the Date object using local time. + * @param date A numeric value equal to the day of the month. + */ + setDate(date: number): number; - /** - * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC). - * @param date A numeric value equal to the day of the month. - */ - setUTCDate(date: number): number; + /** + * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC). + * @param date A numeric value equal to the day of the month. + */ + setUTCDate(date: number): number; - /** - * Sets the month value in the Date object using local time. - * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. - * @param date A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used. - */ - setMonth(month: number, date?: number): number; + /** + * Sets the month value in the Date object using local time. + * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. + * @param date A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used. + */ + setMonth(month: number, date?: number): number; - /** - * Sets the month value in the Date object using Universal Coordinated Time (UTC). - * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. - * @param date A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used. - */ - setUTCMonth(month: number, date?: number): number; + /** + * Sets the month value in the Date object using Universal Coordinated Time (UTC). + * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. + * @param date A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used. + */ + setUTCMonth(month: number, date?: number): number; - /** - * Sets the year of the Date object using local time. - * @param year A numeric value for the year. - * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified. - * @param date A numeric value equal for the day of the month. - */ - setFullYear(year: number, month?: number, date?: number): number; + /** + * Sets the year of the Date object using local time. + * @param year A numeric value for the year. + * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified. + * @param date A numeric value equal for the day of the month. + */ + setFullYear(year: number, month?: number, date?: number): number; - /** - * Sets the year value in the Date object using Universal Coordinated Time (UTC). - * @param year A numeric value equal to the year. - * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied. - * @param date A numeric value equal to the day of the month. - */ - setUTCFullYear(year: number, month?: number, date?: number): number; + /** + * Sets the year value in the Date object using Universal Coordinated Time (UTC). + * @param year A numeric value equal to the year. + * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied. + * @param date A numeric value equal to the day of the month. + */ + setUTCFullYear(year: number, month?: number, date?: number): number; - /** Returns a date converted to a string using Universal Coordinated Time (UTC). */ - toUTCString(): string; + /** Returns a date converted to a string using Universal Coordinated Time (UTC). */ + toUTCString(): string; - /** Returns a date as a string value in ISO format. */ - toISOString(): string; + /** Returns a date as a string value in ISO format. */ + toISOString(): string; - /** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */ - toJSON(key?: any): string; + /** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */ + toJSON(key?: any): string; } interface DateConstructor { - new (): Date; + new (): Date; - new (value: number | string): Date; + new (value: number | string): Date; - /** - * Creates a new Date. - * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. - * @param monthIndex The month as a number between 0 and 11 (January to December). - * @param date The date as a number between 1 and 31. - * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. - * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. - * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. - * @param ms A number from 0 to 999 that specifies the milliseconds. - */ - new (year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; + /** + * Creates a new Date. + * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. + * @param monthIndex The month as a number between 0 and 11 (January to December). + * @param date The date as a number between 1 and 31. + * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. + * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. + * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. + * @param ms A number from 0 to 999 that specifies the milliseconds. + */ + new (year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; - (): string; + (): string; - readonly prototype: Date; + readonly prototype: Date; - /** - * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970. - * @param s A date string - */ - parse(s: string): number; + /** + * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970. + * @param s A date string + */ + parse(s: string): number; - /** - * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. - * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. - * @param monthIndex The month as a number between 0 and 11 (January to December). - * @param date The date as a number between 1 and 31. - * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. - * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. - * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. - * @param ms A number from 0 to 999 that specifies the milliseconds. - */ - UTC(year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; + /** + * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. + * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. + * @param monthIndex The month as a number between 0 and 11 (January to December). + * @param date The date as a number between 1 and 31. + * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. + * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. + * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. + * @param ms A number from 0 to 999 that specifies the milliseconds. + */ + UTC(year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; - /** Returns the number of milliseconds elapsed since midnight, January 1, 1970 Universal Coordinated Time (UTC). */ - now(): number; + /** Returns the number of milliseconds elapsed since midnight, January 1, 1970 Universal Coordinated Time (UTC). */ + now(): number; } declare var Date: DateConstructor; interface RegExpMatchArray extends Array { - /** - * The index of the search at which the result was found. - */ - index?: number; + /** + * The index of the search at which the result was found. + */ + index?: number; - /** - * A copy of the search string. - */ - input?: string; + /** + * A copy of the search string. + */ + input?: string; - /** - * The first match. This will always be present because `null` will be returned if there are no matches. - */ - 0: string; + /** + * The first match. This will always be present because `null` will be returned if there are no matches. + */ + 0: string; } interface RegExpExecArray extends Array { - /** - * The index of the search at which the result was found. - */ - index: number; + /** + * The index of the search at which the result was found. + */ + index: number; - /** - * A copy of the search string. - */ - input: string; + /** + * A copy of the search string. + */ + input: string; - /** - * The first match. This will always be present because `null` will be returned if there are no matches. - */ - 0: string; + /** + * The first match. This will always be present because `null` will be returned if there are no matches. + */ + 0: string; } interface RegExp { - /** - * Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search. - * @param string The String object or string literal on which to perform the search. - */ - exec(string: string): RegExpExecArray | null; + /** + * Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search. + * @param string The String object or string literal on which to perform the search. + */ + exec(string: string): RegExpExecArray | null; - /** - * Returns a Boolean value that indicates whether or not a pattern exists in a searched string. - * @param string String on which to perform the search. - */ - test(string: string): boolean; + /** + * Returns a Boolean value that indicates whether or not a pattern exists in a searched string. + * @param string String on which to perform the search. + */ + test(string: string): boolean; - /** Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. */ - readonly source: string; + /** Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. */ + readonly source: string; - /** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */ - readonly global: boolean; + /** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */ + readonly global: boolean; - /** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */ - readonly ignoreCase: boolean; + /** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */ + readonly ignoreCase: boolean; - /** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */ - readonly multiline: boolean; + /** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */ + readonly multiline: boolean; - lastIndex: number; + lastIndex: number; } interface RegExpConstructor { - new (pattern: RegExp | string): RegExp; + new (pattern: RegExp | string): RegExp; - new (pattern: string, flags?: string): RegExp; + new (pattern: string, flags?: string): RegExp; - (pattern: RegExp | string): RegExp; + (pattern: RegExp | string): RegExp; - (pattern: string, flags?: string): RegExp; + (pattern: string, flags?: string): RegExp; - readonly "prototype": RegExp; + readonly "prototype": RegExp; } declare var RegExp: RegExpConstructor; interface Error { - name: string; + name: string; - message: string; + message: string; - stack?: string; + stack?: string; } interface ErrorConstructor { - new (message?: string): Error; + new (message?: string): Error; - (message?: string): Error; + (message?: string): Error; - readonly prototype: Error; + readonly prototype: Error; } declare var Error: ErrorConstructor; @@ -4314,11 +4314,11 @@ interface EvalError extends Error { } interface EvalErrorConstructor extends ErrorConstructor { - new (message?: string): EvalError; + new (message?: string): EvalError; - (message?: string): EvalError; + (message?: string): EvalError; - readonly prototype: EvalError; + readonly prototype: EvalError; } declare var EvalError: EvalErrorConstructor; @@ -4327,11 +4327,11 @@ interface RangeError extends Error { } interface RangeErrorConstructor extends ErrorConstructor { - new (message?: string): RangeError; + new (message?: string): RangeError; - (message?: string): RangeError; + (message?: string): RangeError; - readonly prototype: RangeError; + readonly prototype: RangeError; } declare var RangeError: RangeErrorConstructor; @@ -4340,11 +4340,11 @@ interface ReferenceError extends Error { } interface ReferenceErrorConstructor extends ErrorConstructor { - new (message?: string): ReferenceError; + new (message?: string): ReferenceError; - (message?: string): ReferenceError; + (message?: string): ReferenceError; - readonly prototype: ReferenceError; + readonly prototype: ReferenceError; } declare var ReferenceError: ReferenceErrorConstructor; @@ -4353,11 +4353,11 @@ interface SyntaxError extends Error { } interface SyntaxErrorConstructor extends ErrorConstructor { - new (message?: string): SyntaxError; + new (message?: string): SyntaxError; - (message?: string): SyntaxError; + (message?: string): SyntaxError; - readonly prototype: SyntaxError; + readonly prototype: SyntaxError; } declare var SyntaxError: SyntaxErrorConstructor; @@ -4366,11 +4366,11 @@ interface TypeError extends Error { } interface TypeErrorConstructor extends ErrorConstructor { - new (message?: string): TypeError; + new (message?: string): TypeError; - (message?: string): TypeError; + (message?: string): TypeError; - readonly prototype: TypeError; + readonly prototype: TypeError; } declare var TypeError: TypeErrorConstructor; @@ -4379,42 +4379,42 @@ interface URIError extends Error { } interface URIErrorConstructor extends ErrorConstructor { - new (message?: string): URIError; + new (message?: string): URIError; - (message?: string): URIError; + (message?: string): URIError; - readonly prototype: URIError; + readonly prototype: URIError; } declare var URIError: URIErrorConstructor; interface JSON { - /** - * Converts a JavaScript Object Notation (JSON) string into an object. - * @param text A valid JSON string. - * @param reviver A function that transforms the results. This function is called for each member of the object. - * If a member contains nested objects, the nested objects are transformed before the parent object is. - * @throws {SyntaxError} If `text` is not valid JSON. - */ - parse(text: string, reviver?: (this: any, key: string, value: any) => any): any; + /** + * Converts a JavaScript Object Notation (JSON) string into an object. + * @param text A valid JSON string. + * @param reviver A function that transforms the results. This function is called for each member of the object. + * If a member contains nested objects, the nested objects are transformed before the parent object is. + * @throws {SyntaxError} If `text` is not valid JSON. + */ + parse(text: string, reviver?: (this: any, key: string, value: any) => any): any; - /** - * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. - * @param value A JavaScript value, usually an object or array, to be converted. - * @param replacer A function that transforms the results. - * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. - * @throws {TypeError} If a circular reference or a BigInt value is found. - */ - stringify(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string; + /** + * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. + * @param value A JavaScript value, usually an object or array, to be converted. + * @param replacer A function that transforms the results. + * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. + * @throws {TypeError} If a circular reference or a BigInt value is found. + */ + stringify(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string; - /** - * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. - * @param value A JavaScript value, usually an object or array, to be converted. - * @param replacer An array of strings and numbers that acts as an approved list for selecting the object properties that will be stringified. - * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. - * @throws {TypeError} If a circular reference or a BigInt value is found. - */ - stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string; + /** + * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. + * @param value A JavaScript value, usually an object or array, to be converted. + * @param replacer An array of strings and numbers that acts as an approved list for selecting the object properties that will be stringified. + * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. + * @throws {TypeError} If a circular reference or a BigInt value is found. + */ + stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string; } /** @@ -4427,444 +4427,444 @@ declare var JSON: JSON; ///////////////////////////// interface ReadonlyArray { - /** - * Gets the length of the array. This is a number one higher than the highest element defined in an array. - */ - readonly length: number; + /** + * Gets the length of the array. This is a number one higher than the highest element defined in an array. + */ + readonly length: number; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** - * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods. - */ - toLocaleString(): string; + /** + * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods. + */ + toLocaleString(): string; - /** - * Combines two or more arrays. - * @param items Additional items to add to the end of array1. - */ - concat(...items: ConcatArray[]): T[]; + /** + * Combines two or more arrays. + * @param items Additional items to add to the end of array1. + */ + concat(...items: ConcatArray[]): T[]; - /** - * Combines two or more arrays. - * @param items Additional items to add to the end of array1. - */ - concat(...items: (T | ConcatArray)[]): T[]; + /** + * Combines two or more arrays. + * @param items Additional items to add to the end of array1. + */ + concat(...items: (T | ConcatArray)[]): T[]; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): T[]; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): T[]; - /** - * Returns the index of the first occurrence of a value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. - */ - indexOf(searchElement: T, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. + */ + indexOf(searchElement: T, fromIndex?: number): number; - /** - * Returns the index of the last occurrence of a specified value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array. - */ - lastIndexOf(searchElement: T, fromIndex?: number): number; + /** + * Returns the index of the last occurrence of a specified value in an array. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array. + */ + lastIndexOf(searchElement: T, fromIndex?: number): number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): this is readonly S[]; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): this is readonly S[]; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: T, index: number, array: readonly T[]) => void, thisArg?: any): void; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: T, index: number, array: readonly T[]) => void, thisArg?: any): void; - /** - * Calls a defined callback function on each element of an array, and returns an array that contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: T, index: number, array: readonly T[]) => U, thisArg?: any): U[]; + /** + * Calls a defined callback function on each element of an array, and returns an array that contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: T, index: number, array: readonly T[]) => U, thisArg?: any): U[]; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): S[]; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): S[]; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): T[]; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): T[]; - /** - * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T; + /** + * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T; - reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T; + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T; - /** - * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U; - /** - * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T; + /** + * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T; - reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T; + reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T; - /** - * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U; - readonly [n: number]: T; + readonly [n: number]: T; } interface ConcatArray { - readonly length: number; + readonly length: number; - readonly [n: number]: T; + readonly [n: number]: T; - join(separator?: string): string; + join(separator?: string): string; - slice(start?: number, end?: number): T[]; + slice(start?: number, end?: number): T[]; } interface Array { - /** - * Gets or sets the length of the array. This is a number one higher than the highest index in the array. - */ - length: number; + /** + * Gets or sets the length of the array. This is a number one higher than the highest index in the array. + */ + length: number; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** - * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods. - */ - toLocaleString(): string; + /** + * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods. + */ + toLocaleString(): string; - /** - * Removes the last element from an array and returns it. - * If the array is empty, undefined is returned and the array is not modified. - */ - pop(): T | undefined; + /** + * Removes the last element from an array and returns it. + * If the array is empty, undefined is returned and the array is not modified. + */ + pop(): T | undefined; - /** - * Appends new elements to the end of an array, and returns the new length of the array. - * @param items New elements to add to the array. - */ - push(...items: T[]): number; + /** + * Appends new elements to the end of an array, and returns the new length of the array. + * @param items New elements to add to the array. + */ + push(...items: T[]): number; - /** - * Combines two or more arrays. - * This method returns a new array without modifying any existing arrays. - * @param items Additional arrays and/or items to add to the end of the array. - */ - concat(...items: ConcatArray[]): T[]; + /** + * Combines two or more arrays. + * This method returns a new array without modifying any existing arrays. + * @param items Additional arrays and/or items to add to the end of the array. + */ + concat(...items: ConcatArray[]): T[]; - /** - * Combines two or more arrays. - * This method returns a new array without modifying any existing arrays. - * @param items Additional arrays and/or items to add to the end of the array. - */ - concat(...items: (T | ConcatArray)[]): T[]; + /** + * Combines two or more arrays. + * This method returns a new array without modifying any existing arrays. + * @param items Additional arrays and/or items to add to the end of the array. + */ + concat(...items: (T | ConcatArray)[]): T[]; - /** - * Adds all the elements of an array into a string, separated by the specified separator string. - * @param separator A string used to separate one element of the array from the next in the resulting string. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Adds all the elements of an array into a string, separated by the specified separator string. + * @param separator A string used to separate one element of the array from the next in the resulting string. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Reverses the elements in an array in place. - * This method mutates the array and returns a reference to the same array. - */ - reverse(): T[]; + /** + * Reverses the elements in an array in place. + * This method mutates the array and returns a reference to the same array. + */ + reverse(): T[]; - /** - * Removes the first element from an array and returns it. - * If the array is empty, undefined is returned and the array is not modified. - */ - shift(): T | undefined; + /** + * Removes the first element from an array and returns it. + * If the array is empty, undefined is returned and the array is not modified. + */ + shift(): T | undefined; - /** - * Returns a copy of a section of an array. - * For both start and end, a negative index can be used to indicate an offset from the end of the array. - * For example, -2 refers to the second to last element of the array. - * @param start The beginning index of the specified portion of the array. - * If start is undefined, then the slice begins at index 0. - * @param end The end index of the specified portion of the array. This is exclusive of the element at the index 'end'. - * If end is undefined, then the slice extends to the end of the array. - */ - slice(start?: number, end?: number): T[]; + /** + * Returns a copy of a section of an array. + * For both start and end, a negative index can be used to indicate an offset from the end of the array. + * For example, -2 refers to the second to last element of the array. + * @param start The beginning index of the specified portion of the array. + * If start is undefined, then the slice begins at index 0. + * @param end The end index of the specified portion of the array. This is exclusive of the element at the index 'end'. + * If end is undefined, then the slice extends to the end of the array. + */ + slice(start?: number, end?: number): T[]; - /** - * Sorts an array in place. - * This method mutates the array and returns a reference to the same array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: T, b: T) => number): this; + /** + * Sorts an array in place. + * This method mutates the array and returns a reference to the same array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: T, b: T) => number): this; - /** - * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. - * @param start The zero-based location in the array from which to start removing elements. - * @param deleteCount The number of elements to remove. Omitting this argument will remove all elements from the start - * paramater location to end of the array. If value of this argument is either a negative number, zero, undefined, or a type - * that cannot be converted to an integer, the function will evaluate the argument as zero and not remove any elements. - * @returns An array containing the elements that were deleted. - */ - splice(start: number, deleteCount?: number): T[]; + /** + * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. + * @param start The zero-based location in the array from which to start removing elements. + * @param deleteCount The number of elements to remove. Omitting this argument will remove all elements from the start + * paramater location to end of the array. If value of this argument is either a negative number, zero, undefined, or a type + * that cannot be converted to an integer, the function will evaluate the argument as zero and not remove any elements. + * @returns An array containing the elements that were deleted. + */ + splice(start: number, deleteCount?: number): T[]; - /** - * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. - * @param start The zero-based location in the array from which to start removing elements. - * @param deleteCount The number of elements to remove. If value of this argument is either a negative number, zero, - * undefined, or a type that cannot be converted to an integer, the function will evaluate the argument as zero and - * not remove any elements. - * @param items Elements to insert into the array in place of the deleted elements. - * @returns An array containing the elements that were deleted. - */ - splice(start: number, deleteCount: number, ...items: T[]): T[]; + /** + * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. + * @param start The zero-based location in the array from which to start removing elements. + * @param deleteCount The number of elements to remove. If value of this argument is either a negative number, zero, + * undefined, or a type that cannot be converted to an integer, the function will evaluate the argument as zero and + * not remove any elements. + * @param items Elements to insert into the array in place of the deleted elements. + * @returns An array containing the elements that were deleted. + */ + splice(start: number, deleteCount: number, ...items: T[]): T[]; - /** - * Inserts new elements at the start of an array, and returns the new length of the array. - * @param items Elements to insert at the start of the array. - */ - unshift(...items: T[]): number; + /** + * Inserts new elements at the start of an array, and returns the new length of the array. + * @param items Elements to insert at the start of the array. + */ + unshift(...items: T[]): number; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. - */ - indexOf(searchElement: T, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. + */ + indexOf(searchElement: T, fromIndex?: number): number; - /** - * Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin searching backward. If fromIndex is omitted, the search starts at the last index in the array. - */ - lastIndexOf(searchElement: T, fromIndex?: number): number; + /** + * Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin searching backward. If fromIndex is omitted, the search starts at the last index in the array. + */ + lastIndexOf(searchElement: T, fromIndex?: number): number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): this is S[]; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): this is S[]; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void; - /** - * Calls a defined callback function on each element of an array, and returns an array that contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[]; + /** + * Calls a defined callback function on each element of an array, and returns an array that contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[]; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T[]; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T[]; - /** - * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; + /** + * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; - reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; - /** - * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; - /** - * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; + /** + * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; - reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; + reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; - /** - * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; - [n: number]: T; + [n: number]: T; } interface ArrayConstructor { - new (arrayLength?: number): any[]; + new (arrayLength?: number): any[]; - new (arrayLength: number): T[]; + new (arrayLength: number): T[]; - new (...items: T[]): T[]; + new (...items: T[]): T[]; - (arrayLength?: number): any[]; + (arrayLength?: number): any[]; - (arrayLength: number): T[]; + (arrayLength: number): T[]; - (...items: T[]): T[]; + (...items: T[]): T[]; - isArray(arg: any): arg is any[]; + isArray(arg: any): arg is any[]; - readonly prototype: any[]; + readonly prototype: any[]; } declare var Array: ArrayConstructor; interface TypedPropertyDescriptor { - enumerable?: boolean; + enumerable?: boolean; - configurable?: boolean; + configurable?: boolean; - writable?: boolean; + writable?: boolean; - value?: T; + value?: T; - get?: () => T; + get?: () => T; - set?: (value: T) => void; + set?: (value: T) => void; } declare type PromiseConstructorLike = new (executor: (resolve: (value: T | PromiseLike) => void, reject: (reason?: any) => void) => void) => PromiseLike; interface PromiseLike { - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): PromiseLike; + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): PromiseLike; } /** * Represents the completion of an asynchronous operation */ interface Promise { - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise; + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise; - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise; + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise; } /** @@ -4880,9 +4880,9 @@ type Awaited = T extends null | undefined ? T : // special case for `null | u // non-object or non-thenable interface ArrayLike { - readonly length: number; + readonly length: number; - readonly [n: number]: T; + readonly [n: number]: T; } /** @@ -4995,7 +4995,7 @@ interface ThisType { * Stores types to be used with WeakSet, WeakMap, WeakRef, and FinalizationRegistry */ interface WeakKeyTypes { - object: object; + object: object; } type WeakKey = WeakKeyTypes[keyof WeakKeyTypes]; @@ -5007,189 +5007,189 @@ type WeakKey = WeakKeyTypes[keyof WeakKeyTypes]; * buffer as needed. */ interface ArrayBuffer { - /** - * Read-only. The length of the ArrayBuffer (in bytes). - */ - readonly byteLength: number; + /** + * Read-only. The length of the ArrayBuffer (in bytes). + */ + readonly byteLength: number; - /** - * Returns a section of an ArrayBuffer. - */ - slice(begin?: number, end?: number): ArrayBuffer; + /** + * Returns a section of an ArrayBuffer. + */ + slice(begin?: number, end?: number): ArrayBuffer; } /** * Allowed ArrayBuffer types for the buffer of an ArrayBufferView and related Typed Arrays. */ interface ArrayBufferTypes { - ArrayBuffer: ArrayBuffer; + ArrayBuffer: ArrayBuffer; } type ArrayBufferLike = ArrayBufferTypes[keyof ArrayBufferTypes]; interface ArrayBufferConstructor { - readonly prototype: ArrayBuffer; + readonly prototype: ArrayBuffer; - new (byteLength: number): ArrayBuffer; + new (byteLength: number): ArrayBuffer; - isView(arg: any): arg is ArrayBufferView; + isView(arg: any): arg is ArrayBufferView; } declare var ArrayBuffer: ArrayBufferConstructor; interface ArrayBufferView { - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; } interface DataView { - readonly buffer: TArrayBuffer; + readonly buffer: TArrayBuffer; - readonly byteLength: number; + readonly byteLength: number; - readonly byteOffset: number; + readonly byteOffset: number; - /** - * Gets the Float32 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getFloat32(byteOffset: number, littleEndian?: boolean): number; + /** + * Gets the Float32 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getFloat32(byteOffset: number, littleEndian?: boolean): number; - /** - * Gets the Float64 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getFloat64(byteOffset: number, littleEndian?: boolean): number; + /** + * Gets the Float64 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getFloat64(byteOffset: number, littleEndian?: boolean): number; - /** - * Gets the Int8 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - */ - getInt8(byteOffset: number): number; + /** + * Gets the Int8 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + */ + getInt8(byteOffset: number): number; - /** - * Gets the Int16 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getInt16(byteOffset: number, littleEndian?: boolean): number; + /** + * Gets the Int16 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getInt16(byteOffset: number, littleEndian?: boolean): number; - /** - * Gets the Int32 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getInt32(byteOffset: number, littleEndian?: boolean): number; + /** + * Gets the Int32 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getInt32(byteOffset: number, littleEndian?: boolean): number; - /** - * Gets the Uint8 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - */ - getUint8(byteOffset: number): number; + /** + * Gets the Uint8 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + */ + getUint8(byteOffset: number): number; - /** - * Gets the Uint16 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getUint16(byteOffset: number, littleEndian?: boolean): number; + /** + * Gets the Uint16 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getUint16(byteOffset: number, littleEndian?: boolean): number; - /** - * Gets the Uint32 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getUint32(byteOffset: number, littleEndian?: boolean): number; + /** + * Gets the Uint32 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getUint32(byteOffset: number, littleEndian?: boolean): number; - /** - * Stores an Float32 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void; + /** + * Stores an Float32 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void; - /** - * Stores an Float64 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void; + /** + * Stores an Float64 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void; - /** - * Stores an Int8 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - */ - setInt8(byteOffset: number, value: number): void; + /** + * Stores an Int8 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + */ + setInt8(byteOffset: number, value: number): void; - /** - * Stores an Int16 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setInt16(byteOffset: number, value: number, littleEndian?: boolean): void; + /** + * Stores an Int16 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setInt16(byteOffset: number, value: number, littleEndian?: boolean): void; - /** - * Stores an Int32 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setInt32(byteOffset: number, value: number, littleEndian?: boolean): void; + /** + * Stores an Int32 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setInt32(byteOffset: number, value: number, littleEndian?: boolean): void; - /** - * Stores an Uint8 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - */ - setUint8(byteOffset: number, value: number): void; + /** + * Stores an Uint8 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + */ + setUint8(byteOffset: number, value: number): void; - /** - * Stores an Uint16 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setUint16(byteOffset: number, value: number, littleEndian?: boolean): void; + /** + * Stores an Uint16 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setUint16(byteOffset: number, value: number, littleEndian?: boolean): void; - /** - * Stores an Uint32 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setUint32(byteOffset: number, value: number, littleEndian?: boolean): void; + /** + * Stores an Uint32 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setUint32(byteOffset: number, value: number, littleEndian?: boolean): void; } interface DataViewConstructor { - readonly prototype: DataView; + readonly prototype: DataView; - new (buffer: TArrayBuffer, byteOffset?: number, byteLength?: number): DataView; + new (buffer: TArrayBuffer, byteOffset?: number, byteLength?: number): DataView; } declare var DataView: DataViewConstructor; @@ -5199,288 +5199,288 @@ declare var DataView: DataViewConstructor; * number of bytes could not be allocated an exception is raised. */ interface Int8Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int8Array; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int8Array; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; - - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int8Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int8Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Int8Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Int8Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Int8Array; + /** + * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Int8Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Int8ArrayConstructor { - readonly prototype: Int8Array; + readonly prototype: Int8Array; - new (length: number): Int8Array; + new (length: number): Int8Array; - new (array: ArrayLike): Int8Array; + new (array: ArrayLike): Int8Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int8Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int8Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int8Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int8Array; - new (array: ArrayLike | ArrayBuffer): Int8Array; + new (array: ArrayLike | ArrayBuffer): Int8Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Int8Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Int8Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Int8Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Int8Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } declare var Int8Array: Int8ArrayConstructor; @@ -5490,288 +5490,288 @@ declare var Int8Array: Int8ArrayConstructor; * requested number of bytes could not be allocated an exception is raised. */ interface Uint8Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint8Array; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint8Array; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint8Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint8Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Uint8Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Uint8Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Uint8Array; + /** + * Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Uint8Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Uint8ArrayConstructor { - readonly prototype: Uint8Array; + readonly prototype: Uint8Array; - new (length: number): Uint8Array; + new (length: number): Uint8Array; - new (array: ArrayLike): Uint8Array; + new (array: ArrayLike): Uint8Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint8Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint8Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8Array; - new (array: ArrayLike | ArrayBuffer): Uint8Array; + new (array: ArrayLike | ArrayBuffer): Uint8Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Uint8Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Uint8Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Uint8Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Uint8Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } declare var Uint8Array: Uint8ArrayConstructor; @@ -5781,288 +5781,288 @@ declare var Uint8Array: Uint8ArrayConstructor; * If the requested number of bytes could not be allocated an exception is raised. */ interface Uint8ClampedArray { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint8ClampedArray; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint8ClampedArray; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint8ClampedArray; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint8ClampedArray; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Uint8ClampedArray; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Uint8ClampedArray; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Uint8ClampedArray; + /** + * Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Uint8ClampedArray; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Uint8ClampedArrayConstructor { - readonly prototype: Uint8ClampedArray; + readonly prototype: Uint8ClampedArray; - new (length: number): Uint8ClampedArray; + new (length: number): Uint8ClampedArray; - new (array: ArrayLike): Uint8ClampedArray; + new (array: ArrayLike): Uint8ClampedArray; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray; - new (array: ArrayLike | ArrayBuffer): Uint8ClampedArray; + new (array: ArrayLike | ArrayBuffer): Uint8ClampedArray; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Uint8ClampedArray; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Uint8ClampedArray; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Uint8ClampedArray; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Uint8ClampedArray; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } declare var Uint8ClampedArray: Uint8ClampedArrayConstructor; @@ -6072,288 +6072,288 @@ declare var Uint8ClampedArray: Uint8ClampedArrayConstructor; * requested number of bytes could not be allocated an exception is raised. */ interface Int16Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int16Array; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int16Array; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int16Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int16Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Int16Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Int16Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Int16Array; + /** + * Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Int16Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Int16ArrayConstructor { - readonly prototype: Int16Array; + readonly prototype: Int16Array; - new (length: number): Int16Array; + new (length: number): Int16Array; - new (array: ArrayLike): Int16Array; + new (array: ArrayLike): Int16Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int16Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int16Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int16Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int16Array; - new (array: ArrayLike | ArrayBuffer): Int16Array; + new (array: ArrayLike | ArrayBuffer): Int16Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Int16Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Int16Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Int16Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Int16Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } declare var Int16Array: Int16ArrayConstructor; @@ -6363,288 +6363,288 @@ declare var Int16Array: Int16ArrayConstructor; * requested number of bytes could not be allocated an exception is raised. */ interface Uint16Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint16Array; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint16Array; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint16Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint16Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Uint16Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Uint16Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Uint16Array; + /** + * Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Uint16Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Uint16ArrayConstructor { - readonly prototype: Uint16Array; + readonly prototype: Uint16Array; - new (length: number): Uint16Array; + new (length: number): Uint16Array; - new (array: ArrayLike): Uint16Array; + new (array: ArrayLike): Uint16Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint16Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint16Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint16Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint16Array; - new (array: ArrayLike | ArrayBuffer): Uint16Array; + new (array: ArrayLike | ArrayBuffer): Uint16Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Uint16Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Uint16Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Uint16Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Uint16Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } declare var Uint16Array: Uint16ArrayConstructor; @@ -6654,288 +6654,288 @@ declare var Uint16Array: Uint16ArrayConstructor; * requested number of bytes could not be allocated an exception is raised. */ interface Int32Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int32Array; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int32Array; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int32Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int32Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Int32Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Int32Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Int32Array; + /** + * Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Int32Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Int32ArrayConstructor { - readonly prototype: Int32Array; + readonly prototype: Int32Array; - new (length: number): Int32Array; + new (length: number): Int32Array; - new (array: ArrayLike): Int32Array; + new (array: ArrayLike): Int32Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int32Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int32Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int32Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int32Array; - new (array: ArrayLike | ArrayBuffer): Int32Array; + new (array: ArrayLike | ArrayBuffer): Int32Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Int32Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Int32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Int32Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Int32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } declare var Int32Array: Int32ArrayConstructor; @@ -6945,288 +6945,288 @@ declare var Int32Array: Int32ArrayConstructor; * requested number of bytes could not be allocated an exception is raised. */ interface Uint32Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; - - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint32Array; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint32Array; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * The length of the array. - */ - readonly length: number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint32Array; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * The length of the array. + */ + readonly length: number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint32Array; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Uint32Array; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Uint32Array; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Gets a new Uint32Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Uint32Array; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Gets a new Uint32Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Uint32Array; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; + + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Uint32ArrayConstructor { - readonly prototype: Uint32Array; + readonly prototype: Uint32Array; - new (length: number): Uint32Array; + new (length: number): Uint32Array; - new (array: ArrayLike): Uint32Array; + new (array: ArrayLike): Uint32Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint32Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint32Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint32Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint32Array; - new (array: ArrayLike | ArrayBuffer): Uint32Array; + new (array: ArrayLike | ArrayBuffer): Uint32Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Uint32Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Uint32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Uint32Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Uint32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } declare var Uint32Array: Uint32ArrayConstructor; @@ -7236,288 +7236,288 @@ declare var Uint32Array: Uint32ArrayConstructor; * of bytes could not be allocated an exception is raised. */ interface Float32Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float32Array; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float32Array; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float32Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float32Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Float32Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Float32Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Float32Array; + /** + * Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Float32Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Float32ArrayConstructor { - readonly prototype: Float32Array; + readonly prototype: Float32Array; - new (length: number): Float32Array; + new (length: number): Float32Array; - new (array: ArrayLike): Float32Array; + new (array: ArrayLike): Float32Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Float32Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Float32Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float32Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float32Array; - new (array: ArrayLike | ArrayBuffer): Float32Array; + new (array: ArrayLike | ArrayBuffer): Float32Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Float32Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Float32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Float32Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Float32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } declare var Float32Array: Float32ArrayConstructor; @@ -7527,288 +7527,288 @@ declare var Float32Array: Float32ArrayConstructor; * number of bytes could not be allocated an exception is raised. */ interface Float64Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float64Array; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float64Array; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float64Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float64Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Float64Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Float64Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Float64Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Float64Array; + /** + * Gets a new Float64Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Float64Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Float64ArrayConstructor { - readonly prototype: Float64Array; + readonly prototype: Float64Array; - new (length: number): Float64Array; + new (length: number): Float64Array; - new (array: ArrayLike): Float64Array; + new (array: ArrayLike): Float64Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Float64Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Float64Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float64Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float64Array; - new (array: ArrayLike | ArrayBuffer): Float64Array; + new (array: ArrayLike | ArrayBuffer): Float64Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Float64Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Float64Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Float64Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Float64Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } declare var Float64Array: Float64ArrayConstructor; @@ -7818,246 +7818,246 @@ declare var Float64Array: Float64ArrayConstructor; ///////////////////////////// declare namespace Intl { - interface CollatorOptions { - usage?: "sort" | "search" | undefined; +interface CollatorOptions { + usage?: "sort" | "search" | undefined; - localeMatcher?: "lookup" | "best fit" | undefined; + localeMatcher?: "lookup" | "best fit" | undefined; - numeric?: boolean | undefined; + numeric?: boolean | undefined; - caseFirst?: "upper" | "lower" | "false" | undefined; + caseFirst?: "upper" | "lower" | "false" | undefined; - sensitivity?: "base" | "accent" | "case" | "variant" | undefined; + sensitivity?: "base" | "accent" | "case" | "variant" | undefined; - ignorePunctuation?: boolean | undefined; - } + ignorePunctuation?: boolean | undefined; +} - interface ResolvedCollatorOptions { - locale: string; +interface ResolvedCollatorOptions { + locale: string; - usage: string; + usage: string; - sensitivity: string; + sensitivity: string; - ignorePunctuation: boolean; + ignorePunctuation: boolean; - caseFirst: string; + caseFirst: string; - numeric: boolean; - } + numeric: boolean; +} - interface Collator { - compare(x: string, y: string): number; +interface Collator { + compare(x: string, y: string): number; - resolvedOptions(): ResolvedCollatorOptions; - } + resolvedOptions(): ResolvedCollatorOptions; +} - interface CollatorConstructor { - new (locales?: string | string[], options?: CollatorOptions): Collator; +interface CollatorConstructor { + new (locales?: string | string[], options?: CollatorOptions): Collator; - (locales?: string | string[], options?: CollatorOptions): Collator; + (locales?: string | string[], options?: CollatorOptions): Collator; - supportedLocalesOf(locales: string | string[], options?: CollatorOptions): string[]; - } + supportedLocalesOf(locales: string | string[], options?: CollatorOptions): string[]; +} - var Collator: CollatorConstructor; +var Collator: CollatorConstructor; - interface NumberFormatOptionsStyleRegistry { - decimal: never; +interface NumberFormatOptionsStyleRegistry { + decimal: never; - percent: never; + percent: never; - currency: never; - } + currency: never; +} - type NumberFormatOptionsStyle = keyof NumberFormatOptionsStyleRegistry; +type NumberFormatOptionsStyle = keyof NumberFormatOptionsStyleRegistry; - interface NumberFormatOptionsCurrencyDisplayRegistry { - code: never; +interface NumberFormatOptionsCurrencyDisplayRegistry { + code: never; - symbol: never; + symbol: never; - name: never; - } + name: never; +} - type NumberFormatOptionsCurrencyDisplay = keyof NumberFormatOptionsCurrencyDisplayRegistry; +type NumberFormatOptionsCurrencyDisplay = keyof NumberFormatOptionsCurrencyDisplayRegistry; - interface NumberFormatOptionsUseGroupingRegistry { - } +interface NumberFormatOptionsUseGroupingRegistry { +} - type NumberFormatOptionsUseGrouping = {} extends NumberFormatOptionsUseGroupingRegistry ? boolean : keyof NumberFormatOptionsUseGroupingRegistry | "true" | "false" | boolean; +type NumberFormatOptionsUseGrouping = {} extends NumberFormatOptionsUseGroupingRegistry ? boolean : keyof NumberFormatOptionsUseGroupingRegistry | "true" | "false" | boolean; - type ResolvedNumberFormatOptionsUseGrouping = {} extends NumberFormatOptionsUseGroupingRegistry ? boolean : keyof NumberFormatOptionsUseGroupingRegistry | false; +type ResolvedNumberFormatOptionsUseGrouping = {} extends NumberFormatOptionsUseGroupingRegistry ? boolean : keyof NumberFormatOptionsUseGroupingRegistry | false; - interface NumberFormatOptions { - localeMatcher?: "lookup" | "best fit" | undefined; +interface NumberFormatOptions { + localeMatcher?: "lookup" | "best fit" | undefined; - style?: NumberFormatOptionsStyle | undefined; + style?: NumberFormatOptionsStyle | undefined; - currency?: string | undefined; + currency?: string | undefined; - useGrouping?: NumberFormatOptionsUseGrouping | undefined; + useGrouping?: NumberFormatOptionsUseGrouping | undefined; - minimumIntegerDigits?: number | undefined; + minimumIntegerDigits?: number | undefined; - minimumFractionDigits?: number | undefined; + minimumFractionDigits?: number | undefined; - maximumFractionDigits?: number | undefined; + maximumFractionDigits?: number | undefined; - minimumSignificantDigits?: number | undefined; + minimumSignificantDigits?: number | undefined; - maximumSignificantDigits?: number | undefined; - } + maximumSignificantDigits?: number | undefined; +} - interface ResolvedNumberFormatOptions { - locale: string; +interface ResolvedNumberFormatOptions { + locale: string; - style: NumberFormatOptionsStyle; + style: NumberFormatOptionsStyle; - currency?: string; + currency?: string; - minimumIntegerDigits: number; + minimumIntegerDigits: number; - minimumFractionDigits?: number; + minimumFractionDigits?: number; - maximumFractionDigits?: number; + maximumFractionDigits?: number; - minimumSignificantDigits?: number; + minimumSignificantDigits?: number; - maximumSignificantDigits?: number; + maximumSignificantDigits?: number; - useGrouping: ResolvedNumberFormatOptionsUseGrouping; - } + useGrouping: ResolvedNumberFormatOptionsUseGrouping; +} - interface NumberFormat { - format(value: number): string; +interface NumberFormat { + format(value: number): string; - resolvedOptions(): ResolvedNumberFormatOptions; - } + resolvedOptions(): ResolvedNumberFormatOptions; +} - interface NumberFormatConstructor { - new (locales?: string | string[], options?: NumberFormatOptions): NumberFormat; +interface NumberFormatConstructor { + new (locales?: string | string[], options?: NumberFormatOptions): NumberFormat; - (locales?: string | string[], options?: NumberFormatOptions): NumberFormat; + (locales?: string | string[], options?: NumberFormatOptions): NumberFormat; - supportedLocalesOf(locales: string | string[], options?: NumberFormatOptions): string[]; + supportedLocalesOf(locales: string | string[], options?: NumberFormatOptions): string[]; - readonly prototype: NumberFormat; - } + readonly prototype: NumberFormat; +} - var NumberFormat: NumberFormatConstructor; +var NumberFormat: NumberFormatConstructor; - interface DateTimeFormatOptions { - localeMatcher?: "best fit" | "lookup" | undefined; +interface DateTimeFormatOptions { + localeMatcher?: "best fit" | "lookup" | undefined; - weekday?: "long" | "short" | "narrow" | undefined; + weekday?: "long" | "short" | "narrow" | undefined; - era?: "long" | "short" | "narrow" | undefined; + era?: "long" | "short" | "narrow" | undefined; - year?: "numeric" | "2-digit" | undefined; + year?: "numeric" | "2-digit" | undefined; - month?: "numeric" | "2-digit" | "long" | "short" | "narrow" | undefined; + month?: "numeric" | "2-digit" | "long" | "short" | "narrow" | undefined; - day?: "numeric" | "2-digit" | undefined; + day?: "numeric" | "2-digit" | undefined; - hour?: "numeric" | "2-digit" | undefined; + hour?: "numeric" | "2-digit" | undefined; - minute?: "numeric" | "2-digit" | undefined; + minute?: "numeric" | "2-digit" | undefined; - second?: "numeric" | "2-digit" | undefined; + second?: "numeric" | "2-digit" | undefined; - timeZoneName?: "short" | "long" | "shortOffset" | "longOffset" | "shortGeneric" | "longGeneric" | undefined; + timeZoneName?: "short" | "long" | "shortOffset" | "longOffset" | "shortGeneric" | "longGeneric" | undefined; - formatMatcher?: "best fit" | "basic" | undefined; + formatMatcher?: "best fit" | "basic" | undefined; - hour12?: boolean | undefined; + hour12?: boolean | undefined; - timeZone?: string | undefined; - } + timeZone?: string | undefined; +} - interface ResolvedDateTimeFormatOptions { - locale: string; +interface ResolvedDateTimeFormatOptions { + locale: string; - timeZone: string; + timeZone: string; - hour12?: boolean; + hour12?: boolean; - weekday?: string; + weekday?: string; - era?: string; + era?: string; - year?: string; + year?: string; - month?: string; + month?: string; - day?: string; + day?: string; - hour?: string; + hour?: string; - minute?: string; + minute?: string; - second?: string; + second?: string; - timeZoneName?: string; - } + timeZoneName?: string; +} - interface DateTimeFormat { - format(date?: Date | number): string; +interface DateTimeFormat { + format(date?: Date | number): string; - resolvedOptions(): ResolvedDateTimeFormatOptions; - } + resolvedOptions(): ResolvedDateTimeFormatOptions; +} - interface DateTimeFormatConstructor { - new (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat; +interface DateTimeFormatConstructor { + new (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat; - (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat; + (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat; - supportedLocalesOf(locales: string | string[], options?: DateTimeFormatOptions): string[]; + supportedLocalesOf(locales: string | string[], options?: DateTimeFormatOptions): string[]; - readonly prototype: DateTimeFormat; - } + readonly prototype: DateTimeFormat; +} - var DateTimeFormat: DateTimeFormatConstructor; +var DateTimeFormat: DateTimeFormatConstructor; } interface String { - /** - * Determines whether two strings are equivalent in the current or specified locale. - * @param that String to compare to target string - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details. - * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details. - */ - localeCompare(that: string, locales?: string | string[], options?: Intl.CollatorOptions): number; + /** + * Determines whether two strings are equivalent in the current or specified locale. + * @param that String to compare to target string + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details. + * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details. + */ + localeCompare(that: string, locales?: string | string[], options?: Intl.CollatorOptions): number; } interface Number { - /** - * Converts a number to a string by using the current or specified locale. - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; + /** + * Converts a number to a string by using the current or specified locale. + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; } interface Date { - /** - * Converts a date and time to a string by using the current or specified locale. - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; + /** + * Converts a date and time to a string by using the current or specified locale. + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; - /** - * Converts a date to a string by using the current or specified locale. - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleDateString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; + /** + * Converts a date to a string by using the current or specified locale. + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleDateString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; - /** - * Converts a time to a string by using the current or specified locale. - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleTimeString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; + /** + * Converts a time to a string by using the current or specified locale. + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleTimeString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; } diff --git a/generated/current/year/2021/index.d.ts b/generated/current/year/2021/index.d.ts index d8bdbbd..1ce6158 100644 --- a/generated/current/year/2021/index.d.ts +++ b/generated/current/year/2021/index.d.ts @@ -22,175 +22,175 @@ and limitations under the License. // lib.es2015.collection.d.ts ///////////////////////////// interface Map { - /** - * Removes all elements from the Map. - */ - clear(): void; + /** + * Removes all elements from the Map. + */ + clear(): void; - /** - * @returns true if an element in the Map existed and has been removed, or false if the element does not exist. - */ - delete(key: K): boolean; + /** + * @returns true if an element in the Map existed and has been removed, or false if the element does not exist. + */ + delete(key: K): boolean; - /** - * Executes a provided function once per each key/value pair in the Map, in insertion order. - */ - forEach(callbackfn: (value: V, key: K, map: Map) => void, thisArg?: any): void; + /** + * Executes a provided function once per each key/value pair in the Map, in insertion order. + */ + forEach(callbackfn: (value: V, key: K, map: Map) => void, thisArg?: any): void; - /** - * Returns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map. - * @returns Returns the element associated with the specified key. If no element is associated with the specified key, undefined is returned. - */ - get(key: K): V | undefined; + /** + * Returns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map. + * @returns Returns the element associated with the specified key. If no element is associated with the specified key, undefined is returned. + */ + get(key: K): V | undefined; - /** - * @returns boolean indicating whether an element with the specified key exists or not. - */ - has(key: K): boolean; + /** + * @returns boolean indicating whether an element with the specified key exists or not. + */ + has(key: K): boolean; - /** - * Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated. - */ - set(key: K, value: V): this; + /** + * Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated. + */ + set(key: K, value: V): this; - /** - * @returns the number of elements in the Map. - */ - readonly size: number; + /** + * @returns the number of elements in the Map. + */ + readonly size: number; } interface MapConstructor { - new (): Map; + new (): Map; - new (entries?: readonly (readonly [K, V])[] | null): Map; + new (entries?: readonly (readonly [K, V])[] | null): Map; - readonly prototype: Map; + readonly prototype: Map; } declare var Map: MapConstructor; interface ReadonlyMap { - forEach(callbackfn: (value: V, key: K, map: ReadonlyMap) => void, thisArg?: any): void; + forEach(callbackfn: (value: V, key: K, map: ReadonlyMap) => void, thisArg?: any): void; - get(key: K): V | undefined; + get(key: K): V | undefined; - has(key: K): boolean; + has(key: K): boolean; - readonly size: number; + readonly size: number; } interface WeakMap { - /** - * Removes the specified element from the WeakMap. - * @returns true if the element was successfully removed, or false if it was not present. - */ - delete(key: K): boolean; + /** + * Removes the specified element from the WeakMap. + * @returns true if the element was successfully removed, or false if it was not present. + */ + delete(key: K): boolean; - /** - * @returns a specified element. - */ - get(key: K): V | undefined; + /** + * @returns a specified element. + */ + get(key: K): V | undefined; - /** - * @returns a boolean indicating whether an element with the specified key exists or not. - */ - has(key: K): boolean; + /** + * @returns a boolean indicating whether an element with the specified key exists or not. + */ + has(key: K): boolean; - /** - * Adds a new element with a specified key and value. - * @param key Must be an object or symbol. - */ - set(key: K, value: V): this; + /** + * Adds a new element with a specified key and value. + * @param key Must be an object or symbol. + */ + set(key: K, value: V): this; } interface WeakMapConstructor { - new (entries?: readonly (readonly [K, V])[] | null): WeakMap; + new (entries?: readonly (readonly [K, V])[] | null): WeakMap; - readonly prototype: WeakMap; + readonly prototype: WeakMap; } declare var WeakMap: WeakMapConstructor; interface Set { - /** - * Appends a new element with a specified value to the end of the Set. - */ - add(value: T): this; + /** + * Appends a new element with a specified value to the end of the Set. + */ + add(value: T): this; - /** - * Removes all elements from the Set. - */ - clear(): void; + /** + * Removes all elements from the Set. + */ + clear(): void; - /** - * Removes a specified value from the Set. - * @returns Returns true if an element in the Set existed and has been removed, or false if the element does not exist. - */ - delete(value: T): boolean; + /** + * Removes a specified value from the Set. + * @returns Returns true if an element in the Set existed and has been removed, or false if the element does not exist. + */ + delete(value: T): boolean; - /** - * Executes a provided function once per each value in the Set object, in insertion order. - */ - forEach(callbackfn: (value: T, value2: T, set: Set) => void, thisArg?: any): void; + /** + * Executes a provided function once per each value in the Set object, in insertion order. + */ + forEach(callbackfn: (value: T, value2: T, set: Set) => void, thisArg?: any): void; - /** - * @returns a boolean indicating whether an element with the specified value exists in the Set or not. - */ - has(value: T): boolean; + /** + * @returns a boolean indicating whether an element with the specified value exists in the Set or not. + */ + has(value: T): boolean; - /** - * @returns the number of (unique) elements in the Set. - */ - readonly size: number; + /** + * @returns the number of (unique) elements in the Set. + */ + readonly size: number; } interface SetConstructor { - new (values?: readonly T[] | null): Set; + new (values?: readonly T[] | null): Set; - readonly prototype: Set; + readonly prototype: Set; } declare var Set: SetConstructor; interface ReadonlySet { - /** - * Executes a provided function once per each value in the ReadonlySet object, in insertion order. - */ - forEach(callbackfn: (value: T, value2: T, set: ReadonlySet) => void, thisArg?: any): void; + /** + * Executes a provided function once per each value in the ReadonlySet object, in insertion order. + */ + forEach(callbackfn: (value: T, value2: T, set: ReadonlySet) => void, thisArg?: any): void; - /** - * @returns a boolean indicating whether an element with the specified value exists in the Set or not. - */ - has(value: T): boolean; + /** + * @returns a boolean indicating whether an element with the specified value exists in the Set or not. + */ + has(value: T): boolean; - /** - * @returns the number of (unique) elements in the Set. - */ - readonly size: number; + /** + * @returns the number of (unique) elements in the Set. + */ + readonly size: number; } interface WeakSet { - /** - * Appends a new value to the end of the WeakSet. - */ - add(value: T): this; + /** + * Appends a new value to the end of the WeakSet. + */ + add(value: T): this; - /** - * Removes the specified element from the WeakSet. - * @returns Returns true if the element existed and has been removed, or false if the element does not exist. - */ - delete(value: T): boolean; + /** + * Removes the specified element from the WeakSet. + * @returns Returns true if the element existed and has been removed, or false if the element does not exist. + */ + delete(value: T): boolean; - /** - * @returns a boolean indicating whether a value exists in the WeakSet or not. - */ - has(value: T): boolean; + /** + * @returns a boolean indicating whether a value exists in the WeakSet or not. + */ + has(value: T): boolean; } interface WeakSetConstructor { - new (values?: readonly T[] | null): WeakSet; + new (values?: readonly T[] | null): WeakSet; - readonly prototype: WeakSet; + readonly prototype: WeakSet; } declare var WeakSet: WeakSetConstructor; @@ -199,596 +199,596 @@ declare var WeakSet: WeakSetConstructor; // lib.es2015.core.d.ts ///////////////////////////// interface Array { - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: T, index: number, obj: T[]) => value is S, thisArg?: any): S | undefined; - - find(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): T | undefined; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: T, index: number, obj: T[]) => value is S, thisArg?: any): S | undefined; + + find(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): T | undefined; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: T, start?: number, end?: number): this; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: T, start?: number, end?: number): this; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } interface ArrayConstructor { - /** - * Creates an array from an array-like object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): T[]; + /** + * Creates an array from an array-like object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): T[]; - /** - * Creates an array from an iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; + /** + * Creates an array from an iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: T[]): T[]; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: T[]): T[]; } interface DateConstructor { - new (value: number | string | Date): Date; + new (value: number | string | Date): Date; } interface Function { - /** - * Returns the name of the function. Function names are read-only and can not be changed. - */ - readonly name: string; + /** + * Returns the name of the function. Function names are read-only and can not be changed. + */ + readonly name: string; } interface Math { - /** - * Returns the number of leading zero bits in the 32-bit binary representation of a number. - * @param x A numeric expression. - */ - clz32(x: number): number; + /** + * Returns the number of leading zero bits in the 32-bit binary representation of a number. + * @param x A numeric expression. + */ + clz32(x: number): number; - /** - * Returns the result of 32-bit multiplication of two numbers. - * @param x First number - * @param y Second number - */ - imul(x: number, y: number): number; + /** + * Returns the result of 32-bit multiplication of two numbers. + * @param x First number + * @param y Second number + */ + imul(x: number, y: number): number; - /** - * Returns the sign of x, indicating whether x is positive, negative, or zero. - * @param x The numeric expression to test - */ - sign(x: number): number; + /** + * Returns the sign of x, indicating whether x is positive, negative, or zero. + * @param x The numeric expression to test + */ + sign(x: number): number; - /** - * Returns the base 10 logarithm of a number. - * @param x A numeric expression. - */ - log10(x: number): number; + /** + * Returns the base 10 logarithm of a number. + * @param x A numeric expression. + */ + log10(x: number): number; - /** - * Returns the base 2 logarithm of a number. - * @param x A numeric expression. - */ - log2(x: number): number; + /** + * Returns the base 2 logarithm of a number. + * @param x A numeric expression. + */ + log2(x: number): number; - /** - * Returns the natural logarithm of 1 + x. - * @param x A numeric expression. - */ - log1p(x: number): number; + /** + * Returns the natural logarithm of 1 + x. + * @param x A numeric expression. + */ + log1p(x: number): number; - /** - * Returns the result of (e^x - 1), which is an implementation-dependent approximation to - * subtracting 1 from the exponential function of x (e raised to the power of x, where e - * is the base of the natural logarithms). - * @param x A numeric expression. - */ - expm1(x: number): number; + /** + * Returns the result of (e^x - 1), which is an implementation-dependent approximation to + * subtracting 1 from the exponential function of x (e raised to the power of x, where e + * is the base of the natural logarithms). + * @param x A numeric expression. + */ + expm1(x: number): number; - /** - * Returns the hyperbolic cosine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - cosh(x: number): number; + /** + * Returns the hyperbolic cosine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + cosh(x: number): number; - /** - * Returns the hyperbolic sine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - sinh(x: number): number; + /** + * Returns the hyperbolic sine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + sinh(x: number): number; - /** - * Returns the hyperbolic tangent of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - tanh(x: number): number; + /** + * Returns the hyperbolic tangent of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + tanh(x: number): number; - /** - * Returns the inverse hyperbolic cosine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - acosh(x: number): number; + /** + * Returns the inverse hyperbolic cosine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + acosh(x: number): number; - /** - * Returns the inverse hyperbolic sine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - asinh(x: number): number; + /** + * Returns the inverse hyperbolic sine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + asinh(x: number): number; - /** - * Returns the inverse hyperbolic tangent of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - atanh(x: number): number; + /** + * Returns the inverse hyperbolic tangent of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + atanh(x: number): number; - /** - * Returns the square root of the sum of squares of its arguments. - * @param values Values to compute the square root for. - * If no arguments are passed, the result is +0. - * If there is only one argument, the result is the absolute value. - * If any argument is +Infinity or -Infinity, the result is +Infinity. - * If any argument is NaN, the result is NaN. - * If all arguments are either +0 or −0, the result is +0. - */ - hypot(...values: number[]): number; + /** + * Returns the square root of the sum of squares of its arguments. + * @param values Values to compute the square root for. + * If no arguments are passed, the result is +0. + * If there is only one argument, the result is the absolute value. + * If any argument is +Infinity or -Infinity, the result is +Infinity. + * If any argument is NaN, the result is NaN. + * If all arguments are either +0 or −0, the result is +0. + */ + hypot(...values: number[]): number; - /** - * Returns the integral part of the numeric expression x, removing any fractional digits. - * If x is already an integer, the result is x. - * @param x A numeric expression. - */ - trunc(x: number): number; + /** + * Returns the integral part of the numeric expression x, removing any fractional digits. + * If x is already an integer, the result is x. + * @param x A numeric expression. + */ + trunc(x: number): number; - /** - * Returns the nearest single precision float representation of a number. - * @param x A numeric expression. - */ - fround(x: number): number; + /** + * Returns the nearest single precision float representation of a number. + * @param x A numeric expression. + */ + fround(x: number): number; - /** - * Returns an implementation-dependent approximation to the cube root of number. - * @param x A numeric expression. - */ - cbrt(x: number): number; + /** + * Returns an implementation-dependent approximation to the cube root of number. + * @param x A numeric expression. + */ + cbrt(x: number): number; } interface NumberConstructor { - /** - * The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1 - * that is representable as a Number value, which is approximately: - * 2.2204460492503130808472633361816 x 10‍−‍16. - */ - readonly EPSILON: number; + /** + * The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1 + * that is representable as a Number value, which is approximately: + * 2.2204460492503130808472633361816 x 10‍−‍16. + */ + readonly EPSILON: number; - /** - * Returns true if passed value is finite. - * Unlike the global isFinite, Number.isFinite doesn't forcibly convert the parameter to a - * number. Only finite values of the type number, result in true. - * @param number A numeric value. - */ - isFinite(number: unknown): boolean; + /** + * Returns true if passed value is finite. + * Unlike the global isFinite, Number.isFinite doesn't forcibly convert the parameter to a + * number. Only finite values of the type number, result in true. + * @param number A numeric value. + */ + isFinite(number: unknown): boolean; - /** - * Returns true if the value passed is an integer, false otherwise. - * @param number A numeric value. - */ - isInteger(number: unknown): boolean; + /** + * Returns true if the value passed is an integer, false otherwise. + * @param number A numeric value. + */ + isInteger(number: unknown): boolean; - /** - * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a - * number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter - * to a number. Only values of the type number, that are also NaN, result in true. - * @param number A numeric value. - */ - isNaN(number: unknown): boolean; + /** + * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a + * number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter + * to a number. Only values of the type number, that are also NaN, result in true. + * @param number A numeric value. + */ + isNaN(number: unknown): boolean; - /** - * Returns true if the value passed is a safe integer. - * @param number A numeric value. - */ - isSafeInteger(number: unknown): boolean; + /** + * Returns true if the value passed is a safe integer. + * @param number A numeric value. + */ + isSafeInteger(number: unknown): boolean; - /** - * The value of the largest integer n such that n and n + 1 are both exactly representable as - * a Number value. - * The value of Number.MAX_SAFE_INTEGER is 9007199254740991 2^53 − 1. - */ - readonly MAX_SAFE_INTEGER: number; + /** + * The value of the largest integer n such that n and n + 1 are both exactly representable as + * a Number value. + * The value of Number.MAX_SAFE_INTEGER is 9007199254740991 2^53 − 1. + */ + readonly MAX_SAFE_INTEGER: number; - /** - * The value of the smallest integer n such that n and n − 1 are both exactly representable as - * a Number value. - * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)). - */ - readonly MIN_SAFE_INTEGER: number; + /** + * The value of the smallest integer n such that n and n − 1 are both exactly representable as + * a Number value. + * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)). + */ + readonly MIN_SAFE_INTEGER: number; - /** - * Converts a string to a floating-point number. - * @param string A string that contains a floating-point number. - */ - parseFloat(string: string): number; + /** + * Converts a string to a floating-point number. + * @param string A string that contains a floating-point number. + */ + parseFloat(string: string): number; - /** - * Converts A string to an integer. - * @param string A string to convert into a number. - * @param radix A value between 2 and 36 that specifies the base of the number in `string`. - * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. - * All other strings are considered decimal. - */ - parseInt(string: string, radix?: number): number; + /** + * Converts A string to an integer. + * @param string A string to convert into a number. + * @param radix A value between 2 and 36 that specifies the base of the number in `string`. + * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. + * All other strings are considered decimal. + */ + parseInt(string: string, radix?: number): number; } interface ObjectConstructor { - /** - * Copy the values of all of the enumerable own properties from one or more source objects to a - * target object. Returns the target object. - * @param target The target object to copy to. - * @param source The source object from which to copy properties. - */ - assign(target: T, source: U): T & U; + /** + * Copy the values of all of the enumerable own properties from one or more source objects to a + * target object. Returns the target object. + * @param target The target object to copy to. + * @param source The source object from which to copy properties. + */ + assign(target: T, source: U): T & U; - /** - * Copy the values of all of the enumerable own properties from one or more source objects to a - * target object. Returns the target object. - * @param target The target object to copy to. - * @param source1 The first source object from which to copy properties. - * @param source2 The second source object from which to copy properties. - */ - assign(target: T, source1: U, source2: V): T & U & V; + /** + * Copy the values of all of the enumerable own properties from one or more source objects to a + * target object. Returns the target object. + * @param target The target object to copy to. + * @param source1 The first source object from which to copy properties. + * @param source2 The second source object from which to copy properties. + */ + assign(target: T, source1: U, source2: V): T & U & V; - /** - * Copy the values of all of the enumerable own properties from one or more source objects to a - * target object. Returns the target object. - * @param target The target object to copy to. - * @param source1 The first source object from which to copy properties. - * @param source2 The second source object from which to copy properties. - * @param source3 The third source object from which to copy properties. - */ - assign(target: T, source1: U, source2: V, source3: W): T & U & V & W; + /** + * Copy the values of all of the enumerable own properties from one or more source objects to a + * target object. Returns the target object. + * @param target The target object to copy to. + * @param source1 The first source object from which to copy properties. + * @param source2 The second source object from which to copy properties. + * @param source3 The third source object from which to copy properties. + */ + assign(target: T, source1: U, source2: V, source3: W): T & U & V & W; - /** - * Copy the values of all of the enumerable own properties from one or more source objects to a - * target object. Returns the target object. - * @param target The target object to copy to. - * @param sources One or more source objects from which to copy properties - */ - assign(target: object, ...sources: any[]): any; + /** + * Copy the values of all of the enumerable own properties from one or more source objects to a + * target object. Returns the target object. + * @param target The target object to copy to. + * @param sources One or more source objects from which to copy properties + */ + assign(target: object, ...sources: any[]): any; - /** - * Returns an array of all symbol properties found directly on object o. - * @param o Object to retrieve the symbols from. - */ - getOwnPropertySymbols(o: any): symbol[]; + /** + * Returns an array of all symbol properties found directly on object o. + * @param o Object to retrieve the symbols from. + */ + getOwnPropertySymbols(o: any): symbol[]; - /** - * Returns the names of the enumerable string properties and methods of an object. - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - keys(o: {}): string[]; + /** + * Returns the names of the enumerable string properties and methods of an object. + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + keys(o: {}): string[]; - /** - * Returns true if the values are the same value, false otherwise. - * @param value1 The first value. - * @param value2 The second value. - */ - is(value1: any, value2: any): boolean; + /** + * Returns true if the values are the same value, false otherwise. + * @param value1 The first value. + * @param value2 The second value. + */ + is(value1: any, value2: any): boolean; - /** - * Sets the prototype of a specified object o to object proto or null. Returns the object o. - * @param o The object to change its prototype. - * @param proto The value of the new prototype or null. - */ - setPrototypeOf(o: any, proto: object | null): any; + /** + * Sets the prototype of a specified object o to object proto or null. Returns the object o. + * @param o The object to change its prototype. + * @param proto The value of the new prototype or null. + */ + setPrototypeOf(o: any, proto: object | null): any; } interface ReadonlyArray { - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: T, index: number, obj: readonly T[]) => value is S, thisArg?: any): S | undefined; - - find(predicate: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): T | undefined; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: T, index: number, obj: readonly T[]) => value is S, thisArg?: any): S | undefined; + + find(predicate: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): T | undefined; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): number; - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } interface RegExp { - /** - * Returns a string indicating the flags of the regular expression in question. This field is read-only. - * The characters in this string are sequenced and concatenated in the following order: - * - * - "g" for global - * - "i" for ignoreCase - * - "m" for multiline - * - "u" for unicode - * - "y" for sticky - * - * If no flags are set, the value is the empty string. - */ - readonly flags: string; + /** + * Returns a string indicating the flags of the regular expression in question. This field is read-only. + * The characters in this string are sequenced and concatenated in the following order: + * + * - "g" for global + * - "i" for ignoreCase + * - "m" for multiline + * - "u" for unicode + * - "y" for sticky + * + * If no flags are set, the value is the empty string. + */ + readonly flags: string; - /** - * Returns a Boolean value indicating the state of the sticky flag (y) used with a regular - * expression. Default is false. Read-only. - */ - readonly sticky: boolean; + /** + * Returns a Boolean value indicating the state of the sticky flag (y) used with a regular + * expression. Default is false. Read-only. + */ + readonly sticky: boolean; - /** - * Returns a Boolean value indicating the state of the Unicode flag (u) used with a regular - * expression. Default is false. Read-only. - */ - readonly unicode: boolean; + /** + * Returns a Boolean value indicating the state of the Unicode flag (u) used with a regular + * expression. Default is false. Read-only. + */ + readonly unicode: boolean; } interface RegExpConstructor { - new (pattern: RegExp | string, flags?: string): RegExp; + new (pattern: RegExp | string, flags?: string): RegExp; - (pattern: RegExp | string, flags?: string): RegExp; + (pattern: RegExp | string, flags?: string): RegExp; } interface String { - /** - * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point - * value of the UTF-16 encoded code point starting at the string element at position pos in - * the String resulting from converting this object to a String. - * If there is no element at that position, the result is undefined. - * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos. - */ - codePointAt(pos: number): number | undefined; + /** + * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point + * value of the UTF-16 encoded code point starting at the string element at position pos in + * the String resulting from converting this object to a String. + * If there is no element at that position, the result is undefined. + * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos. + */ + codePointAt(pos: number): number | undefined; - /** - * Returns true if searchString appears as a substring of the result of converting this - * object to a String, at one or more positions that are - * greater than or equal to position; otherwise, returns false. - * @param searchString search string - * @param position If position is undefined, 0 is assumed, so as to search all of the String. - */ - includes(searchString: string, position?: number): boolean; + /** + * Returns true if searchString appears as a substring of the result of converting this + * object to a String, at one or more positions that are + * greater than or equal to position; otherwise, returns false. + * @param searchString search string + * @param position If position is undefined, 0 is assumed, so as to search all of the String. + */ + includes(searchString: string, position?: number): boolean; - /** - * Returns true if the sequence of elements of searchString converted to a String is the - * same as the corresponding elements of this object (converted to a String) starting at - * endPosition – length(this). Otherwise returns false. - */ - endsWith(searchString: string, endPosition?: number): boolean; + /** + * Returns true if the sequence of elements of searchString converted to a String is the + * same as the corresponding elements of this object (converted to a String) starting at + * endPosition – length(this). Otherwise returns false. + */ + endsWith(searchString: string, endPosition?: number): boolean; - /** - * Returns the String value result of normalizing the string into the normalization form - * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms. - * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default - * is "NFC" - */ - normalize(form: "NFC" | "NFD" | "NFKC" | "NFKD"): string; + /** + * Returns the String value result of normalizing the string into the normalization form + * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms. + * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default + * is "NFC" + */ + normalize(form: "NFC" | "NFD" | "NFKC" | "NFKD"): string; - /** - * Returns the String value result of normalizing the string into the normalization form - * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms. - * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default - * is "NFC" - */ - normalize(form?: string): string; + /** + * Returns the String value result of normalizing the string into the normalization form + * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms. + * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default + * is "NFC" + */ + normalize(form?: string): string; - /** - * Returns a String value that is made from count copies appended together. If count is 0, - * the empty string is returned. - * @param count number of copies to append - */ - repeat(count: number): string; + /** + * Returns a String value that is made from count copies appended together. If count is 0, + * the empty string is returned. + * @param count number of copies to append + */ + repeat(count: number): string; - /** - * Returns true if the sequence of elements of searchString converted to a String is the - * same as the corresponding elements of this object (converted to a String) starting at - * position. Otherwise returns false. - */ - startsWith(searchString: string, position?: number): boolean; + /** + * Returns true if the sequence of elements of searchString converted to a String is the + * same as the corresponding elements of this object (converted to a String) starting at + * position. Otherwise returns false. + */ + startsWith(searchString: string, position?: number): boolean; } interface StringConstructor { - /** - * Return the String value whose elements are, in order, the elements in the List elements. - * If length is 0, the empty string is returned. - */ - fromCodePoint(...codePoints: number[]): string; + /** + * Return the String value whose elements are, in order, the elements in the List elements. + * If length is 0, the empty string is returned. + */ + fromCodePoint(...codePoints: number[]): string; - /** - * String.raw is usually used as a tag function of a Tagged Template String. When called as - * such, the first argument will be a well formed template call site object and the rest - * parameter will contain the substitution values. It can also be called directly, for example, - * to interleave strings and values from your own tag function, and in this case the only thing - * it needs from the first argument is the raw property. - * @param template A well-formed template string call site representation. - * @param substitutions A set of substitution values. - */ - raw(template: { raw: readonly string[] | ArrayLike; }, ...substitutions: any[]): string; + /** + * String.raw is usually used as a tag function of a Tagged Template String. When called as + * such, the first argument will be a well formed template call site object and the rest + * parameter will contain the substitution values. It can also be called directly, for example, + * to interleave strings and values from your own tag function, and in this case the only thing + * it needs from the first argument is the raw property. + * @param template A well-formed template string call site representation. + * @param substitutions A set of substitution values. + */ + raw(template: { raw: readonly string[] | ArrayLike; }, ...substitutions: any[]): string; } interface Int8Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Uint8Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Uint8ClampedArray { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Int16Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Uint16Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Int32Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Uint32Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Float32Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Float64Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } ///////////////////////////// // lib.es2015.generator.d.ts ///////////////////////////// interface Generator extends IteratorObject { - // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. - next(...[value]: [] | [TNext]): IteratorResult; + // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. + next(...[value]: [] | [TNext]): IteratorResult; - return(value: TReturn): IteratorResult; + return(value: TReturn): IteratorResult; - throw(e: any): IteratorResult; + throw(e: any): IteratorResult; - [Symbol.iterator](): Generator; + [Symbol.iterator](): Generator; } interface GeneratorFunction { - /** - * Creates a new Generator object. - * @param args A list of arguments the function accepts. - */ - new (...args: any[]): Generator; + /** + * Creates a new Generator object. + * @param args A list of arguments the function accepts. + */ + new (...args: any[]): Generator; - /** - * Creates a new Generator object. - * @param args A list of arguments the function accepts. - */ - (...args: any[]): Generator; + /** + * Creates a new Generator object. + * @param args A list of arguments the function accepts. + */ + (...args: any[]): Generator; - /** - * The length of the arguments. - */ - readonly length: number; + /** + * The length of the arguments. + */ + readonly length: number; - /** - * Returns the name of the function. - */ - readonly name: string; + /** + * Returns the name of the function. + */ + readonly name: string; - /** - * A reference to the prototype. - */ - readonly prototype: Generator; + /** + * A reference to the prototype. + */ + readonly prototype: Generator; } ///////////////////////////// // lib.es2015.iterable.d.ts ///////////////////////////// interface SymbolConstructor { - /** - * A method that returns the default iterator for an object. Called by the semantics of the - * for-of statement. - */ - readonly iterator: unique symbol; + /** + * A method that returns the default iterator for an object. Called by the semantics of the + * for-of statement. + */ + readonly iterator: unique symbol; } interface IteratorYieldResult { - done?: false; + done?: false; - value: TYield; + value: TYield; } interface IteratorReturnResult { - done: true; + done: true; - value: TReturn; + value: TReturn; } type IteratorResult = IteratorYieldResult | IteratorReturnResult; interface Iterator { - // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. - next(...[value]: [] | [TNext]): IteratorResult; + // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. + next(...[value]: [] | [TNext]): IteratorResult; - return?(value?: TReturn): IteratorResult; + return?(value?: TReturn): IteratorResult; - throw?(e?: any): IteratorResult; + throw?(e?: any): IteratorResult; } interface Iterable { - [Symbol.iterator](): Iterator; + [Symbol.iterator](): Iterator; } /** * Describes a user-defined {@link Iterator} that is also iterable. */ interface IterableIterator extends Iterator { - [Symbol.iterator](): IterableIterator; + [Symbol.iterator](): IterableIterator; } /** * Describes an {@link Iterator} produced by the runtime that inherits from the intrinsic `Iterator.prototype`. */ interface IteratorObject extends Iterator { - [Symbol.iterator](): IteratorObject; + [Symbol.iterator](): IteratorObject; } /** @@ -798,589 +798,589 @@ interface IteratorObject extends Iterator type BuiltinIteratorReturn = intrinsic; interface ArrayIterator extends IteratorObject { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; } interface Array { - /** Iterator */ - [Symbol.iterator](): ArrayIterator; + /** Iterator */ + [Symbol.iterator](): ArrayIterator; - /** - * Returns an iterable of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, T]>; + /** + * Returns an iterable of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, T]>; - /** - * Returns an iterable of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an iterable of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an iterable of values in the array - */ - values(): ArrayIterator; + /** + * Returns an iterable of values in the array + */ + values(): ArrayIterator; } interface ArrayConstructor { - /** - * Creates an array from an iterable object. - * @param iterable An iterable object to convert to an array. - */ - from(iterable: Iterable | ArrayLike): T[]; + /** + * Creates an array from an iterable object. + * @param iterable An iterable object to convert to an array. + */ + from(iterable: Iterable | ArrayLike): T[]; - /** - * Creates an array from an iterable object. - * @param iterable An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; + /** + * Creates an array from an iterable object. + * @param iterable An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } interface ReadonlyArray { - /** Iterator of values in the array. */ - [Symbol.iterator](): ArrayIterator; + /** Iterator of values in the array. */ + [Symbol.iterator](): ArrayIterator; - /** - * Returns an iterable of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, T]>; + /** + * Returns an iterable of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, T]>; - /** - * Returns an iterable of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an iterable of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an iterable of values in the array - */ - values(): ArrayIterator; + /** + * Returns an iterable of values in the array + */ + values(): ArrayIterator; } interface IArguments { - /** Iterator */ - [Symbol.iterator](): ArrayIterator; + /** Iterator */ + [Symbol.iterator](): ArrayIterator; } interface MapIterator extends IteratorObject { - [Symbol.iterator](): MapIterator; + [Symbol.iterator](): MapIterator; } interface Map { - /** Returns an iterable of entries in the map. */ - [Symbol.iterator](): MapIterator<[K, V]>; + /** Returns an iterable of entries in the map. */ + [Symbol.iterator](): MapIterator<[K, V]>; - /** - * Returns an iterable of key, value pairs for every entry in the map. - */ - entries(): MapIterator<[K, V]>; + /** + * Returns an iterable of key, value pairs for every entry in the map. + */ + entries(): MapIterator<[K, V]>; - /** - * Returns an iterable of keys in the map - */ - keys(): MapIterator; + /** + * Returns an iterable of keys in the map + */ + keys(): MapIterator; - /** - * Returns an iterable of values in the map - */ - values(): MapIterator; + /** + * Returns an iterable of values in the map + */ + values(): MapIterator; } interface ReadonlyMap { - /** Returns an iterable of entries in the map. */ - [Symbol.iterator](): MapIterator<[K, V]>; + /** Returns an iterable of entries in the map. */ + [Symbol.iterator](): MapIterator<[K, V]>; - /** - * Returns an iterable of key, value pairs for every entry in the map. - */ - entries(): MapIterator<[K, V]>; + /** + * Returns an iterable of key, value pairs for every entry in the map. + */ + entries(): MapIterator<[K, V]>; - /** - * Returns an iterable of keys in the map - */ - keys(): MapIterator; + /** + * Returns an iterable of keys in the map + */ + keys(): MapIterator; - /** - * Returns an iterable of values in the map - */ - values(): MapIterator; + /** + * Returns an iterable of values in the map + */ + values(): MapIterator; } interface MapConstructor { - new (): Map; + new (): Map; - new (iterable?: Iterable | null): Map; + new (iterable?: Iterable | null): Map; } interface WeakMap { } interface WeakMapConstructor { - new (iterable?: Iterable | null): WeakMap; + new (iterable?: Iterable | null): WeakMap; } interface SetIterator extends IteratorObject { - [Symbol.iterator](): SetIterator; + [Symbol.iterator](): SetIterator; } interface Set { - /** Iterates over values in the set. */ - [Symbol.iterator](): SetIterator; + /** Iterates over values in the set. */ + [Symbol.iterator](): SetIterator; - /** - * Returns an iterable of [v,v] pairs for every value `v` in the set. - */ - entries(): SetIterator<[T, T]>; + /** + * Returns an iterable of [v,v] pairs for every value `v` in the set. + */ + entries(): SetIterator<[T, T]>; - /** - * Despite its name, returns an iterable of the values in the set. - */ - keys(): SetIterator; + /** + * Despite its name, returns an iterable of the values in the set. + */ + keys(): SetIterator; - /** - * Returns an iterable of values in the set. - */ - values(): SetIterator; + /** + * Returns an iterable of values in the set. + */ + values(): SetIterator; } interface ReadonlySet { - /** Iterates over values in the set. */ - [Symbol.iterator](): SetIterator; + /** Iterates over values in the set. */ + [Symbol.iterator](): SetIterator; - /** - * Returns an iterable of [v,v] pairs for every value `v` in the set. - */ - entries(): SetIterator<[T, T]>; + /** + * Returns an iterable of [v,v] pairs for every value `v` in the set. + */ + entries(): SetIterator<[T, T]>; - /** - * Despite its name, returns an iterable of the values in the set. - */ - keys(): SetIterator; + /** + * Despite its name, returns an iterable of the values in the set. + */ + keys(): SetIterator; - /** - * Returns an iterable of values in the set. - */ - values(): SetIterator; + /** + * Returns an iterable of values in the set. + */ + values(): SetIterator; } interface SetConstructor { - new (iterable?: Iterable | null): Set; + new (iterable?: Iterable | null): Set; } interface WeakSet { } interface WeakSetConstructor { - new (iterable: Iterable): WeakSet; + new (iterable: Iterable): WeakSet; } interface PromiseConstructor { - /** - * Creates a Promise that is resolved with an array of results when all of the provided Promises - * resolve, or rejected when any Promise is rejected. - * @param values An iterable of Promises. - * @returns A new Promise. - */ - all(values: Iterable>): Promise[]>; + /** + * Creates a Promise that is resolved with an array of results when all of the provided Promises + * resolve, or rejected when any Promise is rejected. + * @param values An iterable of Promises. + * @returns A new Promise. + */ + all(values: Iterable>): Promise[]>; - /** - * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved - * or rejected. - * @param values An iterable of Promises. - * @returns A new Promise. - */ - race(values: Iterable>): Promise>; + /** + * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved + * or rejected. + * @param values An iterable of Promises. + * @returns A new Promise. + */ + race(values: Iterable>): Promise>; } interface StringIterator extends IteratorObject { - [Symbol.iterator](): StringIterator; + [Symbol.iterator](): StringIterator; } interface String { - /** Iterator */ - [Symbol.iterator](): StringIterator; + /** Iterator */ + [Symbol.iterator](): StringIterator; } interface Int8Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Int8ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Int8Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Int8Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int8Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int8Array; } interface Uint8Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Uint8ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Uint8Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Uint8Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8Array; } interface Uint8ClampedArray { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Uint8ClampedArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Uint8ClampedArray; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Uint8ClampedArray; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } interface Int16Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Int16ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Int16Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Int16Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int16Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int16Array; } interface Uint16Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Uint16ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Uint16Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Uint16Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint16Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint16Array; } interface Int32Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Int32ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Int32Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Int32Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int32Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int32Array; } interface Uint32Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Uint32ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Uint32Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Uint32Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint32Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint32Array; } interface Float32Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Float32ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Float32Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Float32Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Float32Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Float32Array; } interface Float64Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Float64ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Float64Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Float64Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Float64Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Float64Array; } ///////////////////////////// // lib.es2015.promise.d.ts ///////////////////////////// interface PromiseConstructor { - /** - * A reference to the prototype. - */ - readonly prototype: Promise; + /** + * A reference to the prototype. + */ + readonly prototype: Promise; - /** - * Creates a new Promise. - * @param executor A callback used to initialize the promise. This callback is passed two arguments: - * a resolve callback used to resolve the promise with a value or the result of another promise, - * and a reject callback used to reject the promise with a provided reason or error. - */ - new (executor: (resolve: (value: T | PromiseLike) => void, reject: (reason?: any) => void) => void): Promise; + /** + * Creates a new Promise. + * @param executor A callback used to initialize the promise. This callback is passed two arguments: + * a resolve callback used to resolve the promise with a value or the result of another promise, + * and a reject callback used to reject the promise with a provided reason or error. + */ + new (executor: (resolve: (value: T | PromiseLike) => void, reject: (reason?: any) => void) => void): Promise; - /** - * Creates a Promise that is resolved with an array of results when all of the provided Promises - * resolve, or rejected when any Promise is rejected. - * @param values An array of Promises. - * @returns A new Promise. - */ - all(values: T): Promise<{ -readonly [P in keyof T]: Awaited; }>; + /** + * Creates a Promise that is resolved with an array of results when all of the provided Promises + * resolve, or rejected when any Promise is rejected. + * @param values An array of Promises. + * @returns A new Promise. + */ + all(values: T): Promise<{ -readonly [P in keyof T]: Awaited; }>; - // see: lib.es2015.iterable.d.ts - // all(values: Iterable>): Promise[]>; + // see: lib.es2015.iterable.d.ts + // all(values: Iterable>): Promise[]>; - /** - * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved - * or rejected. - * @param values An array of Promises. - * @returns A new Promise. - */ - race(values: T): Promise>; + /** + * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved + * or rejected. + * @param values An array of Promises. + * @returns A new Promise. + */ + race(values: T): Promise>; - // see: lib.es2015.iterable.d.ts - // race(values: Iterable>): Promise>; + // see: lib.es2015.iterable.d.ts + // race(values: Iterable>): Promise>; - /** - * Creates a new rejected promise for the provided reason. - * @param reason The reason the promise was rejected. - * @returns A new rejected Promise. - */ - reject(reason?: any): Promise; + /** + * Creates a new rejected promise for the provided reason. + * @param reason The reason the promise was rejected. + * @returns A new rejected Promise. + */ + reject(reason?: any): Promise; - /** - * Creates a new resolved promise. - * @returns A resolved promise. - */ - resolve(): Promise; + /** + * Creates a new resolved promise. + * @returns A resolved promise. + */ + resolve(): Promise; - /** - * Creates a new resolved promise for the provided value. - * @param value A promise. - * @returns A promise whose internal state matches the provided promise. - */ - resolve(value: T): Promise>; + /** + * Creates a new resolved promise for the provided value. + * @param value A promise. + * @returns A promise whose internal state matches the provided promise. + */ + resolve(value: T): Promise>; - /** - * Creates a new resolved promise for the provided value. - * @param value A promise. - * @returns A promise whose internal state matches the provided promise. - */ - resolve(value: T | PromiseLike): Promise>; + /** + * Creates a new resolved promise for the provided value. + * @param value A promise. + * @returns A promise whose internal state matches the provided promise. + */ + resolve(value: T | PromiseLike): Promise>; } declare var Promise: PromiseConstructor; @@ -1389,113 +1389,113 @@ declare var Promise: PromiseConstructor; // lib.es2015.proxy.d.ts ///////////////////////////// interface ProxyHandler { - /** - * A trap method for a function call. - * @param target The original callable object which is being proxied. - */ - apply?(target: T, thisArg: any, argArray: any[]): any; + /** + * A trap method for a function call. + * @param target The original callable object which is being proxied. + */ + apply?(target: T, thisArg: any, argArray: any[]): any; - /** - * A trap for the `new` operator. - * @param target The original object which is being proxied. - * @param newTarget The constructor that was originally called. - */ - construct?(target: T, argArray: any[], newTarget: Function): object; + /** + * A trap for the `new` operator. + * @param target The original object which is being proxied. + * @param newTarget The constructor that was originally called. + */ + construct?(target: T, argArray: any[], newTarget: Function): object; - /** - * A trap for `Object.defineProperty()`. - * @param target The original object which is being proxied. - * @returns A `Boolean` indicating whether or not the property has been defined. - */ - defineProperty?(target: T, property: string | symbol, attributes: PropertyDescriptor): boolean; + /** + * A trap for `Object.defineProperty()`. + * @param target The original object which is being proxied. + * @returns A `Boolean` indicating whether or not the property has been defined. + */ + defineProperty?(target: T, property: string | symbol, attributes: PropertyDescriptor): boolean; - /** - * A trap for the `delete` operator. - * @param target The original object which is being proxied. - * @param p The name or `Symbol` of the property to delete. - * @returns A `Boolean` indicating whether or not the property was deleted. - */ - deleteProperty?(target: T, p: string | symbol): boolean; + /** + * A trap for the `delete` operator. + * @param target The original object which is being proxied. + * @param p The name or `Symbol` of the property to delete. + * @returns A `Boolean` indicating whether or not the property was deleted. + */ + deleteProperty?(target: T, p: string | symbol): boolean; - /** - * A trap for getting a property value. - * @param target The original object which is being proxied. - * @param p The name or `Symbol` of the property to get. - * @param receiver The proxy or an object that inherits from the proxy. - */ - get?(target: T, p: string | symbol, receiver: any): any; + /** + * A trap for getting a property value. + * @param target The original object which is being proxied. + * @param p The name or `Symbol` of the property to get. + * @param receiver The proxy or an object that inherits from the proxy. + */ + get?(target: T, p: string | symbol, receiver: any): any; - /** - * A trap for `Object.getOwnPropertyDescriptor()`. - * @param target The original object which is being proxied. - * @param p The name of the property whose description should be retrieved. - */ - getOwnPropertyDescriptor?(target: T, p: string | symbol): PropertyDescriptor | undefined; + /** + * A trap for `Object.getOwnPropertyDescriptor()`. + * @param target The original object which is being proxied. + * @param p The name of the property whose description should be retrieved. + */ + getOwnPropertyDescriptor?(target: T, p: string | symbol): PropertyDescriptor | undefined; - /** - * A trap for the `[[GetPrototypeOf]]` internal method. - * @param target The original object which is being proxied. - */ - getPrototypeOf?(target: T): object | null; + /** + * A trap for the `[[GetPrototypeOf]]` internal method. + * @param target The original object which is being proxied. + */ + getPrototypeOf?(target: T): object | null; - /** - * A trap for the `in` operator. - * @param target The original object which is being proxied. - * @param p The name or `Symbol` of the property to check for existence. - */ - has?(target: T, p: string | symbol): boolean; + /** + * A trap for the `in` operator. + * @param target The original object which is being proxied. + * @param p The name or `Symbol` of the property to check for existence. + */ + has?(target: T, p: string | symbol): boolean; - /** - * A trap for `Object.isExtensible()`. - * @param target The original object which is being proxied. - */ - isExtensible?(target: T): boolean; + /** + * A trap for `Object.isExtensible()`. + * @param target The original object which is being proxied. + */ + isExtensible?(target: T): boolean; - /** - * A trap for `Reflect.ownKeys()`. - * @param target The original object which is being proxied. - */ - ownKeys?(target: T): ArrayLike; + /** + * A trap for `Reflect.ownKeys()`. + * @param target The original object which is being proxied. + */ + ownKeys?(target: T): ArrayLike; - /** - * A trap for `Object.preventExtensions()`. - * @param target The original object which is being proxied. - */ - preventExtensions?(target: T): boolean; + /** + * A trap for `Object.preventExtensions()`. + * @param target The original object which is being proxied. + */ + preventExtensions?(target: T): boolean; - /** - * A trap for setting a property value. - * @param target The original object which is being proxied. - * @param p The name or `Symbol` of the property to set. - * @param receiver The object to which the assignment was originally directed. - * @returns A `Boolean` indicating whether or not the property was set. - */ - set?(target: T, p: string | symbol, newValue: any, receiver: any): boolean; + /** + * A trap for setting a property value. + * @param target The original object which is being proxied. + * @param p The name or `Symbol` of the property to set. + * @param receiver The object to which the assignment was originally directed. + * @returns A `Boolean` indicating whether or not the property was set. + */ + set?(target: T, p: string | symbol, newValue: any, receiver: any): boolean; - /** - * A trap for `Object.setPrototypeOf()`. - * @param target The original object which is being proxied. - * @param newPrototype The object's new prototype or `null`. - */ - setPrototypeOf?(target: T, v: object | null): boolean; + /** + * A trap for `Object.setPrototypeOf()`. + * @param target The original object which is being proxied. + * @param newPrototype The object's new prototype or `null`. + */ + setPrototypeOf?(target: T, v: object | null): boolean; } interface ProxyConstructor { - /** - * Creates a revocable Proxy object. - * @param target A target object to wrap with Proxy. - * @param handler An object whose properties define the behavior of Proxy when an operation is attempted on it. - */ - revocable(target: T, handler: ProxyHandler): { proxy: T; revoke: () => void; }; + /** + * Creates a revocable Proxy object. + * @param target A target object to wrap with Proxy. + * @param handler An object whose properties define the behavior of Proxy when an operation is attempted on it. + */ + revocable(target: T, handler: ProxyHandler): { proxy: T; revoke: () => void; }; - /** - * Creates a Proxy object. The Proxy object allows you to create an object that can be used in place of the - * original object, but which may redefine fundamental Object operations like getting, setting, and defining - * properties. Proxy objects are commonly used to log property accesses, validate, format, or sanitize inputs. - * @param target A target object to wrap with Proxy. - * @param handler An object whose properties define the behavior of Proxy when an operation is attempted on it. - */ - new (target: T, handler: ProxyHandler): T; + /** + * Creates a Proxy object. The Proxy object allows you to create an object that can be used in place of the + * original object, but which may redefine fundamental Object operations like getting, setting, and defining + * properties. Proxy objects are commonly used to log property accesses, validate, format, or sanitize inputs. + * @param target A target object to wrap with Proxy. + * @param handler An object whose properties define the behavior of Proxy when an operation is attempted on it. + */ + new (target: T, handler: ProxyHandler): T; } declare var Proxy: ProxyConstructor; @@ -1504,163 +1504,163 @@ declare var Proxy: ProxyConstructor; // lib.es2015.reflect.d.ts ///////////////////////////// declare namespace Reflect { - /** - * Calls the function with the specified object as the this value - * and the elements of specified array as the arguments. - * @param target The function to call. - * @param thisArgument The object to be used as the this object. - * @param argumentsList An array of argument values to be passed to the function. - */ - function apply( - target: (this: T, ...args: A) => R, - thisArgument: T, - argumentsList: Readonly, - ): R; - - function apply(target: Function, thisArgument: any, argumentsList: ArrayLike): any; - - /** - * Constructs the target with the elements of specified array as the arguments - * and the specified constructor as the `new.target` value. - * @param target The constructor to invoke. - * @param argumentsList An array of argument values to be passed to the constructor. - * @param newTarget The constructor to be used as the `new.target` object. - */ - function construct( - target: new (...args: A) => R, - argumentsList: Readonly, - newTarget?: new (...args: any) => any, - ): R; - - function construct(target: Function, argumentsList: ArrayLike, newTarget?: Function): any; +/** + * Calls the function with the specified object as the this value + * and the elements of specified array as the arguments. + * @param target The function to call. + * @param thisArgument The object to be used as the this object. + * @param argumentsList An array of argument values to be passed to the function. + */ + function apply( + target: (this: T, ...args: A) => R, + thisArgument: T, + argumentsList: Readonly, + ): R; + +function apply(target: Function, thisArgument: any, argumentsList: ArrayLike): any; - /** - * Adds a property to an object, or modifies attributes of an existing property. - * @param target Object on which to add or modify the property. This can be a native JavaScript object - * (that is, a user-defined object or a built in object) or a DOM object. - * @param propertyKey The property name. - * @param attributes Descriptor for the property. It can be for a data property or an accessor property. - */ - function defineProperty(target: object, propertyKey: PropertyKey, attributes: PropertyDescriptor & ThisType): boolean; +/** + * Constructs the target with the elements of specified array as the arguments + * and the specified constructor as the `new.target` value. + * @param target The constructor to invoke. + * @param argumentsList An array of argument values to be passed to the constructor. + * @param newTarget The constructor to be used as the `new.target` object. + */ + function construct( + target: new (...args: A) => R, + argumentsList: Readonly, + newTarget?: new (...args: any) => any, + ): R; + +function construct(target: Function, argumentsList: ArrayLike, newTarget?: Function): any; - /** - * Removes a property from an object, equivalent to `delete target[propertyKey]`, - * except it won't throw if `target[propertyKey]` is non-configurable. - * @param target Object from which to remove the own property. - * @param propertyKey The property name. - */ - function deleteProperty(target: object, propertyKey: PropertyKey): boolean; +/** + * Adds a property to an object, or modifies attributes of an existing property. + * @param target Object on which to add or modify the property. This can be a native JavaScript object + * (that is, a user-defined object or a built in object) or a DOM object. + * @param propertyKey The property name. + * @param attributes Descriptor for the property. It can be for a data property or an accessor property. + */ + function defineProperty(target: object, propertyKey: PropertyKey, attributes: PropertyDescriptor & ThisType): boolean; - /** - * Gets the property of target, equivalent to `target[propertyKey]` when `receiver === target`. - * @param target Object that contains the property on itself or in its prototype chain. - * @param propertyKey The property name. - * @param receiver The reference to use as the `this` value in the getter function, - * if `target[propertyKey]` is an accessor property. - */ - function get( - target: T, - propertyKey: P, - receiver?: unknown, - ): P extends keyof T ? T[P] : any; +/** + * Removes a property from an object, equivalent to `delete target[propertyKey]`, + * except it won't throw if `target[propertyKey]` is non-configurable. + * @param target Object from which to remove the own property. + * @param propertyKey The property name. + */ + function deleteProperty(target: object, propertyKey: PropertyKey): boolean; - /** - * Gets the own property descriptor of the specified object. - * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype. - * @param target Object that contains the property. - * @param propertyKey The property name. - */ - function getOwnPropertyDescriptor( - target: T, - propertyKey: P, - ): TypedPropertyDescriptor

| undefined; +/** + * Gets the property of target, equivalent to `target[propertyKey]` when `receiver === target`. + * @param target Object that contains the property on itself or in its prototype chain. + * @param propertyKey The property name. + * @param receiver The reference to use as the `this` value in the getter function, + * if `target[propertyKey]` is an accessor property. + */ + function get( + target: T, + propertyKey: P, + receiver?: unknown, + ): P extends keyof T ? T[P] : any; - /** - * Returns the prototype of an object. - * @param target The object that references the prototype. - */ - function getPrototypeOf(target: object): object | null; +/** + * Gets the own property descriptor of the specified object. + * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype. + * @param target Object that contains the property. + * @param propertyKey The property name. + */ + function getOwnPropertyDescriptor( + target: T, + propertyKey: P, + ): TypedPropertyDescriptor

| undefined; - /** - * Equivalent to `propertyKey in target`. - * @param target Object that contains the property on itself or in its prototype chain. - * @param propertyKey Name of the property. - */ - function has(target: object, propertyKey: PropertyKey): boolean; +/** + * Returns the prototype of an object. + * @param target The object that references the prototype. + */ + function getPrototypeOf(target: object): object | null; - /** - * Returns a value that indicates whether new properties can be added to an object. - * @param target Object to test. - */ - function isExtensible(target: object): boolean; +/** + * Equivalent to `propertyKey in target`. + * @param target Object that contains the property on itself or in its prototype chain. + * @param propertyKey Name of the property. + */ + function has(target: object, propertyKey: PropertyKey): boolean; - /** - * Returns the string and symbol keys of the own properties of an object. The own properties of an object - * are those that are defined directly on that object, and are not inherited from the object's prototype. - * @param target Object that contains the own properties. - */ - function ownKeys(target: object): (string | symbol)[]; +/** + * Returns a value that indicates whether new properties can be added to an object. + * @param target Object to test. + */ + function isExtensible(target: object): boolean; - /** - * Prevents the addition of new properties to an object. - * @param target Object to make non-extensible. - * @return Whether the object has been made non-extensible. - */ - function preventExtensions(target: object): boolean; +/** + * Returns the string and symbol keys of the own properties of an object. The own properties of an object + * are those that are defined directly on that object, and are not inherited from the object's prototype. + * @param target Object that contains the own properties. + */ + function ownKeys(target: object): (string | symbol)[]; - /** - * Sets the property of target, equivalent to `target[propertyKey] = value` when `receiver === target`. - * @param target Object that contains the property on itself or in its prototype chain. - * @param propertyKey Name of the property. - * @param receiver The reference to use as the `this` value in the setter function, - * if `target[propertyKey]` is an accessor property. - */ - function set( - target: T, - propertyKey: P, - value: P extends keyof T ? T[P] : any, - receiver?: any, - ): boolean; +/** + * Prevents the addition of new properties to an object. + * @param target Object to make non-extensible. + * @return Whether the object has been made non-extensible. + */ + function preventExtensions(target: object): boolean; - function set(target: object, propertyKey: PropertyKey, value: any, receiver?: any): boolean; +/** + * Sets the property of target, equivalent to `target[propertyKey] = value` when `receiver === target`. + * @param target Object that contains the property on itself or in its prototype chain. + * @param propertyKey Name of the property. + * @param receiver The reference to use as the `this` value in the setter function, + * if `target[propertyKey]` is an accessor property. + */ + function set( + target: T, + propertyKey: P, + value: P extends keyof T ? T[P] : any, + receiver?: any, + ): boolean; + +function set(target: object, propertyKey: PropertyKey, value: any, receiver?: any): boolean; - /** - * Sets the prototype of a specified object o to object proto or null. - * @param target The object to change its prototype. - * @param proto The value of the new prototype or null. - * @return Whether setting the prototype was successful. - */ - function setPrototypeOf(target: object, proto: object | null): boolean; +/** + * Sets the prototype of a specified object o to object proto or null. + * @param target The object to change its prototype. + * @param proto The value of the new prototype or null. + * @return Whether setting the prototype was successful. + */ + function setPrototypeOf(target: object, proto: object | null): boolean; } ///////////////////////////// // lib.es2015.symbol.d.ts ///////////////////////////// interface SymbolConstructor { - /** - * A reference to the prototype. - */ - readonly prototype: Symbol; + /** + * A reference to the prototype. + */ + readonly prototype: Symbol; - /** - * Returns a new unique Symbol value. - * @param description Description of the new Symbol object. - */ - (description?: string | number): symbol; + /** + * Returns a new unique Symbol value. + * @param description Description of the new Symbol object. + */ + (description?: string | number): symbol; - /** - * Returns a Symbol object from the global symbol registry matching the given key if found. - * Otherwise, returns a new symbol with this key. - * @param key key to search for. - */ - for(key: string): symbol; + /** + * Returns a Symbol object from the global symbol registry matching the given key if found. + * Otherwise, returns a new symbol with this key. + * @param key key to search for. + */ + for(key: string): symbol; - /** - * Returns a key from the global symbol registry matching the given Symbol if found. - * Otherwise, returns undefined. - * @param sym Symbol to find the key for. - */ - keyFor(sym: symbol): string | undefined; + /** + * Returns a key from the global symbol registry matching the given Symbol if found. + * Otherwise, returns undefined. + * @param sym Symbol to find the key for. + */ + keyFor(sym: symbol): string | undefined; } declare var Symbol: SymbolConstructor; @@ -1669,590 +1669,590 @@ declare var Symbol: SymbolConstructor; // lib.es2015.symbol.wellknown.d.ts ///////////////////////////// interface SymbolConstructor { - /** - * A method that determines if a constructor object recognizes an object as one of the - * constructor’s instances. Called by the semantics of the instanceof operator. - */ - readonly hasInstance: unique symbol; + /** + * A method that determines if a constructor object recognizes an object as one of the + * constructor’s instances. Called by the semantics of the instanceof operator. + */ + readonly hasInstance: unique symbol; - /** - * A Boolean value that if true indicates that an object should flatten to its array elements - * by Array.prototype.concat. - */ - readonly isConcatSpreadable: unique symbol; + /** + * A Boolean value that if true indicates that an object should flatten to its array elements + * by Array.prototype.concat. + */ + readonly isConcatSpreadable: unique symbol; - /** - * A regular expression method that matches the regular expression against a string. Called - * by the String.prototype.match method. - */ - readonly match: unique symbol; + /** + * A regular expression method that matches the regular expression against a string. Called + * by the String.prototype.match method. + */ + readonly match: unique symbol; - /** - * A regular expression method that replaces matched substrings of a string. Called by the - * String.prototype.replace method. - */ - readonly replace: unique symbol; + /** + * A regular expression method that replaces matched substrings of a string. Called by the + * String.prototype.replace method. + */ + readonly replace: unique symbol; - /** - * A regular expression method that returns the index within a string that matches the - * regular expression. Called by the String.prototype.search method. - */ - readonly search: unique symbol; + /** + * A regular expression method that returns the index within a string that matches the + * regular expression. Called by the String.prototype.search method. + */ + readonly search: unique symbol; - /** - * A function valued property that is the constructor function that is used to create - * derived objects. - */ - readonly species: unique symbol; + /** + * A function valued property that is the constructor function that is used to create + * derived objects. + */ + readonly species: unique symbol; - /** - * A regular expression method that splits a string at the indices that match the regular - * expression. Called by the String.prototype.split method. - */ - readonly split: unique symbol; + /** + * A regular expression method that splits a string at the indices that match the regular + * expression. Called by the String.prototype.split method. + */ + readonly split: unique symbol; - /** - * A method that converts an object to a corresponding primitive value. - * Called by the ToPrimitive abstract operation. - */ - readonly toPrimitive: unique symbol; + /** + * A method that converts an object to a corresponding primitive value. + * Called by the ToPrimitive abstract operation. + */ + readonly toPrimitive: unique symbol; - /** - * A String value that is used in the creation of the default string description of an object. - * Called by the built-in method Object.prototype.toString. - */ - readonly toStringTag: unique symbol; + /** + * A String value that is used in the creation of the default string description of an object. + * Called by the built-in method Object.prototype.toString. + */ + readonly toStringTag: unique symbol; - /** - * An Object whose truthy properties are properties that are excluded from the 'with' - * environment bindings of the associated objects. - */ - readonly unscopables: unique symbol; + /** + * An Object whose truthy properties are properties that are excluded from the 'with' + * environment bindings of the associated objects. + */ + readonly unscopables: unique symbol; } interface Symbol { - /** - * Converts a Symbol object to a symbol. - */ - [Symbol.toPrimitive](hint: string): symbol; + /** + * Converts a Symbol object to a symbol. + */ + [Symbol.toPrimitive](hint: string): symbol; } interface Array { - /** - * Is an object whose properties have the value 'true' - * when they will be absent when used in a 'with' statement. - */ - readonly [Symbol.unscopables]: { - [K in keyof any[]]?: boolean; - }; + /** + * Is an object whose properties have the value 'true' + * when they will be absent when used in a 'with' statement. + */ + readonly [Symbol.unscopables]: { + [K in keyof any[]]?: boolean; + }; } interface ReadonlyArray { - /** - * Is an object whose properties have the value 'true' - * when they will be absent when used in a 'with' statement. - */ - readonly [Symbol.unscopables]: { - [K in keyof readonly any[]]?: boolean; - }; + /** + * Is an object whose properties have the value 'true' + * when they will be absent when used in a 'with' statement. + */ + readonly [Symbol.unscopables]: { + [K in keyof readonly any[]]?: boolean; + }; } interface Date { - /** - * Converts a Date object to a string. - */ - [Symbol.toPrimitive](hint: "default"): string; + /** + * Converts a Date object to a string. + */ + [Symbol.toPrimitive](hint: "default"): string; - /** - * Converts a Date object to a string. - */ - [Symbol.toPrimitive](hint: "string"): string; + /** + * Converts a Date object to a string. + */ + [Symbol.toPrimitive](hint: "string"): string; - /** - * Converts a Date object to a number. - */ - [Symbol.toPrimitive](hint: "number"): number; + /** + * Converts a Date object to a number. + */ + [Symbol.toPrimitive](hint: "number"): number; - /** - * Converts a Date object to a string or number. - * - * @param hint The strings "number", "string", or "default" to specify what primitive to return. - * - * @throws {TypeError} If 'hint' was given something other than "number", "string", or "default". - * @returns A number if 'hint' was "number", a string if 'hint' was "string" or "default". - */ - [Symbol.toPrimitive](hint: string): string | number; + /** + * Converts a Date object to a string or number. + * + * @param hint The strings "number", "string", or "default" to specify what primitive to return. + * + * @throws {TypeError} If 'hint' was given something other than "number", "string", or "default". + * @returns A number if 'hint' was "number", a string if 'hint' was "string" or "default". + */ + [Symbol.toPrimitive](hint: string): string | number; } interface Map { - readonly [Symbol.toStringTag]: string; + readonly [Symbol.toStringTag]: string; } interface WeakMap { - readonly [Symbol.toStringTag]: string; + readonly [Symbol.toStringTag]: string; } interface Set { - readonly [Symbol.toStringTag]: string; + readonly [Symbol.toStringTag]: string; } interface WeakSet { - readonly [Symbol.toStringTag]: string; + readonly [Symbol.toStringTag]: string; } interface Function { - /** - * Determines whether the given value inherits from this function if this function was used - * as a constructor function. - * - * A constructor function can control which objects are recognized as its instances by - * 'instanceof' by overriding this method. - */ - [Symbol.hasInstance](value: any): boolean; + /** + * Determines whether the given value inherits from this function if this function was used + * as a constructor function. + * + * A constructor function can control which objects are recognized as its instances by + * 'instanceof' by overriding this method. + */ + [Symbol.hasInstance](value: any): boolean; } interface GeneratorFunction { - readonly [Symbol.toStringTag]: string; + readonly [Symbol.toStringTag]: string; } interface PromiseConstructor { - readonly [Symbol.species]: PromiseConstructor; + readonly [Symbol.species]: PromiseConstructor; } interface RegExp { - /** - * Matches a string with this regular expression, and returns an array containing the results of - * that search. - * @param string A string to search within. - */ - [Symbol.match](string: string): RegExpMatchArray | null; + /** + * Matches a string with this regular expression, and returns an array containing the results of + * that search. + * @param string A string to search within. + */ + [Symbol.match](string: string): RegExpMatchArray | null; - /** - * Replaces text in a string, using this regular expression. - * @param string A String object or string literal whose contents matching against - * this regular expression will be replaced - * @param replaceValue A String object or string literal containing the text to replace for every - * successful match of this regular expression. - */ - [Symbol.replace](string: string, replaceValue: string): string; + /** + * Replaces text in a string, using this regular expression. + * @param string A String object or string literal whose contents matching against + * this regular expression will be replaced + * @param replaceValue A String object or string literal containing the text to replace for every + * successful match of this regular expression. + */ + [Symbol.replace](string: string, replaceValue: string): string; - /** - * Replaces text in a string, using this regular expression. - * @param string A String object or string literal whose contents matching against - * this regular expression will be replaced - * @param replacer A function that returns the replacement text. - */ - [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; + /** + * Replaces text in a string, using this regular expression. + * @param string A String object or string literal whose contents matching against + * this regular expression will be replaced + * @param replacer A function that returns the replacement text. + */ + [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; - /** - * Finds the position beginning first substring match in a regular expression search - * using this regular expression. - * - * @param string The string to search within. - */ - [Symbol.search](string: string): number; + /** + * Finds the position beginning first substring match in a regular expression search + * using this regular expression. + * + * @param string The string to search within. + */ + [Symbol.search](string: string): number; - /** - * Returns an array of substrings that were delimited by strings in the original input that - * match against this regular expression. - * - * If the regular expression contains capturing parentheses, then each time this - * regular expression matches, the results (including any undefined results) of the - * capturing parentheses are spliced. - * - * @param string string value to split - * @param limit if not undefined, the output array is truncated so that it contains no more - * than 'limit' elements. - */ - [Symbol.split](string: string, limit?: number): string[]; + /** + * Returns an array of substrings that were delimited by strings in the original input that + * match against this regular expression. + * + * If the regular expression contains capturing parentheses, then each time this + * regular expression matches, the results (including any undefined results) of the + * capturing parentheses are spliced. + * + * @param string string value to split + * @param limit if not undefined, the output array is truncated so that it contains no more + * than 'limit' elements. + */ + [Symbol.split](string: string, limit?: number): string[]; } interface RegExpConstructor { - readonly [Symbol.species]: RegExpConstructor; + readonly [Symbol.species]: RegExpConstructor; } interface String { - /** - * Matches a string or an object that supports being matched against, and returns an array - * containing the results of that search, or null if no matches are found. - * @param matcher An object that supports being matched against. - */ - match(matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null; + /** + * Matches a string or an object that supports being matched against, and returns an array + * containing the results of that search, or null if no matches are found. + * @param matcher An object that supports being matched against. + */ + match(matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null; - /** - * Passes a string and {@linkcode replaceValue} to the `[Symbol.replace]` method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. - * @param searchValue An object that supports searching for and replacing matches within a string. - * @param replaceValue The replacement text. - */ - replace(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string; + /** + * Passes a string and {@linkcode replaceValue} to the `[Symbol.replace]` method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. + * @param searchValue An object that supports searching for and replacing matches within a string. + * @param replaceValue The replacement text. + */ + replace(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string; - /** - * Replaces text in a string, using an object that supports replacement within a string. - * @param searchValue A object can search for and replace matches within a string. - * @param replacer A function that returns the replacement text. - */ - replace(searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string; + /** + * Replaces text in a string, using an object that supports replacement within a string. + * @param searchValue A object can search for and replace matches within a string. + * @param replacer A function that returns the replacement text. + */ + replace(searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string; - /** - * Finds the first substring match in a regular expression search. - * @param searcher An object which supports searching within a string. - */ - search(searcher: { [Symbol.search](string: string): number; }): number; + /** + * Finds the first substring match in a regular expression search. + * @param searcher An object which supports searching within a string. + */ + search(searcher: { [Symbol.search](string: string): number; }): number; - /** - * Split a string into substrings using the specified separator and return them as an array. - * @param splitter An object that can split a string. - * @param limit A value used to limit the number of elements returned in the array. - */ - split(splitter: { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number): string[]; + /** + * Split a string into substrings using the specified separator and return them as an array. + * @param splitter An object that can split a string. + * @param limit A value used to limit the number of elements returned in the array. + */ + split(splitter: { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number): string[]; } interface ArrayConstructor { - readonly [Symbol.species]: ArrayConstructor; + readonly [Symbol.species]: ArrayConstructor; } interface MapConstructor { - readonly [Symbol.species]: MapConstructor; + readonly [Symbol.species]: MapConstructor; } interface SetConstructor { - readonly [Symbol.species]: SetConstructor; + readonly [Symbol.species]: SetConstructor; } interface ArrayBufferConstructor { - readonly [Symbol.species]: ArrayBufferConstructor; + readonly [Symbol.species]: ArrayBufferConstructor; } ///////////////////////////// // lib.es2016.array.include.d.ts ///////////////////////////// interface Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: T, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: T, fromIndex?: number): boolean; } interface ReadonlyArray { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: T, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: T, fromIndex?: number): boolean; } interface Int8Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Uint8Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Uint8ClampedArray { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Int16Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Uint16Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Int32Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Uint32Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Float32Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Float64Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } ///////////////////////////// // lib.es2016.intl.d.ts ///////////////////////////// declare namespace Intl { - /** - * The `Intl.getCanonicalLocales()` method returns an array containing - * the canonical locale names. Duplicates will be omitted and elements - * will be validated as structurally valid language tags. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/getCanonicalLocales) - * - * @param locale A list of String values for which to get the canonical locale names - * @returns An array containing the canonical and validated locale names. - */ - function getCanonicalLocales(locale?: string | readonly string[]): string[]; +/** + * The `Intl.getCanonicalLocales()` method returns an array containing + * the canonical locale names. Duplicates will be omitted and elements + * will be validated as structurally valid language tags. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/getCanonicalLocales) + * + * @param locale A list of String values for which to get the canonical locale names + * @returns An array containing the canonical and validated locale names. + */ + function getCanonicalLocales(locale?: string | readonly string[]): string[]; } ///////////////////////////// // lib.es2017.date.d.ts ///////////////////////////// interface DateConstructor { - /** - * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. - * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. - * @param monthIndex The month as a number between 0 and 11 (January to December). - * @param date The date as a number between 1 and 31. - * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. - * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. - * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. - * @param ms A number from 0 to 999 that specifies the milliseconds. - */ - UTC(year: number, monthIndex?: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; + /** + * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. + * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. + * @param monthIndex The month as a number between 0 and 11 (January to December). + * @param date The date as a number between 1 and 31. + * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. + * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. + * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. + * @param ms A number from 0 to 999 that specifies the milliseconds. + */ + UTC(year: number, monthIndex?: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; } ///////////////////////////// // lib.es2017.intl.d.ts ///////////////////////////// declare namespace Intl { - interface DateTimeFormatPartTypesRegistry { - day: any; +interface DateTimeFormatPartTypesRegistry { + day: any; - dayPeriod: any; + dayPeriod: any; - era: any; + era: any; - hour: any; + hour: any; - literal: any; + literal: any; - minute: any; + minute: any; - month: any; + month: any; - second: any; + second: any; - timeZoneName: any; + timeZoneName: any; - weekday: any; + weekday: any; - year: any; - } + year: any; +} - type DateTimeFormatPartTypes = keyof DateTimeFormatPartTypesRegistry; +type DateTimeFormatPartTypes = keyof DateTimeFormatPartTypesRegistry; - interface DateTimeFormatPart { - type: DateTimeFormatPartTypes; +interface DateTimeFormatPart { + type: DateTimeFormatPartTypes; - value: string; - } + value: string; +} - interface DateTimeFormat { - formatToParts(date?: Date | number): DateTimeFormatPart[]; - } +interface DateTimeFormat { + formatToParts(date?: Date | number): DateTimeFormatPart[]; +} } ///////////////////////////// // lib.es2017.object.d.ts ///////////////////////////// interface ObjectConstructor { - /** - * Returns an array of values of the enumerable own properties of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - values(o: { [s: string]: T; } | ArrayLike): T[]; + /** + * Returns an array of values of the enumerable own properties of an object + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + values(o: { [s: string]: T; } | ArrayLike): T[]; - /** - * Returns an array of values of the enumerable own properties of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - values(o: {}): any[]; + /** + * Returns an array of values of the enumerable own properties of an object + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + values(o: {}): any[]; - /** - * Returns an array of key/values of the enumerable own properties of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - entries(o: { [s: string]: T; } | ArrayLike): [string, T][]; + /** + * Returns an array of key/values of the enumerable own properties of an object + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + entries(o: { [s: string]: T; } | ArrayLike): [string, T][]; - /** - * Returns an array of key/values of the enumerable own properties of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - entries(o: {}): [string, any][]; + /** + * Returns an array of key/values of the enumerable own properties of an object + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + entries(o: {}): [string, any][]; - /** - * Returns an object containing all own property descriptors of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - getOwnPropertyDescriptors(o: T): { [P in keyof T]: TypedPropertyDescriptor; } & { [x: string]: PropertyDescriptor; }; + /** + * Returns an object containing all own property descriptors of an object + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + getOwnPropertyDescriptors(o: T): { [P in keyof T]: TypedPropertyDescriptor; } & { [x: string]: PropertyDescriptor; }; } ///////////////////////////// // lib.es2017.sharedmemory.d.ts ///////////////////////////// interface SharedArrayBuffer { - /** - * Read-only. The length of the ArrayBuffer (in bytes). - */ - readonly byteLength: number; + /** + * Read-only. The length of the ArrayBuffer (in bytes). + */ + readonly byteLength: number; - /** - * Returns a section of an SharedArrayBuffer. - */ - slice(begin?: number, end?: number): SharedArrayBuffer; + /** + * Returns a section of an SharedArrayBuffer. + */ + slice(begin?: number, end?: number): SharedArrayBuffer; - readonly [Symbol.toStringTag]: "SharedArrayBuffer"; + readonly [Symbol.toStringTag]: "SharedArrayBuffer"; } interface SharedArrayBufferConstructor { - readonly prototype: SharedArrayBuffer; + readonly prototype: SharedArrayBuffer; - new (byteLength?: number): SharedArrayBuffer; + new (byteLength?: number): SharedArrayBuffer; - readonly [Symbol.species]: SharedArrayBufferConstructor; + readonly [Symbol.species]: SharedArrayBufferConstructor; } declare var SharedArrayBuffer: SharedArrayBufferConstructor; interface ArrayBufferTypes { - SharedArrayBuffer: SharedArrayBuffer; + SharedArrayBuffer: SharedArrayBuffer; } interface Atomics { - /** - * Adds a value to the value at the given position in the array, returning the original value. - * Until this atomic operation completes, any other read or write operation against the array - * will block. - */ - add(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + /** + * Adds a value to the value at the given position in the array, returning the original value. + * Until this atomic operation completes, any other read or write operation against the array + * will block. + */ + add(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - /** - * Stores the bitwise AND of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or - * write operation against the array will block. - */ - and(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + /** + * Stores the bitwise AND of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or + * write operation against the array will block. + */ + and(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - /** - * Replaces the value at the given position in the array if the original value equals the given - * expected value, returning the original value. Until this atomic operation completes, any - * other read or write operation against the array will block. - */ - compareExchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, expectedValue: number, replacementValue: number): number; + /** + * Replaces the value at the given position in the array if the original value equals the given + * expected value, returning the original value. Until this atomic operation completes, any + * other read or write operation against the array will block. + */ + compareExchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, expectedValue: number, replacementValue: number): number; - /** - * Replaces the value at the given position in the array, returning the original value. Until - * this atomic operation completes, any other read or write operation against the array will - * block. - */ - exchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + /** + * Replaces the value at the given position in the array, returning the original value. Until + * this atomic operation completes, any other read or write operation against the array will + * block. + */ + exchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - /** - * Returns a value indicating whether high-performance algorithms can use atomic operations - * (`true`) or must use locks (`false`) for the given number of bytes-per-element of a typed - * array. - */ - isLockFree(size: number): boolean; + /** + * Returns a value indicating whether high-performance algorithms can use atomic operations + * (`true`) or must use locks (`false`) for the given number of bytes-per-element of a typed + * array. + */ + isLockFree(size: number): boolean; - /** - * Returns the value at the given position in the array. Until this atomic operation completes, - * any other read or write operation against the array will block. - */ - load(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number): number; + /** + * Returns the value at the given position in the array. Until this atomic operation completes, + * any other read or write operation against the array will block. + */ + load(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number): number; - /** - * Stores the bitwise OR of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or write - * operation against the array will block. - */ - or(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + /** + * Stores the bitwise OR of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or write + * operation against the array will block. + */ + or(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - /** - * Stores a value at the given position in the array, returning the new value. Until this - * atomic operation completes, any other read or write operation against the array will block. - */ - store(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + /** + * Stores a value at the given position in the array, returning the new value. Until this + * atomic operation completes, any other read or write operation against the array will block. + */ + store(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - /** - * Subtracts a value from the value at the given position in the array, returning the original - * value. Until this atomic operation completes, any other read or write operation against the - * array will block. - */ - sub(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + /** + * Subtracts a value from the value at the given position in the array, returning the original + * value. Until this atomic operation completes, any other read or write operation against the + * array will block. + */ + sub(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - /** - * If the value at the given position in the array is equal to the provided value, the current - * agent is put to sleep causing execution to suspend until the timeout expires (returning - * `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns - * `"not-equal"`. - */ - wait(typedArray: Int32Array, index: number, value: number, timeout?: number): "ok" | "not-equal" | "timed-out"; + /** + * If the value at the given position in the array is equal to the provided value, the current + * agent is put to sleep causing execution to suspend until the timeout expires (returning + * `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns + * `"not-equal"`. + */ + wait(typedArray: Int32Array, index: number, value: number, timeout?: number): "ok" | "not-equal" | "timed-out"; - /** - * Wakes up sleeping agents that are waiting on the given index of the array, returning the - * number of agents that were awoken. - * @param typedArray A shared Int32Array. - * @param index The position in the typedArray to wake up on. - * @param count The number of sleeping agents to notify. Defaults to +Infinity. - */ - notify(typedArray: Int32Array, index: number, count?: number): number; + /** + * Wakes up sleeping agents that are waiting on the given index of the array, returning the + * number of agents that were awoken. + * @param typedArray A shared Int32Array. + * @param index The position in the typedArray to wake up on. + * @param count The number of sleeping agents to notify. Defaults to +Infinity. + */ + notify(typedArray: Int32Array, index: number, count?: number): number; - /** - * Stores the bitwise XOR of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or write - * operation against the array will block. - */ - xor(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + /** + * Stores the bitwise XOR of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or write + * operation against the array will block. + */ + xor(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - readonly [Symbol.toStringTag]: "Atomics"; + readonly [Symbol.toStringTag]: "Atomics"; } declare var Atomics: Atomics; @@ -2261,249 +2261,249 @@ declare var Atomics: Atomics; // lib.es2017.string.d.ts ///////////////////////////// interface String { - /** - * Pads the current string with a given string (repeated and/or truncated, if needed) so that the resulting string has a given length. - * The padding is applied from the start of the current string. - * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart) - * - * @param targetLength The length of the resulting string once the current `str` has been padded. - * If the value is less than or equal to `str.length`, then `str` is returned as-is. - * - * @param padString The string to pad the current `str` with. - * If `padString` is too long to stay within `targetLength`, it will be truncated from the end. - * The default value is the space character (U+0020). - */ - padStart(targetLength: number, padString?: string): string; + /** + * Pads the current string with a given string (repeated and/or truncated, if needed) so that the resulting string has a given length. + * The padding is applied from the start of the current string. + * + * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart) + * + * @param targetLength The length of the resulting string once the current `str` has been padded. + * If the value is less than or equal to `str.length`, then `str` is returned as-is. + * + * @param padString The string to pad the current `str` with. + * If `padString` is too long to stay within `targetLength`, it will be truncated from the end. + * The default value is the space character (U+0020). + */ + padStart(targetLength: number, padString?: string): string; - /** - * Pads the current string with a given string (repeated and/or truncated, if needed) so that the resulting string has a given length. - * The padding is applied from the end of the current string. - * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padEnd) - * - * @param targetLength The length of the resulting string once the current `str` has been padded. - * If the value is less than or equal to `str.length`, then `str` is returned as-is. - * - * @param padString The string to pad the current `str` with. - * If `padString` is too long to stay within `targetLength`, it will be truncated from the end. - * The default value is the space character (U+0020). - */ - padEnd(targetLength: number, padString?: string): string; + /** + * Pads the current string with a given string (repeated and/or truncated, if needed) so that the resulting string has a given length. + * The padding is applied from the end of the current string. + * + * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padEnd) + * + * @param targetLength The length of the resulting string once the current `str` has been padded. + * If the value is less than or equal to `str.length`, then `str` is returned as-is. + * + * @param padString The string to pad the current `str` with. + * If `padString` is too long to stay within `targetLength`, it will be truncated from the end. + * The default value is the space character (U+0020). + */ + padEnd(targetLength: number, padString?: string): string; } ///////////////////////////// // lib.es2017.typedarrays.d.ts ///////////////////////////// interface Int8ArrayConstructor { - new (): Int8Array; + new (): Int8Array; } interface Uint8ArrayConstructor { - new (): Uint8Array; + new (): Uint8Array; } interface Uint8ClampedArrayConstructor { - new (): Uint8ClampedArray; + new (): Uint8ClampedArray; } interface Int16ArrayConstructor { - new (): Int16Array; + new (): Int16Array; } interface Uint16ArrayConstructor { - new (): Uint16Array; + new (): Uint16Array; } interface Int32ArrayConstructor { - new (): Int32Array; + new (): Int32Array; } interface Uint32ArrayConstructor { - new (): Uint32Array; + new (): Uint32Array; } interface Float32ArrayConstructor { - new (): Float32Array; + new (): Float32Array; } interface Float64ArrayConstructor { - new (): Float64Array; + new (): Float64Array; } ///////////////////////////// // lib.es2018.asyncgenerator.d.ts ///////////////////////////// interface AsyncGenerator extends AsyncIteratorObject { - // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. - next(...[value]: [] | [TNext]): Promise>; + // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. + next(...[value]: [] | [TNext]): Promise>; - return(value: TReturn | PromiseLike): Promise>; + return(value: TReturn | PromiseLike): Promise>; - throw(e: any): Promise>; + throw(e: any): Promise>; - [Symbol.asyncIterator](): AsyncGenerator; + [Symbol.asyncIterator](): AsyncGenerator; } interface AsyncGeneratorFunction { - /** - * Creates a new AsyncGenerator object. - * @param args A list of arguments the function accepts. - */ - new (...args: any[]): AsyncGenerator; + /** + * Creates a new AsyncGenerator object. + * @param args A list of arguments the function accepts. + */ + new (...args: any[]): AsyncGenerator; - /** - * Creates a new AsyncGenerator object. - * @param args A list of arguments the function accepts. - */ - (...args: any[]): AsyncGenerator; + /** + * Creates a new AsyncGenerator object. + * @param args A list of arguments the function accepts. + */ + (...args: any[]): AsyncGenerator; - /** - * The length of the arguments. - */ - readonly length: number; + /** + * The length of the arguments. + */ + readonly length: number; - /** - * Returns the name of the function. - */ - readonly name: string; + /** + * Returns the name of the function. + */ + readonly name: string; - /** - * A reference to the prototype. - */ - readonly prototype: AsyncGenerator; + /** + * A reference to the prototype. + */ + readonly prototype: AsyncGenerator; } ///////////////////////////// // lib.es2018.asynciterable.d.ts ///////////////////////////// interface SymbolConstructor { - /** - * A method that returns the default async iterator for an object. Called by the semantics of - * the for-await-of statement. - */ - readonly asyncIterator: unique symbol; + /** + * A method that returns the default async iterator for an object. Called by the semantics of + * the for-await-of statement. + */ + readonly asyncIterator: unique symbol; } interface AsyncIterator { - // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. - next(...[value]: [] | [TNext]): Promise>; + // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. + next(...[value]: [] | [TNext]): Promise>; - return?(value?: TReturn | PromiseLike): Promise>; + return?(value?: TReturn | PromiseLike): Promise>; - throw?(e?: any): Promise>; + throw?(e?: any): Promise>; } interface AsyncIterable { - [Symbol.asyncIterator](): AsyncIterator; + [Symbol.asyncIterator](): AsyncIterator; } /** * Describes a user-defined {@link AsyncIterator} that is also async iterable. */ interface AsyncIterableIterator extends AsyncIterator { - [Symbol.asyncIterator](): AsyncIterableIterator; + [Symbol.asyncIterator](): AsyncIterableIterator; } /** * Describes an {@link AsyncIterator} produced by the runtime that inherits from the intrinsic `AsyncIterator.prototype`. */ interface AsyncIteratorObject extends AsyncIterator { - [Symbol.asyncIterator](): AsyncIteratorObject; + [Symbol.asyncIterator](): AsyncIteratorObject; } ///////////////////////////// // lib.es2018.intl.d.ts ///////////////////////////// declare namespace Intl { - // http://cldr.unicode.org/index/cldr-spec/plural-rules#TOC-Determining-Plural-Categories - type LDMLPluralRule = "zero" | "one" | "two" | "few" | "many" | "other"; +// http://cldr.unicode.org/index/cldr-spec/plural-rules#TOC-Determining-Plural-Categories + type LDMLPluralRule = "zero" | "one" | "two" | "few" | "many" | "other"; - type PluralRuleType = "cardinal" | "ordinal"; +type PluralRuleType = "cardinal" | "ordinal"; - interface PluralRulesOptions { - localeMatcher?: "lookup" | "best fit" | undefined; +interface PluralRulesOptions { + localeMatcher?: "lookup" | "best fit" | undefined; - type?: PluralRuleType | undefined; + type?: PluralRuleType | undefined; - minimumIntegerDigits?: number | undefined; + minimumIntegerDigits?: number | undefined; - minimumFractionDigits?: number | undefined; + minimumFractionDigits?: number | undefined; - maximumFractionDigits?: number | undefined; + maximumFractionDigits?: number | undefined; - minimumSignificantDigits?: number | undefined; + minimumSignificantDigits?: number | undefined; - maximumSignificantDigits?: number | undefined; - } + maximumSignificantDigits?: number | undefined; +} - interface ResolvedPluralRulesOptions { - locale: string; +interface ResolvedPluralRulesOptions { + locale: string; - pluralCategories: LDMLPluralRule[]; + pluralCategories: LDMLPluralRule[]; - type: PluralRuleType; + type: PluralRuleType; - minimumIntegerDigits: number; + minimumIntegerDigits: number; - minimumFractionDigits: number; + minimumFractionDigits: number; - maximumFractionDigits: number; + maximumFractionDigits: number; - minimumSignificantDigits?: number; + minimumSignificantDigits?: number; - maximumSignificantDigits?: number; - } + maximumSignificantDigits?: number; +} - interface PluralRules { - resolvedOptions(): ResolvedPluralRulesOptions; +interface PluralRules { + resolvedOptions(): ResolvedPluralRulesOptions; - select(n: number): LDMLPluralRule; - } + select(n: number): LDMLPluralRule; +} - interface PluralRulesConstructor { - new (locales?: string | readonly string[], options?: PluralRulesOptions): PluralRules; +interface PluralRulesConstructor { + new (locales?: string | readonly string[], options?: PluralRulesOptions): PluralRules; - (locales?: string | readonly string[], options?: PluralRulesOptions): PluralRules; + (locales?: string | readonly string[], options?: PluralRulesOptions): PluralRules; - supportedLocalesOf(locales: string | readonly string[], options?: { localeMatcher?: "lookup" | "best fit"; }): string[]; - } + supportedLocalesOf(locales: string | readonly string[], options?: { localeMatcher?: "lookup" | "best fit"; }): string[]; +} - const PluralRules: PluralRulesConstructor; +const PluralRules: PluralRulesConstructor; - interface NumberFormatPartTypeRegistry { - literal: never; +interface NumberFormatPartTypeRegistry { + literal: never; - nan: never; + nan: never; - infinity: never; + infinity: never; - percent: never; + percent: never; - integer: never; + integer: never; - group: never; + group: never; - decimal: never; + decimal: never; - fraction: never; + fraction: never; - plusSign: never; + plusSign: never; - minusSign: never; + minusSign: never; - percentSign: never; + percentSign: never; - currency: never; - } + currency: never; +} - type NumberFormatPartTypes = keyof NumberFormatPartTypeRegistry; +type NumberFormatPartTypes = keyof NumberFormatPartTypeRegistry; - interface NumberFormatPart { - type: NumberFormatPartTypes; +interface NumberFormatPart { + type: NumberFormatPartTypes; - value: string; - } + value: string; +} } ///////////////////////////// @@ -2513,24 +2513,24 @@ declare namespace Intl { * Represents the completion of an asynchronous operation */ interface Promise { - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): Promise; + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): Promise; } ///////////////////////////// // lib.es2018.regexp.d.ts ///////////////////////////// interface RegExp { - /** - * Returns a Boolean value indicating the state of the dotAll flag (s) used with a regular expression. - * Default is false. Read-only. - */ - readonly dotAll: boolean; + /** + * Returns a Boolean value indicating the state of the dotAll flag (s) used with a regular expression. + * Default is false. Read-only. + */ + readonly dotAll: boolean; } ///////////////////////////// @@ -2543,226 +2543,226 @@ type FlatArray = { }[Depth extends -1 ? "done" : "recur"]; interface ReadonlyArray { - /** - * Calls a defined callback function on each element of an array. Then, flattens the result into - * a new array. - * This is identical to a map followed by flat with depth 1. - * - * @param callback A function that accepts up to three arguments. The flatMap method calls the - * callback function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callback function. If - * thisArg is omitted, undefined is used as the this value. - */ - flatMap( - callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray, - thisArg?: This, - ): U[]; + /** + * Calls a defined callback function on each element of an array. Then, flattens the result into + * a new array. + * This is identical to a map followed by flat with depth 1. + * + * @param callback A function that accepts up to three arguments. The flatMap method calls the + * callback function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callback function. If + * thisArg is omitted, undefined is used as the this value. + */ + flatMap( + callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray, + thisArg?: This, + ): U[]; - /** - * Returns a new array with all sub-array elements concatenated into it recursively up to the - * specified depth. - * - * @param depth The maximum recursion depth - */ - flat( - this: A, - depth?: D, - ): FlatArray[]; + /** + * Returns a new array with all sub-array elements concatenated into it recursively up to the + * specified depth. + * + * @param depth The maximum recursion depth + */ + flat( + this: A, + depth?: D, + ): FlatArray[]; } interface Array { - /** - * Calls a defined callback function on each element of an array. Then, flattens the result into - * a new array. - * This is identical to a map followed by flat with depth 1. - * - * @param callback A function that accepts up to three arguments. The flatMap method calls the - * callback function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callback function. If - * thisArg is omitted, undefined is used as the this value. - */ - flatMap( - callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray, - thisArg?: This, - ): U[]; + /** + * Calls a defined callback function on each element of an array. Then, flattens the result into + * a new array. + * This is identical to a map followed by flat with depth 1. + * + * @param callback A function that accepts up to three arguments. The flatMap method calls the + * callback function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callback function. If + * thisArg is omitted, undefined is used as the this value. + */ + flatMap( + callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray, + thisArg?: This, + ): U[]; - /** - * Returns a new array with all sub-array elements concatenated into it recursively up to the - * specified depth. - * - * @param depth The maximum recursion depth - */ - flat( - this: A, - depth?: D, - ): FlatArray[]; + /** + * Returns a new array with all sub-array elements concatenated into it recursively up to the + * specified depth. + * + * @param depth The maximum recursion depth + */ + flat( + this: A, + depth?: D, + ): FlatArray[]; } ///////////////////////////// // lib.es2019.object.d.ts ///////////////////////////// interface ObjectConstructor { - /** - * Returns an object created by key-value entries for properties and methods - * @param entries An iterable object that contains key-value entries for properties and methods. - */ - fromEntries(entries: Iterable): { [k: string]: T; }; + /** + * Returns an object created by key-value entries for properties and methods + * @param entries An iterable object that contains key-value entries for properties and methods. + */ + fromEntries(entries: Iterable): { [k: string]: T; }; - /** - * Returns an object created by key-value entries for properties and methods - * @param entries An iterable object that contains key-value entries for properties and methods. - */ - fromEntries(entries: Iterable): any; + /** + * Returns an object created by key-value entries for properties and methods + * @param entries An iterable object that contains key-value entries for properties and methods. + */ + fromEntries(entries: Iterable): any; } ///////////////////////////// // lib.es2019.string.d.ts ///////////////////////////// interface String { - /** Removes the trailing white space and line terminator characters from a string. */ - trimEnd(): string; + /** Removes the trailing white space and line terminator characters from a string. */ + trimEnd(): string; - /** Removes the leading white space and line terminator characters from a string. */ - trimStart(): string; + /** Removes the leading white space and line terminator characters from a string. */ + trimStart(): string; } ///////////////////////////// // lib.es2019.symbol.d.ts ///////////////////////////// interface Symbol { - /** - * Expose the [[Description]] internal slot of a symbol directly. - */ - readonly description: string | undefined; + /** + * Expose the [[Description]] internal slot of a symbol directly. + */ + readonly description: string | undefined; } ///////////////////////////// // lib.es2020.bigint.d.ts ///////////////////////////// interface BigIntToLocaleStringOptions { - /** - * The locale matching algorithm to use.The default is "best fit". For information about this option, see the {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation Intl page}. - */ - localeMatcher?: string; + /** + * The locale matching algorithm to use.The default is "best fit". For information about this option, see the {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation Intl page}. + */ + localeMatcher?: string; - /** - * The formatting style to use , the default is "decimal". - */ - style?: string; + /** + * The formatting style to use , the default is "decimal". + */ + style?: string; - numberingSystem?: string; + numberingSystem?: string; - /** - * The unit to use in unit formatting, Possible values are core unit identifiers, defined in UTS #35, Part 2, Section 6. A subset of units from the full list was selected for use in ECMAScript. Pairs of simple units can be concatenated with "-per-" to make a compound unit. There is no default value; if the style is "unit", the unit property must be provided. - */ - unit?: string; + /** + * The unit to use in unit formatting, Possible values are core unit identifiers, defined in UTS #35, Part 2, Section 6. A subset of units from the full list was selected for use in ECMAScript. Pairs of simple units can be concatenated with "-per-" to make a compound unit. There is no default value; if the style is "unit", the unit property must be provided. + */ + unit?: string; - /** - * The unit formatting style to use in unit formatting, the defaults is "short". - */ - unitDisplay?: string; + /** + * The unit formatting style to use in unit formatting, the defaults is "short". + */ + unitDisplay?: string; - /** - * The currency to use in currency formatting. Possible values are the ISO 4217 currency codes, such as "USD" for the US dollar, "EUR" for the euro, or "CNY" for the Chinese RMB — see the Current currency & funds code list. There is no default value; if the style is "currency", the currency property must be provided. It is only used when [[Style]] has the value "currency". - */ - currency?: string; + /** + * The currency to use in currency formatting. Possible values are the ISO 4217 currency codes, such as "USD" for the US dollar, "EUR" for the euro, or "CNY" for the Chinese RMB — see the Current currency & funds code list. There is no default value; if the style is "currency", the currency property must be provided. It is only used when [[Style]] has the value "currency". + */ + currency?: string; - /** - * How to display the currency in currency formatting. It is only used when [[Style]] has the value "currency". The default is "symbol". - * - * "symbol" to use a localized currency symbol such as €, - * - * "code" to use the ISO currency code, - * - * "name" to use a localized currency name such as "dollar" - */ - currencyDisplay?: string; + /** + * How to display the currency in currency formatting. It is only used when [[Style]] has the value "currency". The default is "symbol". + * + * "symbol" to use a localized currency symbol such as €, + * + * "code" to use the ISO currency code, + * + * "name" to use a localized currency name such as "dollar" + */ + currencyDisplay?: string; - /** - * Whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators. The default is true. - */ - useGrouping?: boolean; + /** + * Whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators. The default is true. + */ + useGrouping?: boolean; - /** - * The minimum number of integer digits to use. Possible values are from 1 to 21; the default is 1. - */ - minimumIntegerDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; + /** + * The minimum number of integer digits to use. Possible values are from 1 to 21; the default is 1. + */ + minimumIntegerDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; - /** - * The minimum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number and percent formatting is 0; the default for currency formatting is the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html ISO 4217 currency codes list} (2 if the list doesn't provide that information). - */ - minimumFractionDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20; + /** + * The minimum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number and percent formatting is 0; the default for currency formatting is the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html ISO 4217 currency codes list} (2 if the list doesn't provide that information). + */ + minimumFractionDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20; - /** - * The maximum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number formatting is the larger of minimumFractionDigits and 3; the default for currency formatting is the larger of minimumFractionDigits and the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html ISO 4217 currency codes list} (2 if the list doesn't provide that information); the default for percent formatting is the larger of minimumFractionDigits and 0. - */ - maximumFractionDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20; + /** + * The maximum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number formatting is the larger of minimumFractionDigits and 3; the default for currency formatting is the larger of minimumFractionDigits and the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html ISO 4217 currency codes list} (2 if the list doesn't provide that information); the default for percent formatting is the larger of minimumFractionDigits and 0. + */ + maximumFractionDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20; - /** - * The minimum number of significant digits to use. Possible values are from 1 to 21; the default is 1. - */ - minimumSignificantDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; + /** + * The minimum number of significant digits to use. Possible values are from 1 to 21; the default is 1. + */ + minimumSignificantDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; - /** - * The maximum number of significant digits to use. Possible values are from 1 to 21; the default is 21. - */ - maximumSignificantDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; + /** + * The maximum number of significant digits to use. Possible values are from 1 to 21; the default is 21. + */ + maximumSignificantDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; - /** - * The formatting that should be displayed for the number, the defaults is "standard" - * - * "standard" plain number formatting - * - * "scientific" return the order-of-magnitude for formatted number. - * - * "engineering" return the exponent of ten when divisible by three - * - * "compact" string representing exponent, defaults is using the "short" form - */ - notation?: string; + /** + * The formatting that should be displayed for the number, the defaults is "standard" + * + * "standard" plain number formatting + * + * "scientific" return the order-of-magnitude for formatted number. + * + * "engineering" return the exponent of ten when divisible by three + * + * "compact" string representing exponent, defaults is using the "short" form + */ + notation?: string; - /** - * used only when notation is "compact" - */ - compactDisplay?: string; + /** + * used only when notation is "compact" + */ + compactDisplay?: string; } interface BigInt { - /** - * Returns a string representation of an object. - * @param radix Specifies a radix for converting numeric values to strings. - */ - toString(radix?: number): string; + /** + * Returns a string representation of an object. + * @param radix Specifies a radix for converting numeric values to strings. + */ + toString(radix?: number): string; - /** Returns a string representation appropriate to the host environment's current locale. */ - toLocaleString(locales?: Intl.LocalesArgument, options?: BigIntToLocaleStringOptions): string; + /** Returns a string representation appropriate to the host environment's current locale. */ + toLocaleString(locales?: Intl.LocalesArgument, options?: BigIntToLocaleStringOptions): string; - /** Returns the primitive value of the specified object. */ - valueOf(): bigint; + /** Returns the primitive value of the specified object. */ + valueOf(): bigint; - readonly [Symbol.toStringTag]: "BigInt"; + readonly [Symbol.toStringTag]: "BigInt"; } interface BigIntConstructor { - (value: bigint | boolean | number | string): bigint; + (value: bigint | boolean | number | string): bigint; - readonly prototype: BigInt; + readonly prototype: BigInt; - /** - * Interprets the low bits of a BigInt as a 2's-complement signed integer. - * All higher bits are discarded. - * @param bits The number of low bits to use - * @param int The BigInt whose bits to extract - */ - asIntN(bits: number, int: bigint): bigint; + /** + * Interprets the low bits of a BigInt as a 2's-complement signed integer. + * All higher bits are discarded. + * @param bits The number of low bits to use + * @param int The BigInt whose bits to extract + */ + asIntN(bits: number, int: bigint): bigint; - /** - * Interprets the low bits of a BigInt as an unsigned integer. - * All higher bits are discarded. - * @param bits The number of low bits to use - * @param int The BigInt whose bits to extract - */ - asUintN(bits: number, int: bigint): bigint; + /** + * Interprets the low bits of a BigInt as an unsigned integer. + * All higher bits are discarded. + * @param bits The number of low bits to use + * @param int The BigInt whose bits to extract + */ + asUintN(bits: number, int: bigint): bigint; } declare var BigInt: BigIntConstructor; @@ -2772,295 +2772,295 @@ declare var BigInt: BigIntConstructor; * requested number of bytes could not be allocated, an exception is raised. */ interface BigInt64Array { - /** The size in bytes of each element in the array. */ - readonly BYTES_PER_ELEMENT: number; - - /** The ArrayBuffer instance referenced by the array. */ - readonly buffer: TArrayBuffer; - - /** The length in bytes of the array. */ - readonly byteLength: number; + /** The size in bytes of each element in the array. */ + readonly BYTES_PER_ELEMENT: number; - /** The offset in bytes of the array. */ - readonly byteOffset: number; + /** The ArrayBuffer instance referenced by the array. */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** The length in bytes of the array. */ + readonly byteLength: number; - /** Yields index, value pairs for every entry in the array. */ - entries(): ArrayIterator<[number, bigint]>; + /** The offset in bytes of the array. */ + readonly byteOffset: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns false, - * or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; + + /** Yields index, value pairs for every entry in the array. */ + entries(): ArrayIterator<[number, bigint]>; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: bigint, start?: number, end?: number): this; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns false, + * or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: bigint, index: number, array: BigInt64Array) => any, thisArg?: any): BigInt64Array; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: bigint, start?: number, end?: number): this; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): bigint | undefined; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: bigint, index: number, array: BigInt64Array) => any, thisArg?: any): BigInt64Array; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): number; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): bigint | undefined; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: bigint, index: number, array: BigInt64Array) => void, thisArg?: any): void; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): number; - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: bigint, fromIndex?: number): boolean; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: bigint, index: number, array: BigInt64Array) => void, thisArg?: any): void; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: bigint, fromIndex?: number): number; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: bigint, fromIndex?: number): boolean; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: bigint, fromIndex?: number): number; - /** Yields each index in the array. */ - keys(): ArrayIterator; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: bigint, fromIndex?: number): number; + /** Yields each index in the array. */ + keys(): ArrayIterator; - /** The length of the array. */ - readonly length: number; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: bigint, fromIndex?: number): number; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: bigint, index: number, array: BigInt64Array) => bigint, thisArg?: any): BigInt64Array; + /** The length of the array. */ + readonly length: number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: bigint, index: number, array: BigInt64Array) => bigint, thisArg?: any): BigInt64Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint; - /** Reverses the elements in the array. */ - reverse(): this; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U; + + /** Reverses the elements in the array. */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. - */ - slice(start?: number, end?: number): BigInt64Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. + */ + slice(start?: number, end?: number): BigInt64Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls the - * predicate function for each element in the array until the predicate returns true, or until - * the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls the + * predicate function for each element in the array until the predicate returns true, or until + * the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean; - /** - * Sorts the array. - * @param compareFn The function used to determine the order of the elements. If omitted, the elements are sorted in ascending order. - */ - sort(compareFn?: (a: bigint, b: bigint) => number | bigint): this; + /** + * Sorts the array. + * @param compareFn The function used to determine the order of the elements. If omitted, the elements are sorted in ascending order. + */ + sort(compareFn?: (a: bigint, b: bigint) => number | bigint): this; - /** - * Gets a new BigInt64Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): BigInt64Array; + /** + * Gets a new BigInt64Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): BigInt64Array; - /** Converts the array to a string by using the current locale. */ - toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; + /** Converts the array to a string by using the current locale. */ + toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; - /** Returns a string representation of the array. */ - toString(): string; + /** Returns a string representation of the array. */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): BigInt64Array; + /** Returns the primitive value of the specified object. */ + valueOf(): BigInt64Array; - /** Yields each value in the array. */ - values(): ArrayIterator; + /** Yields each value in the array. */ + values(): ArrayIterator; - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - readonly [Symbol.toStringTag]: "BigInt64Array"; + readonly [Symbol.toStringTag]: "BigInt64Array"; - [index: number]: bigint; + [index: number]: bigint; } interface BigInt64ArrayConstructor { - readonly prototype: BigInt64Array; + readonly prototype: BigInt64Array; - new (length?: number): BigInt64Array; + new (length?: number): BigInt64Array; - new (array: ArrayLike | Iterable): BigInt64Array; + new (array: ArrayLike | Iterable): BigInt64Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): BigInt64Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): BigInt64Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): BigInt64Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): BigInt64Array; - new (array: ArrayLike | ArrayBuffer): BigInt64Array; + new (array: ArrayLike | ArrayBuffer): BigInt64Array; - /** The size in bytes of each element in the array. */ - readonly BYTES_PER_ELEMENT: number; + /** The size in bytes of each element in the array. */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: bigint[]): BigInt64Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: bigint[]): BigInt64Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): BigInt64Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): BigInt64Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigInt64Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigInt64Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): BigInt64Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): BigInt64Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => bigint, thisArg?: any): BigInt64Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => bigint, thisArg?: any): BigInt64Array; } declare var BigInt64Array: BigInt64ArrayConstructor; @@ -3070,1286 +3070,1286 @@ declare var BigInt64Array: BigInt64ArrayConstructor; * requested number of bytes could not be allocated, an exception is raised. */ interface BigUint64Array { - /** The size in bytes of each element in the array. */ - readonly BYTES_PER_ELEMENT: number; + /** The size in bytes of each element in the array. */ + readonly BYTES_PER_ELEMENT: number; - /** The ArrayBuffer instance referenced by the array. */ - readonly buffer: TArrayBuffer; + /** The ArrayBuffer instance referenced by the array. */ + readonly buffer: TArrayBuffer; - /** The length in bytes of the array. */ - readonly byteLength: number; + /** The length in bytes of the array. */ + readonly byteLength: number; - /** The offset in bytes of the array. */ - readonly byteOffset: number; + /** The offset in bytes of the array. */ + readonly byteOffset: number; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; + + /** Yields index, value pairs for every entry in the array. */ + entries(): ArrayIterator<[number, bigint]>; - /** Yields index, value pairs for every entry in the array. */ - entries(): ArrayIterator<[number, bigint]>; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns false, + * or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns false, - * or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: bigint, start?: number, end?: number): this; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: bigint, start?: number, end?: number): this; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: bigint, index: number, array: BigUint64Array) => any, thisArg?: any): BigUint64Array; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: bigint, index: number, array: BigUint64Array) => any, thisArg?: any): BigUint64Array; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): bigint | undefined; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): bigint | undefined; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): number; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): number; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: bigint, index: number, array: BigUint64Array) => void, thisArg?: any): void; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: bigint, index: number, array: BigUint64Array) => void, thisArg?: any): void; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: bigint, fromIndex?: number): boolean; - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: bigint, fromIndex?: number): boolean; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: bigint, fromIndex?: number): number; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: bigint, fromIndex?: number): number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** Yields each index in the array. */ + keys(): ArrayIterator; - /** Yields each index in the array. */ - keys(): ArrayIterator; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: bigint, fromIndex?: number): number; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: bigint, fromIndex?: number): number; + /** The length of the array. */ + readonly length: number; - /** The length of the array. */ - readonly length: number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: bigint, index: number, array: BigUint64Array) => bigint, thisArg?: any): BigUint64Array; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: bigint, index: number, array: BigUint64Array) => bigint, thisArg?: any): BigUint64Array; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint; - /** Reverses the elements in the array. */ - reverse(): this; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U; + + /** Reverses the elements in the array. */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. - */ - slice(start?: number, end?: number): BigUint64Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. + */ + slice(start?: number, end?: number): BigUint64Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls the - * predicate function for each element in the array until the predicate returns true, or until - * the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls the + * predicate function for each element in the array until the predicate returns true, or until + * the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean; - /** - * Sorts the array. - * @param compareFn The function used to determine the order of the elements. If omitted, the elements are sorted in ascending order. - */ - sort(compareFn?: (a: bigint, b: bigint) => number | bigint): this; + /** + * Sorts the array. + * @param compareFn The function used to determine the order of the elements. If omitted, the elements are sorted in ascending order. + */ + sort(compareFn?: (a: bigint, b: bigint) => number | bigint): this; - /** - * Gets a new BigUint64Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): BigUint64Array; + /** + * Gets a new BigUint64Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): BigUint64Array; - /** Converts the array to a string by using the current locale. */ - toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; + /** Converts the array to a string by using the current locale. */ + toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; - /** Returns a string representation of the array. */ - toString(): string; + /** Returns a string representation of the array. */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): BigUint64Array; + /** Returns the primitive value of the specified object. */ + valueOf(): BigUint64Array; - /** Yields each value in the array. */ - values(): ArrayIterator; + /** Yields each value in the array. */ + values(): ArrayIterator; - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - readonly [Symbol.toStringTag]: "BigUint64Array"; + readonly [Symbol.toStringTag]: "BigUint64Array"; - [index: number]: bigint; + [index: number]: bigint; } interface BigUint64ArrayConstructor { - readonly prototype: BigUint64Array; + readonly prototype: BigUint64Array; - new (length?: number): BigUint64Array; + new (length?: number): BigUint64Array; - new (array: ArrayLike | Iterable): BigUint64Array; + new (array: ArrayLike | Iterable): BigUint64Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): BigUint64Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): BigUint64Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): BigUint64Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): BigUint64Array; - new (array: ArrayLike | ArrayBuffer): BigUint64Array; + new (array: ArrayLike | ArrayBuffer): BigUint64Array; - /** The size in bytes of each element in the array. */ - readonly BYTES_PER_ELEMENT: number; + /** The size in bytes of each element in the array. */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: bigint[]): BigUint64Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: bigint[]): BigUint64Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): BigUint64Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): BigUint64Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigUint64Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigUint64Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): BigUint64Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): BigUint64Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => bigint, thisArg?: any): BigUint64Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => bigint, thisArg?: any): BigUint64Array; } declare var BigUint64Array: BigUint64ArrayConstructor; interface DataView { - /** - * Gets the BigInt64 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getBigInt64(byteOffset: number, littleEndian?: boolean): bigint; + /** + * Gets the BigInt64 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getBigInt64(byteOffset: number, littleEndian?: boolean): bigint; - /** - * Gets the BigUint64 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getBigUint64(byteOffset: number, littleEndian?: boolean): bigint; + /** + * Gets the BigUint64 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getBigUint64(byteOffset: number, littleEndian?: boolean): bigint; - /** - * Stores a BigInt64 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setBigInt64(byteOffset: number, value: bigint, littleEndian?: boolean): void; + /** + * Stores a BigInt64 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setBigInt64(byteOffset: number, value: bigint, littleEndian?: boolean): void; - /** - * Stores a BigUint64 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setBigUint64(byteOffset: number, value: bigint, littleEndian?: boolean): void; + /** + * Stores a BigUint64 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setBigUint64(byteOffset: number, value: bigint, littleEndian?: boolean): void; } ///////////////////////////// // lib.es2020.date.d.ts ///////////////////////////// interface Date { - /** - * Converts a date and time to a string by using the current or specified locale. - * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; + /** + * Converts a date and time to a string by using the current or specified locale. + * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; - /** - * Converts a date to a string by using the current or specified locale. - * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleDateString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; + /** + * Converts a date to a string by using the current or specified locale. + * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleDateString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; - /** - * Converts a time to a string by using the current or specified locale. - * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleTimeString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; + /** + * Converts a time to a string by using the current or specified locale. + * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleTimeString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; } ///////////////////////////// // lib.es2020.intl.d.ts ///////////////////////////// declare namespace Intl { - /** - * A string that is a valid [Unicode BCP 47 Locale Identifier](https://unicode.org/reports/tr35/#Unicode_locale_identifier). +/** + * A string that is a valid [Unicode BCP 47 Locale Identifier](https://unicode.org/reports/tr35/#Unicode_locale_identifier). + * + * For example: "fa", "es-MX", "zh-Hant-TW". + * + * See [MDN - Intl - locales argument](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). + */ + type UnicodeBCP47LocaleIdentifier = string; + +/** + * Unit to use in the relative time internationalized message. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format#Parameters). + */ + type RelativeTimeFormatUnit = + | "year" + | "years" + | "quarter" + | "quarters" + | "month" + | "months" + | "week" + | "weeks" + | "day" + | "days" + | "hour" + | "hours" + | "minute" + | "minutes" + | "second" + | "seconds"; + +/** + * Value of the `unit` property in objects returned by + * `Intl.RelativeTimeFormat.prototype.formatToParts()`. `formatToParts` and + * `format` methods accept either singular or plural unit names as input, + * but `formatToParts` only outputs singular (e.g. "day") not plural (e.g. + * "days"). + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts). + */ + type RelativeTimeFormatUnitSingular = + | "year" + | "quarter" + | "month" + | "week" + | "day" + | "hour" + | "minute" + | "second"; + +/** + * The locale matching algorithm to use. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). + */ + type RelativeTimeFormatLocaleMatcher = "lookup" | "best fit"; + +/** + * The format of output message. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). + */ + type RelativeTimeFormatNumeric = "always" | "auto"; + +/** + * The length of the internationalized message. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). + */ + type RelativeTimeFormatStyle = "long" | "short" | "narrow"; + +/** + * The locale or locales to use + * + * See [MDN - Intl - locales argument](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). + */ + type LocalesArgument = UnicodeBCP47LocaleIdentifier | Locale | readonly (UnicodeBCP47LocaleIdentifier | Locale)[] | undefined; + +/** + * An object with some or all of properties of `options` parameter + * of `Intl.RelativeTimeFormat` constructor. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). + */ + interface RelativeTimeFormatOptions { + /** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */ + localeMatcher?: RelativeTimeFormatLocaleMatcher; + + /** The format of output message. */ + numeric?: RelativeTimeFormatNumeric; +} + +/** + * An object with properties reflecting the locale + * and formatting options computed during initialization + * of the `Intl.RelativeTimeFormat` object + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions#Description). + */ + interface ResolvedRelativeTimeFormatOptions { + numeric: RelativeTimeFormatNumeric; + + numberingSystem: string; +} + +/** + * An object representing the relative time format in parts + * that can be used for custom locale-aware formatting. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts). + */ + type RelativeTimeFormatPart = + | { + type: "literal"; + value: string; + } + | { + type: Exclude; + value: string; + unit: RelativeTimeFormatUnitSingular; + }; + +interface RelativeTimeFormat { + /** + * Formats a value and a unit according to the locale + * and formatting options of the given + * [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) + * object. * - * For example: "fa", "es-MX", "zh-Hant-TW". + * While this method automatically provides the correct plural forms, + * the grammatical form is otherwise as neutral as possible. * - * See [MDN - Intl - locales argument](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). - */ - type UnicodeBCP47LocaleIdentifier = string; - - /** - * Unit to use in the relative time internationalized message. + * It is the caller's responsibility to handle cut-off logic + * such as deciding between displaying "in 7 days" or "in 1 week". + * This API does not support relative dates involving compound units. + * e.g "in 5 days and 4 hours". * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format#Parameters). - */ - type RelativeTimeFormatUnit = - | "year" - | "years" - | "quarter" - | "quarters" - | "month" - | "months" - | "week" - | "weeks" - | "day" - | "days" - | "hour" - | "hours" - | "minute" - | "minutes" - | "second" - | "seconds"; - - /** - * Value of the `unit` property in objects returned by - * `Intl.RelativeTimeFormat.prototype.formatToParts()`. `formatToParts` and - * `format` methods accept either singular or plural unit names as input, - * but `formatToParts` only outputs singular (e.g. "day") not plural (e.g. - * "days"). + * @param value - Numeric value to use in the internationalized relative time message * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts). - */ - type RelativeTimeFormatUnitSingular = - | "year" - | "quarter" - | "month" - | "week" - | "day" - | "hour" - | "minute" - | "second"; - - /** - * The locale matching algorithm to use. + * @param unit - [Unit](https://tc39.es/ecma402/#sec-singularrelativetimeunit) to use in the relative time internationalized message. * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). - */ - type RelativeTimeFormatLocaleMatcher = "lookup" | "best fit"; - - /** - * The format of output message. + * @throws `RangeError` if `unit` was given something other than `unit` possible values * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). - */ - type RelativeTimeFormatNumeric = "always" | "auto"; - - /** - * The length of the internationalized message. + * @returns {string} Internationalized relative time message as string * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format). */ - type RelativeTimeFormatStyle = "long" | "short" | "narrow"; + format(value: number, unit: RelativeTimeFormatUnit): string; - /** - * The locale or locales to use + /** + * Returns an array of objects representing the relative time format in parts that can be used for custom locale-aware formatting. + * + * @param value - Numeric value to use in the internationalized relative time message * - * See [MDN - Intl - locales argument](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). + * @param unit - [Unit](https://tc39.es/ecma402/#sec-singularrelativetimeunit) to use in the relative time internationalized message. + * + * @throws `RangeError` if `unit` was given something other than `unit` possible values + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts). */ - type LocalesArgument = UnicodeBCP47LocaleIdentifier | Locale | readonly (UnicodeBCP47LocaleIdentifier | Locale)[] | undefined; + formatToParts(value: number, unit: RelativeTimeFormatUnit): RelativeTimeFormatPart[]; - /** - * An object with some or all of properties of `options` parameter - * of `Intl.RelativeTimeFormat` constructor. + /** + * Provides access to the locale and options computed during initialization of this `Intl.RelativeTimeFormat` object. * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions). */ - interface RelativeTimeFormatOptions { - /** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */ - localeMatcher?: RelativeTimeFormatLocaleMatcher; - - /** The format of output message. */ - numeric?: RelativeTimeFormatNumeric; - } + resolvedOptions(): ResolvedRelativeTimeFormatOptions; +} - /** - * An object with properties reflecting the locale - * and formatting options computed during initialization - * of the `Intl.RelativeTimeFormat` object +/** + * The [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) + * object is a constructor for objects that enable language-sensitive relative time formatting. + * + * [Compatibility](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat#Browser_compatibility). + */ + const RelativeTimeFormat: { + /** + * Creates [Intl.RelativeTimeFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) objects * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions#Description). + * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. + * For the general form and interpretation of the locales argument, + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters) + * with some or all of options of `RelativeTimeFormatOptions`. + * + * @returns [Intl.RelativeTimeFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat). */ - interface ResolvedRelativeTimeFormatOptions { - numeric: RelativeTimeFormatNumeric; - - numberingSystem: string; - } + new ( + locales?: LocalesArgument, + options?: RelativeTimeFormatOptions, + ): RelativeTimeFormat; - /** - * An object representing the relative time format in parts - * that can be used for custom locale-aware formatting. + /** + * Returns an array containing those of the provided locales + * that are supported in date and time formatting + * without having to fall back to the runtime's default locale. * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts). - */ - type RelativeTimeFormatPart = - | { - type: "literal"; - value: string; - } - | { - type: Exclude; - value: string; - unit: RelativeTimeFormatUnitSingular; - }; - - interface RelativeTimeFormat { - /** - * Formats a value and a unit according to the locale - * and formatting options of the given - * [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) - * object. - * - * While this method automatically provides the correct plural forms, - * the grammatical form is otherwise as neutral as possible. - * - * It is the caller's responsibility to handle cut-off logic - * such as deciding between displaying "in 7 days" or "in 1 week". - * This API does not support relative dates involving compound units. - * e.g "in 5 days and 4 hours". - * - * @param value - Numeric value to use in the internationalized relative time message - * - * @param unit - [Unit](https://tc39.es/ecma402/#sec-singularrelativetimeunit) to use in the relative time internationalized message. - * - * @throws `RangeError` if `unit` was given something other than `unit` possible values - * - * @returns {string} Internationalized relative time message as string - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format). - */ - format(value: number, unit: RelativeTimeFormatUnit): string; - - /** - * Returns an array of objects representing the relative time format in parts that can be used for custom locale-aware formatting. - * - * @param value - Numeric value to use in the internationalized relative time message - * - * @param unit - [Unit](https://tc39.es/ecma402/#sec-singularrelativetimeunit) to use in the relative time internationalized message. - * - * @throws `RangeError` if `unit` was given something other than `unit` possible values - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts). - */ - formatToParts(value: number, unit: RelativeTimeFormatUnit): RelativeTimeFormatPart[]; - - /** - * Provides access to the locale and options computed during initialization of this `Intl.RelativeTimeFormat` object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions). - */ - resolvedOptions(): ResolvedRelativeTimeFormatOptions; - } - - /** - * The [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) - * object is a constructor for objects that enable language-sensitive relative time formatting. + * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. + * For the general form and interpretation of the locales argument, + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). * - * [Compatibility](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat#Browser_compatibility). + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters) + * with some or all of options of the formatting. + * + * @returns An array containing those of the provided locales + * that are supported in date and time formatting + * without having to fall back to the runtime's default locale. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/supportedLocalesOf). */ - const RelativeTimeFormat: { - /** - * Creates [Intl.RelativeTimeFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) objects - * - * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. - * For the general form and interpretation of the locales argument, - * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). - * - * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters) - * with some or all of options of `RelativeTimeFormatOptions`. - * - * @returns [Intl.RelativeTimeFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat). - */ - new ( - locales?: LocalesArgument, - options?: RelativeTimeFormatOptions, - ): RelativeTimeFormat; - - /** - * Returns an array containing those of the provided locales - * that are supported in date and time formatting - * without having to fall back to the runtime's default locale. - * - * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. - * For the general form and interpretation of the locales argument, - * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). - * - * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters) - * with some or all of options of the formatting. - * - * @returns An array containing those of the provided locales - * that are supported in date and time formatting - * without having to fall back to the runtime's default locale. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/supportedLocalesOf). - */ - supportedLocalesOf( - locales?: LocalesArgument, - options?: RelativeTimeFormatOptions, - ): UnicodeBCP47LocaleIdentifier[]; - }; + supportedLocalesOf( + locales?: LocalesArgument, + options?: RelativeTimeFormatOptions, + ): UnicodeBCP47LocaleIdentifier[]; +}; - interface NumberFormatOptionsSignDisplayRegistry { - auto: never; +interface NumberFormatOptionsSignDisplayRegistry { + auto: never; - never: never; + never: never; - always: never; + always: never; - exceptZero: never; - } + exceptZero: never; +} - type NumberFormatOptionsSignDisplay = keyof NumberFormatOptionsSignDisplayRegistry; +type NumberFormatOptionsSignDisplay = keyof NumberFormatOptionsSignDisplayRegistry; - interface NumberFormatOptions { - numberingSystem?: string | undefined; +interface NumberFormatOptions { + numberingSystem?: string | undefined; - compactDisplay?: "short" | "long" | undefined; + compactDisplay?: "short" | "long" | undefined; - notation?: "standard" | "scientific" | "engineering" | "compact" | undefined; + notation?: "standard" | "scientific" | "engineering" | "compact" | undefined; - signDisplay?: NumberFormatOptionsSignDisplay | undefined; + signDisplay?: NumberFormatOptionsSignDisplay | undefined; - unit?: string | undefined; + unit?: string | undefined; - unitDisplay?: "short" | "long" | "narrow" | undefined; + unitDisplay?: "short" | "long" | "narrow" | undefined; - currencySign?: "standard" | "accounting" | undefined; - } + currencySign?: "standard" | "accounting" | undefined; +} - interface ResolvedNumberFormatOptions { - compactDisplay?: "short" | "long"; +interface ResolvedNumberFormatOptions { + compactDisplay?: "short" | "long"; - notation: "standard" | "scientific" | "engineering" | "compact"; + notation: "standard" | "scientific" | "engineering" | "compact"; - signDisplay: NumberFormatOptionsSignDisplay; + signDisplay: NumberFormatOptionsSignDisplay; - unit?: string; + unit?: string; - unitDisplay?: "short" | "long" | "narrow"; + unitDisplay?: "short" | "long" | "narrow"; - currencySign?: "standard" | "accounting"; - } + currencySign?: "standard" | "accounting"; +} - interface DateTimeFormatOptions { - calendar?: string | undefined; +interface DateTimeFormatOptions { + calendar?: string | undefined; - numberingSystem?: string | undefined; + numberingSystem?: string | undefined; - hourCycle?: "h11" | "h12" | "h23" | "h24" | undefined; - } + hourCycle?: "h11" | "h12" | "h23" | "h24" | undefined; +} - type LocaleHourCycleKey = "h12" | "h23" | "h11" | "h24"; +type LocaleHourCycleKey = "h12" | "h23" | "h11" | "h24"; - type LocaleCollationCaseFirst = "upper" | "lower" | "false"; +type LocaleCollationCaseFirst = "upper" | "lower" | "false"; - interface LocaleOptions { - /** The part of the Locale that indicates the locale's calendar era. */ - calendar?: string; +interface LocaleOptions { + /** The part of the Locale that indicates the locale's calendar era. */ + calendar?: string; - /** Flag that defines whether case is taken into account for the locale's collation rules. */ - caseFirst?: LocaleCollationCaseFirst; + /** Flag that defines whether case is taken into account for the locale's collation rules. */ + caseFirst?: LocaleCollationCaseFirst; - /** The collation type used for sorting */ - collation?: string; + /** The collation type used for sorting */ + collation?: string; - /** The time keeping format convention used by the locale. */ - hourCycle?: LocaleHourCycleKey; + /** The time keeping format convention used by the locale. */ + hourCycle?: LocaleHourCycleKey; - /** The numeral system used by the locale. */ - numberingSystem?: string; + /** The numeral system used by the locale. */ + numberingSystem?: string; - /** Flag that defines whether the locale has special collation handling for numeric characters. */ - numeric?: boolean; + /** Flag that defines whether the locale has special collation handling for numeric characters. */ + numeric?: boolean; - /** The region of the world (usually a country) associated with the locale. Possible values are region codes as defined by ISO 3166-1. */ - region?: string; + /** The region of the world (usually a country) associated with the locale. Possible values are region codes as defined by ISO 3166-1. */ + region?: string; - /** The script used for writing the particular language used in the locale. Possible values are script codes as defined by ISO 15924. */ - script?: string; - } + /** The script used for writing the particular language used in the locale. Possible values are script codes as defined by ISO 15924. */ + script?: string; +} - interface Locale extends LocaleOptions { - /** A string containing the language, and the script and region if available. */ - baseName: string; +interface Locale extends LocaleOptions { + /** A string containing the language, and the script and region if available. */ + baseName: string; - /** The primary language subtag associated with the locale. */ - language: string; + /** The primary language subtag associated with the locale. */ + language: string; - /** Gets the most likely values for the language, script, and region of the locale based on existing values. */ - maximize(): Locale; + /** Gets the most likely values for the language, script, and region of the locale based on existing values. */ + maximize(): Locale; - /** Attempts to remove information about the locale that would be added by calling `Locale.maximize()`. */ - minimize(): Locale; + /** Attempts to remove information about the locale that would be added by calling `Locale.maximize()`. */ + minimize(): Locale; - /** Returns the locale's full locale identifier string. */ - toString(): UnicodeBCP47LocaleIdentifier; - } + /** Returns the locale's full locale identifier string. */ + toString(): UnicodeBCP47LocaleIdentifier; +} - /** - * Constructor creates [Intl.Locale](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) - * objects - * - * @param tag - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646). - * For the general form and interpretation of the locales argument, - * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). - * - * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/Locale#Parameters) with some or all of options of the locale. - * - * @returns [Intl.Locale](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale). - */ - const Locale: { - new (tag: UnicodeBCP47LocaleIdentifier | Locale, options?: LocaleOptions): Locale; - }; +/** + * Constructor creates [Intl.Locale](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) + * objects + * + * @param tag - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646). + * For the general form and interpretation of the locales argument, + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/Locale#Parameters) with some or all of options of the locale. + * + * @returns [Intl.Locale](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale). + */ + const Locale: { + new (tag: UnicodeBCP47LocaleIdentifier | Locale, options?: LocaleOptions): Locale; +}; - type DisplayNamesFallback = - | "code" - | "none"; +type DisplayNamesFallback = + | "code" + | "none"; - type DisplayNamesType = - | "language" - | "region" - | "script" - | "calendar" - | "dateTimeField" - | "currency"; +type DisplayNamesType = + | "language" + | "region" + | "script" + | "calendar" + | "dateTimeField" + | "currency"; - type DisplayNamesLanguageDisplay = - | "dialect" - | "standard"; +type DisplayNamesLanguageDisplay = + | "dialect" + | "standard"; - interface DisplayNamesOptions { - localeMatcher?: RelativeTimeFormatLocaleMatcher; +interface DisplayNamesOptions { + localeMatcher?: RelativeTimeFormatLocaleMatcher; - style?: RelativeTimeFormatStyle; + style?: RelativeTimeFormatStyle; - type: DisplayNamesType; + type: DisplayNamesType; - languageDisplay?: DisplayNamesLanguageDisplay; + languageDisplay?: DisplayNamesLanguageDisplay; - fallback?: DisplayNamesFallback; - } + fallback?: DisplayNamesFallback; +} - interface ResolvedDisplayNamesOptions { - locale: UnicodeBCP47LocaleIdentifier; +interface ResolvedDisplayNamesOptions { + locale: UnicodeBCP47LocaleIdentifier; - style: RelativeTimeFormatStyle; + style: RelativeTimeFormatStyle; - type: DisplayNamesType; + type: DisplayNamesType; - fallback: DisplayNamesFallback; + fallback: DisplayNamesFallback; - languageDisplay?: DisplayNamesLanguageDisplay; - } + languageDisplay?: DisplayNamesLanguageDisplay; +} - interface DisplayNames { - /** - * Receives a code and returns a string based on the locale and options provided when instantiating - * [`Intl.DisplayNames()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) - * - * @param code The `code` to provide depends on the `type` passed to display name during creation: - * - If the type is `"region"`, code should be either an [ISO-3166 two letters region code](https://www.iso.org/iso-3166-country-codes.html), - * or a [three digits UN M49 Geographic Regions](https://unstats.un.org/unsd/methodology/m49/). - * - If the type is `"script"`, code should be an [ISO-15924 four letters script code](https://unicode.org/iso15924/iso15924-codes.html). - * - If the type is `"language"`, code should be a `languageCode` ["-" `scriptCode`] ["-" `regionCode` ] *("-" `variant` ) - * subsequence of the unicode_language_id grammar in [UTS 35's Unicode Language and Locale Identifiers grammar](https://unicode.org/reports/tr35/#Unicode_language_identifier). - * `languageCode` is either a two letters ISO 639-1 language code or a three letters ISO 639-2 language code. - * - If the type is `"currency"`, code should be a [3-letter ISO 4217 currency code](https://www.iso.org/iso-4217-currency-codes.html). - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/of). - */ - of(code: string): string | undefined; +interface DisplayNames { + /** + * Receives a code and returns a string based on the locale and options provided when instantiating + * [`Intl.DisplayNames()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) + * + * @param code The `code` to provide depends on the `type` passed to display name during creation: + * - If the type is `"region"`, code should be either an [ISO-3166 two letters region code](https://www.iso.org/iso-3166-country-codes.html), + * or a [three digits UN M49 Geographic Regions](https://unstats.un.org/unsd/methodology/m49/). + * - If the type is `"script"`, code should be an [ISO-15924 four letters script code](https://unicode.org/iso15924/iso15924-codes.html). + * - If the type is `"language"`, code should be a `languageCode` ["-" `scriptCode`] ["-" `regionCode` ] *("-" `variant` ) + * subsequence of the unicode_language_id grammar in [UTS 35's Unicode Language and Locale Identifiers grammar](https://unicode.org/reports/tr35/#Unicode_language_identifier). + * `languageCode` is either a two letters ISO 639-1 language code or a three letters ISO 639-2 language code. + * - If the type is `"currency"`, code should be a [3-letter ISO 4217 currency code](https://www.iso.org/iso-4217-currency-codes.html). + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/of). + */ + of(code: string): string | undefined; - /** - * Returns a new object with properties reflecting the locale and style formatting options computed during the construction of the current - * [`Intl/DisplayNames`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/resolvedOptions). - */ - resolvedOptions(): ResolvedDisplayNamesOptions; - } + /** + * Returns a new object with properties reflecting the locale and style formatting options computed during the construction of the current + * [`Intl/DisplayNames`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/resolvedOptions). + */ + resolvedOptions(): ResolvedDisplayNamesOptions; +} - /** - * The [`Intl.DisplayNames()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) - * object enables the consistent translation of language, region and script display names. +/** + * The [`Intl.DisplayNames()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) + * object enables the consistent translation of language, region and script display names. + * + * [Compatibility](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames#browser_compatibility). + */ + const DisplayNames: { + prototype: DisplayNames; + + /** + * @param locales A string with a BCP 47 language tag, or an array of such strings. + * For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) + * page. + * + * @param options An object for setting up a display name. * - * [Compatibility](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames#browser_compatibility). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/DisplayNames). */ - const DisplayNames: { - prototype: DisplayNames; - - /** - * @param locales A string with a BCP 47 language tag, or an array of such strings. - * For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) - * page. - * - * @param options An object for setting up a display name. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/DisplayNames). - */ - new (locales: LocalesArgument, options: DisplayNamesOptions): DisplayNames; - - /** - * Returns an array containing those of the provided locales that are supported in display names without having to fall back to the runtime's default locale. - * - * @param locales A string with a BCP 47 language tag, or an array of such strings. - * For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) - * page. - * - * @param options An object with a locale matcher. - * - * @returns An array of strings representing a subset of the given locale tags that are supported in display names without having to fall back to the runtime's default locale. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/supportedLocalesOf). - */ - supportedLocalesOf(locales?: LocalesArgument, options?: { localeMatcher?: RelativeTimeFormatLocaleMatcher; }): UnicodeBCP47LocaleIdentifier[]; - }; + new (locales: LocalesArgument, options: DisplayNamesOptions): DisplayNames; + + /** + * Returns an array containing those of the provided locales that are supported in display names without having to fall back to the runtime's default locale. + * + * @param locales A string with a BCP 47 language tag, or an array of such strings. + * For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) + * page. + * + * @param options An object with a locale matcher. + * + * @returns An array of strings representing a subset of the given locale tags that are supported in display names without having to fall back to the runtime's default locale. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/supportedLocalesOf). + */ + supportedLocalesOf(locales?: LocalesArgument, options?: { localeMatcher?: RelativeTimeFormatLocaleMatcher; }): UnicodeBCP47LocaleIdentifier[]; +}; - interface CollatorConstructor { - new (locales?: LocalesArgument, options?: CollatorOptions): Collator; +interface CollatorConstructor { + new (locales?: LocalesArgument, options?: CollatorOptions): Collator; - (locales?: LocalesArgument, options?: CollatorOptions): Collator; + (locales?: LocalesArgument, options?: CollatorOptions): Collator; - supportedLocalesOf(locales: LocalesArgument, options?: CollatorOptions): string[]; - } + supportedLocalesOf(locales: LocalesArgument, options?: CollatorOptions): string[]; +} - interface DateTimeFormatConstructor { - new (locales?: LocalesArgument, options?: DateTimeFormatOptions): DateTimeFormat; +interface DateTimeFormatConstructor { + new (locales?: LocalesArgument, options?: DateTimeFormatOptions): DateTimeFormat; - (locales?: LocalesArgument, options?: DateTimeFormatOptions): DateTimeFormat; + (locales?: LocalesArgument, options?: DateTimeFormatOptions): DateTimeFormat; - supportedLocalesOf(locales: LocalesArgument, options?: DateTimeFormatOptions): string[]; - } + supportedLocalesOf(locales: LocalesArgument, options?: DateTimeFormatOptions): string[]; +} - interface NumberFormatConstructor { - new (locales?: LocalesArgument, options?: NumberFormatOptions): NumberFormat; +interface NumberFormatConstructor { + new (locales?: LocalesArgument, options?: NumberFormatOptions): NumberFormat; - (locales?: LocalesArgument, options?: NumberFormatOptions): NumberFormat; + (locales?: LocalesArgument, options?: NumberFormatOptions): NumberFormat; - supportedLocalesOf(locales: LocalesArgument, options?: NumberFormatOptions): string[]; - } + supportedLocalesOf(locales: LocalesArgument, options?: NumberFormatOptions): string[]; +} - interface PluralRulesConstructor { - new (locales?: LocalesArgument, options?: PluralRulesOptions): PluralRules; +interface PluralRulesConstructor { + new (locales?: LocalesArgument, options?: PluralRulesOptions): PluralRules; - (locales?: LocalesArgument, options?: PluralRulesOptions): PluralRules; + (locales?: LocalesArgument, options?: PluralRulesOptions): PluralRules; - supportedLocalesOf(locales: LocalesArgument, options?: { localeMatcher?: "lookup" | "best fit"; }): string[]; - } + supportedLocalesOf(locales: LocalesArgument, options?: { localeMatcher?: "lookup" | "best fit"; }): string[]; +} } ///////////////////////////// // lib.es2020.number.d.ts ///////////////////////////// interface Number { - /** - * Converts a number to a string by using the current or specified locale. - * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.NumberFormatOptions): string; + /** + * Converts a number to a string by using the current or specified locale. + * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.NumberFormatOptions): string; } ///////////////////////////// // lib.es2020.promise.d.ts ///////////////////////////// interface PromiseFulfilledResult { - status: "fulfilled"; + status: "fulfilled"; - value: T; + value: T; } interface PromiseRejectedResult { - status: "rejected"; + status: "rejected"; - reason: any; + reason: any; } type PromiseSettledResult = PromiseFulfilledResult | PromiseRejectedResult; interface PromiseConstructor { - /** - * Creates a Promise that is resolved with an array of results when all - * of the provided Promises resolve or reject. - * @param values An array of Promises. - * @returns A new Promise. - */ - allSettled(values: T): Promise<{ -readonly [P in keyof T]: PromiseSettledResult>; }>; + /** + * Creates a Promise that is resolved with an array of results when all + * of the provided Promises resolve or reject. + * @param values An array of Promises. + * @returns A new Promise. + */ + allSettled(values: T): Promise<{ -readonly [P in keyof T]: PromiseSettledResult>; }>; - /** - * Creates a Promise that is resolved with an array of results when all - * of the provided Promises resolve or reject. - * @param values An array of Promises. - * @returns A new Promise. - */ - allSettled(values: Iterable>): Promise>[]>; + /** + * Creates a Promise that is resolved with an array of results when all + * of the provided Promises resolve or reject. + * @param values An array of Promises. + * @returns A new Promise. + */ + allSettled(values: Iterable>): Promise>[]>; } ///////////////////////////// // lib.es2020.sharedmemory.d.ts ///////////////////////////// interface Atomics { - /** - * Adds a value to the value at the given position in the array, returning the original value. - * Until this atomic operation completes, any other read or write operation against the array - * will block. - */ - add(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + /** + * Adds a value to the value at the given position in the array, returning the original value. + * Until this atomic operation completes, any other read or write operation against the array + * will block. + */ + add(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - /** - * Stores the bitwise AND of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or - * write operation against the array will block. - */ - and(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + /** + * Stores the bitwise AND of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or + * write operation against the array will block. + */ + and(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - /** - * Replaces the value at the given position in the array if the original value equals the given - * expected value, returning the original value. Until this atomic operation completes, any - * other read or write operation against the array will block. - */ - compareExchange(typedArray: BigInt64Array | BigUint64Array, index: number, expectedValue: bigint, replacementValue: bigint): bigint; + /** + * Replaces the value at the given position in the array if the original value equals the given + * expected value, returning the original value. Until this atomic operation completes, any + * other read or write operation against the array will block. + */ + compareExchange(typedArray: BigInt64Array | BigUint64Array, index: number, expectedValue: bigint, replacementValue: bigint): bigint; - /** - * Replaces the value at the given position in the array, returning the original value. Until - * this atomic operation completes, any other read or write operation against the array will - * block. - */ - exchange(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + /** + * Replaces the value at the given position in the array, returning the original value. Until + * this atomic operation completes, any other read or write operation against the array will + * block. + */ + exchange(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - /** - * Returns the value at the given position in the array. Until this atomic operation completes, - * any other read or write operation against the array will block. - */ - load(typedArray: BigInt64Array | BigUint64Array, index: number): bigint; + /** + * Returns the value at the given position in the array. Until this atomic operation completes, + * any other read or write operation against the array will block. + */ + load(typedArray: BigInt64Array | BigUint64Array, index: number): bigint; - /** - * Stores the bitwise OR of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or write - * operation against the array will block. - */ - or(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + /** + * Stores the bitwise OR of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or write + * operation against the array will block. + */ + or(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - /** - * Stores a value at the given position in the array, returning the new value. Until this - * atomic operation completes, any other read or write operation against the array will block. - */ - store(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + /** + * Stores a value at the given position in the array, returning the new value. Until this + * atomic operation completes, any other read or write operation against the array will block. + */ + store(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - /** - * Subtracts a value from the value at the given position in the array, returning the original - * value. Until this atomic operation completes, any other read or write operation against the - * array will block. - */ - sub(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + /** + * Subtracts a value from the value at the given position in the array, returning the original + * value. Until this atomic operation completes, any other read or write operation against the + * array will block. + */ + sub(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - /** - * If the value at the given position in the array is equal to the provided value, the current - * agent is put to sleep causing execution to suspend until the timeout expires (returning - * `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns - * `"not-equal"`. - */ - wait(typedArray: BigInt64Array, index: number, value: bigint, timeout?: number): "ok" | "not-equal" | "timed-out"; + /** + * If the value at the given position in the array is equal to the provided value, the current + * agent is put to sleep causing execution to suspend until the timeout expires (returning + * `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns + * `"not-equal"`. + */ + wait(typedArray: BigInt64Array, index: number, value: bigint, timeout?: number): "ok" | "not-equal" | "timed-out"; - /** - * Wakes up sleeping agents that are waiting on the given index of the array, returning the - * number of agents that were awoken. - * @param typedArray A shared BigInt64Array. - * @param index The position in the typedArray to wake up on. - * @param count The number of sleeping agents to notify. Defaults to +Infinity. - */ - notify(typedArray: BigInt64Array, index: number, count?: number): number; + /** + * Wakes up sleeping agents that are waiting on the given index of the array, returning the + * number of agents that were awoken. + * @param typedArray A shared BigInt64Array. + * @param index The position in the typedArray to wake up on. + * @param count The number of sleeping agents to notify. Defaults to +Infinity. + */ + notify(typedArray: BigInt64Array, index: number, count?: number): number; - /** - * Stores the bitwise XOR of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or write - * operation against the array will block. - */ - xor(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + /** + * Stores the bitwise XOR of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or write + * operation against the array will block. + */ + xor(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; } ///////////////////////////// // lib.es2020.string.d.ts ///////////////////////////// interface String { - /** - * Matches a string with a regular expression, and returns an iterable of matches - * containing the results of that search. - * @param regexp A regular expression - */ - matchAll(regexp: RegExp): RegExpStringIterator; + /** + * Matches a string with a regular expression, and returns an iterable of matches + * containing the results of that search. + * @param regexp A regular expression + */ + matchAll(regexp: RegExp): RegExpStringIterator; - /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */ - toLocaleLowerCase(locales?: Intl.LocalesArgument): string; + /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */ + toLocaleLowerCase(locales?: Intl.LocalesArgument): string; - /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */ - toLocaleUpperCase(locales?: Intl.LocalesArgument): string; + /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */ + toLocaleUpperCase(locales?: Intl.LocalesArgument): string; - /** - * Determines whether two strings are equivalent in the current or specified locale. - * @param that String to compare to target string - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details. - * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details. - */ - localeCompare(that: string, locales?: Intl.LocalesArgument, options?: Intl.CollatorOptions): number; + /** + * Determines whether two strings are equivalent in the current or specified locale. + * @param that String to compare to target string + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details. + * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details. + */ + localeCompare(that: string, locales?: Intl.LocalesArgument, options?: Intl.CollatorOptions): number; } ///////////////////////////// // lib.es2020.symbol.wellknown.d.ts ///////////////////////////// interface SymbolConstructor { - /** - * A regular expression method that matches the regular expression against a string. Called - * by the String.prototype.matchAll method. - */ - readonly matchAll: unique symbol; + /** + * A regular expression method that matches the regular expression against a string. Called + * by the String.prototype.matchAll method. + */ + readonly matchAll: unique symbol; } interface RegExpStringIterator extends IteratorObject { - [Symbol.iterator](): RegExpStringIterator; + [Symbol.iterator](): RegExpStringIterator; } interface RegExp { - /** - * Matches a string with this regular expression, and returns an iterable of matches - * containing the results of that search. - * @param string A string to search within. - */ - [Symbol.matchAll](str: string): RegExpStringIterator; + /** + * Matches a string with this regular expression, and returns an iterable of matches + * containing the results of that search. + * @param string A string to search within. + */ + [Symbol.matchAll](str: string): RegExpStringIterator; } ///////////////////////////// // lib.es2021.intl.d.ts ///////////////////////////// declare namespace Intl { - interface DateTimeFormatOptions { - dateStyle?: "full" | "long" | "medium" | "short" | undefined; +interface DateTimeFormatOptions { + dateStyle?: "full" | "long" | "medium" | "short" | undefined; - timeStyle?: "full" | "long" | "medium" | "short" | undefined; + timeStyle?: "full" | "long" | "medium" | "short" | undefined; - dayPeriod?: "narrow" | "short" | "long" | undefined; + dayPeriod?: "narrow" | "short" | "long" | undefined; - fractionalSecondDigits?: 1 | 2 | 3 | undefined; - } + fractionalSecondDigits?: 1 | 2 | 3 | undefined; +} - interface DateTimeRangeFormatPart extends DateTimeFormatPart { - source: "startRange" | "endRange" | "shared"; - } +interface DateTimeRangeFormatPart extends DateTimeFormatPart { + source: "startRange" | "endRange" | "shared"; +} - interface DateTimeFormat { - formatRange(startDate: Date | number | bigint, endDate: Date | number | bigint): string; +interface DateTimeFormat { + formatRange(startDate: Date | number | bigint, endDate: Date | number | bigint): string; - formatRangeToParts(startDate: Date | number | bigint, endDate: Date | number | bigint): DateTimeRangeFormatPart[]; - } + formatRangeToParts(startDate: Date | number | bigint, endDate: Date | number | bigint): DateTimeRangeFormatPart[]; +} - interface ResolvedDateTimeFormatOptions { - dateStyle?: "full" | "long" | "medium" | "short"; +interface ResolvedDateTimeFormatOptions { + dateStyle?: "full" | "long" | "medium" | "short"; - timeStyle?: "full" | "long" | "medium" | "short"; + timeStyle?: "full" | "long" | "medium" | "short"; - hourCycle?: "h11" | "h12" | "h23" | "h24"; + hourCycle?: "h11" | "h12" | "h23" | "h24"; - dayPeriod?: "narrow" | "short" | "long"; + dayPeriod?: "narrow" | "short" | "long"; - fractionalSecondDigits?: 1 | 2 | 3; - } + fractionalSecondDigits?: 1 | 2 | 3; +} - /** - * The locale matching algorithm to use. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). - */ - type ListFormatLocaleMatcher = "lookup" | "best fit"; +/** + * The locale matching algorithm to use. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). + */ + type ListFormatLocaleMatcher = "lookup" | "best fit"; - /** - * The format of output message. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). - */ - type ListFormatType = "conjunction" | "disjunction" | "unit"; +/** + * The format of output message. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). + */ + type ListFormatType = "conjunction" | "disjunction" | "unit"; - /** - * The length of the formatted message. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). - */ - type ListFormatStyle = "long" | "short" | "narrow"; +/** + * The length of the formatted message. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). + */ + type ListFormatStyle = "long" | "short" | "narrow"; - /** - * An object with some or all properties of the `Intl.ListFormat` constructor `options` parameter. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). - */ - interface ListFormatOptions { - /** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */ - localeMatcher?: ListFormatLocaleMatcher | undefined; - - /** The format of output message. */ - type?: ListFormatType | undefined; - - /** The length of the internationalized message. */ - style?: ListFormatStyle | undefined; - } - - interface ResolvedListFormatOptions { - locale: string; - - style: ListFormatStyle; - - type: ListFormatType; - } - - interface ListFormat { - /** - * Returns a string with a language-specific representation of the list. - * - * @param list - An iterable object, such as an [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array). - * - * @throws `TypeError` if `list` includes something other than the possible values. - * - * @returns {string} A language-specific formatted string representing the elements of the list. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/format). - */ - format(list: Iterable): string; - - /** - * Returns an Array of objects representing the different components that can be used to format a list of values in a locale-aware fashion. - * - * @param list - An iterable object, such as an [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array), to be formatted according to a locale. - * - * @throws `TypeError` if `list` includes something other than the possible values. - * - * @returns {{ type: "element" | "literal", value: string; }[]} An Array of components which contains the formatted parts from the list. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/formatToParts). - */ - formatToParts(list: Iterable): { type: "element" | "literal"; value: string; }[]; - - /** - * Returns a new object with properties reflecting the locale and style - * formatting options computed during the construction of the current - * `Intl.ListFormat` object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/resolvedOptions). - */ - resolvedOptions(): ResolvedListFormatOptions; - } - - const ListFormat: { - prototype: ListFormat; - - /** - * Creates [Intl.ListFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat) objects that - * enable language-sensitive list formatting. - * - * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. - * For the general form and interpretation of the `locales` argument, - * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). - * - * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters) - * with some or all options of `ListFormatOptions`. - * - * @returns [Intl.ListFormatOptions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat) object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat). - */ - new (locales?: LocalesArgument, options?: ListFormatOptions): ListFormat; - - /** - * Returns an array containing those of the provided locales that are - * supported in list formatting without having to fall back to the runtime's default locale. - * - * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. - * For the general form and interpretation of the `locales` argument, - * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). - * - * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf#parameters). - * with some or all possible options. - * - * @returns An array of strings representing a subset of the given locale tags that are supported in list - * formatting without having to fall back to the runtime's default locale. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf). - */ - supportedLocalesOf(locales: LocalesArgument, options?: Pick): UnicodeBCP47LocaleIdentifier[]; - }; -} +/** + * An object with some or all properties of the `Intl.ListFormat` constructor `options` parameter. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). + */ + interface ListFormatOptions { + /** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */ + localeMatcher?: ListFormatLocaleMatcher | undefined; -///////////////////////////// -// lib.es2021.promise.d.ts -///////////////////////////// -interface AggregateError extends Error { - errors: any[]; + /** The format of output message. */ + type?: ListFormatType | undefined; + + /** The length of the internationalized message. */ + style?: ListFormatStyle | undefined; } -interface AggregateErrorConstructor { - new (errors: Iterable, message?: string): AggregateError; +interface ResolvedListFormatOptions { + locale: string; - (errors: Iterable, message?: string): AggregateError; + style: ListFormatStyle; - readonly prototype: AggregateError; + type: ListFormatType; } -declare var AggregateError: AggregateErrorConstructor; +interface ListFormat { + /** + * Returns a string with a language-specific representation of the list. + * + * @param list - An iterable object, such as an [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array). + * + * @throws `TypeError` if `list` includes something other than the possible values. + * + * @returns {string} A language-specific formatted string representing the elements of the list. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/format). + */ + format(list: Iterable): string; -/** - * Represents the completion of an asynchronous operation - */ -interface PromiseConstructor { /** - * The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm. - * @param values An array or iterable of Promises. - * @returns A new Promise. + * Returns an Array of objects representing the different components that can be used to format a list of values in a locale-aware fashion. + * + * @param list - An iterable object, such as an [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array), to be formatted according to a locale. + * + * @throws `TypeError` if `list` includes something other than the possible values. + * + * @returns {{ type: "element" | "literal", value: string; }[]} An Array of components which contains the formatted parts from the list. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/formatToParts). */ - any(values: T): Promise>; + formatToParts(list: Iterable): { type: "element" | "literal"; value: string; }[]; /** - * The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm. - * @param values An array or iterable of Promises. - * @returns A new Promise. + * Returns a new object with properties reflecting the locale and style + * formatting options computed during the construction of the current + * `Intl.ListFormat` object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/resolvedOptions). */ - any(values: Iterable>): Promise>; + resolvedOptions(): ResolvedListFormatOptions; } -///////////////////////////// -// lib.es2021.string.d.ts -///////////////////////////// -interface String { +const ListFormat: { + prototype: ListFormat; + /** - * Replace all instances of a substring in a string, using a regular expression or search string. - * @param searchValue A string to search for. - * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string. + * Creates [Intl.ListFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat) objects that + * enable language-sensitive list formatting. + * + * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. + * For the general form and interpretation of the `locales` argument, + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters) + * with some or all options of `ListFormatOptions`. + * + * @returns [Intl.ListFormatOptions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat) object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat). */ - replaceAll(searchValue: string | RegExp, replaceValue: string): string; + new (locales?: LocalesArgument, options?: ListFormatOptions): ListFormat; /** - * Replace all instances of a substring in a string, using a regular expression or search string. - * @param searchValue A string to search for. - * @param replacer A function that returns the replacement text. + * Returns an array containing those of the provided locales that are + * supported in list formatting without having to fall back to the runtime's default locale. + * + * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. + * For the general form and interpretation of the `locales` argument, + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf#parameters). + * with some or all possible options. + * + * @returns An array of strings representing a subset of the given locale tags that are supported in list + * formatting without having to fall back to the runtime's default locale. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf). */ - replaceAll(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; + supportedLocalesOf(locales: LocalesArgument, options?: Pick): UnicodeBCP47LocaleIdentifier[]; +}; +} + +///////////////////////////// +// lib.es2021.promise.d.ts +///////////////////////////// +interface AggregateError extends Error { + errors: any[]; +} + +interface AggregateErrorConstructor { + new (errors: Iterable, message?: string): AggregateError; + + (errors: Iterable, message?: string): AggregateError; + + readonly prototype: AggregateError; +} + +declare var AggregateError: AggregateErrorConstructor; + +/** + * Represents the completion of an asynchronous operation + */ +interface PromiseConstructor { + /** + * The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm. + * @param values An array or iterable of Promises. + * @returns A new Promise. + */ + any(values: T): Promise>; + + /** + * The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm. + * @param values An array or iterable of Promises. + * @returns A new Promise. + */ + any(values: Iterable>): Promise>; +} + +///////////////////////////// +// lib.es2021.string.d.ts +///////////////////////////// +interface String { + /** + * Replace all instances of a substring in a string, using a regular expression or search string. + * @param searchValue A string to search for. + * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string. + */ + replaceAll(searchValue: string | RegExp, replaceValue: string): string; + + /** + * Replace all instances of a substring in a string, using a regular expression or search string. + * @param searchValue A string to search for. + * @param replacer A function that returns the replacement text. + */ + replaceAll(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; } ///////////////////////////// // lib.es2021.weakref.d.ts ///////////////////////////// interface WeakRef { - readonly [Symbol.toStringTag]: "WeakRef"; + readonly [Symbol.toStringTag]: "WeakRef"; - /** - * Returns the WeakRef instance's target value, or undefined if the target value has been - * reclaimed. - * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. - */ - deref(): T | undefined; + /** + * Returns the WeakRef instance's target value, or undefined if the target value has been + * reclaimed. + * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. + */ + deref(): T | undefined; } interface WeakRefConstructor { - readonly prototype: WeakRef; + readonly prototype: WeakRef; - /** - * Creates a WeakRef instance for the given target value. - * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. - * @param target The target value for the WeakRef instance. - */ - new (target: T): WeakRef; + /** + * Creates a WeakRef instance for the given target value. + * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. + * @param target The target value for the WeakRef instance. + */ + new (target: T): WeakRef; } declare var WeakRef: WeakRefConstructor; interface FinalizationRegistry { - readonly [Symbol.toStringTag]: "FinalizationRegistry"; + readonly [Symbol.toStringTag]: "FinalizationRegistry"; - /** - * Registers a value with the registry. - * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. - * @param target The target value to register. - * @param heldValue The value to pass to the finalizer for this value. This cannot be the - * target value. - * @param unregisterToken The token to pass to the unregister method to unregister the target - * value. If not provided, the target cannot be unregistered. - */ - register(target: WeakKey, heldValue: T, unregisterToken?: WeakKey): void; + /** + * Registers a value with the registry. + * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. + * @param target The target value to register. + * @param heldValue The value to pass to the finalizer for this value. This cannot be the + * target value. + * @param unregisterToken The token to pass to the unregister method to unregister the target + * value. If not provided, the target cannot be unregistered. + */ + register(target: WeakKey, heldValue: T, unregisterToken?: WeakKey): void; - /** - * Unregisters a value from the registry. - * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. - * @param unregisterToken The token that was used as the unregisterToken argument when calling - * register to register the target value. - */ - unregister(unregisterToken: WeakKey): boolean; + /** + * Unregisters a value from the registry. + * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. + * @param unregisterToken The token that was used as the unregisterToken argument when calling + * register to register the target value. + */ + unregister(unregisterToken: WeakKey): boolean; } interface FinalizationRegistryConstructor { - readonly prototype: FinalizationRegistry; + readonly prototype: FinalizationRegistry; - /** - * Creates a finalization registry with an associated cleanup callback - * @param cleanupCallback The callback to call after a value in the registry has been reclaimed. - */ - new (cleanupCallback: (heldValue: T) => void): FinalizationRegistry; + /** + * Creates a finalization registry with an associated cleanup callback + * @param cleanupCallback The callback to call after a value in the registry has been reclaimed. + */ + new (cleanupCallback: (heldValue: T) => void): FinalizationRegistry; } declare var FinalizationRegistry: FinalizationRegistryConstructor; @@ -4358,105 +4358,105 @@ declare var FinalizationRegistry: FinalizationRegistryConstructor; // lib.es2022.error.d.ts ///////////////////////////// interface ErrorOptions { - cause?: unknown; + cause?: unknown; } interface Error { - cause?: unknown; + cause?: unknown; } interface ErrorConstructor { - new (message?: string, options?: ErrorOptions): Error; + new (message?: string, options?: ErrorOptions): Error; - (message?: string, options?: ErrorOptions): Error; + (message?: string, options?: ErrorOptions): Error; } interface EvalErrorConstructor { - new (message?: string, options?: ErrorOptions): EvalError; + new (message?: string, options?: ErrorOptions): EvalError; - (message?: string, options?: ErrorOptions): EvalError; + (message?: string, options?: ErrorOptions): EvalError; } interface RangeErrorConstructor { - new (message?: string, options?: ErrorOptions): RangeError; + new (message?: string, options?: ErrorOptions): RangeError; - (message?: string, options?: ErrorOptions): RangeError; + (message?: string, options?: ErrorOptions): RangeError; } interface ReferenceErrorConstructor { - new (message?: string, options?: ErrorOptions): ReferenceError; + new (message?: string, options?: ErrorOptions): ReferenceError; - (message?: string, options?: ErrorOptions): ReferenceError; + (message?: string, options?: ErrorOptions): ReferenceError; } interface SyntaxErrorConstructor { - new (message?: string, options?: ErrorOptions): SyntaxError; + new (message?: string, options?: ErrorOptions): SyntaxError; - (message?: string, options?: ErrorOptions): SyntaxError; + (message?: string, options?: ErrorOptions): SyntaxError; } interface TypeErrorConstructor { - new (message?: string, options?: ErrorOptions): TypeError; + new (message?: string, options?: ErrorOptions): TypeError; - (message?: string, options?: ErrorOptions): TypeError; + (message?: string, options?: ErrorOptions): TypeError; } interface URIErrorConstructor { - new (message?: string, options?: ErrorOptions): URIError; + new (message?: string, options?: ErrorOptions): URIError; - (message?: string, options?: ErrorOptions): URIError; + (message?: string, options?: ErrorOptions): URIError; } interface AggregateErrorConstructor { - new ( - errors: Iterable, - message?: string, - options?: ErrorOptions, - ): AggregateError; + new ( + errors: Iterable, + message?: string, + options?: ErrorOptions, + ): AggregateError; - ( - errors: Iterable, - message?: string, - options?: ErrorOptions, - ): AggregateError; + ( + errors: Iterable, + message?: string, + options?: ErrorOptions, + ): AggregateError; } ///////////////////////////// // lib.es2022.regexp.d.ts ///////////////////////////// interface RegExp { - /** - * Returns a Boolean value indicating the state of the hasIndices flag (d) used with a regular expression. - * Default is false. Read-only. - */ - readonly hasIndices: boolean; + /** + * Returns a Boolean value indicating the state of the hasIndices flag (d) used with a regular expression. + * Default is false. Read-only. + */ + readonly hasIndices: boolean; } ///////////////////////////// // lib.es2023.intl.d.ts ///////////////////////////// declare namespace Intl { - type StringNumericLiteral = `${number}` | "Infinity" | "-Infinity" | "+Infinity"; +type StringNumericLiteral = `${number}` | "Infinity" | "-Infinity" | "+Infinity"; - interface NumberFormat { - format(value: number | bigint | StringNumericLiteral): string; +interface NumberFormat { + format(value: number | bigint | StringNumericLiteral): string; - formatToParts(value: number | bigint | StringNumericLiteral): NumberFormatPart[]; - } + formatToParts(value: number | bigint | StringNumericLiteral): NumberFormatPart[]; +} } ///////////////////////////// // lib.es2024.arraybuffer.d.ts ///////////////////////////// interface ArrayBufferConstructor { - new (byteLength: number): ArrayBuffer; + new (byteLength: number): ArrayBuffer; } ///////////////////////////// // lib.es2024.sharedmemory.d.ts ///////////////////////////// interface SharedArrayBufferConstructor { - new (byteLength: number): SharedArrayBuffer; + new (byteLength: number): SharedArrayBuffer; } ///////////////////////////// @@ -4528,177 +4528,177 @@ declare function encodeURI(uri: string): string; declare function encodeURIComponent(uriComponent: string | number | boolean): string; interface Symbol { - /** Returns a string representation of an object. */ - toString(): string; + /** Returns a string representation of an object. */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): symbol; + /** Returns the primitive value of the specified object. */ + valueOf(): symbol; } declare type PropertyKey = string | number | symbol; interface PropertyDescriptor { - configurable?: boolean; + configurable?: boolean; - enumerable?: boolean; + enumerable?: boolean; - value?: any; + value?: any; - writable?: boolean; + writable?: boolean; - get?(): any; + get?(): any; - set?(v: any): void; + set?(v: any): void; } interface PropertyDescriptorMap { - [key: PropertyKey]: PropertyDescriptor; + [key: PropertyKey]: PropertyDescriptor; } interface Object { - /** The initial value of Object.prototype.constructor is the standard built-in Object constructor. */ - constructor: Function; + /** The initial value of Object.prototype.constructor is the standard built-in Object constructor. */ + constructor: Function; - /** Returns a string representation of an object. */ - toString(): string; + /** Returns a string representation of an object. */ + toString(): string; - /** Returns a date converted to a string using the current locale. */ - toLocaleString(): string; + /** Returns a date converted to a string using the current locale. */ + toLocaleString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): Object; + /** Returns the primitive value of the specified object. */ + valueOf(): Object; - /** - * Determines whether an object has a property with the specified name. - * @param v A property name. - */ - hasOwnProperty(v: PropertyKey): boolean; + /** + * Determines whether an object has a property with the specified name. + * @param v A property name. + */ + hasOwnProperty(v: PropertyKey): boolean; - /** - * Determines whether an object exists in another object's prototype chain. - * @param v Another object whose prototype chain is to be checked. - */ - isPrototypeOf(v: Object): boolean; + /** + * Determines whether an object exists in another object's prototype chain. + * @param v Another object whose prototype chain is to be checked. + */ + isPrototypeOf(v: Object): boolean; - /** - * Determines whether a specified property is enumerable. - * @param v A property name. - */ - propertyIsEnumerable(v: PropertyKey): boolean; + /** + * Determines whether a specified property is enumerable. + * @param v A property name. + */ + propertyIsEnumerable(v: PropertyKey): boolean; } interface ObjectConstructor { - new (value?: any): Object; + new (value?: any): Object; - (): any; + (): any; - (value: any): any; + (value: any): any; - /** A reference to the prototype for a class of objects. */ - readonly prototype: Object; + /** A reference to the prototype for a class of objects. */ + readonly prototype: Object; - /** - * Returns the prototype of an object. - * @param o The object that references the prototype. - */ - getPrototypeOf(o: any): any; + /** + * Returns the prototype of an object. + * @param o The object that references the prototype. + */ + getPrototypeOf(o: any): any; - /** - * Gets the own property descriptor of the specified object. - * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype. - * @param o Object that contains the property. - * @param p Name of the property. - */ - getOwnPropertyDescriptor(o: any, p: PropertyKey): PropertyDescriptor | undefined; + /** + * Gets the own property descriptor of the specified object. + * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype. + * @param o Object that contains the property. + * @param p Name of the property. + */ + getOwnPropertyDescriptor(o: any, p: PropertyKey): PropertyDescriptor | undefined; - /** - * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly - * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions. - * @param o Object that contains the own properties. - */ - getOwnPropertyNames(o: any): string[]; + /** + * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly + * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions. + * @param o Object that contains the own properties. + */ + getOwnPropertyNames(o: any): string[]; - /** - * Creates an object that has the specified prototype or that has null prototype. - * @param o Object to use as a prototype. May be null. - */ - create(o: object | null): any; + /** + * Creates an object that has the specified prototype or that has null prototype. + * @param o Object to use as a prototype. May be null. + */ + create(o: object | null): any; - /** - * Creates an object that has the specified prototype, and that optionally contains specified properties. - * @param o Object to use as a prototype. May be null - * @param properties JavaScript object that contains one or more property descriptors. - */ - create(o: object | null, properties: PropertyDescriptorMap & ThisType): any; + /** + * Creates an object that has the specified prototype, and that optionally contains specified properties. + * @param o Object to use as a prototype. May be null + * @param properties JavaScript object that contains one or more property descriptors. + */ + create(o: object | null, properties: PropertyDescriptorMap & ThisType): any; - /** - * Adds a property to an object, or modifies attributes of an existing property. - * @param o Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object. - * @param p The property name. - * @param attributes Descriptor for the property. It can be for a data property or an accessor property. - */ - defineProperty(o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType): T; + /** + * Adds a property to an object, or modifies attributes of an existing property. + * @param o Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object. + * @param p The property name. + * @param attributes Descriptor for the property. It can be for a data property or an accessor property. + */ + defineProperty(o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType): T; - /** - * Adds one or more properties to an object, and/or modifies attributes of existing properties. - * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object. - * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property. - */ - defineProperties(o: T, properties: PropertyDescriptorMap & ThisType): T; + /** + * Adds one or more properties to an object, and/or modifies attributes of existing properties. + * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object. + * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property. + */ + defineProperties(o: T, properties: PropertyDescriptorMap & ThisType): T; - /** - * Prevents the modification of attributes of existing properties, and prevents the addition of new properties. - * @param o Object on which to lock the attributes. - */ - seal(o: T): T; + /** + * Prevents the modification of attributes of existing properties, and prevents the addition of new properties. + * @param o Object on which to lock the attributes. + */ + seal(o: T): T; - /** - * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. - * @param f Object on which to lock the attributes. - */ - freeze(f: T): T; + /** + * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. + * @param f Object on which to lock the attributes. + */ + freeze(f: T): T; - /** - * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. - * @param o Object on which to lock the attributes. - */ - freeze(o: T): Readonly; + /** + * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. + * @param o Object on which to lock the attributes. + */ + freeze(o: T): Readonly; - /** - * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. - * @param o Object on which to lock the attributes. - */ - freeze(o: T): Readonly; + /** + * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. + * @param o Object on which to lock the attributes. + */ + freeze(o: T): Readonly; - /** - * Prevents the addition of new properties to an object. - * @param o Object to make non-extensible. - */ - preventExtensions(o: T): T; + /** + * Prevents the addition of new properties to an object. + * @param o Object to make non-extensible. + */ + preventExtensions(o: T): T; - /** - * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object. - * @param o Object to test. - */ - isSealed(o: any): boolean; + /** + * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object. + * @param o Object to test. + */ + isSealed(o: any): boolean; - /** - * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object. - * @param o Object to test. - */ - isFrozen(o: any): boolean; + /** + * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object. + * @param o Object to test. + */ + isFrozen(o: any): boolean; - /** - * Returns a value that indicates whether new properties can be added to an object. - * @param o Object to test. - */ - isExtensible(o: any): boolean; + /** + * Returns a value that indicates whether new properties can be added to an object. + * @param o Object to test. + */ + isExtensible(o: any): boolean; - /** - * Returns the names of the enumerable string properties and methods of an object. - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - keys(o: object): string[]; + /** + * Returns the names of the enumerable string properties and methods of an object. + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + keys(o: object): string[]; } /** @@ -4710,46 +4710,46 @@ declare var Object: ObjectConstructor; * Creates a new function. */ interface Function { - /** - * Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function. - * @param thisArg The object to be used as the this object. - * @param argArray A set of arguments to be passed to the function. - */ - apply(this: Function, thisArg: any, argArray?: any): any; + /** + * Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function. + * @param thisArg The object to be used as the this object. + * @param argArray A set of arguments to be passed to the function. + */ + apply(this: Function, thisArg: any, argArray?: any): any; - /** - * Calls a method of an object, substituting another object for the current object. - * @param thisArg The object to be used as the current object. - * @param argArray A list of arguments to be passed to the method. - */ - call(this: Function, thisArg: any, ...argArray: any[]): any; + /** + * Calls a method of an object, substituting another object for the current object. + * @param thisArg The object to be used as the current object. + * @param argArray A list of arguments to be passed to the method. + */ + call(this: Function, thisArg: any, ...argArray: any[]): any; - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg An object to which the this keyword can refer inside the new function. - * @param argArray A list of arguments to be passed to the new function. - */ - bind(this: Function, thisArg: any, ...argArray: any[]): any; + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg An object to which the this keyword can refer inside the new function. + * @param argArray A list of arguments to be passed to the new function. + */ + bind(this: Function, thisArg: any, ...argArray: any[]): any; - /** Returns a string representation of a function. */ - toString(): string; + /** Returns a string representation of a function. */ + toString(): string; - prototype: any; + prototype: any; - readonly length: number; + readonly length: number; } interface FunctionConstructor { - /** - * Creates a new function. - * @param args A list of arguments the function accepts. - */ - new (...args: string[]): Function; + /** + * Creates a new function. + * @param args A list of arguments the function accepts. + */ + new (...args: string[]): Function; - (...args: string[]): Function; + (...args: string[]): Function; - readonly prototype: Function; + readonly prototype: Function; } declare var Function: FunctionConstructor; @@ -4765,208 +4765,208 @@ type ThisParameterType = T extends (this: infer U, ...args: never) => any ? U type OmitThisParameter = unknown extends ThisParameterType ? T : T extends (...args: infer A) => infer R ? (...args: A) => R : T; interface CallableFunction extends Function { - /** - * Calls the function with the specified object as the this value and the elements of specified array as the arguments. - * @param thisArg The object to be used as the this object. - */ - apply(this: (this: T) => R, thisArg: T): R; + /** + * Calls the function with the specified object as the this value and the elements of specified array as the arguments. + * @param thisArg The object to be used as the this object. + */ + apply(this: (this: T) => R, thisArg: T): R; - /** - * Calls the function with the specified object as the this value and the elements of specified array as the arguments. - * @param thisArg The object to be used as the this object. - * @param args An array of argument values to be passed to the function. - */ - apply(this: (this: T, ...args: A) => R, thisArg: T, args: A): R; + /** + * Calls the function with the specified object as the this value and the elements of specified array as the arguments. + * @param thisArg The object to be used as the this object. + * @param args An array of argument values to be passed to the function. + */ + apply(this: (this: T, ...args: A) => R, thisArg: T, args: A): R; - /** - * Calls the function with the specified object as the this value and the specified rest arguments as the arguments. - * @param thisArg The object to be used as the this object. - * @param args Argument values to be passed to the function. - */ - call(this: (this: T, ...args: A) => R, thisArg: T, ...args: A): R; + /** + * Calls the function with the specified object as the this value and the specified rest arguments as the arguments. + * @param thisArg The object to be used as the this object. + * @param args Argument values to be passed to the function. + */ + call(this: (this: T, ...args: A) => R, thisArg: T, ...args: A): R; - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg The object to be used as the this object. - */ - bind(this: T, thisArg: ThisParameterType): OmitThisParameter; + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg The object to be used as the this object. + */ + bind(this: T, thisArg: ThisParameterType): OmitThisParameter; - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg The object to be used as the this object. - * @param args Arguments to bind to the parameters of the function. - */ - bind(this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg The object to be used as the this object. + * @param args Arguments to bind to the parameters of the function. + */ + bind(this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } interface NewableFunction extends Function { - /** - * Calls the function with the specified object as the this value and the elements of specified array as the arguments. - * @param thisArg The object to be used as the this object. - */ - apply(this: new () => T, thisArg: T): void; + /** + * Calls the function with the specified object as the this value and the elements of specified array as the arguments. + * @param thisArg The object to be used as the this object. + */ + apply(this: new () => T, thisArg: T): void; - /** - * Calls the function with the specified object as the this value and the elements of specified array as the arguments. - * @param thisArg The object to be used as the this object. - * @param args An array of argument values to be passed to the function. - */ - apply(this: new (...args: A) => T, thisArg: T, args: A): void; + /** + * Calls the function with the specified object as the this value and the elements of specified array as the arguments. + * @param thisArg The object to be used as the this object. + * @param args An array of argument values to be passed to the function. + */ + apply(this: new (...args: A) => T, thisArg: T, args: A): void; - /** - * Calls the function with the specified object as the this value and the specified rest arguments as the arguments. - * @param thisArg The object to be used as the this object. - * @param args Argument values to be passed to the function. - */ - call(this: new (...args: A) => T, thisArg: T, ...args: A): void; + /** + * Calls the function with the specified object as the this value and the specified rest arguments as the arguments. + * @param thisArg The object to be used as the this object. + * @param args Argument values to be passed to the function. + */ + call(this: new (...args: A) => T, thisArg: T, ...args: A): void; - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg The object to be used as the this object. - */ - bind(this: T, thisArg: any): T; + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg The object to be used as the this object. + */ + bind(this: T, thisArg: any): T; - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg The object to be used as the this object. - * @param args Arguments to bind to the parameters of the function. - */ - bind(this: new (...args: [...A, ...B]) => R, thisArg: any, ...args: A): new (...args: B) => R; + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg The object to be used as the this object. + * @param args Arguments to bind to the parameters of the function. + */ + bind(this: new (...args: [...A, ...B]) => R, thisArg: any, ...args: A): new (...args: B) => R; } interface IArguments { - [index: number]: any; + [index: number]: any; - length: number; + length: number; } interface String { - /** Returns a string representation of a string. */ - toString(): string; + /** Returns a string representation of a string. */ + toString(): string; - /** - * Returns the character at the specified index. - * @param pos The zero-based index of the desired character. - */ - charAt(pos: number): string; + /** + * Returns the character at the specified index. + * @param pos The zero-based index of the desired character. + */ + charAt(pos: number): string; - /** - * Returns the Unicode value of the character at the specified location, or NaN if the index is out of bounds. - * @param index The zero-based index of the desired character. - */ - charCodeAt(index: number): number; + /** + * Returns the Unicode value of the character at the specified location, or NaN if the index is out of bounds. + * @param index The zero-based index of the desired character. + */ + charCodeAt(index: number): number; - /** - * Returns a string that contains the concatenation of two or more strings. - * @param strings The strings to append to the end of the string. - */ - concat(...strings: string[]): string; + /** + * Returns a string that contains the concatenation of two or more strings. + * @param strings The strings to append to the end of the string. + */ + concat(...strings: string[]): string; - /** - * Returns the position of the first occurrence of a substring, or -1 if it is not present. - * @param searchString The substring to search for in the string - * @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string. - */ - indexOf(searchString: string, position?: number): number; + /** + * Returns the position of the first occurrence of a substring, or -1 if it is not present. + * @param searchString The substring to search for in the string + * @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string. + */ + indexOf(searchString: string, position?: number): number; - /** - * Returns the last occurrence of a substring in the string, or -1 if it is not present. - * @param searchString The substring to search for. - * @param position The index at which to begin searching. If omitted, the search begins at the end of the string. - */ - lastIndexOf(searchString: string, position?: number): number; + /** + * Returns the last occurrence of a substring in the string, or -1 if it is not present. + * @param searchString The substring to search for. + * @param position The index at which to begin searching. If omitted, the search begins at the end of the string. + */ + lastIndexOf(searchString: string, position?: number): number; - /** - * Determines whether two strings are equivalent in the current locale. - * @param that String to compare to target string - */ - localeCompare(that: string): number; + /** + * Determines whether two strings are equivalent in the current locale. + * @param that String to compare to target string + */ + localeCompare(that: string): number; - /** - * Matches a string with a regular expression, and returns an array containing the results of that search. - * @param regexp A variable name or string literal containing the regular expression pattern and flags. - */ - match(regexp: string | RegExp): RegExpMatchArray | null; + /** + * Matches a string with a regular expression, and returns an array containing the results of that search. + * @param regexp A variable name or string literal containing the regular expression pattern and flags. + */ + match(regexp: string | RegExp): RegExpMatchArray | null; - /** - * Replaces text in a string, using a regular expression or search string. - * @param searchValue A string or regular expression to search for. - * @param replaceValue A string containing the text to replace. When the {@linkcode searchValue} is a `RegExp`, all matches are replaced if the `g` flag is set (or only those matches at the beginning, if the `y` flag is also present). Otherwise, only the first match of {@linkcode searchValue} is replaced. - */ - replace(searchValue: string | RegExp, replaceValue: string): string; + /** + * Replaces text in a string, using a regular expression or search string. + * @param searchValue A string or regular expression to search for. + * @param replaceValue A string containing the text to replace. When the {@linkcode searchValue} is a `RegExp`, all matches are replaced if the `g` flag is set (or only those matches at the beginning, if the `y` flag is also present). Otherwise, only the first match of {@linkcode searchValue} is replaced. + */ + replace(searchValue: string | RegExp, replaceValue: string): string; - /** - * Replaces text in a string, using a regular expression or search string. - * @param searchValue A string to search for. - * @param replacer A function that returns the replacement text. - */ - replace(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; + /** + * Replaces text in a string, using a regular expression or search string. + * @param searchValue A string to search for. + * @param replacer A function that returns the replacement text. + */ + replace(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; - /** - * Finds the first substring match in a regular expression search. - * @param regexp The regular expression pattern and applicable flags. - */ - search(regexp: string | RegExp): number; + /** + * Finds the first substring match in a regular expression search. + * @param regexp The regular expression pattern and applicable flags. + */ + search(regexp: string | RegExp): number; - /** - * Returns a section of a string. - * @param start The index to the beginning of the specified portion of stringObj. - * @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end. - * If this value is not specified, the substring continues to the end of stringObj. - */ - slice(start?: number, end?: number): string; + /** + * Returns a section of a string. + * @param start The index to the beginning of the specified portion of stringObj. + * @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end. + * If this value is not specified, the substring continues to the end of stringObj. + */ + slice(start?: number, end?: number): string; - /** - * Split a string into substrings using the specified separator and return them as an array. - * @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned. - * @param limit A value used to limit the number of elements returned in the array. - */ - split(separator: string | RegExp, limit?: number): string[]; + /** + * Split a string into substrings using the specified separator and return them as an array. + * @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned. + * @param limit A value used to limit the number of elements returned in the array. + */ + split(separator: string | RegExp, limit?: number): string[]; - /** - * Returns the substring at the specified location within a String object. - * @param start The zero-based index number indicating the beginning of the substring. - * @param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end. - * If end is omitted, the characters from start through the end of the original string are returned. - */ - substring(start: number, end?: number): string; + /** + * Returns the substring at the specified location within a String object. + * @param start The zero-based index number indicating the beginning of the substring. + * @param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end. + * If end is omitted, the characters from start through the end of the original string are returned. + */ + substring(start: number, end?: number): string; - /** Converts all the alphabetic characters in a string to lowercase. */ - toLowerCase(): string; + /** Converts all the alphabetic characters in a string to lowercase. */ + toLowerCase(): string; - /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */ - toLocaleLowerCase(locales?: string | string[]): string; + /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */ + toLocaleLowerCase(locales?: string | string[]): string; - /** Converts all the alphabetic characters in a string to uppercase. */ - toUpperCase(): string; + /** Converts all the alphabetic characters in a string to uppercase. */ + toUpperCase(): string; - /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */ - toLocaleUpperCase(locales?: string | string[]): string; + /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */ + toLocaleUpperCase(locales?: string | string[]): string; - /** Removes the leading and trailing white space and line terminator characters from a string. */ - trim(): string; + /** Removes the leading and trailing white space and line terminator characters from a string. */ + trim(): string; - /** Returns the length of a String object. */ - readonly length: number; + /** Returns the length of a String object. */ + readonly length: number; - /** Returns the primitive value of the specified object. */ - valueOf(): string; + /** Returns the primitive value of the specified object. */ + valueOf(): string; - readonly [index: number]: string; + readonly [index: number]: string; } interface StringConstructor { - new (value?: any): String; + new (value?: any): String; - (value?: any): string; + (value?: any): string; - readonly prototype: String; + readonly prototype: String; - fromCharCode(...codes: number[]): string; + fromCharCode(...codes: number[]): string; } /** @@ -4975,220 +4975,220 @@ interface StringConstructor { declare var String: StringConstructor; interface Boolean { - /** Returns the primitive value of the specified object. */ - valueOf(): boolean; + /** Returns the primitive value of the specified object. */ + valueOf(): boolean; } interface BooleanConstructor { - new (value?: any): Boolean; + new (value?: any): Boolean; - (value?: T): boolean; + (value?: T): boolean; - readonly prototype: Boolean; + readonly prototype: Boolean; } declare var Boolean: BooleanConstructor; interface Number { - /** - * Returns a string representation of an object. - * @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers. - */ - toString(radix?: number): string; + /** + * Returns a string representation of an object. + * @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers. + */ + toString(radix?: number): string; - /** - * Returns a string representing a number in fixed-point notation. - * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 100, inclusive. - */ - toFixed(fractionDigits?: number): string; + /** + * Returns a string representing a number in fixed-point notation. + * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 100, inclusive. + */ + toFixed(fractionDigits?: number): string; - /** - * Returns a string containing a number represented in exponential notation. - * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 100, inclusive. - */ - toExponential(fractionDigits?: number): string; + /** + * Returns a string containing a number represented in exponential notation. + * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 100, inclusive. + */ + toExponential(fractionDigits?: number): string; - /** - * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits. - * @param precision Number of significant digits. Must be in the range 1 - 100, inclusive. - */ - toPrecision(precision?: number): string; + /** + * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits. + * @param precision Number of significant digits. Must be in the range 1 - 100, inclusive. + */ + toPrecision(precision?: number): string; - /** Returns the primitive value of the specified object. */ - valueOf(): number; + /** Returns the primitive value of the specified object. */ + valueOf(): number; } interface NumberConstructor { - new (value?: any): Number; + new (value?: any): Number; - (value?: any): number; + (value?: any): number; - readonly prototype: Number; + readonly prototype: Number; - /** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */ - readonly MAX_VALUE: number; + /** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */ + readonly MAX_VALUE: number; - /** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */ - readonly MIN_VALUE: number; + /** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */ + readonly MIN_VALUE: number; - /** - * A value that is not a number. - * In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function. - */ - readonly NaN: number; + /** + * A value that is not a number. + * In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function. + */ + readonly NaN: number; - /** - * A value that is less than the largest negative number that can be represented in JavaScript. - * JavaScript displays NEGATIVE_INFINITY values as -infinity. - */ - readonly NEGATIVE_INFINITY: number; + /** + * A value that is less than the largest negative number that can be represented in JavaScript. + * JavaScript displays NEGATIVE_INFINITY values as -infinity. + */ + readonly NEGATIVE_INFINITY: number; - /** - * A value greater than the largest number that can be represented in JavaScript. - * JavaScript displays POSITIVE_INFINITY values as infinity. - */ - readonly POSITIVE_INFINITY: number; + /** + * A value greater than the largest number that can be represented in JavaScript. + * JavaScript displays POSITIVE_INFINITY values as infinity. + */ + readonly POSITIVE_INFINITY: number; } /** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */ declare var Number: NumberConstructor; interface TemplateStringsArray extends ReadonlyArray { - readonly raw: readonly string[]; + readonly raw: readonly string[]; } interface Math { - /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */ - readonly E: number; + /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */ + readonly E: number; - /** The natural logarithm of 10. */ - readonly LN10: number; + /** The natural logarithm of 10. */ + readonly LN10: number; - /** The natural logarithm of 2. */ - readonly LN2: number; + /** The natural logarithm of 2. */ + readonly LN2: number; - /** The base-2 logarithm of e. */ - readonly LOG2E: number; + /** The base-2 logarithm of e. */ + readonly LOG2E: number; - /** The base-10 logarithm of e. */ - readonly LOG10E: number; + /** The base-10 logarithm of e. */ + readonly LOG10E: number; - /** Pi. This is the ratio of the circumference of a circle to its diameter. */ - readonly PI: number; + /** Pi. This is the ratio of the circumference of a circle to its diameter. */ + readonly PI: number; - /** The square root of 0.5, or, equivalently, one divided by the square root of 2. */ - readonly SQRT1_2: number; + /** The square root of 0.5, or, equivalently, one divided by the square root of 2. */ + readonly SQRT1_2: number; - /** The square root of 2. */ - readonly SQRT2: number; + /** The square root of 2. */ + readonly SQRT2: number; - /** - * Returns the absolute value of a number (the value without regard to whether it is positive or negative). - * For example, the absolute value of -5 is the same as the absolute value of 5. - * @param x A numeric expression for which the absolute value is needed. - */ - abs(x: number): number; + /** + * Returns the absolute value of a number (the value without regard to whether it is positive or negative). + * For example, the absolute value of -5 is the same as the absolute value of 5. + * @param x A numeric expression for which the absolute value is needed. + */ + abs(x: number): number; - /** - * Returns the arc cosine (or inverse cosine) of a number. - * @param x A numeric expression. - */ - acos(x: number): number; + /** + * Returns the arc cosine (or inverse cosine) of a number. + * @param x A numeric expression. + */ + acos(x: number): number; - /** - * Returns the arcsine of a number. - * @param x A numeric expression. - */ - asin(x: number): number; + /** + * Returns the arcsine of a number. + * @param x A numeric expression. + */ + asin(x: number): number; - /** - * Returns the arctangent of a number. - * @param x A numeric expression for which the arctangent is needed. - */ - atan(x: number): number; + /** + * Returns the arctangent of a number. + * @param x A numeric expression for which the arctangent is needed. + */ + atan(x: number): number; - /** - * Returns the angle (in radians) between the X axis and the line going through both the origin and the given point. - * @param y A numeric expression representing the cartesian y-coordinate. - * @param x A numeric expression representing the cartesian x-coordinate. - */ - atan2(y: number, x: number): number; + /** + * Returns the angle (in radians) between the X axis and the line going through both the origin and the given point. + * @param y A numeric expression representing the cartesian y-coordinate. + * @param x A numeric expression representing the cartesian x-coordinate. + */ + atan2(y: number, x: number): number; - /** - * Returns the smallest integer greater than or equal to its numeric argument. - * @param x A numeric expression. - */ - ceil(x: number): number; + /** + * Returns the smallest integer greater than or equal to its numeric argument. + * @param x A numeric expression. + */ + ceil(x: number): number; - /** - * Returns the cosine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - cos(x: number): number; + /** + * Returns the cosine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + cos(x: number): number; - /** - * Returns e (the base of natural logarithms) raised to a power. - * @param x A numeric expression representing the power of e. - */ - exp(x: number): number; + /** + * Returns e (the base of natural logarithms) raised to a power. + * @param x A numeric expression representing the power of e. + */ + exp(x: number): number; - /** - * Returns the greatest integer less than or equal to its numeric argument. - * @param x A numeric expression. - */ - floor(x: number): number; + /** + * Returns the greatest integer less than or equal to its numeric argument. + * @param x A numeric expression. + */ + floor(x: number): number; - /** - * Returns the natural logarithm (base e) of a number. - * @param x A numeric expression. - */ - log(x: number): number; + /** + * Returns the natural logarithm (base e) of a number. + * @param x A numeric expression. + */ + log(x: number): number; - /** - * Returns the larger of a set of supplied numeric expressions. - * @param values Numeric expressions to be evaluated. - */ - max(...values: number[]): number; + /** + * Returns the larger of a set of supplied numeric expressions. + * @param values Numeric expressions to be evaluated. + */ + max(...values: number[]): number; - /** - * Returns the smaller of a set of supplied numeric expressions. - * @param values Numeric expressions to be evaluated. - */ - min(...values: number[]): number; + /** + * Returns the smaller of a set of supplied numeric expressions. + * @param values Numeric expressions to be evaluated. + */ + min(...values: number[]): number; - /** - * Returns the value of a base expression taken to a specified power. - * @param x The base value of the expression. - * @param y The exponent value of the expression. - */ - pow(x: number, y: number): number; + /** + * Returns the value of a base expression taken to a specified power. + * @param x The base value of the expression. + * @param y The exponent value of the expression. + */ + pow(x: number, y: number): number; - /** Returns a pseudorandom number between 0 and 1. */ - random(): number; + /** Returns a pseudorandom number between 0 and 1. */ + random(): number; - /** - * Returns a supplied numeric expression rounded to the nearest integer. - * @param x The value to be rounded to the nearest integer. - */ - round(x: number): number; + /** + * Returns a supplied numeric expression rounded to the nearest integer. + * @param x The value to be rounded to the nearest integer. + */ + round(x: number): number; - /** - * Returns the sine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - sin(x: number): number; + /** + * Returns the sine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + sin(x: number): number; - /** - * Returns the square root of a number. - * @param x A numeric expression. - */ - sqrt(x: number): number; + /** + * Returns the square root of a number. + * @param x A numeric expression. + */ + sqrt(x: number): number; - /** - * Returns the tangent of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - tan(x: number): number; + /** + * Returns the tangent of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + tan(x: number): number; } /** An intrinsic object that provides basic mathematics functionality and constants. */ @@ -5196,334 +5196,334 @@ declare var Math: Math; /** Enables basic storage and retrieval of dates and times. */ interface Date { - /** Returns a string representation of a date. The format of the string depends on the locale. */ - toString(): string; + /** Returns a string representation of a date. The format of the string depends on the locale. */ + toString(): string; - /** Returns a date as a string value. */ - toDateString(): string; + /** Returns a date as a string value. */ + toDateString(): string; - /** Returns a time as a string value. */ - toTimeString(): string; + /** Returns a time as a string value. */ + toTimeString(): string; - /** Returns a value as a string value appropriate to the host environment's current locale. */ - toLocaleString(): string; + /** Returns a value as a string value appropriate to the host environment's current locale. */ + toLocaleString(): string; - /** Returns a date as a string value appropriate to the host environment's current locale. */ - toLocaleDateString(): string; + /** Returns a date as a string value appropriate to the host environment's current locale. */ + toLocaleDateString(): string; - /** Returns a time as a string value appropriate to the host environment's current locale. */ - toLocaleTimeString(): string; + /** Returns a time as a string value appropriate to the host environment's current locale. */ + toLocaleTimeString(): string; - /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */ - valueOf(): number; + /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */ + valueOf(): number; - /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */ - getTime(): number; + /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */ + getTime(): number; - /** Gets the year, using local time. */ - getFullYear(): number; + /** Gets the year, using local time. */ + getFullYear(): number; - /** Gets the year using Universal Coordinated Time (UTC). */ - getUTCFullYear(): number; + /** Gets the year using Universal Coordinated Time (UTC). */ + getUTCFullYear(): number; - /** Gets the month, using local time. */ - getMonth(): number; + /** Gets the month, using local time. */ + getMonth(): number; - /** Gets the month of a Date object using Universal Coordinated Time (UTC). */ - getUTCMonth(): number; + /** Gets the month of a Date object using Universal Coordinated Time (UTC). */ + getUTCMonth(): number; - /** Gets the day-of-the-month, using local time. */ - getDate(): number; + /** Gets the day-of-the-month, using local time. */ + getDate(): number; - /** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */ - getUTCDate(): number; + /** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */ + getUTCDate(): number; - /** Gets the day of the week, using local time. */ - getDay(): number; + /** Gets the day of the week, using local time. */ + getDay(): number; - /** Gets the day of the week using Universal Coordinated Time (UTC). */ - getUTCDay(): number; + /** Gets the day of the week using Universal Coordinated Time (UTC). */ + getUTCDay(): number; - /** Gets the hours in a date, using local time. */ - getHours(): number; + /** Gets the hours in a date, using local time. */ + getHours(): number; - /** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */ - getUTCHours(): number; + /** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */ + getUTCHours(): number; - /** Gets the minutes of a Date object, using local time. */ - getMinutes(): number; + /** Gets the minutes of a Date object, using local time. */ + getMinutes(): number; - /** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */ - getUTCMinutes(): number; + /** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */ + getUTCMinutes(): number; - /** Gets the seconds of a Date object, using local time. */ - getSeconds(): number; + /** Gets the seconds of a Date object, using local time. */ + getSeconds(): number; - /** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */ - getUTCSeconds(): number; + /** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */ + getUTCSeconds(): number; - /** Gets the milliseconds of a Date, using local time. */ - getMilliseconds(): number; + /** Gets the milliseconds of a Date, using local time. */ + getMilliseconds(): number; - /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */ - getUTCMilliseconds(): number; + /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */ + getUTCMilliseconds(): number; - /** Gets the difference in minutes between Universal Coordinated Time (UTC) and the time on the local computer. */ - getTimezoneOffset(): number; + /** Gets the difference in minutes between Universal Coordinated Time (UTC) and the time on the local computer. */ + getTimezoneOffset(): number; - /** - * Sets the date and time value in the Date object. - * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT. - */ - setTime(time: number): number; + /** + * Sets the date and time value in the Date object. + * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT. + */ + setTime(time: number): number; - /** - * Sets the milliseconds value in the Date object using local time. - * @param ms A numeric value equal to the millisecond value. - */ - setMilliseconds(ms: number): number; + /** + * Sets the milliseconds value in the Date object using local time. + * @param ms A numeric value equal to the millisecond value. + */ + setMilliseconds(ms: number): number; - /** - * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC). - * @param ms A numeric value equal to the millisecond value. - */ - setUTCMilliseconds(ms: number): number; + /** + * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC). + * @param ms A numeric value equal to the millisecond value. + */ + setUTCMilliseconds(ms: number): number; - /** - * Sets the seconds value in the Date object using local time. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setSeconds(sec: number, ms?: number): number; + /** + * Sets the seconds value in the Date object using local time. + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setSeconds(sec: number, ms?: number): number; - /** - * Sets the seconds value in the Date object using Universal Coordinated Time (UTC). - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setUTCSeconds(sec: number, ms?: number): number; + /** + * Sets the seconds value in the Date object using Universal Coordinated Time (UTC). + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setUTCSeconds(sec: number, ms?: number): number; - /** - * Sets the minutes value in the Date object using local time. - * @param min A numeric value equal to the minutes value. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setMinutes(min: number, sec?: number, ms?: number): number; + /** + * Sets the minutes value in the Date object using local time. + * @param min A numeric value equal to the minutes value. + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setMinutes(min: number, sec?: number, ms?: number): number; - /** - * Sets the minutes value in the Date object using Universal Coordinated Time (UTC). - * @param min A numeric value equal to the minutes value. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setUTCMinutes(min: number, sec?: number, ms?: number): number; + /** + * Sets the minutes value in the Date object using Universal Coordinated Time (UTC). + * @param min A numeric value equal to the minutes value. + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setUTCMinutes(min: number, sec?: number, ms?: number): number; - /** - * Sets the hour value in the Date object using local time. - * @param hours A numeric value equal to the hours value. - * @param min A numeric value equal to the minutes value. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setHours(hours: number, min?: number, sec?: number, ms?: number): number; + /** + * Sets the hour value in the Date object using local time. + * @param hours A numeric value equal to the hours value. + * @param min A numeric value equal to the minutes value. + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setHours(hours: number, min?: number, sec?: number, ms?: number): number; - /** - * Sets the hours value in the Date object using Universal Coordinated Time (UTC). - * @param hours A numeric value equal to the hours value. - * @param min A numeric value equal to the minutes value. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number; + /** + * Sets the hours value in the Date object using Universal Coordinated Time (UTC). + * @param hours A numeric value equal to the hours value. + * @param min A numeric value equal to the minutes value. + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number; - /** - * Sets the numeric day-of-the-month value of the Date object using local time. - * @param date A numeric value equal to the day of the month. - */ - setDate(date: number): number; + /** + * Sets the numeric day-of-the-month value of the Date object using local time. + * @param date A numeric value equal to the day of the month. + */ + setDate(date: number): number; - /** - * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC). - * @param date A numeric value equal to the day of the month. - */ - setUTCDate(date: number): number; + /** + * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC). + * @param date A numeric value equal to the day of the month. + */ + setUTCDate(date: number): number; - /** - * Sets the month value in the Date object using local time. - * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. - * @param date A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used. - */ - setMonth(month: number, date?: number): number; + /** + * Sets the month value in the Date object using local time. + * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. + * @param date A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used. + */ + setMonth(month: number, date?: number): number; - /** - * Sets the month value in the Date object using Universal Coordinated Time (UTC). - * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. - * @param date A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used. - */ - setUTCMonth(month: number, date?: number): number; + /** + * Sets the month value in the Date object using Universal Coordinated Time (UTC). + * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. + * @param date A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used. + */ + setUTCMonth(month: number, date?: number): number; - /** - * Sets the year of the Date object using local time. - * @param year A numeric value for the year. - * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified. - * @param date A numeric value equal for the day of the month. - */ - setFullYear(year: number, month?: number, date?: number): number; + /** + * Sets the year of the Date object using local time. + * @param year A numeric value for the year. + * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified. + * @param date A numeric value equal for the day of the month. + */ + setFullYear(year: number, month?: number, date?: number): number; - /** - * Sets the year value in the Date object using Universal Coordinated Time (UTC). - * @param year A numeric value equal to the year. - * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied. - * @param date A numeric value equal to the day of the month. - */ - setUTCFullYear(year: number, month?: number, date?: number): number; + /** + * Sets the year value in the Date object using Universal Coordinated Time (UTC). + * @param year A numeric value equal to the year. + * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied. + * @param date A numeric value equal to the day of the month. + */ + setUTCFullYear(year: number, month?: number, date?: number): number; - /** Returns a date converted to a string using Universal Coordinated Time (UTC). */ - toUTCString(): string; + /** Returns a date converted to a string using Universal Coordinated Time (UTC). */ + toUTCString(): string; - /** Returns a date as a string value in ISO format. */ - toISOString(): string; + /** Returns a date as a string value in ISO format. */ + toISOString(): string; - /** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */ - toJSON(key?: any): string; + /** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */ + toJSON(key?: any): string; } interface DateConstructor { - new (): Date; + new (): Date; - new (value: number | string): Date; + new (value: number | string): Date; - /** - * Creates a new Date. - * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. - * @param monthIndex The month as a number between 0 and 11 (January to December). - * @param date The date as a number between 1 and 31. - * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. - * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. - * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. - * @param ms A number from 0 to 999 that specifies the milliseconds. - */ - new (year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; + /** + * Creates a new Date. + * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. + * @param monthIndex The month as a number between 0 and 11 (January to December). + * @param date The date as a number between 1 and 31. + * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. + * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. + * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. + * @param ms A number from 0 to 999 that specifies the milliseconds. + */ + new (year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; - (): string; + (): string; - readonly prototype: Date; + readonly prototype: Date; - /** - * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970. - * @param s A date string - */ - parse(s: string): number; + /** + * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970. + * @param s A date string + */ + parse(s: string): number; - /** - * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. - * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. - * @param monthIndex The month as a number between 0 and 11 (January to December). - * @param date The date as a number between 1 and 31. - * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. - * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. - * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. - * @param ms A number from 0 to 999 that specifies the milliseconds. - */ - UTC(year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; + /** + * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. + * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. + * @param monthIndex The month as a number between 0 and 11 (January to December). + * @param date The date as a number between 1 and 31. + * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. + * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. + * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. + * @param ms A number from 0 to 999 that specifies the milliseconds. + */ + UTC(year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; - /** Returns the number of milliseconds elapsed since midnight, January 1, 1970 Universal Coordinated Time (UTC). */ - now(): number; + /** Returns the number of milliseconds elapsed since midnight, January 1, 1970 Universal Coordinated Time (UTC). */ + now(): number; } declare var Date: DateConstructor; interface RegExpMatchArray extends Array { - /** - * The index of the search at which the result was found. - */ - index?: number; + /** + * The index of the search at which the result was found. + */ + index?: number; - /** - * A copy of the search string. - */ - input?: string; + /** + * A copy of the search string. + */ + input?: string; - /** - * The first match. This will always be present because `null` will be returned if there are no matches. - */ - 0: string; + /** + * The first match. This will always be present because `null` will be returned if there are no matches. + */ + 0: string; } interface RegExpExecArray extends Array { - /** - * The index of the search at which the result was found. - */ - index: number; + /** + * The index of the search at which the result was found. + */ + index: number; - /** - * A copy of the search string. - */ - input: string; + /** + * A copy of the search string. + */ + input: string; - /** - * The first match. This will always be present because `null` will be returned if there are no matches. - */ - 0: string; + /** + * The first match. This will always be present because `null` will be returned if there are no matches. + */ + 0: string; } interface RegExp { - /** - * Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search. - * @param string The String object or string literal on which to perform the search. - */ - exec(string: string): RegExpExecArray | null; + /** + * Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search. + * @param string The String object or string literal on which to perform the search. + */ + exec(string: string): RegExpExecArray | null; - /** - * Returns a Boolean value that indicates whether or not a pattern exists in a searched string. - * @param string String on which to perform the search. - */ - test(string: string): boolean; + /** + * Returns a Boolean value that indicates whether or not a pattern exists in a searched string. + * @param string String on which to perform the search. + */ + test(string: string): boolean; - /** Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. */ - readonly source: string; + /** Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. */ + readonly source: string; - /** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */ - readonly global: boolean; + /** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */ + readonly global: boolean; - /** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */ - readonly ignoreCase: boolean; + /** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */ + readonly ignoreCase: boolean; - /** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */ - readonly multiline: boolean; + /** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */ + readonly multiline: boolean; - lastIndex: number; + lastIndex: number; } interface RegExpConstructor { - new (pattern: RegExp | string): RegExp; + new (pattern: RegExp | string): RegExp; - new (pattern: string, flags?: string): RegExp; + new (pattern: string, flags?: string): RegExp; - (pattern: RegExp | string): RegExp; + (pattern: RegExp | string): RegExp; - (pattern: string, flags?: string): RegExp; + (pattern: string, flags?: string): RegExp; - readonly "prototype": RegExp; + readonly "prototype": RegExp; } declare var RegExp: RegExpConstructor; interface Error { - name: string; + name: string; - message: string; + message: string; - stack?: string; + stack?: string; } interface ErrorConstructor { - new (message?: string): Error; + new (message?: string): Error; - (message?: string): Error; + (message?: string): Error; - readonly prototype: Error; + readonly prototype: Error; } declare var Error: ErrorConstructor; @@ -5532,11 +5532,11 @@ interface EvalError extends Error { } interface EvalErrorConstructor extends ErrorConstructor { - new (message?: string): EvalError; + new (message?: string): EvalError; - (message?: string): EvalError; + (message?: string): EvalError; - readonly prototype: EvalError; + readonly prototype: EvalError; } declare var EvalError: EvalErrorConstructor; @@ -5545,11 +5545,11 @@ interface RangeError extends Error { } interface RangeErrorConstructor extends ErrorConstructor { - new (message?: string): RangeError; + new (message?: string): RangeError; - (message?: string): RangeError; + (message?: string): RangeError; - readonly prototype: RangeError; + readonly prototype: RangeError; } declare var RangeError: RangeErrorConstructor; @@ -5558,11 +5558,11 @@ interface ReferenceError extends Error { } interface ReferenceErrorConstructor extends ErrorConstructor { - new (message?: string): ReferenceError; + new (message?: string): ReferenceError; - (message?: string): ReferenceError; + (message?: string): ReferenceError; - readonly prototype: ReferenceError; + readonly prototype: ReferenceError; } declare var ReferenceError: ReferenceErrorConstructor; @@ -5571,11 +5571,11 @@ interface SyntaxError extends Error { } interface SyntaxErrorConstructor extends ErrorConstructor { - new (message?: string): SyntaxError; + new (message?: string): SyntaxError; - (message?: string): SyntaxError; + (message?: string): SyntaxError; - readonly prototype: SyntaxError; + readonly prototype: SyntaxError; } declare var SyntaxError: SyntaxErrorConstructor; @@ -5584,11 +5584,11 @@ interface TypeError extends Error { } interface TypeErrorConstructor extends ErrorConstructor { - new (message?: string): TypeError; + new (message?: string): TypeError; - (message?: string): TypeError; + (message?: string): TypeError; - readonly prototype: TypeError; + readonly prototype: TypeError; } declare var TypeError: TypeErrorConstructor; @@ -5597,42 +5597,42 @@ interface URIError extends Error { } interface URIErrorConstructor extends ErrorConstructor { - new (message?: string): URIError; + new (message?: string): URIError; - (message?: string): URIError; + (message?: string): URIError; - readonly prototype: URIError; + readonly prototype: URIError; } declare var URIError: URIErrorConstructor; interface JSON { - /** - * Converts a JavaScript Object Notation (JSON) string into an object. - * @param text A valid JSON string. - * @param reviver A function that transforms the results. This function is called for each member of the object. - * If a member contains nested objects, the nested objects are transformed before the parent object is. - * @throws {SyntaxError} If `text` is not valid JSON. - */ - parse(text: string, reviver?: (this: any, key: string, value: any) => any): any; + /** + * Converts a JavaScript Object Notation (JSON) string into an object. + * @param text A valid JSON string. + * @param reviver A function that transforms the results. This function is called for each member of the object. + * If a member contains nested objects, the nested objects are transformed before the parent object is. + * @throws {SyntaxError} If `text` is not valid JSON. + */ + parse(text: string, reviver?: (this: any, key: string, value: any) => any): any; - /** - * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. - * @param value A JavaScript value, usually an object or array, to be converted. - * @param replacer A function that transforms the results. - * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. - * @throws {TypeError} If a circular reference or a BigInt value is found. - */ - stringify(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string; + /** + * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. + * @param value A JavaScript value, usually an object or array, to be converted. + * @param replacer A function that transforms the results. + * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. + * @throws {TypeError} If a circular reference or a BigInt value is found. + */ + stringify(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string; - /** - * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. - * @param value A JavaScript value, usually an object or array, to be converted. - * @param replacer An array of strings and numbers that acts as an approved list for selecting the object properties that will be stringified. - * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. - * @throws {TypeError} If a circular reference or a BigInt value is found. - */ - stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string; + /** + * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. + * @param value A JavaScript value, usually an object or array, to be converted. + * @param replacer An array of strings and numbers that acts as an approved list for selecting the object properties that will be stringified. + * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. + * @throws {TypeError} If a circular reference or a BigInt value is found. + */ + stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string; } /** @@ -5645,444 +5645,444 @@ declare var JSON: JSON; ///////////////////////////// interface ReadonlyArray { - /** - * Gets the length of the array. This is a number one higher than the highest element defined in an array. - */ - readonly length: number; + /** + * Gets the length of the array. This is a number one higher than the highest element defined in an array. + */ + readonly length: number; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** - * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods. - */ - toLocaleString(): string; + /** + * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods. + */ + toLocaleString(): string; - /** - * Combines two or more arrays. - * @param items Additional items to add to the end of array1. - */ - concat(...items: ConcatArray[]): T[]; + /** + * Combines two or more arrays. + * @param items Additional items to add to the end of array1. + */ + concat(...items: ConcatArray[]): T[]; - /** - * Combines two or more arrays. - * @param items Additional items to add to the end of array1. - */ - concat(...items: (T | ConcatArray)[]): T[]; + /** + * Combines two or more arrays. + * @param items Additional items to add to the end of array1. + */ + concat(...items: (T | ConcatArray)[]): T[]; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): T[]; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): T[]; - /** - * Returns the index of the first occurrence of a value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. - */ - indexOf(searchElement: T, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. + */ + indexOf(searchElement: T, fromIndex?: number): number; - /** - * Returns the index of the last occurrence of a specified value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array. - */ - lastIndexOf(searchElement: T, fromIndex?: number): number; + /** + * Returns the index of the last occurrence of a specified value in an array. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array. + */ + lastIndexOf(searchElement: T, fromIndex?: number): number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): this is readonly S[]; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): this is readonly S[]; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: T, index: number, array: readonly T[]) => void, thisArg?: any): void; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: T, index: number, array: readonly T[]) => void, thisArg?: any): void; - /** - * Calls a defined callback function on each element of an array, and returns an array that contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: T, index: number, array: readonly T[]) => U, thisArg?: any): U[]; + /** + * Calls a defined callback function on each element of an array, and returns an array that contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: T, index: number, array: readonly T[]) => U, thisArg?: any): U[]; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): S[]; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): S[]; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): T[]; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): T[]; - /** - * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T; + /** + * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T; - reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T; + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T; - /** - * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U; - /** - * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T; + /** + * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T; - reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T; + reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T; - /** - * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U; - readonly [n: number]: T; + readonly [n: number]: T; } interface ConcatArray { - readonly length: number; + readonly length: number; - readonly [n: number]: T; + readonly [n: number]: T; - join(separator?: string): string; + join(separator?: string): string; - slice(start?: number, end?: number): T[]; + slice(start?: number, end?: number): T[]; } interface Array { - /** - * Gets or sets the length of the array. This is a number one higher than the highest index in the array. - */ - length: number; + /** + * Gets or sets the length of the array. This is a number one higher than the highest index in the array. + */ + length: number; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** - * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods. - */ - toLocaleString(): string; + /** + * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods. + */ + toLocaleString(): string; - /** - * Removes the last element from an array and returns it. - * If the array is empty, undefined is returned and the array is not modified. - */ - pop(): T | undefined; + /** + * Removes the last element from an array and returns it. + * If the array is empty, undefined is returned and the array is not modified. + */ + pop(): T | undefined; - /** - * Appends new elements to the end of an array, and returns the new length of the array. - * @param items New elements to add to the array. - */ - push(...items: T[]): number; + /** + * Appends new elements to the end of an array, and returns the new length of the array. + * @param items New elements to add to the array. + */ + push(...items: T[]): number; - /** - * Combines two or more arrays. - * This method returns a new array without modifying any existing arrays. - * @param items Additional arrays and/or items to add to the end of the array. - */ - concat(...items: ConcatArray[]): T[]; + /** + * Combines two or more arrays. + * This method returns a new array without modifying any existing arrays. + * @param items Additional arrays and/or items to add to the end of the array. + */ + concat(...items: ConcatArray[]): T[]; - /** - * Combines two or more arrays. - * This method returns a new array without modifying any existing arrays. - * @param items Additional arrays and/or items to add to the end of the array. - */ - concat(...items: (T | ConcatArray)[]): T[]; + /** + * Combines two or more arrays. + * This method returns a new array without modifying any existing arrays. + * @param items Additional arrays and/or items to add to the end of the array. + */ + concat(...items: (T | ConcatArray)[]): T[]; - /** - * Adds all the elements of an array into a string, separated by the specified separator string. - * @param separator A string used to separate one element of the array from the next in the resulting string. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Adds all the elements of an array into a string, separated by the specified separator string. + * @param separator A string used to separate one element of the array from the next in the resulting string. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Reverses the elements in an array in place. - * This method mutates the array and returns a reference to the same array. - */ - reverse(): T[]; + /** + * Reverses the elements in an array in place. + * This method mutates the array and returns a reference to the same array. + */ + reverse(): T[]; - /** - * Removes the first element from an array and returns it. - * If the array is empty, undefined is returned and the array is not modified. - */ - shift(): T | undefined; + /** + * Removes the first element from an array and returns it. + * If the array is empty, undefined is returned and the array is not modified. + */ + shift(): T | undefined; - /** - * Returns a copy of a section of an array. - * For both start and end, a negative index can be used to indicate an offset from the end of the array. - * For example, -2 refers to the second to last element of the array. - * @param start The beginning index of the specified portion of the array. - * If start is undefined, then the slice begins at index 0. - * @param end The end index of the specified portion of the array. This is exclusive of the element at the index 'end'. - * If end is undefined, then the slice extends to the end of the array. - */ - slice(start?: number, end?: number): T[]; + /** + * Returns a copy of a section of an array. + * For both start and end, a negative index can be used to indicate an offset from the end of the array. + * For example, -2 refers to the second to last element of the array. + * @param start The beginning index of the specified portion of the array. + * If start is undefined, then the slice begins at index 0. + * @param end The end index of the specified portion of the array. This is exclusive of the element at the index 'end'. + * If end is undefined, then the slice extends to the end of the array. + */ + slice(start?: number, end?: number): T[]; - /** - * Sorts an array in place. - * This method mutates the array and returns a reference to the same array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: T, b: T) => number): this; + /** + * Sorts an array in place. + * This method mutates the array and returns a reference to the same array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: T, b: T) => number): this; - /** - * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. - * @param start The zero-based location in the array from which to start removing elements. - * @param deleteCount The number of elements to remove. Omitting this argument will remove all elements from the start - * paramater location to end of the array. If value of this argument is either a negative number, zero, undefined, or a type - * that cannot be converted to an integer, the function will evaluate the argument as zero and not remove any elements. - * @returns An array containing the elements that were deleted. - */ - splice(start: number, deleteCount?: number): T[]; + /** + * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. + * @param start The zero-based location in the array from which to start removing elements. + * @param deleteCount The number of elements to remove. Omitting this argument will remove all elements from the start + * paramater location to end of the array. If value of this argument is either a negative number, zero, undefined, or a type + * that cannot be converted to an integer, the function will evaluate the argument as zero and not remove any elements. + * @returns An array containing the elements that were deleted. + */ + splice(start: number, deleteCount?: number): T[]; - /** - * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. - * @param start The zero-based location in the array from which to start removing elements. - * @param deleteCount The number of elements to remove. If value of this argument is either a negative number, zero, - * undefined, or a type that cannot be converted to an integer, the function will evaluate the argument as zero and - * not remove any elements. - * @param items Elements to insert into the array in place of the deleted elements. - * @returns An array containing the elements that were deleted. - */ - splice(start: number, deleteCount: number, ...items: T[]): T[]; + /** + * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. + * @param start The zero-based location in the array from which to start removing elements. + * @param deleteCount The number of elements to remove. If value of this argument is either a negative number, zero, + * undefined, or a type that cannot be converted to an integer, the function will evaluate the argument as zero and + * not remove any elements. + * @param items Elements to insert into the array in place of the deleted elements. + * @returns An array containing the elements that were deleted. + */ + splice(start: number, deleteCount: number, ...items: T[]): T[]; - /** - * Inserts new elements at the start of an array, and returns the new length of the array. - * @param items Elements to insert at the start of the array. - */ - unshift(...items: T[]): number; + /** + * Inserts new elements at the start of an array, and returns the new length of the array. + * @param items Elements to insert at the start of the array. + */ + unshift(...items: T[]): number; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. - */ - indexOf(searchElement: T, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. + */ + indexOf(searchElement: T, fromIndex?: number): number; - /** - * Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin searching backward. If fromIndex is omitted, the search starts at the last index in the array. - */ - lastIndexOf(searchElement: T, fromIndex?: number): number; + /** + * Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin searching backward. If fromIndex is omitted, the search starts at the last index in the array. + */ + lastIndexOf(searchElement: T, fromIndex?: number): number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): this is S[]; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): this is S[]; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void; - /** - * Calls a defined callback function on each element of an array, and returns an array that contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[]; + /** + * Calls a defined callback function on each element of an array, and returns an array that contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[]; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T[]; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T[]; - /** - * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; + /** + * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; - reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; - /** - * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; - /** - * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; + /** + * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; - reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; + reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; - /** - * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; - [n: number]: T; + [n: number]: T; } interface ArrayConstructor { - new (arrayLength?: number): any[]; + new (arrayLength?: number): any[]; - new (arrayLength: number): T[]; + new (arrayLength: number): T[]; - new (...items: T[]): T[]; + new (...items: T[]): T[]; - (arrayLength?: number): any[]; + (arrayLength?: number): any[]; - (arrayLength: number): T[]; + (arrayLength: number): T[]; - (...items: T[]): T[]; + (...items: T[]): T[]; - isArray(arg: any): arg is any[]; + isArray(arg: any): arg is any[]; - readonly prototype: any[]; + readonly prototype: any[]; } declare var Array: ArrayConstructor; interface TypedPropertyDescriptor { - enumerable?: boolean; + enumerable?: boolean; - configurable?: boolean; + configurable?: boolean; - writable?: boolean; + writable?: boolean; - value?: T; + value?: T; - get?: () => T; + get?: () => T; - set?: (value: T) => void; + set?: (value: T) => void; } declare type PromiseConstructorLike = new (executor: (resolve: (value: T | PromiseLike) => void, reject: (reason?: any) => void) => void) => PromiseLike; interface PromiseLike { - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): PromiseLike; + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): PromiseLike; } /** * Represents the completion of an asynchronous operation */ interface Promise { - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise; + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise; - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise; + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise; } /** @@ -6098,9 +6098,9 @@ type Awaited = T extends null | undefined ? T : // special case for `null | u // non-object or non-thenable interface ArrayLike { - readonly length: number; + readonly length: number; - readonly [n: number]: T; + readonly [n: number]: T; } /** @@ -6213,7 +6213,7 @@ interface ThisType { * Stores types to be used with WeakSet, WeakMap, WeakRef, and FinalizationRegistry */ interface WeakKeyTypes { - object: object; + object: object; } type WeakKey = WeakKeyTypes[keyof WeakKeyTypes]; @@ -6225,189 +6225,189 @@ type WeakKey = WeakKeyTypes[keyof WeakKeyTypes]; * buffer as needed. */ interface ArrayBuffer { - /** - * Read-only. The length of the ArrayBuffer (in bytes). - */ - readonly byteLength: number; + /** + * Read-only. The length of the ArrayBuffer (in bytes). + */ + readonly byteLength: number; - /** - * Returns a section of an ArrayBuffer. - */ - slice(begin?: number, end?: number): ArrayBuffer; + /** + * Returns a section of an ArrayBuffer. + */ + slice(begin?: number, end?: number): ArrayBuffer; } /** * Allowed ArrayBuffer types for the buffer of an ArrayBufferView and related Typed Arrays. */ interface ArrayBufferTypes { - ArrayBuffer: ArrayBuffer; + ArrayBuffer: ArrayBuffer; } type ArrayBufferLike = ArrayBufferTypes[keyof ArrayBufferTypes]; interface ArrayBufferConstructor { - readonly prototype: ArrayBuffer; + readonly prototype: ArrayBuffer; - new (byteLength: number): ArrayBuffer; + new (byteLength: number): ArrayBuffer; - isView(arg: any): arg is ArrayBufferView; + isView(arg: any): arg is ArrayBufferView; } declare var ArrayBuffer: ArrayBufferConstructor; interface ArrayBufferView { - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; } interface DataView { - readonly buffer: TArrayBuffer; + readonly buffer: TArrayBuffer; - readonly byteLength: number; + readonly byteLength: number; - readonly byteOffset: number; + readonly byteOffset: number; - /** - * Gets the Float32 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getFloat32(byteOffset: number, littleEndian?: boolean): number; + /** + * Gets the Float32 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getFloat32(byteOffset: number, littleEndian?: boolean): number; - /** - * Gets the Float64 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getFloat64(byteOffset: number, littleEndian?: boolean): number; + /** + * Gets the Float64 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getFloat64(byteOffset: number, littleEndian?: boolean): number; - /** - * Gets the Int8 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - */ - getInt8(byteOffset: number): number; + /** + * Gets the Int8 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + */ + getInt8(byteOffset: number): number; - /** - * Gets the Int16 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getInt16(byteOffset: number, littleEndian?: boolean): number; + /** + * Gets the Int16 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getInt16(byteOffset: number, littleEndian?: boolean): number; - /** - * Gets the Int32 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getInt32(byteOffset: number, littleEndian?: boolean): number; + /** + * Gets the Int32 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getInt32(byteOffset: number, littleEndian?: boolean): number; - /** - * Gets the Uint8 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - */ - getUint8(byteOffset: number): number; + /** + * Gets the Uint8 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + */ + getUint8(byteOffset: number): number; - /** - * Gets the Uint16 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getUint16(byteOffset: number, littleEndian?: boolean): number; + /** + * Gets the Uint16 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getUint16(byteOffset: number, littleEndian?: boolean): number; - /** - * Gets the Uint32 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getUint32(byteOffset: number, littleEndian?: boolean): number; + /** + * Gets the Uint32 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getUint32(byteOffset: number, littleEndian?: boolean): number; - /** - * Stores an Float32 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void; + /** + * Stores an Float32 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void; - /** - * Stores an Float64 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void; + /** + * Stores an Float64 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void; - /** - * Stores an Int8 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - */ - setInt8(byteOffset: number, value: number): void; + /** + * Stores an Int8 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + */ + setInt8(byteOffset: number, value: number): void; - /** - * Stores an Int16 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setInt16(byteOffset: number, value: number, littleEndian?: boolean): void; + /** + * Stores an Int16 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setInt16(byteOffset: number, value: number, littleEndian?: boolean): void; - /** - * Stores an Int32 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setInt32(byteOffset: number, value: number, littleEndian?: boolean): void; + /** + * Stores an Int32 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setInt32(byteOffset: number, value: number, littleEndian?: boolean): void; - /** - * Stores an Uint8 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - */ - setUint8(byteOffset: number, value: number): void; + /** + * Stores an Uint8 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + */ + setUint8(byteOffset: number, value: number): void; - /** - * Stores an Uint16 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setUint16(byteOffset: number, value: number, littleEndian?: boolean): void; + /** + * Stores an Uint16 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setUint16(byteOffset: number, value: number, littleEndian?: boolean): void; - /** - * Stores an Uint32 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setUint32(byteOffset: number, value: number, littleEndian?: boolean): void; + /** + * Stores an Uint32 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setUint32(byteOffset: number, value: number, littleEndian?: boolean): void; } interface DataViewConstructor { - readonly prototype: DataView; + readonly prototype: DataView; - new (buffer: TArrayBuffer, byteOffset?: number, byteLength?: number): DataView; + new (buffer: TArrayBuffer, byteOffset?: number, byteLength?: number): DataView; } declare var DataView: DataViewConstructor; @@ -6417,288 +6417,288 @@ declare var DataView: DataViewConstructor; * number of bytes could not be allocated an exception is raised. */ interface Int8Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int8Array; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int8Array; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int8Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int8Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Int8Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Int8Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Int8Array; + /** + * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Int8Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Int8ArrayConstructor { - readonly prototype: Int8Array; + readonly prototype: Int8Array; - new (length: number): Int8Array; + new (length: number): Int8Array; - new (array: ArrayLike): Int8Array; + new (array: ArrayLike): Int8Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int8Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int8Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int8Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int8Array; - new (array: ArrayLike | ArrayBuffer): Int8Array; + new (array: ArrayLike | ArrayBuffer): Int8Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Int8Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Int8Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Int8Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Int8Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } declare var Int8Array: Int8ArrayConstructor; @@ -6708,288 +6708,288 @@ declare var Int8Array: Int8ArrayConstructor; * requested number of bytes could not be allocated an exception is raised. */ interface Uint8Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint8Array; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint8Array; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * The length of the array. + */ + readonly length: number; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint8Array; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint8Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Uint8Array; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Uint8Array; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Uint8Array; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; - - /** - * Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Uint8Array; - - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Uint8ArrayConstructor { - readonly prototype: Uint8Array; + readonly prototype: Uint8Array; - new (length: number): Uint8Array; + new (length: number): Uint8Array; - new (array: ArrayLike): Uint8Array; + new (array: ArrayLike): Uint8Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint8Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint8Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8Array; - new (array: ArrayLike | ArrayBuffer): Uint8Array; + new (array: ArrayLike | ArrayBuffer): Uint8Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Uint8Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Uint8Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Uint8Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Uint8Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } declare var Uint8Array: Uint8ArrayConstructor; @@ -6999,288 +6999,288 @@ declare var Uint8Array: Uint8ArrayConstructor; * If the requested number of bytes could not be allocated an exception is raised. */ interface Uint8ClampedArray { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint8ClampedArray; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint8ClampedArray; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint8ClampedArray; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint8ClampedArray; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Uint8ClampedArray; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Uint8ClampedArray; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Uint8ClampedArray; + /** + * Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Uint8ClampedArray; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Uint8ClampedArrayConstructor { - readonly prototype: Uint8ClampedArray; + readonly prototype: Uint8ClampedArray; - new (length: number): Uint8ClampedArray; + new (length: number): Uint8ClampedArray; - new (array: ArrayLike): Uint8ClampedArray; + new (array: ArrayLike): Uint8ClampedArray; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray; - new (array: ArrayLike | ArrayBuffer): Uint8ClampedArray; + new (array: ArrayLike | ArrayBuffer): Uint8ClampedArray; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Uint8ClampedArray; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Uint8ClampedArray; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Uint8ClampedArray; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Uint8ClampedArray; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } declare var Uint8ClampedArray: Uint8ClampedArrayConstructor; @@ -7290,288 +7290,288 @@ declare var Uint8ClampedArray: Uint8ClampedArrayConstructor; * requested number of bytes could not be allocated an exception is raised. */ interface Int16Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int16Array; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int16Array; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int16Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int16Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Int16Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Int16Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Int16Array; + /** + * Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Int16Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Int16ArrayConstructor { - readonly prototype: Int16Array; + readonly prototype: Int16Array; - new (length: number): Int16Array; + new (length: number): Int16Array; - new (array: ArrayLike): Int16Array; + new (array: ArrayLike): Int16Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int16Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int16Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int16Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int16Array; - new (array: ArrayLike | ArrayBuffer): Int16Array; + new (array: ArrayLike | ArrayBuffer): Int16Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Int16Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Int16Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Int16Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Int16Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } declare var Int16Array: Int16ArrayConstructor; @@ -7581,288 +7581,288 @@ declare var Int16Array: Int16ArrayConstructor; * requested number of bytes could not be allocated an exception is raised. */ interface Uint16Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint16Array; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint16Array; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint16Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint16Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Uint16Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Uint16Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Uint16Array; + /** + * Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Uint16Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Uint16ArrayConstructor { - readonly prototype: Uint16Array; + readonly prototype: Uint16Array; - new (length: number): Uint16Array; + new (length: number): Uint16Array; - new (array: ArrayLike): Uint16Array; + new (array: ArrayLike): Uint16Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint16Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint16Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint16Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint16Array; - new (array: ArrayLike | ArrayBuffer): Uint16Array; + new (array: ArrayLike | ArrayBuffer): Uint16Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Uint16Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Uint16Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Uint16Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Uint16Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } declare var Uint16Array: Uint16ArrayConstructor; @@ -7872,288 +7872,288 @@ declare var Uint16Array: Uint16ArrayConstructor; * requested number of bytes could not be allocated an exception is raised. */ interface Int32Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int32Array; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int32Array; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int32Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int32Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Int32Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Int32Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Int32Array; + /** + * Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Int32Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Int32ArrayConstructor { - readonly prototype: Int32Array; + readonly prototype: Int32Array; - new (length: number): Int32Array; + new (length: number): Int32Array; - new (array: ArrayLike): Int32Array; + new (array: ArrayLike): Int32Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int32Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int32Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int32Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int32Array; - new (array: ArrayLike | ArrayBuffer): Int32Array; + new (array: ArrayLike | ArrayBuffer): Int32Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Int32Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Int32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Int32Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Int32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } declare var Int32Array: Int32ArrayConstructor; @@ -8163,288 +8163,288 @@ declare var Int32Array: Int32ArrayConstructor; * requested number of bytes could not be allocated an exception is raised. */ interface Uint32Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; - - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint32Array; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint32Array; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * The length of the array. - */ - readonly length: number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint32Array; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * The length of the array. + */ + readonly length: number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint32Array; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Uint32Array; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Uint32Array; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Gets a new Uint32Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Uint32Array; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Gets a new Uint32Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Uint32Array; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; + + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Uint32ArrayConstructor { - readonly prototype: Uint32Array; + readonly prototype: Uint32Array; - new (length: number): Uint32Array; + new (length: number): Uint32Array; - new (array: ArrayLike): Uint32Array; + new (array: ArrayLike): Uint32Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint32Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint32Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint32Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint32Array; - new (array: ArrayLike | ArrayBuffer): Uint32Array; + new (array: ArrayLike | ArrayBuffer): Uint32Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Uint32Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Uint32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Uint32Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Uint32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } declare var Uint32Array: Uint32ArrayConstructor; @@ -8454,288 +8454,288 @@ declare var Uint32Array: Uint32ArrayConstructor; * of bytes could not be allocated an exception is raised. */ interface Float32Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float32Array; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float32Array; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float32Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float32Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Float32Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Float32Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Float32Array; + /** + * Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Float32Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Float32ArrayConstructor { - readonly prototype: Float32Array; + readonly prototype: Float32Array; - new (length: number): Float32Array; + new (length: number): Float32Array; - new (array: ArrayLike): Float32Array; + new (array: ArrayLike): Float32Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Float32Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Float32Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float32Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float32Array; - new (array: ArrayLike | ArrayBuffer): Float32Array; + new (array: ArrayLike | ArrayBuffer): Float32Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Float32Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Float32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Float32Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Float32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } declare var Float32Array: Float32ArrayConstructor; @@ -8745,288 +8745,288 @@ declare var Float32Array: Float32ArrayConstructor; * number of bytes could not be allocated an exception is raised. */ interface Float64Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float64Array; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float64Array; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float64Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float64Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Float64Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Float64Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Float64Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Float64Array; + /** + * Gets a new Float64Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Float64Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Float64ArrayConstructor { - readonly prototype: Float64Array; + readonly prototype: Float64Array; - new (length: number): Float64Array; + new (length: number): Float64Array; - new (array: ArrayLike): Float64Array; + new (array: ArrayLike): Float64Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Float64Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Float64Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float64Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float64Array; - new (array: ArrayLike | ArrayBuffer): Float64Array; + new (array: ArrayLike | ArrayBuffer): Float64Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Float64Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Float64Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Float64Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Float64Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } declare var Float64Array: Float64ArrayConstructor; @@ -9036,260 +9036,260 @@ declare var Float64Array: Float64ArrayConstructor; ///////////////////////////// declare namespace Intl { - interface CollatorOptions { - usage?: "sort" | "search" | undefined; +interface CollatorOptions { + usage?: "sort" | "search" | undefined; - localeMatcher?: "lookup" | "best fit" | undefined; + localeMatcher?: "lookup" | "best fit" | undefined; - numeric?: boolean | undefined; + numeric?: boolean | undefined; - caseFirst?: "upper" | "lower" | "false" | undefined; + caseFirst?: "upper" | "lower" | "false" | undefined; - sensitivity?: "base" | "accent" | "case" | "variant" | undefined; + sensitivity?: "base" | "accent" | "case" | "variant" | undefined; - collation?: "big5han" | "compat" | "default" | "dict" | "direct" | "ducet" | "emoji" | "eor" | "gb2312" | "phonebk" | "phonetic" | "pinyin" | "reformed" | "searchjl" | "stroke" | "trad" | "unihan" | "zhuyin" | undefined; + collation?: "big5han" | "compat" | "default" | "dict" | "direct" | "ducet" | "emoji" | "eor" | "gb2312" | "phonebk" | "phonetic" | "pinyin" | "reformed" | "searchjl" | "stroke" | "trad" | "unihan" | "zhuyin" | undefined; - ignorePunctuation?: boolean | undefined; - } + ignorePunctuation?: boolean | undefined; +} - interface ResolvedCollatorOptions { - locale: string; +interface ResolvedCollatorOptions { + locale: string; - usage: string; + usage: string; - sensitivity: string; + sensitivity: string; - ignorePunctuation: boolean; + ignorePunctuation: boolean; - collation: string; + collation: string; - caseFirst: string; + caseFirst: string; - numeric: boolean; - } + numeric: boolean; +} - interface Collator { - compare(x: string, y: string): number; +interface Collator { + compare(x: string, y: string): number; - resolvedOptions(): ResolvedCollatorOptions; - } + resolvedOptions(): ResolvedCollatorOptions; +} - interface CollatorConstructor { - new (locales?: string | string[], options?: CollatorOptions): Collator; +interface CollatorConstructor { + new (locales?: string | string[], options?: CollatorOptions): Collator; - (locales?: string | string[], options?: CollatorOptions): Collator; + (locales?: string | string[], options?: CollatorOptions): Collator; - supportedLocalesOf(locales: string | string[], options?: CollatorOptions): string[]; - } + supportedLocalesOf(locales: string | string[], options?: CollatorOptions): string[]; +} - var Collator: CollatorConstructor; +var Collator: CollatorConstructor; - interface NumberFormatOptionsStyleRegistry { - decimal: never; +interface NumberFormatOptionsStyleRegistry { + decimal: never; - percent: never; + percent: never; - currency: never; - } + currency: never; +} - type NumberFormatOptionsStyle = keyof NumberFormatOptionsStyleRegistry; +type NumberFormatOptionsStyle = keyof NumberFormatOptionsStyleRegistry; - interface NumberFormatOptionsCurrencyDisplayRegistry { - code: never; +interface NumberFormatOptionsCurrencyDisplayRegistry { + code: never; - symbol: never; + symbol: never; - name: never; - } + name: never; +} - type NumberFormatOptionsCurrencyDisplay = keyof NumberFormatOptionsCurrencyDisplayRegistry; +type NumberFormatOptionsCurrencyDisplay = keyof NumberFormatOptionsCurrencyDisplayRegistry; - interface NumberFormatOptionsUseGroupingRegistry { - } +interface NumberFormatOptionsUseGroupingRegistry { +} - type NumberFormatOptionsUseGrouping = {} extends NumberFormatOptionsUseGroupingRegistry ? boolean : keyof NumberFormatOptionsUseGroupingRegistry | "true" | "false" | boolean; +type NumberFormatOptionsUseGrouping = {} extends NumberFormatOptionsUseGroupingRegistry ? boolean : keyof NumberFormatOptionsUseGroupingRegistry | "true" | "false" | boolean; - type ResolvedNumberFormatOptionsUseGrouping = {} extends NumberFormatOptionsUseGroupingRegistry ? boolean : keyof NumberFormatOptionsUseGroupingRegistry | false; +type ResolvedNumberFormatOptionsUseGrouping = {} extends NumberFormatOptionsUseGroupingRegistry ? boolean : keyof NumberFormatOptionsUseGroupingRegistry | false; - interface NumberFormatOptions { - localeMatcher?: "lookup" | "best fit" | undefined; +interface NumberFormatOptions { + localeMatcher?: "lookup" | "best fit" | undefined; - style?: NumberFormatOptionsStyle | undefined; + style?: NumberFormatOptionsStyle | undefined; - currency?: string | undefined; + currency?: string | undefined; - currencyDisplay?: NumberFormatOptionsCurrencyDisplay | undefined; + currencyDisplay?: NumberFormatOptionsCurrencyDisplay | undefined; - useGrouping?: NumberFormatOptionsUseGrouping | undefined; + useGrouping?: NumberFormatOptionsUseGrouping | undefined; - minimumIntegerDigits?: number | undefined; + minimumIntegerDigits?: number | undefined; - minimumFractionDigits?: number | undefined; + minimumFractionDigits?: number | undefined; - maximumFractionDigits?: number | undefined; + maximumFractionDigits?: number | undefined; - minimumSignificantDigits?: number | undefined; + minimumSignificantDigits?: number | undefined; - maximumSignificantDigits?: number | undefined; - } + maximumSignificantDigits?: number | undefined; +} - interface ResolvedNumberFormatOptions { - locale: string; +interface ResolvedNumberFormatOptions { + locale: string; - numberingSystem: string; + numberingSystem: string; - style: NumberFormatOptionsStyle; + style: NumberFormatOptionsStyle; - currency?: string; + currency?: string; - currencyDisplay?: NumberFormatOptionsCurrencyDisplay; + currencyDisplay?: NumberFormatOptionsCurrencyDisplay; - minimumIntegerDigits: number; + minimumIntegerDigits: number; - minimumFractionDigits?: number; + minimumFractionDigits?: number; - maximumFractionDigits?: number; + maximumFractionDigits?: number; - minimumSignificantDigits?: number; + minimumSignificantDigits?: number; - maximumSignificantDigits?: number; + maximumSignificantDigits?: number; - useGrouping: ResolvedNumberFormatOptionsUseGrouping; - } + useGrouping: ResolvedNumberFormatOptionsUseGrouping; +} - interface NumberFormat { - format(value: number): string; +interface NumberFormat { + format(value: number): string; - resolvedOptions(): ResolvedNumberFormatOptions; - } + resolvedOptions(): ResolvedNumberFormatOptions; +} - interface NumberFormatConstructor { - new (locales?: string | string[], options?: NumberFormatOptions): NumberFormat; +interface NumberFormatConstructor { + new (locales?: string | string[], options?: NumberFormatOptions): NumberFormat; - (locales?: string | string[], options?: NumberFormatOptions): NumberFormat; + (locales?: string | string[], options?: NumberFormatOptions): NumberFormat; - supportedLocalesOf(locales: string | string[], options?: NumberFormatOptions): string[]; + supportedLocalesOf(locales: string | string[], options?: NumberFormatOptions): string[]; - readonly prototype: NumberFormat; - } + readonly prototype: NumberFormat; +} - var NumberFormat: NumberFormatConstructor; +var NumberFormat: NumberFormatConstructor; - interface DateTimeFormatOptions { - localeMatcher?: "best fit" | "lookup" | undefined; +interface DateTimeFormatOptions { + localeMatcher?: "best fit" | "lookup" | undefined; - weekday?: "long" | "short" | "narrow" | undefined; + weekday?: "long" | "short" | "narrow" | undefined; - era?: "long" | "short" | "narrow" | undefined; + era?: "long" | "short" | "narrow" | undefined; - year?: "numeric" | "2-digit" | undefined; + year?: "numeric" | "2-digit" | undefined; - month?: "numeric" | "2-digit" | "long" | "short" | "narrow" | undefined; + month?: "numeric" | "2-digit" | "long" | "short" | "narrow" | undefined; - day?: "numeric" | "2-digit" | undefined; + day?: "numeric" | "2-digit" | undefined; - hour?: "numeric" | "2-digit" | undefined; + hour?: "numeric" | "2-digit" | undefined; - minute?: "numeric" | "2-digit" | undefined; + minute?: "numeric" | "2-digit" | undefined; - second?: "numeric" | "2-digit" | undefined; + second?: "numeric" | "2-digit" | undefined; - timeZoneName?: "short" | "long" | "shortOffset" | "longOffset" | "shortGeneric" | "longGeneric" | undefined; + timeZoneName?: "short" | "long" | "shortOffset" | "longOffset" | "shortGeneric" | "longGeneric" | undefined; - formatMatcher?: "best fit" | "basic" | undefined; + formatMatcher?: "best fit" | "basic" | undefined; - hour12?: boolean | undefined; + hour12?: boolean | undefined; - timeZone?: string | undefined; - } + timeZone?: string | undefined; +} - interface ResolvedDateTimeFormatOptions { - locale: string; +interface ResolvedDateTimeFormatOptions { + locale: string; - calendar: string; + calendar: string; - numberingSystem: string; + numberingSystem: string; - timeZone: string; + timeZone: string; - hour12?: boolean; + hour12?: boolean; - weekday?: string; + weekday?: string; - era?: string; + era?: string; - year?: string; + year?: string; - month?: string; + month?: string; - day?: string; + day?: string; - hour?: string; + hour?: string; - minute?: string; + minute?: string; - second?: string; + second?: string; - timeZoneName?: string; - } + timeZoneName?: string; +} - interface DateTimeFormat { - format(date?: Date | number): string; +interface DateTimeFormat { + format(date?: Date | number): string; - resolvedOptions(): ResolvedDateTimeFormatOptions; - } + resolvedOptions(): ResolvedDateTimeFormatOptions; +} - interface DateTimeFormatConstructor { - new (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat; +interface DateTimeFormatConstructor { + new (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat; - (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat; + (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat; - supportedLocalesOf(locales: string | string[], options?: DateTimeFormatOptions): string[]; + supportedLocalesOf(locales: string | string[], options?: DateTimeFormatOptions): string[]; - readonly prototype: DateTimeFormat; - } + readonly prototype: DateTimeFormat; +} - var DateTimeFormat: DateTimeFormatConstructor; +var DateTimeFormat: DateTimeFormatConstructor; } interface String { - /** - * Determines whether two strings are equivalent in the current or specified locale. - * @param that String to compare to target string - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details. - * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details. - */ - localeCompare(that: string, locales?: string | string[], options?: Intl.CollatorOptions): number; + /** + * Determines whether two strings are equivalent in the current or specified locale. + * @param that String to compare to target string + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details. + * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details. + */ + localeCompare(that: string, locales?: string | string[], options?: Intl.CollatorOptions): number; } interface Number { - /** - * Converts a number to a string by using the current or specified locale. - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; + /** + * Converts a number to a string by using the current or specified locale. + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; } interface Date { - /** - * Converts a date and time to a string by using the current or specified locale. - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; + /** + * Converts a date and time to a string by using the current or specified locale. + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; - /** - * Converts a date to a string by using the current or specified locale. - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleDateString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; + /** + * Converts a date to a string by using the current or specified locale. + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleDateString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; - /** - * Converts a time to a string by using the current or specified locale. - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleTimeString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; + /** + * Converts a time to a string by using the current or specified locale. + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleTimeString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; } diff --git a/generated/current/year/2022/index.d.ts b/generated/current/year/2022/index.d.ts index 2d48e99..6577861 100644 --- a/generated/current/year/2022/index.d.ts +++ b/generated/current/year/2022/index.d.ts @@ -22,175 +22,175 @@ and limitations under the License. // lib.es2015.collection.d.ts ///////////////////////////// interface Map { - /** - * Removes all elements from the Map. - */ - clear(): void; + /** + * Removes all elements from the Map. + */ + clear(): void; - /** - * @returns true if an element in the Map existed and has been removed, or false if the element does not exist. - */ - delete(key: K): boolean; + /** + * @returns true if an element in the Map existed and has been removed, or false if the element does not exist. + */ + delete(key: K): boolean; - /** - * Executes a provided function once per each key/value pair in the Map, in insertion order. - */ - forEach(callbackfn: (value: V, key: K, map: Map) => void, thisArg?: any): void; + /** + * Executes a provided function once per each key/value pair in the Map, in insertion order. + */ + forEach(callbackfn: (value: V, key: K, map: Map) => void, thisArg?: any): void; - /** - * Returns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map. - * @returns Returns the element associated with the specified key. If no element is associated with the specified key, undefined is returned. - */ - get(key: K): V | undefined; + /** + * Returns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map. + * @returns Returns the element associated with the specified key. If no element is associated with the specified key, undefined is returned. + */ + get(key: K): V | undefined; - /** - * @returns boolean indicating whether an element with the specified key exists or not. - */ - has(key: K): boolean; + /** + * @returns boolean indicating whether an element with the specified key exists or not. + */ + has(key: K): boolean; - /** - * Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated. - */ - set(key: K, value: V): this; + /** + * Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated. + */ + set(key: K, value: V): this; - /** - * @returns the number of elements in the Map. - */ - readonly size: number; + /** + * @returns the number of elements in the Map. + */ + readonly size: number; } interface MapConstructor { - new (): Map; + new (): Map; - new (entries?: readonly (readonly [K, V])[] | null): Map; + new (entries?: readonly (readonly [K, V])[] | null): Map; - readonly prototype: Map; + readonly prototype: Map; } declare var Map: MapConstructor; interface ReadonlyMap { - forEach(callbackfn: (value: V, key: K, map: ReadonlyMap) => void, thisArg?: any): void; + forEach(callbackfn: (value: V, key: K, map: ReadonlyMap) => void, thisArg?: any): void; - get(key: K): V | undefined; + get(key: K): V | undefined; - has(key: K): boolean; + has(key: K): boolean; - readonly size: number; + readonly size: number; } interface WeakMap { - /** - * Removes the specified element from the WeakMap. - * @returns true if the element was successfully removed, or false if it was not present. - */ - delete(key: K): boolean; + /** + * Removes the specified element from the WeakMap. + * @returns true if the element was successfully removed, or false if it was not present. + */ + delete(key: K): boolean; - /** - * @returns a specified element. - */ - get(key: K): V | undefined; + /** + * @returns a specified element. + */ + get(key: K): V | undefined; - /** - * @returns a boolean indicating whether an element with the specified key exists or not. - */ - has(key: K): boolean; + /** + * @returns a boolean indicating whether an element with the specified key exists or not. + */ + has(key: K): boolean; - /** - * Adds a new element with a specified key and value. - * @param key Must be an object or symbol. - */ - set(key: K, value: V): this; + /** + * Adds a new element with a specified key and value. + * @param key Must be an object or symbol. + */ + set(key: K, value: V): this; } interface WeakMapConstructor { - new (entries?: readonly (readonly [K, V])[] | null): WeakMap; + new (entries?: readonly (readonly [K, V])[] | null): WeakMap; - readonly prototype: WeakMap; + readonly prototype: WeakMap; } declare var WeakMap: WeakMapConstructor; interface Set { - /** - * Appends a new element with a specified value to the end of the Set. - */ - add(value: T): this; + /** + * Appends a new element with a specified value to the end of the Set. + */ + add(value: T): this; - /** - * Removes all elements from the Set. - */ - clear(): void; + /** + * Removes all elements from the Set. + */ + clear(): void; - /** - * Removes a specified value from the Set. - * @returns Returns true if an element in the Set existed and has been removed, or false if the element does not exist. - */ - delete(value: T): boolean; + /** + * Removes a specified value from the Set. + * @returns Returns true if an element in the Set existed and has been removed, or false if the element does not exist. + */ + delete(value: T): boolean; - /** - * Executes a provided function once per each value in the Set object, in insertion order. - */ - forEach(callbackfn: (value: T, value2: T, set: Set) => void, thisArg?: any): void; + /** + * Executes a provided function once per each value in the Set object, in insertion order. + */ + forEach(callbackfn: (value: T, value2: T, set: Set) => void, thisArg?: any): void; - /** - * @returns a boolean indicating whether an element with the specified value exists in the Set or not. - */ - has(value: T): boolean; + /** + * @returns a boolean indicating whether an element with the specified value exists in the Set or not. + */ + has(value: T): boolean; - /** - * @returns the number of (unique) elements in the Set. - */ - readonly size: number; + /** + * @returns the number of (unique) elements in the Set. + */ + readonly size: number; } interface SetConstructor { - new (values?: readonly T[] | null): Set; + new (values?: readonly T[] | null): Set; - readonly prototype: Set; + readonly prototype: Set; } declare var Set: SetConstructor; interface ReadonlySet { - /** - * Executes a provided function once per each value in the ReadonlySet object, in insertion order. - */ - forEach(callbackfn: (value: T, value2: T, set: ReadonlySet) => void, thisArg?: any): void; + /** + * Executes a provided function once per each value in the ReadonlySet object, in insertion order. + */ + forEach(callbackfn: (value: T, value2: T, set: ReadonlySet) => void, thisArg?: any): void; - /** - * @returns a boolean indicating whether an element with the specified value exists in the Set or not. - */ - has(value: T): boolean; + /** + * @returns a boolean indicating whether an element with the specified value exists in the Set or not. + */ + has(value: T): boolean; - /** - * @returns the number of (unique) elements in the Set. - */ - readonly size: number; + /** + * @returns the number of (unique) elements in the Set. + */ + readonly size: number; } interface WeakSet { - /** - * Appends a new value to the end of the WeakSet. - */ - add(value: T): this; + /** + * Appends a new value to the end of the WeakSet. + */ + add(value: T): this; - /** - * Removes the specified element from the WeakSet. - * @returns Returns true if the element existed and has been removed, or false if the element does not exist. - */ - delete(value: T): boolean; + /** + * Removes the specified element from the WeakSet. + * @returns Returns true if the element existed and has been removed, or false if the element does not exist. + */ + delete(value: T): boolean; - /** - * @returns a boolean indicating whether a value exists in the WeakSet or not. - */ - has(value: T): boolean; + /** + * @returns a boolean indicating whether a value exists in the WeakSet or not. + */ + has(value: T): boolean; } interface WeakSetConstructor { - new (values?: readonly T[] | null): WeakSet; + new (values?: readonly T[] | null): WeakSet; - readonly prototype: WeakSet; + readonly prototype: WeakSet; } declare var WeakSet: WeakSetConstructor; @@ -199,596 +199,596 @@ declare var WeakSet: WeakSetConstructor; // lib.es2015.core.d.ts ///////////////////////////// interface Array { - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: T, index: number, obj: T[]) => value is S, thisArg?: any): S | undefined; - - find(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): T | undefined; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: T, index: number, obj: T[]) => value is S, thisArg?: any): S | undefined; + + find(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): T | undefined; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: T, start?: number, end?: number): this; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: T, start?: number, end?: number): this; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } interface ArrayConstructor { - /** - * Creates an array from an array-like object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): T[]; + /** + * Creates an array from an array-like object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): T[]; - /** - * Creates an array from an iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; + /** + * Creates an array from an iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: T[]): T[]; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: T[]): T[]; } interface DateConstructor { - new (value: number | string | Date): Date; + new (value: number | string | Date): Date; } interface Function { - /** - * Returns the name of the function. Function names are read-only and can not be changed. - */ - readonly name: string; + /** + * Returns the name of the function. Function names are read-only and can not be changed. + */ + readonly name: string; } interface Math { - /** - * Returns the number of leading zero bits in the 32-bit binary representation of a number. - * @param x A numeric expression. - */ - clz32(x: number): number; + /** + * Returns the number of leading zero bits in the 32-bit binary representation of a number. + * @param x A numeric expression. + */ + clz32(x: number): number; - /** - * Returns the result of 32-bit multiplication of two numbers. - * @param x First number - * @param y Second number - */ - imul(x: number, y: number): number; + /** + * Returns the result of 32-bit multiplication of two numbers. + * @param x First number + * @param y Second number + */ + imul(x: number, y: number): number; - /** - * Returns the sign of x, indicating whether x is positive, negative, or zero. - * @param x The numeric expression to test - */ - sign(x: number): number; + /** + * Returns the sign of x, indicating whether x is positive, negative, or zero. + * @param x The numeric expression to test + */ + sign(x: number): number; - /** - * Returns the base 10 logarithm of a number. - * @param x A numeric expression. - */ - log10(x: number): number; + /** + * Returns the base 10 logarithm of a number. + * @param x A numeric expression. + */ + log10(x: number): number; - /** - * Returns the base 2 logarithm of a number. - * @param x A numeric expression. - */ - log2(x: number): number; + /** + * Returns the base 2 logarithm of a number. + * @param x A numeric expression. + */ + log2(x: number): number; - /** - * Returns the natural logarithm of 1 + x. - * @param x A numeric expression. - */ - log1p(x: number): number; + /** + * Returns the natural logarithm of 1 + x. + * @param x A numeric expression. + */ + log1p(x: number): number; - /** - * Returns the result of (e^x - 1), which is an implementation-dependent approximation to - * subtracting 1 from the exponential function of x (e raised to the power of x, where e - * is the base of the natural logarithms). - * @param x A numeric expression. - */ - expm1(x: number): number; + /** + * Returns the result of (e^x - 1), which is an implementation-dependent approximation to + * subtracting 1 from the exponential function of x (e raised to the power of x, where e + * is the base of the natural logarithms). + * @param x A numeric expression. + */ + expm1(x: number): number; - /** - * Returns the hyperbolic cosine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - cosh(x: number): number; + /** + * Returns the hyperbolic cosine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + cosh(x: number): number; - /** - * Returns the hyperbolic sine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - sinh(x: number): number; + /** + * Returns the hyperbolic sine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + sinh(x: number): number; - /** - * Returns the hyperbolic tangent of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - tanh(x: number): number; + /** + * Returns the hyperbolic tangent of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + tanh(x: number): number; - /** - * Returns the inverse hyperbolic cosine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - acosh(x: number): number; + /** + * Returns the inverse hyperbolic cosine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + acosh(x: number): number; - /** - * Returns the inverse hyperbolic sine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - asinh(x: number): number; + /** + * Returns the inverse hyperbolic sine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + asinh(x: number): number; - /** - * Returns the inverse hyperbolic tangent of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - atanh(x: number): number; + /** + * Returns the inverse hyperbolic tangent of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + atanh(x: number): number; - /** - * Returns the square root of the sum of squares of its arguments. - * @param values Values to compute the square root for. - * If no arguments are passed, the result is +0. - * If there is only one argument, the result is the absolute value. - * If any argument is +Infinity or -Infinity, the result is +Infinity. - * If any argument is NaN, the result is NaN. - * If all arguments are either +0 or −0, the result is +0. - */ - hypot(...values: number[]): number; + /** + * Returns the square root of the sum of squares of its arguments. + * @param values Values to compute the square root for. + * If no arguments are passed, the result is +0. + * If there is only one argument, the result is the absolute value. + * If any argument is +Infinity or -Infinity, the result is +Infinity. + * If any argument is NaN, the result is NaN. + * If all arguments are either +0 or −0, the result is +0. + */ + hypot(...values: number[]): number; - /** - * Returns the integral part of the numeric expression x, removing any fractional digits. - * If x is already an integer, the result is x. - * @param x A numeric expression. - */ - trunc(x: number): number; + /** + * Returns the integral part of the numeric expression x, removing any fractional digits. + * If x is already an integer, the result is x. + * @param x A numeric expression. + */ + trunc(x: number): number; - /** - * Returns the nearest single precision float representation of a number. - * @param x A numeric expression. - */ - fround(x: number): number; + /** + * Returns the nearest single precision float representation of a number. + * @param x A numeric expression. + */ + fround(x: number): number; - /** - * Returns an implementation-dependent approximation to the cube root of number. - * @param x A numeric expression. - */ - cbrt(x: number): number; + /** + * Returns an implementation-dependent approximation to the cube root of number. + * @param x A numeric expression. + */ + cbrt(x: number): number; } interface NumberConstructor { - /** - * The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1 - * that is representable as a Number value, which is approximately: - * 2.2204460492503130808472633361816 x 10‍−‍16. - */ - readonly EPSILON: number; + /** + * The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1 + * that is representable as a Number value, which is approximately: + * 2.2204460492503130808472633361816 x 10‍−‍16. + */ + readonly EPSILON: number; - /** - * Returns true if passed value is finite. - * Unlike the global isFinite, Number.isFinite doesn't forcibly convert the parameter to a - * number. Only finite values of the type number, result in true. - * @param number A numeric value. - */ - isFinite(number: unknown): boolean; + /** + * Returns true if passed value is finite. + * Unlike the global isFinite, Number.isFinite doesn't forcibly convert the parameter to a + * number. Only finite values of the type number, result in true. + * @param number A numeric value. + */ + isFinite(number: unknown): boolean; - /** - * Returns true if the value passed is an integer, false otherwise. - * @param number A numeric value. - */ - isInteger(number: unknown): boolean; + /** + * Returns true if the value passed is an integer, false otherwise. + * @param number A numeric value. + */ + isInteger(number: unknown): boolean; - /** - * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a - * number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter - * to a number. Only values of the type number, that are also NaN, result in true. - * @param number A numeric value. - */ - isNaN(number: unknown): boolean; + /** + * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a + * number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter + * to a number. Only values of the type number, that are also NaN, result in true. + * @param number A numeric value. + */ + isNaN(number: unknown): boolean; - /** - * Returns true if the value passed is a safe integer. - * @param number A numeric value. - */ - isSafeInteger(number: unknown): boolean; + /** + * Returns true if the value passed is a safe integer. + * @param number A numeric value. + */ + isSafeInteger(number: unknown): boolean; - /** - * The value of the largest integer n such that n and n + 1 are both exactly representable as - * a Number value. - * The value of Number.MAX_SAFE_INTEGER is 9007199254740991 2^53 − 1. - */ - readonly MAX_SAFE_INTEGER: number; + /** + * The value of the largest integer n such that n and n + 1 are both exactly representable as + * a Number value. + * The value of Number.MAX_SAFE_INTEGER is 9007199254740991 2^53 − 1. + */ + readonly MAX_SAFE_INTEGER: number; - /** - * The value of the smallest integer n such that n and n − 1 are both exactly representable as - * a Number value. - * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)). - */ - readonly MIN_SAFE_INTEGER: number; + /** + * The value of the smallest integer n such that n and n − 1 are both exactly representable as + * a Number value. + * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)). + */ + readonly MIN_SAFE_INTEGER: number; - /** - * Converts a string to a floating-point number. - * @param string A string that contains a floating-point number. - */ - parseFloat(string: string): number; + /** + * Converts a string to a floating-point number. + * @param string A string that contains a floating-point number. + */ + parseFloat(string: string): number; - /** - * Converts A string to an integer. - * @param string A string to convert into a number. - * @param radix A value between 2 and 36 that specifies the base of the number in `string`. - * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. - * All other strings are considered decimal. - */ - parseInt(string: string, radix?: number): number; + /** + * Converts A string to an integer. + * @param string A string to convert into a number. + * @param radix A value between 2 and 36 that specifies the base of the number in `string`. + * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. + * All other strings are considered decimal. + */ + parseInt(string: string, radix?: number): number; } interface ObjectConstructor { - /** - * Copy the values of all of the enumerable own properties from one or more source objects to a - * target object. Returns the target object. - * @param target The target object to copy to. - * @param source The source object from which to copy properties. - */ - assign(target: T, source: U): T & U; + /** + * Copy the values of all of the enumerable own properties from one or more source objects to a + * target object. Returns the target object. + * @param target The target object to copy to. + * @param source The source object from which to copy properties. + */ + assign(target: T, source: U): T & U; - /** - * Copy the values of all of the enumerable own properties from one or more source objects to a - * target object. Returns the target object. - * @param target The target object to copy to. - * @param source1 The first source object from which to copy properties. - * @param source2 The second source object from which to copy properties. - */ - assign(target: T, source1: U, source2: V): T & U & V; + /** + * Copy the values of all of the enumerable own properties from one or more source objects to a + * target object. Returns the target object. + * @param target The target object to copy to. + * @param source1 The first source object from which to copy properties. + * @param source2 The second source object from which to copy properties. + */ + assign(target: T, source1: U, source2: V): T & U & V; - /** - * Copy the values of all of the enumerable own properties from one or more source objects to a - * target object. Returns the target object. - * @param target The target object to copy to. - * @param source1 The first source object from which to copy properties. - * @param source2 The second source object from which to copy properties. - * @param source3 The third source object from which to copy properties. - */ - assign(target: T, source1: U, source2: V, source3: W): T & U & V & W; + /** + * Copy the values of all of the enumerable own properties from one or more source objects to a + * target object. Returns the target object. + * @param target The target object to copy to. + * @param source1 The first source object from which to copy properties. + * @param source2 The second source object from which to copy properties. + * @param source3 The third source object from which to copy properties. + */ + assign(target: T, source1: U, source2: V, source3: W): T & U & V & W; - /** - * Copy the values of all of the enumerable own properties from one or more source objects to a - * target object. Returns the target object. - * @param target The target object to copy to. - * @param sources One or more source objects from which to copy properties - */ - assign(target: object, ...sources: any[]): any; + /** + * Copy the values of all of the enumerable own properties from one or more source objects to a + * target object. Returns the target object. + * @param target The target object to copy to. + * @param sources One or more source objects from which to copy properties + */ + assign(target: object, ...sources: any[]): any; - /** - * Returns an array of all symbol properties found directly on object o. - * @param o Object to retrieve the symbols from. - */ - getOwnPropertySymbols(o: any): symbol[]; + /** + * Returns an array of all symbol properties found directly on object o. + * @param o Object to retrieve the symbols from. + */ + getOwnPropertySymbols(o: any): symbol[]; - /** - * Returns the names of the enumerable string properties and methods of an object. - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - keys(o: {}): string[]; + /** + * Returns the names of the enumerable string properties and methods of an object. + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + keys(o: {}): string[]; - /** - * Returns true if the values are the same value, false otherwise. - * @param value1 The first value. - * @param value2 The second value. - */ - is(value1: any, value2: any): boolean; + /** + * Returns true if the values are the same value, false otherwise. + * @param value1 The first value. + * @param value2 The second value. + */ + is(value1: any, value2: any): boolean; - /** - * Sets the prototype of a specified object o to object proto or null. Returns the object o. - * @param o The object to change its prototype. - * @param proto The value of the new prototype or null. - */ - setPrototypeOf(o: any, proto: object | null): any; + /** + * Sets the prototype of a specified object o to object proto or null. Returns the object o. + * @param o The object to change its prototype. + * @param proto The value of the new prototype or null. + */ + setPrototypeOf(o: any, proto: object | null): any; } interface ReadonlyArray { - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: T, index: number, obj: readonly T[]) => value is S, thisArg?: any): S | undefined; - - find(predicate: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): T | undefined; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: T, index: number, obj: readonly T[]) => value is S, thisArg?: any): S | undefined; + + find(predicate: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): T | undefined; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): number; - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } interface RegExp { - /** - * Returns a string indicating the flags of the regular expression in question. This field is read-only. - * The characters in this string are sequenced and concatenated in the following order: - * - * - "g" for global - * - "i" for ignoreCase - * - "m" for multiline - * - "u" for unicode - * - "y" for sticky - * - * If no flags are set, the value is the empty string. - */ - readonly flags: string; + /** + * Returns a string indicating the flags of the regular expression in question. This field is read-only. + * The characters in this string are sequenced and concatenated in the following order: + * + * - "g" for global + * - "i" for ignoreCase + * - "m" for multiline + * - "u" for unicode + * - "y" for sticky + * + * If no flags are set, the value is the empty string. + */ + readonly flags: string; - /** - * Returns a Boolean value indicating the state of the sticky flag (y) used with a regular - * expression. Default is false. Read-only. - */ - readonly sticky: boolean; + /** + * Returns a Boolean value indicating the state of the sticky flag (y) used with a regular + * expression. Default is false. Read-only. + */ + readonly sticky: boolean; - /** - * Returns a Boolean value indicating the state of the Unicode flag (u) used with a regular - * expression. Default is false. Read-only. - */ - readonly unicode: boolean; + /** + * Returns a Boolean value indicating the state of the Unicode flag (u) used with a regular + * expression. Default is false. Read-only. + */ + readonly unicode: boolean; } interface RegExpConstructor { - new (pattern: RegExp | string, flags?: string): RegExp; + new (pattern: RegExp | string, flags?: string): RegExp; - (pattern: RegExp | string, flags?: string): RegExp; + (pattern: RegExp | string, flags?: string): RegExp; } interface String { - /** - * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point - * value of the UTF-16 encoded code point starting at the string element at position pos in - * the String resulting from converting this object to a String. - * If there is no element at that position, the result is undefined. - * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos. - */ - codePointAt(pos: number): number | undefined; + /** + * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point + * value of the UTF-16 encoded code point starting at the string element at position pos in + * the String resulting from converting this object to a String. + * If there is no element at that position, the result is undefined. + * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos. + */ + codePointAt(pos: number): number | undefined; - /** - * Returns true if searchString appears as a substring of the result of converting this - * object to a String, at one or more positions that are - * greater than or equal to position; otherwise, returns false. - * @param searchString search string - * @param position If position is undefined, 0 is assumed, so as to search all of the String. - */ - includes(searchString: string, position?: number): boolean; + /** + * Returns true if searchString appears as a substring of the result of converting this + * object to a String, at one or more positions that are + * greater than or equal to position; otherwise, returns false. + * @param searchString search string + * @param position If position is undefined, 0 is assumed, so as to search all of the String. + */ + includes(searchString: string, position?: number): boolean; - /** - * Returns true if the sequence of elements of searchString converted to a String is the - * same as the corresponding elements of this object (converted to a String) starting at - * endPosition – length(this). Otherwise returns false. - */ - endsWith(searchString: string, endPosition?: number): boolean; + /** + * Returns true if the sequence of elements of searchString converted to a String is the + * same as the corresponding elements of this object (converted to a String) starting at + * endPosition – length(this). Otherwise returns false. + */ + endsWith(searchString: string, endPosition?: number): boolean; - /** - * Returns the String value result of normalizing the string into the normalization form - * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms. - * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default - * is "NFC" - */ - normalize(form: "NFC" | "NFD" | "NFKC" | "NFKD"): string; + /** + * Returns the String value result of normalizing the string into the normalization form + * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms. + * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default + * is "NFC" + */ + normalize(form: "NFC" | "NFD" | "NFKC" | "NFKD"): string; - /** - * Returns the String value result of normalizing the string into the normalization form - * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms. - * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default - * is "NFC" - */ - normalize(form?: string): string; + /** + * Returns the String value result of normalizing the string into the normalization form + * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms. + * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default + * is "NFC" + */ + normalize(form?: string): string; - /** - * Returns a String value that is made from count copies appended together. If count is 0, - * the empty string is returned. - * @param count number of copies to append - */ - repeat(count: number): string; + /** + * Returns a String value that is made from count copies appended together. If count is 0, + * the empty string is returned. + * @param count number of copies to append + */ + repeat(count: number): string; - /** - * Returns true if the sequence of elements of searchString converted to a String is the - * same as the corresponding elements of this object (converted to a String) starting at - * position. Otherwise returns false. - */ - startsWith(searchString: string, position?: number): boolean; + /** + * Returns true if the sequence of elements of searchString converted to a String is the + * same as the corresponding elements of this object (converted to a String) starting at + * position. Otherwise returns false. + */ + startsWith(searchString: string, position?: number): boolean; } interface StringConstructor { - /** - * Return the String value whose elements are, in order, the elements in the List elements. - * If length is 0, the empty string is returned. - */ - fromCodePoint(...codePoints: number[]): string; + /** + * Return the String value whose elements are, in order, the elements in the List elements. + * If length is 0, the empty string is returned. + */ + fromCodePoint(...codePoints: number[]): string; - /** - * String.raw is usually used as a tag function of a Tagged Template String. When called as - * such, the first argument will be a well formed template call site object and the rest - * parameter will contain the substitution values. It can also be called directly, for example, - * to interleave strings and values from your own tag function, and in this case the only thing - * it needs from the first argument is the raw property. - * @param template A well-formed template string call site representation. - * @param substitutions A set of substitution values. - */ - raw(template: { raw: readonly string[] | ArrayLike; }, ...substitutions: any[]): string; + /** + * String.raw is usually used as a tag function of a Tagged Template String. When called as + * such, the first argument will be a well formed template call site object and the rest + * parameter will contain the substitution values. It can also be called directly, for example, + * to interleave strings and values from your own tag function, and in this case the only thing + * it needs from the first argument is the raw property. + * @param template A well-formed template string call site representation. + * @param substitutions A set of substitution values. + */ + raw(template: { raw: readonly string[] | ArrayLike; }, ...substitutions: any[]): string; } interface Int8Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Uint8Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Uint8ClampedArray { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Int16Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Uint16Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Int32Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Uint32Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Float32Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Float64Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } ///////////////////////////// // lib.es2015.generator.d.ts ///////////////////////////// interface Generator extends IteratorObject { - // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. - next(...[value]: [] | [TNext]): IteratorResult; + // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. + next(...[value]: [] | [TNext]): IteratorResult; - return(value: TReturn): IteratorResult; + return(value: TReturn): IteratorResult; - throw(e: any): IteratorResult; + throw(e: any): IteratorResult; - [Symbol.iterator](): Generator; + [Symbol.iterator](): Generator; } interface GeneratorFunction { - /** - * Creates a new Generator object. - * @param args A list of arguments the function accepts. - */ - new (...args: any[]): Generator; + /** + * Creates a new Generator object. + * @param args A list of arguments the function accepts. + */ + new (...args: any[]): Generator; - /** - * Creates a new Generator object. - * @param args A list of arguments the function accepts. - */ - (...args: any[]): Generator; + /** + * Creates a new Generator object. + * @param args A list of arguments the function accepts. + */ + (...args: any[]): Generator; - /** - * The length of the arguments. - */ - readonly length: number; + /** + * The length of the arguments. + */ + readonly length: number; - /** - * Returns the name of the function. - */ - readonly name: string; + /** + * Returns the name of the function. + */ + readonly name: string; - /** - * A reference to the prototype. - */ - readonly prototype: Generator; + /** + * A reference to the prototype. + */ + readonly prototype: Generator; } ///////////////////////////// // lib.es2015.iterable.d.ts ///////////////////////////// interface SymbolConstructor { - /** - * A method that returns the default iterator for an object. Called by the semantics of the - * for-of statement. - */ - readonly iterator: unique symbol; + /** + * A method that returns the default iterator for an object. Called by the semantics of the + * for-of statement. + */ + readonly iterator: unique symbol; } interface IteratorYieldResult { - done?: false; + done?: false; - value: TYield; + value: TYield; } interface IteratorReturnResult { - done: true; + done: true; - value: TReturn; + value: TReturn; } type IteratorResult = IteratorYieldResult | IteratorReturnResult; interface Iterator { - // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. - next(...[value]: [] | [TNext]): IteratorResult; + // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. + next(...[value]: [] | [TNext]): IteratorResult; - return?(value?: TReturn): IteratorResult; + return?(value?: TReturn): IteratorResult; - throw?(e?: any): IteratorResult; + throw?(e?: any): IteratorResult; } interface Iterable { - [Symbol.iterator](): Iterator; + [Symbol.iterator](): Iterator; } /** * Describes a user-defined {@link Iterator} that is also iterable. */ interface IterableIterator extends Iterator { - [Symbol.iterator](): IterableIterator; + [Symbol.iterator](): IterableIterator; } /** * Describes an {@link Iterator} produced by the runtime that inherits from the intrinsic `Iterator.prototype`. */ interface IteratorObject extends Iterator { - [Symbol.iterator](): IteratorObject; + [Symbol.iterator](): IteratorObject; } /** @@ -798,589 +798,589 @@ interface IteratorObject extends Iterator type BuiltinIteratorReturn = intrinsic; interface ArrayIterator extends IteratorObject { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; } interface Array { - /** Iterator */ - [Symbol.iterator](): ArrayIterator; + /** Iterator */ + [Symbol.iterator](): ArrayIterator; - /** - * Returns an iterable of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, T]>; + /** + * Returns an iterable of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, T]>; - /** - * Returns an iterable of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an iterable of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an iterable of values in the array - */ - values(): ArrayIterator; + /** + * Returns an iterable of values in the array + */ + values(): ArrayIterator; } interface ArrayConstructor { - /** - * Creates an array from an iterable object. - * @param iterable An iterable object to convert to an array. - */ - from(iterable: Iterable | ArrayLike): T[]; + /** + * Creates an array from an iterable object. + * @param iterable An iterable object to convert to an array. + */ + from(iterable: Iterable | ArrayLike): T[]; - /** - * Creates an array from an iterable object. - * @param iterable An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; + /** + * Creates an array from an iterable object. + * @param iterable An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } interface ReadonlyArray { - /** Iterator of values in the array. */ - [Symbol.iterator](): ArrayIterator; + /** Iterator of values in the array. */ + [Symbol.iterator](): ArrayIterator; - /** - * Returns an iterable of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, T]>; + /** + * Returns an iterable of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, T]>; - /** - * Returns an iterable of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an iterable of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an iterable of values in the array - */ - values(): ArrayIterator; + /** + * Returns an iterable of values in the array + */ + values(): ArrayIterator; } interface IArguments { - /** Iterator */ - [Symbol.iterator](): ArrayIterator; + /** Iterator */ + [Symbol.iterator](): ArrayIterator; } interface MapIterator extends IteratorObject { - [Symbol.iterator](): MapIterator; + [Symbol.iterator](): MapIterator; } interface Map { - /** Returns an iterable of entries in the map. */ - [Symbol.iterator](): MapIterator<[K, V]>; + /** Returns an iterable of entries in the map. */ + [Symbol.iterator](): MapIterator<[K, V]>; - /** - * Returns an iterable of key, value pairs for every entry in the map. - */ - entries(): MapIterator<[K, V]>; + /** + * Returns an iterable of key, value pairs for every entry in the map. + */ + entries(): MapIterator<[K, V]>; - /** - * Returns an iterable of keys in the map - */ - keys(): MapIterator; + /** + * Returns an iterable of keys in the map + */ + keys(): MapIterator; - /** - * Returns an iterable of values in the map - */ - values(): MapIterator; + /** + * Returns an iterable of values in the map + */ + values(): MapIterator; } interface ReadonlyMap { - /** Returns an iterable of entries in the map. */ - [Symbol.iterator](): MapIterator<[K, V]>; + /** Returns an iterable of entries in the map. */ + [Symbol.iterator](): MapIterator<[K, V]>; - /** - * Returns an iterable of key, value pairs for every entry in the map. - */ - entries(): MapIterator<[K, V]>; + /** + * Returns an iterable of key, value pairs for every entry in the map. + */ + entries(): MapIterator<[K, V]>; - /** - * Returns an iterable of keys in the map - */ - keys(): MapIterator; + /** + * Returns an iterable of keys in the map + */ + keys(): MapIterator; - /** - * Returns an iterable of values in the map - */ - values(): MapIterator; + /** + * Returns an iterable of values in the map + */ + values(): MapIterator; } interface MapConstructor { - new (): Map; + new (): Map; - new (iterable?: Iterable | null): Map; + new (iterable?: Iterable | null): Map; } interface WeakMap { } interface WeakMapConstructor { - new (iterable?: Iterable | null): WeakMap; + new (iterable?: Iterable | null): WeakMap; } interface SetIterator extends IteratorObject { - [Symbol.iterator](): SetIterator; + [Symbol.iterator](): SetIterator; } interface Set { - /** Iterates over values in the set. */ - [Symbol.iterator](): SetIterator; + /** Iterates over values in the set. */ + [Symbol.iterator](): SetIterator; - /** - * Returns an iterable of [v,v] pairs for every value `v` in the set. - */ - entries(): SetIterator<[T, T]>; + /** + * Returns an iterable of [v,v] pairs for every value `v` in the set. + */ + entries(): SetIterator<[T, T]>; - /** - * Despite its name, returns an iterable of the values in the set. - */ - keys(): SetIterator; + /** + * Despite its name, returns an iterable of the values in the set. + */ + keys(): SetIterator; - /** - * Returns an iterable of values in the set. - */ - values(): SetIterator; + /** + * Returns an iterable of values in the set. + */ + values(): SetIterator; } interface ReadonlySet { - /** Iterates over values in the set. */ - [Symbol.iterator](): SetIterator; + /** Iterates over values in the set. */ + [Symbol.iterator](): SetIterator; - /** - * Returns an iterable of [v,v] pairs for every value `v` in the set. - */ - entries(): SetIterator<[T, T]>; + /** + * Returns an iterable of [v,v] pairs for every value `v` in the set. + */ + entries(): SetIterator<[T, T]>; - /** - * Despite its name, returns an iterable of the values in the set. - */ - keys(): SetIterator; + /** + * Despite its name, returns an iterable of the values in the set. + */ + keys(): SetIterator; - /** - * Returns an iterable of values in the set. - */ - values(): SetIterator; + /** + * Returns an iterable of values in the set. + */ + values(): SetIterator; } interface SetConstructor { - new (iterable?: Iterable | null): Set; + new (iterable?: Iterable | null): Set; } interface WeakSet { } interface WeakSetConstructor { - new (iterable: Iterable): WeakSet; + new (iterable: Iterable): WeakSet; } interface PromiseConstructor { - /** - * Creates a Promise that is resolved with an array of results when all of the provided Promises - * resolve, or rejected when any Promise is rejected. - * @param values An iterable of Promises. - * @returns A new Promise. - */ - all(values: Iterable>): Promise[]>; + /** + * Creates a Promise that is resolved with an array of results when all of the provided Promises + * resolve, or rejected when any Promise is rejected. + * @param values An iterable of Promises. + * @returns A new Promise. + */ + all(values: Iterable>): Promise[]>; - /** - * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved - * or rejected. - * @param values An iterable of Promises. - * @returns A new Promise. - */ - race(values: Iterable>): Promise>; + /** + * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved + * or rejected. + * @param values An iterable of Promises. + * @returns A new Promise. + */ + race(values: Iterable>): Promise>; } interface StringIterator extends IteratorObject { - [Symbol.iterator](): StringIterator; + [Symbol.iterator](): StringIterator; } interface String { - /** Iterator */ - [Symbol.iterator](): StringIterator; + /** Iterator */ + [Symbol.iterator](): StringIterator; } interface Int8Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Int8ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Int8Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Int8Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int8Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int8Array; } interface Uint8Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Uint8ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Uint8Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Uint8Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8Array; } interface Uint8ClampedArray { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Uint8ClampedArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Uint8ClampedArray; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Uint8ClampedArray; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } interface Int16Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Int16ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Int16Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Int16Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int16Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int16Array; } interface Uint16Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Uint16ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Uint16Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Uint16Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint16Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint16Array; } interface Int32Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Int32ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Int32Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Int32Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int32Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int32Array; } interface Uint32Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Uint32ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Uint32Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Uint32Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint32Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint32Array; } interface Float32Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Float32ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Float32Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Float32Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Float32Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Float32Array; } interface Float64Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Float64ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Float64Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Float64Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Float64Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Float64Array; } ///////////////////////////// // lib.es2015.promise.d.ts ///////////////////////////// interface PromiseConstructor { - /** - * A reference to the prototype. - */ - readonly prototype: Promise; + /** + * A reference to the prototype. + */ + readonly prototype: Promise; - /** - * Creates a new Promise. - * @param executor A callback used to initialize the promise. This callback is passed two arguments: - * a resolve callback used to resolve the promise with a value or the result of another promise, - * and a reject callback used to reject the promise with a provided reason or error. - */ - new (executor: (resolve: (value: T | PromiseLike) => void, reject: (reason?: any) => void) => void): Promise; + /** + * Creates a new Promise. + * @param executor A callback used to initialize the promise. This callback is passed two arguments: + * a resolve callback used to resolve the promise with a value or the result of another promise, + * and a reject callback used to reject the promise with a provided reason or error. + */ + new (executor: (resolve: (value: T | PromiseLike) => void, reject: (reason?: any) => void) => void): Promise; - /** - * Creates a Promise that is resolved with an array of results when all of the provided Promises - * resolve, or rejected when any Promise is rejected. - * @param values An array of Promises. - * @returns A new Promise. - */ - all(values: T): Promise<{ -readonly [P in keyof T]: Awaited; }>; + /** + * Creates a Promise that is resolved with an array of results when all of the provided Promises + * resolve, or rejected when any Promise is rejected. + * @param values An array of Promises. + * @returns A new Promise. + */ + all(values: T): Promise<{ -readonly [P in keyof T]: Awaited; }>; - // see: lib.es2015.iterable.d.ts - // all(values: Iterable>): Promise[]>; + // see: lib.es2015.iterable.d.ts + // all(values: Iterable>): Promise[]>; - /** - * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved - * or rejected. - * @param values An array of Promises. - * @returns A new Promise. - */ - race(values: T): Promise>; + /** + * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved + * or rejected. + * @param values An array of Promises. + * @returns A new Promise. + */ + race(values: T): Promise>; - // see: lib.es2015.iterable.d.ts - // race(values: Iterable>): Promise>; + // see: lib.es2015.iterable.d.ts + // race(values: Iterable>): Promise>; - /** - * Creates a new rejected promise for the provided reason. - * @param reason The reason the promise was rejected. - * @returns A new rejected Promise. - */ - reject(reason?: any): Promise; + /** + * Creates a new rejected promise for the provided reason. + * @param reason The reason the promise was rejected. + * @returns A new rejected Promise. + */ + reject(reason?: any): Promise; - /** - * Creates a new resolved promise. - * @returns A resolved promise. - */ - resolve(): Promise; + /** + * Creates a new resolved promise. + * @returns A resolved promise. + */ + resolve(): Promise; - /** - * Creates a new resolved promise for the provided value. - * @param value A promise. - * @returns A promise whose internal state matches the provided promise. - */ - resolve(value: T): Promise>; + /** + * Creates a new resolved promise for the provided value. + * @param value A promise. + * @returns A promise whose internal state matches the provided promise. + */ + resolve(value: T): Promise>; - /** - * Creates a new resolved promise for the provided value. - * @param value A promise. - * @returns A promise whose internal state matches the provided promise. - */ - resolve(value: T | PromiseLike): Promise>; + /** + * Creates a new resolved promise for the provided value. + * @param value A promise. + * @returns A promise whose internal state matches the provided promise. + */ + resolve(value: T | PromiseLike): Promise>; } declare var Promise: PromiseConstructor; @@ -1389,113 +1389,113 @@ declare var Promise: PromiseConstructor; // lib.es2015.proxy.d.ts ///////////////////////////// interface ProxyHandler { - /** - * A trap method for a function call. - * @param target The original callable object which is being proxied. - */ - apply?(target: T, thisArg: any, argArray: any[]): any; + /** + * A trap method for a function call. + * @param target The original callable object which is being proxied. + */ + apply?(target: T, thisArg: any, argArray: any[]): any; - /** - * A trap for the `new` operator. - * @param target The original object which is being proxied. - * @param newTarget The constructor that was originally called. - */ - construct?(target: T, argArray: any[], newTarget: Function): object; + /** + * A trap for the `new` operator. + * @param target The original object which is being proxied. + * @param newTarget The constructor that was originally called. + */ + construct?(target: T, argArray: any[], newTarget: Function): object; - /** - * A trap for `Object.defineProperty()`. - * @param target The original object which is being proxied. - * @returns A `Boolean` indicating whether or not the property has been defined. - */ - defineProperty?(target: T, property: string | symbol, attributes: PropertyDescriptor): boolean; + /** + * A trap for `Object.defineProperty()`. + * @param target The original object which is being proxied. + * @returns A `Boolean` indicating whether or not the property has been defined. + */ + defineProperty?(target: T, property: string | symbol, attributes: PropertyDescriptor): boolean; - /** - * A trap for the `delete` operator. - * @param target The original object which is being proxied. - * @param p The name or `Symbol` of the property to delete. - * @returns A `Boolean` indicating whether or not the property was deleted. - */ - deleteProperty?(target: T, p: string | symbol): boolean; + /** + * A trap for the `delete` operator. + * @param target The original object which is being proxied. + * @param p The name or `Symbol` of the property to delete. + * @returns A `Boolean` indicating whether or not the property was deleted. + */ + deleteProperty?(target: T, p: string | symbol): boolean; - /** - * A trap for getting a property value. - * @param target The original object which is being proxied. - * @param p The name or `Symbol` of the property to get. - * @param receiver The proxy or an object that inherits from the proxy. - */ - get?(target: T, p: string | symbol, receiver: any): any; + /** + * A trap for getting a property value. + * @param target The original object which is being proxied. + * @param p The name or `Symbol` of the property to get. + * @param receiver The proxy or an object that inherits from the proxy. + */ + get?(target: T, p: string | symbol, receiver: any): any; - /** - * A trap for `Object.getOwnPropertyDescriptor()`. - * @param target The original object which is being proxied. - * @param p The name of the property whose description should be retrieved. - */ - getOwnPropertyDescriptor?(target: T, p: string | symbol): PropertyDescriptor | undefined; + /** + * A trap for `Object.getOwnPropertyDescriptor()`. + * @param target The original object which is being proxied. + * @param p The name of the property whose description should be retrieved. + */ + getOwnPropertyDescriptor?(target: T, p: string | symbol): PropertyDescriptor | undefined; - /** - * A trap for the `[[GetPrototypeOf]]` internal method. - * @param target The original object which is being proxied. - */ - getPrototypeOf?(target: T): object | null; + /** + * A trap for the `[[GetPrototypeOf]]` internal method. + * @param target The original object which is being proxied. + */ + getPrototypeOf?(target: T): object | null; - /** - * A trap for the `in` operator. - * @param target The original object which is being proxied. - * @param p The name or `Symbol` of the property to check for existence. - */ - has?(target: T, p: string | symbol): boolean; + /** + * A trap for the `in` operator. + * @param target The original object which is being proxied. + * @param p The name or `Symbol` of the property to check for existence. + */ + has?(target: T, p: string | symbol): boolean; - /** - * A trap for `Object.isExtensible()`. - * @param target The original object which is being proxied. - */ - isExtensible?(target: T): boolean; + /** + * A trap for `Object.isExtensible()`. + * @param target The original object which is being proxied. + */ + isExtensible?(target: T): boolean; - /** - * A trap for `Reflect.ownKeys()`. - * @param target The original object which is being proxied. - */ - ownKeys?(target: T): ArrayLike; + /** + * A trap for `Reflect.ownKeys()`. + * @param target The original object which is being proxied. + */ + ownKeys?(target: T): ArrayLike; - /** - * A trap for `Object.preventExtensions()`. - * @param target The original object which is being proxied. - */ - preventExtensions?(target: T): boolean; + /** + * A trap for `Object.preventExtensions()`. + * @param target The original object which is being proxied. + */ + preventExtensions?(target: T): boolean; - /** - * A trap for setting a property value. - * @param target The original object which is being proxied. - * @param p The name or `Symbol` of the property to set. - * @param receiver The object to which the assignment was originally directed. - * @returns A `Boolean` indicating whether or not the property was set. - */ - set?(target: T, p: string | symbol, newValue: any, receiver: any): boolean; + /** + * A trap for setting a property value. + * @param target The original object which is being proxied. + * @param p The name or `Symbol` of the property to set. + * @param receiver The object to which the assignment was originally directed. + * @returns A `Boolean` indicating whether or not the property was set. + */ + set?(target: T, p: string | symbol, newValue: any, receiver: any): boolean; - /** - * A trap for `Object.setPrototypeOf()`. - * @param target The original object which is being proxied. - * @param newPrototype The object's new prototype or `null`. - */ - setPrototypeOf?(target: T, v: object | null): boolean; + /** + * A trap for `Object.setPrototypeOf()`. + * @param target The original object which is being proxied. + * @param newPrototype The object's new prototype or `null`. + */ + setPrototypeOf?(target: T, v: object | null): boolean; } interface ProxyConstructor { - /** - * Creates a revocable Proxy object. - * @param target A target object to wrap with Proxy. - * @param handler An object whose properties define the behavior of Proxy when an operation is attempted on it. - */ - revocable(target: T, handler: ProxyHandler): { proxy: T; revoke: () => void; }; + /** + * Creates a revocable Proxy object. + * @param target A target object to wrap with Proxy. + * @param handler An object whose properties define the behavior of Proxy when an operation is attempted on it. + */ + revocable(target: T, handler: ProxyHandler): { proxy: T; revoke: () => void; }; - /** - * Creates a Proxy object. The Proxy object allows you to create an object that can be used in place of the - * original object, but which may redefine fundamental Object operations like getting, setting, and defining - * properties. Proxy objects are commonly used to log property accesses, validate, format, or sanitize inputs. - * @param target A target object to wrap with Proxy. - * @param handler An object whose properties define the behavior of Proxy when an operation is attempted on it. - */ - new (target: T, handler: ProxyHandler): T; + /** + * Creates a Proxy object. The Proxy object allows you to create an object that can be used in place of the + * original object, but which may redefine fundamental Object operations like getting, setting, and defining + * properties. Proxy objects are commonly used to log property accesses, validate, format, or sanitize inputs. + * @param target A target object to wrap with Proxy. + * @param handler An object whose properties define the behavior of Proxy when an operation is attempted on it. + */ + new (target: T, handler: ProxyHandler): T; } declare var Proxy: ProxyConstructor; @@ -1504,163 +1504,163 @@ declare var Proxy: ProxyConstructor; // lib.es2015.reflect.d.ts ///////////////////////////// declare namespace Reflect { - /** - * Calls the function with the specified object as the this value - * and the elements of specified array as the arguments. - * @param target The function to call. - * @param thisArgument The object to be used as the this object. - * @param argumentsList An array of argument values to be passed to the function. - */ - function apply( - target: (this: T, ...args: A) => R, - thisArgument: T, - argumentsList: Readonly, - ): R; - - function apply(target: Function, thisArgument: any, argumentsList: ArrayLike): any; - - /** - * Constructs the target with the elements of specified array as the arguments - * and the specified constructor as the `new.target` value. - * @param target The constructor to invoke. - * @param argumentsList An array of argument values to be passed to the constructor. - * @param newTarget The constructor to be used as the `new.target` object. - */ - function construct( - target: new (...args: A) => R, - argumentsList: Readonly, - newTarget?: new (...args: any) => any, - ): R; - - function construct(target: Function, argumentsList: ArrayLike, newTarget?: Function): any; +/** + * Calls the function with the specified object as the this value + * and the elements of specified array as the arguments. + * @param target The function to call. + * @param thisArgument The object to be used as the this object. + * @param argumentsList An array of argument values to be passed to the function. + */ + function apply( + target: (this: T, ...args: A) => R, + thisArgument: T, + argumentsList: Readonly, + ): R; + +function apply(target: Function, thisArgument: any, argumentsList: ArrayLike): any; - /** - * Adds a property to an object, or modifies attributes of an existing property. - * @param target Object on which to add or modify the property. This can be a native JavaScript object - * (that is, a user-defined object or a built in object) or a DOM object. - * @param propertyKey The property name. - * @param attributes Descriptor for the property. It can be for a data property or an accessor property. - */ - function defineProperty(target: object, propertyKey: PropertyKey, attributes: PropertyDescriptor & ThisType): boolean; +/** + * Constructs the target with the elements of specified array as the arguments + * and the specified constructor as the `new.target` value. + * @param target The constructor to invoke. + * @param argumentsList An array of argument values to be passed to the constructor. + * @param newTarget The constructor to be used as the `new.target` object. + */ + function construct( + target: new (...args: A) => R, + argumentsList: Readonly, + newTarget?: new (...args: any) => any, + ): R; + +function construct(target: Function, argumentsList: ArrayLike, newTarget?: Function): any; - /** - * Removes a property from an object, equivalent to `delete target[propertyKey]`, - * except it won't throw if `target[propertyKey]` is non-configurable. - * @param target Object from which to remove the own property. - * @param propertyKey The property name. - */ - function deleteProperty(target: object, propertyKey: PropertyKey): boolean; +/** + * Adds a property to an object, or modifies attributes of an existing property. + * @param target Object on which to add or modify the property. This can be a native JavaScript object + * (that is, a user-defined object or a built in object) or a DOM object. + * @param propertyKey The property name. + * @param attributes Descriptor for the property. It can be for a data property or an accessor property. + */ + function defineProperty(target: object, propertyKey: PropertyKey, attributes: PropertyDescriptor & ThisType): boolean; - /** - * Gets the property of target, equivalent to `target[propertyKey]` when `receiver === target`. - * @param target Object that contains the property on itself or in its prototype chain. - * @param propertyKey The property name. - * @param receiver The reference to use as the `this` value in the getter function, - * if `target[propertyKey]` is an accessor property. - */ - function get( - target: T, - propertyKey: P, - receiver?: unknown, - ): P extends keyof T ? T[P] : any; +/** + * Removes a property from an object, equivalent to `delete target[propertyKey]`, + * except it won't throw if `target[propertyKey]` is non-configurable. + * @param target Object from which to remove the own property. + * @param propertyKey The property name. + */ + function deleteProperty(target: object, propertyKey: PropertyKey): boolean; - /** - * Gets the own property descriptor of the specified object. - * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype. - * @param target Object that contains the property. - * @param propertyKey The property name. - */ - function getOwnPropertyDescriptor( - target: T, - propertyKey: P, - ): TypedPropertyDescriptor

| undefined; +/** + * Gets the property of target, equivalent to `target[propertyKey]` when `receiver === target`. + * @param target Object that contains the property on itself or in its prototype chain. + * @param propertyKey The property name. + * @param receiver The reference to use as the `this` value in the getter function, + * if `target[propertyKey]` is an accessor property. + */ + function get( + target: T, + propertyKey: P, + receiver?: unknown, + ): P extends keyof T ? T[P] : any; - /** - * Returns the prototype of an object. - * @param target The object that references the prototype. - */ - function getPrototypeOf(target: object): object | null; +/** + * Gets the own property descriptor of the specified object. + * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype. + * @param target Object that contains the property. + * @param propertyKey The property name. + */ + function getOwnPropertyDescriptor( + target: T, + propertyKey: P, + ): TypedPropertyDescriptor

| undefined; - /** - * Equivalent to `propertyKey in target`. - * @param target Object that contains the property on itself or in its prototype chain. - * @param propertyKey Name of the property. - */ - function has(target: object, propertyKey: PropertyKey): boolean; +/** + * Returns the prototype of an object. + * @param target The object that references the prototype. + */ + function getPrototypeOf(target: object): object | null; - /** - * Returns a value that indicates whether new properties can be added to an object. - * @param target Object to test. - */ - function isExtensible(target: object): boolean; +/** + * Equivalent to `propertyKey in target`. + * @param target Object that contains the property on itself or in its prototype chain. + * @param propertyKey Name of the property. + */ + function has(target: object, propertyKey: PropertyKey): boolean; - /** - * Returns the string and symbol keys of the own properties of an object. The own properties of an object - * are those that are defined directly on that object, and are not inherited from the object's prototype. - * @param target Object that contains the own properties. - */ - function ownKeys(target: object): (string | symbol)[]; +/** + * Returns a value that indicates whether new properties can be added to an object. + * @param target Object to test. + */ + function isExtensible(target: object): boolean; - /** - * Prevents the addition of new properties to an object. - * @param target Object to make non-extensible. - * @return Whether the object has been made non-extensible. - */ - function preventExtensions(target: object): boolean; +/** + * Returns the string and symbol keys of the own properties of an object. The own properties of an object + * are those that are defined directly on that object, and are not inherited from the object's prototype. + * @param target Object that contains the own properties. + */ + function ownKeys(target: object): (string | symbol)[]; - /** - * Sets the property of target, equivalent to `target[propertyKey] = value` when `receiver === target`. - * @param target Object that contains the property on itself or in its prototype chain. - * @param propertyKey Name of the property. - * @param receiver The reference to use as the `this` value in the setter function, - * if `target[propertyKey]` is an accessor property. - */ - function set( - target: T, - propertyKey: P, - value: P extends keyof T ? T[P] : any, - receiver?: any, - ): boolean; +/** + * Prevents the addition of new properties to an object. + * @param target Object to make non-extensible. + * @return Whether the object has been made non-extensible. + */ + function preventExtensions(target: object): boolean; - function set(target: object, propertyKey: PropertyKey, value: any, receiver?: any): boolean; +/** + * Sets the property of target, equivalent to `target[propertyKey] = value` when `receiver === target`. + * @param target Object that contains the property on itself or in its prototype chain. + * @param propertyKey Name of the property. + * @param receiver The reference to use as the `this` value in the setter function, + * if `target[propertyKey]` is an accessor property. + */ + function set( + target: T, + propertyKey: P, + value: P extends keyof T ? T[P] : any, + receiver?: any, + ): boolean; + +function set(target: object, propertyKey: PropertyKey, value: any, receiver?: any): boolean; - /** - * Sets the prototype of a specified object o to object proto or null. - * @param target The object to change its prototype. - * @param proto The value of the new prototype or null. - * @return Whether setting the prototype was successful. - */ - function setPrototypeOf(target: object, proto: object | null): boolean; +/** + * Sets the prototype of a specified object o to object proto or null. + * @param target The object to change its prototype. + * @param proto The value of the new prototype or null. + * @return Whether setting the prototype was successful. + */ + function setPrototypeOf(target: object, proto: object | null): boolean; } ///////////////////////////// // lib.es2015.symbol.d.ts ///////////////////////////// interface SymbolConstructor { - /** - * A reference to the prototype. - */ - readonly prototype: Symbol; + /** + * A reference to the prototype. + */ + readonly prototype: Symbol; - /** - * Returns a new unique Symbol value. - * @param description Description of the new Symbol object. - */ - (description?: string | number): symbol; + /** + * Returns a new unique Symbol value. + * @param description Description of the new Symbol object. + */ + (description?: string | number): symbol; - /** - * Returns a Symbol object from the global symbol registry matching the given key if found. - * Otherwise, returns a new symbol with this key. - * @param key key to search for. - */ - for(key: string): symbol; + /** + * Returns a Symbol object from the global symbol registry matching the given key if found. + * Otherwise, returns a new symbol with this key. + * @param key key to search for. + */ + for(key: string): symbol; - /** - * Returns a key from the global symbol registry matching the given Symbol if found. - * Otherwise, returns undefined. - * @param sym Symbol to find the key for. - */ - keyFor(sym: symbol): string | undefined; + /** + * Returns a key from the global symbol registry matching the given Symbol if found. + * Otherwise, returns undefined. + * @param sym Symbol to find the key for. + */ + keyFor(sym: symbol): string | undefined; } declare var Symbol: SymbolConstructor; @@ -1669,590 +1669,590 @@ declare var Symbol: SymbolConstructor; // lib.es2015.symbol.wellknown.d.ts ///////////////////////////// interface SymbolConstructor { - /** - * A method that determines if a constructor object recognizes an object as one of the - * constructor’s instances. Called by the semantics of the instanceof operator. - */ - readonly hasInstance: unique symbol; + /** + * A method that determines if a constructor object recognizes an object as one of the + * constructor’s instances. Called by the semantics of the instanceof operator. + */ + readonly hasInstance: unique symbol; - /** - * A Boolean value that if true indicates that an object should flatten to its array elements - * by Array.prototype.concat. - */ - readonly isConcatSpreadable: unique symbol; + /** + * A Boolean value that if true indicates that an object should flatten to its array elements + * by Array.prototype.concat. + */ + readonly isConcatSpreadable: unique symbol; - /** - * A regular expression method that matches the regular expression against a string. Called - * by the String.prototype.match method. - */ - readonly match: unique symbol; + /** + * A regular expression method that matches the regular expression against a string. Called + * by the String.prototype.match method. + */ + readonly match: unique symbol; - /** - * A regular expression method that replaces matched substrings of a string. Called by the - * String.prototype.replace method. - */ - readonly replace: unique symbol; + /** + * A regular expression method that replaces matched substrings of a string. Called by the + * String.prototype.replace method. + */ + readonly replace: unique symbol; - /** - * A regular expression method that returns the index within a string that matches the - * regular expression. Called by the String.prototype.search method. - */ - readonly search: unique symbol; + /** + * A regular expression method that returns the index within a string that matches the + * regular expression. Called by the String.prototype.search method. + */ + readonly search: unique symbol; - /** - * A function valued property that is the constructor function that is used to create - * derived objects. - */ - readonly species: unique symbol; + /** + * A function valued property that is the constructor function that is used to create + * derived objects. + */ + readonly species: unique symbol; - /** - * A regular expression method that splits a string at the indices that match the regular - * expression. Called by the String.prototype.split method. - */ - readonly split: unique symbol; + /** + * A regular expression method that splits a string at the indices that match the regular + * expression. Called by the String.prototype.split method. + */ + readonly split: unique symbol; - /** - * A method that converts an object to a corresponding primitive value. - * Called by the ToPrimitive abstract operation. - */ - readonly toPrimitive: unique symbol; + /** + * A method that converts an object to a corresponding primitive value. + * Called by the ToPrimitive abstract operation. + */ + readonly toPrimitive: unique symbol; - /** - * A String value that is used in the creation of the default string description of an object. - * Called by the built-in method Object.prototype.toString. - */ - readonly toStringTag: unique symbol; + /** + * A String value that is used in the creation of the default string description of an object. + * Called by the built-in method Object.prototype.toString. + */ + readonly toStringTag: unique symbol; - /** - * An Object whose truthy properties are properties that are excluded from the 'with' - * environment bindings of the associated objects. - */ - readonly unscopables: unique symbol; + /** + * An Object whose truthy properties are properties that are excluded from the 'with' + * environment bindings of the associated objects. + */ + readonly unscopables: unique symbol; } interface Symbol { - /** - * Converts a Symbol object to a symbol. - */ - [Symbol.toPrimitive](hint: string): symbol; + /** + * Converts a Symbol object to a symbol. + */ + [Symbol.toPrimitive](hint: string): symbol; } interface Array { - /** - * Is an object whose properties have the value 'true' - * when they will be absent when used in a 'with' statement. - */ - readonly [Symbol.unscopables]: { - [K in keyof any[]]?: boolean; - }; + /** + * Is an object whose properties have the value 'true' + * when they will be absent when used in a 'with' statement. + */ + readonly [Symbol.unscopables]: { + [K in keyof any[]]?: boolean; + }; } interface ReadonlyArray { - /** - * Is an object whose properties have the value 'true' - * when they will be absent when used in a 'with' statement. - */ - readonly [Symbol.unscopables]: { - [K in keyof readonly any[]]?: boolean; - }; + /** + * Is an object whose properties have the value 'true' + * when they will be absent when used in a 'with' statement. + */ + readonly [Symbol.unscopables]: { + [K in keyof readonly any[]]?: boolean; + }; } interface Date { - /** - * Converts a Date object to a string. - */ - [Symbol.toPrimitive](hint: "default"): string; + /** + * Converts a Date object to a string. + */ + [Symbol.toPrimitive](hint: "default"): string; - /** - * Converts a Date object to a string. - */ - [Symbol.toPrimitive](hint: "string"): string; + /** + * Converts a Date object to a string. + */ + [Symbol.toPrimitive](hint: "string"): string; - /** - * Converts a Date object to a number. - */ - [Symbol.toPrimitive](hint: "number"): number; + /** + * Converts a Date object to a number. + */ + [Symbol.toPrimitive](hint: "number"): number; - /** - * Converts a Date object to a string or number. - * - * @param hint The strings "number", "string", or "default" to specify what primitive to return. - * - * @throws {TypeError} If 'hint' was given something other than "number", "string", or "default". - * @returns A number if 'hint' was "number", a string if 'hint' was "string" or "default". - */ - [Symbol.toPrimitive](hint: string): string | number; + /** + * Converts a Date object to a string or number. + * + * @param hint The strings "number", "string", or "default" to specify what primitive to return. + * + * @throws {TypeError} If 'hint' was given something other than "number", "string", or "default". + * @returns A number if 'hint' was "number", a string if 'hint' was "string" or "default". + */ + [Symbol.toPrimitive](hint: string): string | number; } interface Map { - readonly [Symbol.toStringTag]: string; + readonly [Symbol.toStringTag]: string; } interface WeakMap { - readonly [Symbol.toStringTag]: string; + readonly [Symbol.toStringTag]: string; } interface Set { - readonly [Symbol.toStringTag]: string; + readonly [Symbol.toStringTag]: string; } interface WeakSet { - readonly [Symbol.toStringTag]: string; + readonly [Symbol.toStringTag]: string; } interface Function { - /** - * Determines whether the given value inherits from this function if this function was used - * as a constructor function. - * - * A constructor function can control which objects are recognized as its instances by - * 'instanceof' by overriding this method. - */ - [Symbol.hasInstance](value: any): boolean; + /** + * Determines whether the given value inherits from this function if this function was used + * as a constructor function. + * + * A constructor function can control which objects are recognized as its instances by + * 'instanceof' by overriding this method. + */ + [Symbol.hasInstance](value: any): boolean; } interface GeneratorFunction { - readonly [Symbol.toStringTag]: string; + readonly [Symbol.toStringTag]: string; } interface PromiseConstructor { - readonly [Symbol.species]: PromiseConstructor; + readonly [Symbol.species]: PromiseConstructor; } interface RegExp { - /** - * Matches a string with this regular expression, and returns an array containing the results of - * that search. - * @param string A string to search within. - */ - [Symbol.match](string: string): RegExpMatchArray | null; + /** + * Matches a string with this regular expression, and returns an array containing the results of + * that search. + * @param string A string to search within. + */ + [Symbol.match](string: string): RegExpMatchArray | null; - /** - * Replaces text in a string, using this regular expression. - * @param string A String object or string literal whose contents matching against - * this regular expression will be replaced - * @param replaceValue A String object or string literal containing the text to replace for every - * successful match of this regular expression. - */ - [Symbol.replace](string: string, replaceValue: string): string; + /** + * Replaces text in a string, using this regular expression. + * @param string A String object or string literal whose contents matching against + * this regular expression will be replaced + * @param replaceValue A String object or string literal containing the text to replace for every + * successful match of this regular expression. + */ + [Symbol.replace](string: string, replaceValue: string): string; - /** - * Replaces text in a string, using this regular expression. - * @param string A String object or string literal whose contents matching against - * this regular expression will be replaced - * @param replacer A function that returns the replacement text. - */ - [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; + /** + * Replaces text in a string, using this regular expression. + * @param string A String object or string literal whose contents matching against + * this regular expression will be replaced + * @param replacer A function that returns the replacement text. + */ + [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; - /** - * Finds the position beginning first substring match in a regular expression search - * using this regular expression. - * - * @param string The string to search within. - */ - [Symbol.search](string: string): number; + /** + * Finds the position beginning first substring match in a regular expression search + * using this regular expression. + * + * @param string The string to search within. + */ + [Symbol.search](string: string): number; - /** - * Returns an array of substrings that were delimited by strings in the original input that - * match against this regular expression. - * - * If the regular expression contains capturing parentheses, then each time this - * regular expression matches, the results (including any undefined results) of the - * capturing parentheses are spliced. - * - * @param string string value to split - * @param limit if not undefined, the output array is truncated so that it contains no more - * than 'limit' elements. - */ - [Symbol.split](string: string, limit?: number): string[]; + /** + * Returns an array of substrings that were delimited by strings in the original input that + * match against this regular expression. + * + * If the regular expression contains capturing parentheses, then each time this + * regular expression matches, the results (including any undefined results) of the + * capturing parentheses are spliced. + * + * @param string string value to split + * @param limit if not undefined, the output array is truncated so that it contains no more + * than 'limit' elements. + */ + [Symbol.split](string: string, limit?: number): string[]; } interface RegExpConstructor { - readonly [Symbol.species]: RegExpConstructor; + readonly [Symbol.species]: RegExpConstructor; } interface String { - /** - * Matches a string or an object that supports being matched against, and returns an array - * containing the results of that search, or null if no matches are found. - * @param matcher An object that supports being matched against. - */ - match(matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null; + /** + * Matches a string or an object that supports being matched against, and returns an array + * containing the results of that search, or null if no matches are found. + * @param matcher An object that supports being matched against. + */ + match(matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null; - /** - * Passes a string and {@linkcode replaceValue} to the `[Symbol.replace]` method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. - * @param searchValue An object that supports searching for and replacing matches within a string. - * @param replaceValue The replacement text. - */ - replace(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string; + /** + * Passes a string and {@linkcode replaceValue} to the `[Symbol.replace]` method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. + * @param searchValue An object that supports searching for and replacing matches within a string. + * @param replaceValue The replacement text. + */ + replace(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string; - /** - * Replaces text in a string, using an object that supports replacement within a string. - * @param searchValue A object can search for and replace matches within a string. - * @param replacer A function that returns the replacement text. - */ - replace(searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string; + /** + * Replaces text in a string, using an object that supports replacement within a string. + * @param searchValue A object can search for and replace matches within a string. + * @param replacer A function that returns the replacement text. + */ + replace(searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string; - /** - * Finds the first substring match in a regular expression search. - * @param searcher An object which supports searching within a string. - */ - search(searcher: { [Symbol.search](string: string): number; }): number; + /** + * Finds the first substring match in a regular expression search. + * @param searcher An object which supports searching within a string. + */ + search(searcher: { [Symbol.search](string: string): number; }): number; - /** - * Split a string into substrings using the specified separator and return them as an array. - * @param splitter An object that can split a string. - * @param limit A value used to limit the number of elements returned in the array. - */ - split(splitter: { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number): string[]; + /** + * Split a string into substrings using the specified separator and return them as an array. + * @param splitter An object that can split a string. + * @param limit A value used to limit the number of elements returned in the array. + */ + split(splitter: { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number): string[]; } interface ArrayConstructor { - readonly [Symbol.species]: ArrayConstructor; + readonly [Symbol.species]: ArrayConstructor; } interface MapConstructor { - readonly [Symbol.species]: MapConstructor; + readonly [Symbol.species]: MapConstructor; } interface SetConstructor { - readonly [Symbol.species]: SetConstructor; + readonly [Symbol.species]: SetConstructor; } interface ArrayBufferConstructor { - readonly [Symbol.species]: ArrayBufferConstructor; + readonly [Symbol.species]: ArrayBufferConstructor; } ///////////////////////////// // lib.es2016.array.include.d.ts ///////////////////////////// interface Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: T, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: T, fromIndex?: number): boolean; } interface ReadonlyArray { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: T, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: T, fromIndex?: number): boolean; } interface Int8Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Uint8Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Uint8ClampedArray { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Int16Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Uint16Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Int32Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Uint32Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Float32Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Float64Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } ///////////////////////////// // lib.es2016.intl.d.ts ///////////////////////////// declare namespace Intl { - /** - * The `Intl.getCanonicalLocales()` method returns an array containing - * the canonical locale names. Duplicates will be omitted and elements - * will be validated as structurally valid language tags. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/getCanonicalLocales) - * - * @param locale A list of String values for which to get the canonical locale names - * @returns An array containing the canonical and validated locale names. - */ - function getCanonicalLocales(locale?: string | readonly string[]): string[]; +/** + * The `Intl.getCanonicalLocales()` method returns an array containing + * the canonical locale names. Duplicates will be omitted and elements + * will be validated as structurally valid language tags. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/getCanonicalLocales) + * + * @param locale A list of String values for which to get the canonical locale names + * @returns An array containing the canonical and validated locale names. + */ + function getCanonicalLocales(locale?: string | readonly string[]): string[]; } ///////////////////////////// // lib.es2017.date.d.ts ///////////////////////////// interface DateConstructor { - /** - * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. - * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. - * @param monthIndex The month as a number between 0 and 11 (January to December). - * @param date The date as a number between 1 and 31. - * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. - * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. - * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. - * @param ms A number from 0 to 999 that specifies the milliseconds. - */ - UTC(year: number, monthIndex?: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; + /** + * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. + * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. + * @param monthIndex The month as a number between 0 and 11 (January to December). + * @param date The date as a number between 1 and 31. + * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. + * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. + * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. + * @param ms A number from 0 to 999 that specifies the milliseconds. + */ + UTC(year: number, monthIndex?: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; } ///////////////////////////// // lib.es2017.intl.d.ts ///////////////////////////// declare namespace Intl { - interface DateTimeFormatPartTypesRegistry { - day: any; +interface DateTimeFormatPartTypesRegistry { + day: any; - dayPeriod: any; + dayPeriod: any; - era: any; + era: any; - hour: any; + hour: any; - literal: any; + literal: any; - minute: any; + minute: any; - month: any; + month: any; - second: any; + second: any; - timeZoneName: any; + timeZoneName: any; - weekday: any; + weekday: any; - year: any; - } + year: any; +} - type DateTimeFormatPartTypes = keyof DateTimeFormatPartTypesRegistry; +type DateTimeFormatPartTypes = keyof DateTimeFormatPartTypesRegistry; - interface DateTimeFormatPart { - type: DateTimeFormatPartTypes; +interface DateTimeFormatPart { + type: DateTimeFormatPartTypes; - value: string; - } + value: string; +} - interface DateTimeFormat { - formatToParts(date?: Date | number): DateTimeFormatPart[]; - } +interface DateTimeFormat { + formatToParts(date?: Date | number): DateTimeFormatPart[]; +} } ///////////////////////////// // lib.es2017.object.d.ts ///////////////////////////// interface ObjectConstructor { - /** - * Returns an array of values of the enumerable own properties of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - values(o: { [s: string]: T; } | ArrayLike): T[]; + /** + * Returns an array of values of the enumerable own properties of an object + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + values(o: { [s: string]: T; } | ArrayLike): T[]; - /** - * Returns an array of values of the enumerable own properties of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - values(o: {}): any[]; + /** + * Returns an array of values of the enumerable own properties of an object + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + values(o: {}): any[]; - /** - * Returns an array of key/values of the enumerable own properties of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - entries(o: { [s: string]: T; } | ArrayLike): [string, T][]; + /** + * Returns an array of key/values of the enumerable own properties of an object + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + entries(o: { [s: string]: T; } | ArrayLike): [string, T][]; - /** - * Returns an array of key/values of the enumerable own properties of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - entries(o: {}): [string, any][]; + /** + * Returns an array of key/values of the enumerable own properties of an object + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + entries(o: {}): [string, any][]; - /** - * Returns an object containing all own property descriptors of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - getOwnPropertyDescriptors(o: T): { [P in keyof T]: TypedPropertyDescriptor; } & { [x: string]: PropertyDescriptor; }; + /** + * Returns an object containing all own property descriptors of an object + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + getOwnPropertyDescriptors(o: T): { [P in keyof T]: TypedPropertyDescriptor; } & { [x: string]: PropertyDescriptor; }; } ///////////////////////////// // lib.es2017.sharedmemory.d.ts ///////////////////////////// interface SharedArrayBuffer { - /** - * Read-only. The length of the ArrayBuffer (in bytes). - */ - readonly byteLength: number; + /** + * Read-only. The length of the ArrayBuffer (in bytes). + */ + readonly byteLength: number; - /** - * Returns a section of an SharedArrayBuffer. - */ - slice(begin?: number, end?: number): SharedArrayBuffer; + /** + * Returns a section of an SharedArrayBuffer. + */ + slice(begin?: number, end?: number): SharedArrayBuffer; - readonly [Symbol.toStringTag]: "SharedArrayBuffer"; + readonly [Symbol.toStringTag]: "SharedArrayBuffer"; } interface SharedArrayBufferConstructor { - readonly prototype: SharedArrayBuffer; + readonly prototype: SharedArrayBuffer; - new (byteLength?: number): SharedArrayBuffer; + new (byteLength?: number): SharedArrayBuffer; - readonly [Symbol.species]: SharedArrayBufferConstructor; + readonly [Symbol.species]: SharedArrayBufferConstructor; } declare var SharedArrayBuffer: SharedArrayBufferConstructor; interface ArrayBufferTypes { - SharedArrayBuffer: SharedArrayBuffer; + SharedArrayBuffer: SharedArrayBuffer; } interface Atomics { - /** - * Adds a value to the value at the given position in the array, returning the original value. - * Until this atomic operation completes, any other read or write operation against the array - * will block. - */ - add(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + /** + * Adds a value to the value at the given position in the array, returning the original value. + * Until this atomic operation completes, any other read or write operation against the array + * will block. + */ + add(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - /** - * Stores the bitwise AND of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or - * write operation against the array will block. - */ - and(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + /** + * Stores the bitwise AND of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or + * write operation against the array will block. + */ + and(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - /** - * Replaces the value at the given position in the array if the original value equals the given - * expected value, returning the original value. Until this atomic operation completes, any - * other read or write operation against the array will block. - */ - compareExchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, expectedValue: number, replacementValue: number): number; + /** + * Replaces the value at the given position in the array if the original value equals the given + * expected value, returning the original value. Until this atomic operation completes, any + * other read or write operation against the array will block. + */ + compareExchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, expectedValue: number, replacementValue: number): number; - /** - * Replaces the value at the given position in the array, returning the original value. Until - * this atomic operation completes, any other read or write operation against the array will - * block. - */ - exchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + /** + * Replaces the value at the given position in the array, returning the original value. Until + * this atomic operation completes, any other read or write operation against the array will + * block. + */ + exchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - /** - * Returns a value indicating whether high-performance algorithms can use atomic operations - * (`true`) or must use locks (`false`) for the given number of bytes-per-element of a typed - * array. - */ - isLockFree(size: number): boolean; + /** + * Returns a value indicating whether high-performance algorithms can use atomic operations + * (`true`) or must use locks (`false`) for the given number of bytes-per-element of a typed + * array. + */ + isLockFree(size: number): boolean; - /** - * Returns the value at the given position in the array. Until this atomic operation completes, - * any other read or write operation against the array will block. - */ - load(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number): number; + /** + * Returns the value at the given position in the array. Until this atomic operation completes, + * any other read or write operation against the array will block. + */ + load(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number): number; - /** - * Stores the bitwise OR of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or write - * operation against the array will block. - */ - or(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + /** + * Stores the bitwise OR of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or write + * operation against the array will block. + */ + or(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - /** - * Stores a value at the given position in the array, returning the new value. Until this - * atomic operation completes, any other read or write operation against the array will block. - */ - store(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + /** + * Stores a value at the given position in the array, returning the new value. Until this + * atomic operation completes, any other read or write operation against the array will block. + */ + store(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - /** - * Subtracts a value from the value at the given position in the array, returning the original - * value. Until this atomic operation completes, any other read or write operation against the - * array will block. - */ - sub(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + /** + * Subtracts a value from the value at the given position in the array, returning the original + * value. Until this atomic operation completes, any other read or write operation against the + * array will block. + */ + sub(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - /** - * If the value at the given position in the array is equal to the provided value, the current - * agent is put to sleep causing execution to suspend until the timeout expires (returning - * `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns - * `"not-equal"`. - */ - wait(typedArray: Int32Array, index: number, value: number, timeout?: number): "ok" | "not-equal" | "timed-out"; + /** + * If the value at the given position in the array is equal to the provided value, the current + * agent is put to sleep causing execution to suspend until the timeout expires (returning + * `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns + * `"not-equal"`. + */ + wait(typedArray: Int32Array, index: number, value: number, timeout?: number): "ok" | "not-equal" | "timed-out"; - /** - * Wakes up sleeping agents that are waiting on the given index of the array, returning the - * number of agents that were awoken. - * @param typedArray A shared Int32Array. - * @param index The position in the typedArray to wake up on. - * @param count The number of sleeping agents to notify. Defaults to +Infinity. - */ - notify(typedArray: Int32Array, index: number, count?: number): number; + /** + * Wakes up sleeping agents that are waiting on the given index of the array, returning the + * number of agents that were awoken. + * @param typedArray A shared Int32Array. + * @param index The position in the typedArray to wake up on. + * @param count The number of sleeping agents to notify. Defaults to +Infinity. + */ + notify(typedArray: Int32Array, index: number, count?: number): number; - /** - * Stores the bitwise XOR of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or write - * operation against the array will block. - */ - xor(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + /** + * Stores the bitwise XOR of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or write + * operation against the array will block. + */ + xor(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - readonly [Symbol.toStringTag]: "Atomics"; + readonly [Symbol.toStringTag]: "Atomics"; } declare var Atomics: Atomics; @@ -2261,249 +2261,249 @@ declare var Atomics: Atomics; // lib.es2017.string.d.ts ///////////////////////////// interface String { - /** - * Pads the current string with a given string (repeated and/or truncated, if needed) so that the resulting string has a given length. - * The padding is applied from the start of the current string. - * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart) - * - * @param targetLength The length of the resulting string once the current `str` has been padded. - * If the value is less than or equal to `str.length`, then `str` is returned as-is. - * - * @param padString The string to pad the current `str` with. - * If `padString` is too long to stay within `targetLength`, it will be truncated from the end. - * The default value is the space character (U+0020). - */ - padStart(targetLength: number, padString?: string): string; + /** + * Pads the current string with a given string (repeated and/or truncated, if needed) so that the resulting string has a given length. + * The padding is applied from the start of the current string. + * + * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart) + * + * @param targetLength The length of the resulting string once the current `str` has been padded. + * If the value is less than or equal to `str.length`, then `str` is returned as-is. + * + * @param padString The string to pad the current `str` with. + * If `padString` is too long to stay within `targetLength`, it will be truncated from the end. + * The default value is the space character (U+0020). + */ + padStart(targetLength: number, padString?: string): string; - /** - * Pads the current string with a given string (repeated and/or truncated, if needed) so that the resulting string has a given length. - * The padding is applied from the end of the current string. - * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padEnd) - * - * @param targetLength The length of the resulting string once the current `str` has been padded. - * If the value is less than or equal to `str.length`, then `str` is returned as-is. - * - * @param padString The string to pad the current `str` with. - * If `padString` is too long to stay within `targetLength`, it will be truncated from the end. - * The default value is the space character (U+0020). - */ - padEnd(targetLength: number, padString?: string): string; + /** + * Pads the current string with a given string (repeated and/or truncated, if needed) so that the resulting string has a given length. + * The padding is applied from the end of the current string. + * + * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padEnd) + * + * @param targetLength The length of the resulting string once the current `str` has been padded. + * If the value is less than or equal to `str.length`, then `str` is returned as-is. + * + * @param padString The string to pad the current `str` with. + * If `padString` is too long to stay within `targetLength`, it will be truncated from the end. + * The default value is the space character (U+0020). + */ + padEnd(targetLength: number, padString?: string): string; } ///////////////////////////// // lib.es2017.typedarrays.d.ts ///////////////////////////// interface Int8ArrayConstructor { - new (): Int8Array; + new (): Int8Array; } interface Uint8ArrayConstructor { - new (): Uint8Array; + new (): Uint8Array; } interface Uint8ClampedArrayConstructor { - new (): Uint8ClampedArray; + new (): Uint8ClampedArray; } interface Int16ArrayConstructor { - new (): Int16Array; + new (): Int16Array; } interface Uint16ArrayConstructor { - new (): Uint16Array; + new (): Uint16Array; } interface Int32ArrayConstructor { - new (): Int32Array; + new (): Int32Array; } interface Uint32ArrayConstructor { - new (): Uint32Array; + new (): Uint32Array; } interface Float32ArrayConstructor { - new (): Float32Array; + new (): Float32Array; } interface Float64ArrayConstructor { - new (): Float64Array; + new (): Float64Array; } ///////////////////////////// // lib.es2018.asyncgenerator.d.ts ///////////////////////////// interface AsyncGenerator extends AsyncIteratorObject { - // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. - next(...[value]: [] | [TNext]): Promise>; + // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. + next(...[value]: [] | [TNext]): Promise>; - return(value: TReturn | PromiseLike): Promise>; + return(value: TReturn | PromiseLike): Promise>; - throw(e: any): Promise>; + throw(e: any): Promise>; - [Symbol.asyncIterator](): AsyncGenerator; + [Symbol.asyncIterator](): AsyncGenerator; } interface AsyncGeneratorFunction { - /** - * Creates a new AsyncGenerator object. - * @param args A list of arguments the function accepts. - */ - new (...args: any[]): AsyncGenerator; + /** + * Creates a new AsyncGenerator object. + * @param args A list of arguments the function accepts. + */ + new (...args: any[]): AsyncGenerator; - /** - * Creates a new AsyncGenerator object. - * @param args A list of arguments the function accepts. - */ - (...args: any[]): AsyncGenerator; + /** + * Creates a new AsyncGenerator object. + * @param args A list of arguments the function accepts. + */ + (...args: any[]): AsyncGenerator; - /** - * The length of the arguments. - */ - readonly length: number; + /** + * The length of the arguments. + */ + readonly length: number; - /** - * Returns the name of the function. - */ - readonly name: string; + /** + * Returns the name of the function. + */ + readonly name: string; - /** - * A reference to the prototype. - */ - readonly prototype: AsyncGenerator; + /** + * A reference to the prototype. + */ + readonly prototype: AsyncGenerator; } ///////////////////////////// // lib.es2018.asynciterable.d.ts ///////////////////////////// interface SymbolConstructor { - /** - * A method that returns the default async iterator for an object. Called by the semantics of - * the for-await-of statement. - */ - readonly asyncIterator: unique symbol; + /** + * A method that returns the default async iterator for an object. Called by the semantics of + * the for-await-of statement. + */ + readonly asyncIterator: unique symbol; } interface AsyncIterator { - // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. - next(...[value]: [] | [TNext]): Promise>; + // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. + next(...[value]: [] | [TNext]): Promise>; - return?(value?: TReturn | PromiseLike): Promise>; + return?(value?: TReturn | PromiseLike): Promise>; - throw?(e?: any): Promise>; + throw?(e?: any): Promise>; } interface AsyncIterable { - [Symbol.asyncIterator](): AsyncIterator; + [Symbol.asyncIterator](): AsyncIterator; } /** * Describes a user-defined {@link AsyncIterator} that is also async iterable. */ interface AsyncIterableIterator extends AsyncIterator { - [Symbol.asyncIterator](): AsyncIterableIterator; + [Symbol.asyncIterator](): AsyncIterableIterator; } /** * Describes an {@link AsyncIterator} produced by the runtime that inherits from the intrinsic `AsyncIterator.prototype`. */ interface AsyncIteratorObject extends AsyncIterator { - [Symbol.asyncIterator](): AsyncIteratorObject; + [Symbol.asyncIterator](): AsyncIteratorObject; } ///////////////////////////// // lib.es2018.intl.d.ts ///////////////////////////// declare namespace Intl { - // http://cldr.unicode.org/index/cldr-spec/plural-rules#TOC-Determining-Plural-Categories - type LDMLPluralRule = "zero" | "one" | "two" | "few" | "many" | "other"; +// http://cldr.unicode.org/index/cldr-spec/plural-rules#TOC-Determining-Plural-Categories + type LDMLPluralRule = "zero" | "one" | "two" | "few" | "many" | "other"; - type PluralRuleType = "cardinal" | "ordinal"; +type PluralRuleType = "cardinal" | "ordinal"; - interface PluralRulesOptions { - localeMatcher?: "lookup" | "best fit" | undefined; +interface PluralRulesOptions { + localeMatcher?: "lookup" | "best fit" | undefined; - type?: PluralRuleType | undefined; + type?: PluralRuleType | undefined; - minimumIntegerDigits?: number | undefined; + minimumIntegerDigits?: number | undefined; - minimumFractionDigits?: number | undefined; + minimumFractionDigits?: number | undefined; - maximumFractionDigits?: number | undefined; + maximumFractionDigits?: number | undefined; - minimumSignificantDigits?: number | undefined; + minimumSignificantDigits?: number | undefined; - maximumSignificantDigits?: number | undefined; - } + maximumSignificantDigits?: number | undefined; +} - interface ResolvedPluralRulesOptions { - locale: string; +interface ResolvedPluralRulesOptions { + locale: string; - pluralCategories: LDMLPluralRule[]; + pluralCategories: LDMLPluralRule[]; - type: PluralRuleType; + type: PluralRuleType; - minimumIntegerDigits: number; + minimumIntegerDigits: number; - minimumFractionDigits: number; + minimumFractionDigits: number; - maximumFractionDigits: number; + maximumFractionDigits: number; - minimumSignificantDigits?: number; + minimumSignificantDigits?: number; - maximumSignificantDigits?: number; - } + maximumSignificantDigits?: number; +} - interface PluralRules { - resolvedOptions(): ResolvedPluralRulesOptions; +interface PluralRules { + resolvedOptions(): ResolvedPluralRulesOptions; - select(n: number): LDMLPluralRule; - } + select(n: number): LDMLPluralRule; +} - interface PluralRulesConstructor { - new (locales?: string | readonly string[], options?: PluralRulesOptions): PluralRules; +interface PluralRulesConstructor { + new (locales?: string | readonly string[], options?: PluralRulesOptions): PluralRules; - (locales?: string | readonly string[], options?: PluralRulesOptions): PluralRules; + (locales?: string | readonly string[], options?: PluralRulesOptions): PluralRules; - supportedLocalesOf(locales: string | readonly string[], options?: { localeMatcher?: "lookup" | "best fit"; }): string[]; - } + supportedLocalesOf(locales: string | readonly string[], options?: { localeMatcher?: "lookup" | "best fit"; }): string[]; +} - const PluralRules: PluralRulesConstructor; +const PluralRules: PluralRulesConstructor; - interface NumberFormatPartTypeRegistry { - literal: never; +interface NumberFormatPartTypeRegistry { + literal: never; - nan: never; + nan: never; - infinity: never; + infinity: never; - percent: never; + percent: never; - integer: never; + integer: never; - group: never; + group: never; - decimal: never; + decimal: never; - fraction: never; + fraction: never; - plusSign: never; + plusSign: never; - minusSign: never; + minusSign: never; - percentSign: never; + percentSign: never; - currency: never; - } + currency: never; +} - type NumberFormatPartTypes = keyof NumberFormatPartTypeRegistry; +type NumberFormatPartTypes = keyof NumberFormatPartTypeRegistry; - interface NumberFormatPart { - type: NumberFormatPartTypes; +interface NumberFormatPart { + type: NumberFormatPartTypes; - value: string; - } + value: string; +} } ///////////////////////////// @@ -2513,24 +2513,24 @@ declare namespace Intl { * Represents the completion of an asynchronous operation */ interface Promise { - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): Promise; + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): Promise; } ///////////////////////////// // lib.es2018.regexp.d.ts ///////////////////////////// interface RegExp { - /** - * Returns a Boolean value indicating the state of the dotAll flag (s) used with a regular expression. - * Default is false. Read-only. - */ - readonly dotAll: boolean; + /** + * Returns a Boolean value indicating the state of the dotAll flag (s) used with a regular expression. + * Default is false. Read-only. + */ + readonly dotAll: boolean; } ///////////////////////////// @@ -2543,226 +2543,226 @@ type FlatArray = { }[Depth extends -1 ? "done" : "recur"]; interface ReadonlyArray { - /** - * Calls a defined callback function on each element of an array. Then, flattens the result into - * a new array. - * This is identical to a map followed by flat with depth 1. - * - * @param callback A function that accepts up to three arguments. The flatMap method calls the - * callback function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callback function. If - * thisArg is omitted, undefined is used as the this value. - */ - flatMap( - callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray, - thisArg?: This, - ): U[]; + /** + * Calls a defined callback function on each element of an array. Then, flattens the result into + * a new array. + * This is identical to a map followed by flat with depth 1. + * + * @param callback A function that accepts up to three arguments. The flatMap method calls the + * callback function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callback function. If + * thisArg is omitted, undefined is used as the this value. + */ + flatMap( + callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray, + thisArg?: This, + ): U[]; - /** - * Returns a new array with all sub-array elements concatenated into it recursively up to the - * specified depth. - * - * @param depth The maximum recursion depth - */ - flat( - this: A, - depth?: D, - ): FlatArray[]; + /** + * Returns a new array with all sub-array elements concatenated into it recursively up to the + * specified depth. + * + * @param depth The maximum recursion depth + */ + flat( + this: A, + depth?: D, + ): FlatArray[]; } interface Array { - /** - * Calls a defined callback function on each element of an array. Then, flattens the result into - * a new array. - * This is identical to a map followed by flat with depth 1. - * - * @param callback A function that accepts up to three arguments. The flatMap method calls the - * callback function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callback function. If - * thisArg is omitted, undefined is used as the this value. - */ - flatMap( - callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray, - thisArg?: This, - ): U[]; + /** + * Calls a defined callback function on each element of an array. Then, flattens the result into + * a new array. + * This is identical to a map followed by flat with depth 1. + * + * @param callback A function that accepts up to three arguments. The flatMap method calls the + * callback function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callback function. If + * thisArg is omitted, undefined is used as the this value. + */ + flatMap( + callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray, + thisArg?: This, + ): U[]; - /** - * Returns a new array with all sub-array elements concatenated into it recursively up to the - * specified depth. - * - * @param depth The maximum recursion depth - */ - flat( - this: A, - depth?: D, - ): FlatArray[]; + /** + * Returns a new array with all sub-array elements concatenated into it recursively up to the + * specified depth. + * + * @param depth The maximum recursion depth + */ + flat( + this: A, + depth?: D, + ): FlatArray[]; } ///////////////////////////// // lib.es2019.object.d.ts ///////////////////////////// interface ObjectConstructor { - /** - * Returns an object created by key-value entries for properties and methods - * @param entries An iterable object that contains key-value entries for properties and methods. - */ - fromEntries(entries: Iterable): { [k: string]: T; }; + /** + * Returns an object created by key-value entries for properties and methods + * @param entries An iterable object that contains key-value entries for properties and methods. + */ + fromEntries(entries: Iterable): { [k: string]: T; }; - /** - * Returns an object created by key-value entries for properties and methods - * @param entries An iterable object that contains key-value entries for properties and methods. - */ - fromEntries(entries: Iterable): any; + /** + * Returns an object created by key-value entries for properties and methods + * @param entries An iterable object that contains key-value entries for properties and methods. + */ + fromEntries(entries: Iterable): any; } ///////////////////////////// // lib.es2019.string.d.ts ///////////////////////////// interface String { - /** Removes the trailing white space and line terminator characters from a string. */ - trimEnd(): string; + /** Removes the trailing white space and line terminator characters from a string. */ + trimEnd(): string; - /** Removes the leading white space and line terminator characters from a string. */ - trimStart(): string; + /** Removes the leading white space and line terminator characters from a string. */ + trimStart(): string; } ///////////////////////////// // lib.es2019.symbol.d.ts ///////////////////////////// interface Symbol { - /** - * Expose the [[Description]] internal slot of a symbol directly. - */ - readonly description: string | undefined; + /** + * Expose the [[Description]] internal slot of a symbol directly. + */ + readonly description: string | undefined; } ///////////////////////////// // lib.es2020.bigint.d.ts ///////////////////////////// interface BigIntToLocaleStringOptions { - /** - * The locale matching algorithm to use.The default is "best fit". For information about this option, see the {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation Intl page}. - */ - localeMatcher?: string; + /** + * The locale matching algorithm to use.The default is "best fit". For information about this option, see the {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation Intl page}. + */ + localeMatcher?: string; - /** - * The formatting style to use , the default is "decimal". - */ - style?: string; + /** + * The formatting style to use , the default is "decimal". + */ + style?: string; - numberingSystem?: string; + numberingSystem?: string; - /** - * The unit to use in unit formatting, Possible values are core unit identifiers, defined in UTS #35, Part 2, Section 6. A subset of units from the full list was selected for use in ECMAScript. Pairs of simple units can be concatenated with "-per-" to make a compound unit. There is no default value; if the style is "unit", the unit property must be provided. - */ - unit?: string; + /** + * The unit to use in unit formatting, Possible values are core unit identifiers, defined in UTS #35, Part 2, Section 6. A subset of units from the full list was selected for use in ECMAScript. Pairs of simple units can be concatenated with "-per-" to make a compound unit. There is no default value; if the style is "unit", the unit property must be provided. + */ + unit?: string; - /** - * The unit formatting style to use in unit formatting, the defaults is "short". - */ - unitDisplay?: string; + /** + * The unit formatting style to use in unit formatting, the defaults is "short". + */ + unitDisplay?: string; - /** - * The currency to use in currency formatting. Possible values are the ISO 4217 currency codes, such as "USD" for the US dollar, "EUR" for the euro, or "CNY" for the Chinese RMB — see the Current currency & funds code list. There is no default value; if the style is "currency", the currency property must be provided. It is only used when [[Style]] has the value "currency". - */ - currency?: string; + /** + * The currency to use in currency formatting. Possible values are the ISO 4217 currency codes, such as "USD" for the US dollar, "EUR" for the euro, or "CNY" for the Chinese RMB — see the Current currency & funds code list. There is no default value; if the style is "currency", the currency property must be provided. It is only used when [[Style]] has the value "currency". + */ + currency?: string; - /** - * How to display the currency in currency formatting. It is only used when [[Style]] has the value "currency". The default is "symbol". - * - * "symbol" to use a localized currency symbol such as €, - * - * "code" to use the ISO currency code, - * - * "name" to use a localized currency name such as "dollar" - */ - currencyDisplay?: string; + /** + * How to display the currency in currency formatting. It is only used when [[Style]] has the value "currency". The default is "symbol". + * + * "symbol" to use a localized currency symbol such as €, + * + * "code" to use the ISO currency code, + * + * "name" to use a localized currency name such as "dollar" + */ + currencyDisplay?: string; - /** - * Whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators. The default is true. - */ - useGrouping?: boolean; + /** + * Whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators. The default is true. + */ + useGrouping?: boolean; - /** - * The minimum number of integer digits to use. Possible values are from 1 to 21; the default is 1. - */ - minimumIntegerDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; + /** + * The minimum number of integer digits to use. Possible values are from 1 to 21; the default is 1. + */ + minimumIntegerDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; - /** - * The minimum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number and percent formatting is 0; the default for currency formatting is the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html ISO 4217 currency codes list} (2 if the list doesn't provide that information). - */ - minimumFractionDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20; + /** + * The minimum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number and percent formatting is 0; the default for currency formatting is the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html ISO 4217 currency codes list} (2 if the list doesn't provide that information). + */ + minimumFractionDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20; - /** - * The maximum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number formatting is the larger of minimumFractionDigits and 3; the default for currency formatting is the larger of minimumFractionDigits and the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html ISO 4217 currency codes list} (2 if the list doesn't provide that information); the default for percent formatting is the larger of minimumFractionDigits and 0. - */ - maximumFractionDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20; + /** + * The maximum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number formatting is the larger of minimumFractionDigits and 3; the default for currency formatting is the larger of minimumFractionDigits and the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html ISO 4217 currency codes list} (2 if the list doesn't provide that information); the default for percent formatting is the larger of minimumFractionDigits and 0. + */ + maximumFractionDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20; - /** - * The minimum number of significant digits to use. Possible values are from 1 to 21; the default is 1. - */ - minimumSignificantDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; + /** + * The minimum number of significant digits to use. Possible values are from 1 to 21; the default is 1. + */ + minimumSignificantDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; - /** - * The maximum number of significant digits to use. Possible values are from 1 to 21; the default is 21. - */ - maximumSignificantDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; + /** + * The maximum number of significant digits to use. Possible values are from 1 to 21; the default is 21. + */ + maximumSignificantDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; - /** - * The formatting that should be displayed for the number, the defaults is "standard" - * - * "standard" plain number formatting - * - * "scientific" return the order-of-magnitude for formatted number. - * - * "engineering" return the exponent of ten when divisible by three - * - * "compact" string representing exponent, defaults is using the "short" form - */ - notation?: string; + /** + * The formatting that should be displayed for the number, the defaults is "standard" + * + * "standard" plain number formatting + * + * "scientific" return the order-of-magnitude for formatted number. + * + * "engineering" return the exponent of ten when divisible by three + * + * "compact" string representing exponent, defaults is using the "short" form + */ + notation?: string; - /** - * used only when notation is "compact" - */ - compactDisplay?: string; + /** + * used only when notation is "compact" + */ + compactDisplay?: string; } interface BigInt { - /** - * Returns a string representation of an object. - * @param radix Specifies a radix for converting numeric values to strings. - */ - toString(radix?: number): string; + /** + * Returns a string representation of an object. + * @param radix Specifies a radix for converting numeric values to strings. + */ + toString(radix?: number): string; - /** Returns a string representation appropriate to the host environment's current locale. */ - toLocaleString(locales?: Intl.LocalesArgument, options?: BigIntToLocaleStringOptions): string; + /** Returns a string representation appropriate to the host environment's current locale. */ + toLocaleString(locales?: Intl.LocalesArgument, options?: BigIntToLocaleStringOptions): string; - /** Returns the primitive value of the specified object. */ - valueOf(): bigint; + /** Returns the primitive value of the specified object. */ + valueOf(): bigint; - readonly [Symbol.toStringTag]: "BigInt"; + readonly [Symbol.toStringTag]: "BigInt"; } interface BigIntConstructor { - (value: bigint | boolean | number | string): bigint; + (value: bigint | boolean | number | string): bigint; - readonly prototype: BigInt; + readonly prototype: BigInt; - /** - * Interprets the low bits of a BigInt as a 2's-complement signed integer. - * All higher bits are discarded. - * @param bits The number of low bits to use - * @param int The BigInt whose bits to extract - */ - asIntN(bits: number, int: bigint): bigint; + /** + * Interprets the low bits of a BigInt as a 2's-complement signed integer. + * All higher bits are discarded. + * @param bits The number of low bits to use + * @param int The BigInt whose bits to extract + */ + asIntN(bits: number, int: bigint): bigint; - /** - * Interprets the low bits of a BigInt as an unsigned integer. - * All higher bits are discarded. - * @param bits The number of low bits to use - * @param int The BigInt whose bits to extract - */ - asUintN(bits: number, int: bigint): bigint; + /** + * Interprets the low bits of a BigInt as an unsigned integer. + * All higher bits are discarded. + * @param bits The number of low bits to use + * @param int The BigInt whose bits to extract + */ + asUintN(bits: number, int: bigint): bigint; } declare var BigInt: BigIntConstructor; @@ -2772,295 +2772,295 @@ declare var BigInt: BigIntConstructor; * requested number of bytes could not be allocated, an exception is raised. */ interface BigInt64Array { - /** The size in bytes of each element in the array. */ - readonly BYTES_PER_ELEMENT: number; - - /** The ArrayBuffer instance referenced by the array. */ - readonly buffer: TArrayBuffer; - - /** The length in bytes of the array. */ - readonly byteLength: number; + /** The size in bytes of each element in the array. */ + readonly BYTES_PER_ELEMENT: number; - /** The offset in bytes of the array. */ - readonly byteOffset: number; + /** The ArrayBuffer instance referenced by the array. */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** The length in bytes of the array. */ + readonly byteLength: number; - /** Yields index, value pairs for every entry in the array. */ - entries(): ArrayIterator<[number, bigint]>; + /** The offset in bytes of the array. */ + readonly byteOffset: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns false, - * or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; + + /** Yields index, value pairs for every entry in the array. */ + entries(): ArrayIterator<[number, bigint]>; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: bigint, start?: number, end?: number): this; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns false, + * or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: bigint, index: number, array: BigInt64Array) => any, thisArg?: any): BigInt64Array; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: bigint, start?: number, end?: number): this; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): bigint | undefined; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: bigint, index: number, array: BigInt64Array) => any, thisArg?: any): BigInt64Array; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): number; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): bigint | undefined; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: bigint, index: number, array: BigInt64Array) => void, thisArg?: any): void; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): number; - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: bigint, fromIndex?: number): boolean; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: bigint, index: number, array: BigInt64Array) => void, thisArg?: any): void; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: bigint, fromIndex?: number): number; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: bigint, fromIndex?: number): boolean; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: bigint, fromIndex?: number): number; - /** Yields each index in the array. */ - keys(): ArrayIterator; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: bigint, fromIndex?: number): number; + /** Yields each index in the array. */ + keys(): ArrayIterator; - /** The length of the array. */ - readonly length: number; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: bigint, fromIndex?: number): number; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: bigint, index: number, array: BigInt64Array) => bigint, thisArg?: any): BigInt64Array; + /** The length of the array. */ + readonly length: number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: bigint, index: number, array: BigInt64Array) => bigint, thisArg?: any): BigInt64Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint; - /** Reverses the elements in the array. */ - reverse(): this; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U; + + /** Reverses the elements in the array. */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. - */ - slice(start?: number, end?: number): BigInt64Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. + */ + slice(start?: number, end?: number): BigInt64Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls the - * predicate function for each element in the array until the predicate returns true, or until - * the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls the + * predicate function for each element in the array until the predicate returns true, or until + * the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean; - /** - * Sorts the array. - * @param compareFn The function used to determine the order of the elements. If omitted, the elements are sorted in ascending order. - */ - sort(compareFn?: (a: bigint, b: bigint) => number | bigint): this; + /** + * Sorts the array. + * @param compareFn The function used to determine the order of the elements. If omitted, the elements are sorted in ascending order. + */ + sort(compareFn?: (a: bigint, b: bigint) => number | bigint): this; - /** - * Gets a new BigInt64Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): BigInt64Array; + /** + * Gets a new BigInt64Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): BigInt64Array; - /** Converts the array to a string by using the current locale. */ - toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; + /** Converts the array to a string by using the current locale. */ + toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; - /** Returns a string representation of the array. */ - toString(): string; + /** Returns a string representation of the array. */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): BigInt64Array; + /** Returns the primitive value of the specified object. */ + valueOf(): BigInt64Array; - /** Yields each value in the array. */ - values(): ArrayIterator; + /** Yields each value in the array. */ + values(): ArrayIterator; - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - readonly [Symbol.toStringTag]: "BigInt64Array"; + readonly [Symbol.toStringTag]: "BigInt64Array"; - [index: number]: bigint; + [index: number]: bigint; } interface BigInt64ArrayConstructor { - readonly prototype: BigInt64Array; + readonly prototype: BigInt64Array; - new (length?: number): BigInt64Array; + new (length?: number): BigInt64Array; - new (array: ArrayLike | Iterable): BigInt64Array; + new (array: ArrayLike | Iterable): BigInt64Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): BigInt64Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): BigInt64Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): BigInt64Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): BigInt64Array; - new (array: ArrayLike | ArrayBuffer): BigInt64Array; + new (array: ArrayLike | ArrayBuffer): BigInt64Array; - /** The size in bytes of each element in the array. */ - readonly BYTES_PER_ELEMENT: number; + /** The size in bytes of each element in the array. */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: bigint[]): BigInt64Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: bigint[]): BigInt64Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): BigInt64Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): BigInt64Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigInt64Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigInt64Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): BigInt64Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): BigInt64Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => bigint, thisArg?: any): BigInt64Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => bigint, thisArg?: any): BigInt64Array; } declare var BigInt64Array: BigInt64ArrayConstructor; @@ -3070,1286 +3070,1286 @@ declare var BigInt64Array: BigInt64ArrayConstructor; * requested number of bytes could not be allocated, an exception is raised. */ interface BigUint64Array { - /** The size in bytes of each element in the array. */ - readonly BYTES_PER_ELEMENT: number; + /** The size in bytes of each element in the array. */ + readonly BYTES_PER_ELEMENT: number; - /** The ArrayBuffer instance referenced by the array. */ - readonly buffer: TArrayBuffer; + /** The ArrayBuffer instance referenced by the array. */ + readonly buffer: TArrayBuffer; - /** The length in bytes of the array. */ - readonly byteLength: number; + /** The length in bytes of the array. */ + readonly byteLength: number; - /** The offset in bytes of the array. */ - readonly byteOffset: number; + /** The offset in bytes of the array. */ + readonly byteOffset: number; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; + + /** Yields index, value pairs for every entry in the array. */ + entries(): ArrayIterator<[number, bigint]>; - /** Yields index, value pairs for every entry in the array. */ - entries(): ArrayIterator<[number, bigint]>; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns false, + * or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns false, - * or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: bigint, start?: number, end?: number): this; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: bigint, start?: number, end?: number): this; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: bigint, index: number, array: BigUint64Array) => any, thisArg?: any): BigUint64Array; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: bigint, index: number, array: BigUint64Array) => any, thisArg?: any): BigUint64Array; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): bigint | undefined; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): bigint | undefined; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): number; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): number; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: bigint, index: number, array: BigUint64Array) => void, thisArg?: any): void; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: bigint, index: number, array: BigUint64Array) => void, thisArg?: any): void; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: bigint, fromIndex?: number): boolean; - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: bigint, fromIndex?: number): boolean; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: bigint, fromIndex?: number): number; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: bigint, fromIndex?: number): number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** Yields each index in the array. */ + keys(): ArrayIterator; - /** Yields each index in the array. */ - keys(): ArrayIterator; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: bigint, fromIndex?: number): number; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: bigint, fromIndex?: number): number; + /** The length of the array. */ + readonly length: number; - /** The length of the array. */ - readonly length: number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: bigint, index: number, array: BigUint64Array) => bigint, thisArg?: any): BigUint64Array; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: bigint, index: number, array: BigUint64Array) => bigint, thisArg?: any): BigUint64Array; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint; - /** Reverses the elements in the array. */ - reverse(): this; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U; + + /** Reverses the elements in the array. */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. - */ - slice(start?: number, end?: number): BigUint64Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. + */ + slice(start?: number, end?: number): BigUint64Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls the - * predicate function for each element in the array until the predicate returns true, or until - * the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls the + * predicate function for each element in the array until the predicate returns true, or until + * the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean; - /** - * Sorts the array. - * @param compareFn The function used to determine the order of the elements. If omitted, the elements are sorted in ascending order. - */ - sort(compareFn?: (a: bigint, b: bigint) => number | bigint): this; + /** + * Sorts the array. + * @param compareFn The function used to determine the order of the elements. If omitted, the elements are sorted in ascending order. + */ + sort(compareFn?: (a: bigint, b: bigint) => number | bigint): this; - /** - * Gets a new BigUint64Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): BigUint64Array; + /** + * Gets a new BigUint64Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): BigUint64Array; - /** Converts the array to a string by using the current locale. */ - toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; + /** Converts the array to a string by using the current locale. */ + toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; - /** Returns a string representation of the array. */ - toString(): string; + /** Returns a string representation of the array. */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): BigUint64Array; + /** Returns the primitive value of the specified object. */ + valueOf(): BigUint64Array; - /** Yields each value in the array. */ - values(): ArrayIterator; + /** Yields each value in the array. */ + values(): ArrayIterator; - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - readonly [Symbol.toStringTag]: "BigUint64Array"; + readonly [Symbol.toStringTag]: "BigUint64Array"; - [index: number]: bigint; + [index: number]: bigint; } interface BigUint64ArrayConstructor { - readonly prototype: BigUint64Array; + readonly prototype: BigUint64Array; - new (length?: number): BigUint64Array; + new (length?: number): BigUint64Array; - new (array: ArrayLike | Iterable): BigUint64Array; + new (array: ArrayLike | Iterable): BigUint64Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): BigUint64Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): BigUint64Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): BigUint64Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): BigUint64Array; - new (array: ArrayLike | ArrayBuffer): BigUint64Array; + new (array: ArrayLike | ArrayBuffer): BigUint64Array; - /** The size in bytes of each element in the array. */ - readonly BYTES_PER_ELEMENT: number; + /** The size in bytes of each element in the array. */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: bigint[]): BigUint64Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: bigint[]): BigUint64Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): BigUint64Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): BigUint64Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigUint64Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigUint64Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): BigUint64Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): BigUint64Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => bigint, thisArg?: any): BigUint64Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => bigint, thisArg?: any): BigUint64Array; } declare var BigUint64Array: BigUint64ArrayConstructor; interface DataView { - /** - * Gets the BigInt64 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getBigInt64(byteOffset: number, littleEndian?: boolean): bigint; + /** + * Gets the BigInt64 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getBigInt64(byteOffset: number, littleEndian?: boolean): bigint; - /** - * Gets the BigUint64 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getBigUint64(byteOffset: number, littleEndian?: boolean): bigint; + /** + * Gets the BigUint64 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getBigUint64(byteOffset: number, littleEndian?: boolean): bigint; - /** - * Stores a BigInt64 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setBigInt64(byteOffset: number, value: bigint, littleEndian?: boolean): void; + /** + * Stores a BigInt64 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setBigInt64(byteOffset: number, value: bigint, littleEndian?: boolean): void; - /** - * Stores a BigUint64 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setBigUint64(byteOffset: number, value: bigint, littleEndian?: boolean): void; + /** + * Stores a BigUint64 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setBigUint64(byteOffset: number, value: bigint, littleEndian?: boolean): void; } ///////////////////////////// // lib.es2020.date.d.ts ///////////////////////////// interface Date { - /** - * Converts a date and time to a string by using the current or specified locale. - * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; + /** + * Converts a date and time to a string by using the current or specified locale. + * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; - /** - * Converts a date to a string by using the current or specified locale. - * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleDateString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; + /** + * Converts a date to a string by using the current or specified locale. + * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleDateString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; - /** - * Converts a time to a string by using the current or specified locale. - * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleTimeString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; + /** + * Converts a time to a string by using the current or specified locale. + * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleTimeString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; } ///////////////////////////// // lib.es2020.intl.d.ts ///////////////////////////// declare namespace Intl { - /** - * A string that is a valid [Unicode BCP 47 Locale Identifier](https://unicode.org/reports/tr35/#Unicode_locale_identifier). +/** + * A string that is a valid [Unicode BCP 47 Locale Identifier](https://unicode.org/reports/tr35/#Unicode_locale_identifier). + * + * For example: "fa", "es-MX", "zh-Hant-TW". + * + * See [MDN - Intl - locales argument](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). + */ + type UnicodeBCP47LocaleIdentifier = string; + +/** + * Unit to use in the relative time internationalized message. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format#Parameters). + */ + type RelativeTimeFormatUnit = + | "year" + | "years" + | "quarter" + | "quarters" + | "month" + | "months" + | "week" + | "weeks" + | "day" + | "days" + | "hour" + | "hours" + | "minute" + | "minutes" + | "second" + | "seconds"; + +/** + * Value of the `unit` property in objects returned by + * `Intl.RelativeTimeFormat.prototype.formatToParts()`. `formatToParts` and + * `format` methods accept either singular or plural unit names as input, + * but `formatToParts` only outputs singular (e.g. "day") not plural (e.g. + * "days"). + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts). + */ + type RelativeTimeFormatUnitSingular = + | "year" + | "quarter" + | "month" + | "week" + | "day" + | "hour" + | "minute" + | "second"; + +/** + * The locale matching algorithm to use. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). + */ + type RelativeTimeFormatLocaleMatcher = "lookup" | "best fit"; + +/** + * The format of output message. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). + */ + type RelativeTimeFormatNumeric = "always" | "auto"; + +/** + * The length of the internationalized message. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). + */ + type RelativeTimeFormatStyle = "long" | "short" | "narrow"; + +/** + * The locale or locales to use + * + * See [MDN - Intl - locales argument](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). + */ + type LocalesArgument = UnicodeBCP47LocaleIdentifier | Locale | readonly (UnicodeBCP47LocaleIdentifier | Locale)[] | undefined; + +/** + * An object with some or all of properties of `options` parameter + * of `Intl.RelativeTimeFormat` constructor. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). + */ + interface RelativeTimeFormatOptions { + /** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */ + localeMatcher?: RelativeTimeFormatLocaleMatcher; + + /** The format of output message. */ + numeric?: RelativeTimeFormatNumeric; +} + +/** + * An object with properties reflecting the locale + * and formatting options computed during initialization + * of the `Intl.RelativeTimeFormat` object + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions#Description). + */ + interface ResolvedRelativeTimeFormatOptions { + numeric: RelativeTimeFormatNumeric; + + numberingSystem: string; +} + +/** + * An object representing the relative time format in parts + * that can be used for custom locale-aware formatting. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts). + */ + type RelativeTimeFormatPart = + | { + type: "literal"; + value: string; + } + | { + type: Exclude; + value: string; + unit: RelativeTimeFormatUnitSingular; + }; + +interface RelativeTimeFormat { + /** + * Formats a value and a unit according to the locale + * and formatting options of the given + * [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) + * object. * - * For example: "fa", "es-MX", "zh-Hant-TW". + * While this method automatically provides the correct plural forms, + * the grammatical form is otherwise as neutral as possible. * - * See [MDN - Intl - locales argument](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). - */ - type UnicodeBCP47LocaleIdentifier = string; - - /** - * Unit to use in the relative time internationalized message. + * It is the caller's responsibility to handle cut-off logic + * such as deciding between displaying "in 7 days" or "in 1 week". + * This API does not support relative dates involving compound units. + * e.g "in 5 days and 4 hours". * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format#Parameters). - */ - type RelativeTimeFormatUnit = - | "year" - | "years" - | "quarter" - | "quarters" - | "month" - | "months" - | "week" - | "weeks" - | "day" - | "days" - | "hour" - | "hours" - | "minute" - | "minutes" - | "second" - | "seconds"; - - /** - * Value of the `unit` property in objects returned by - * `Intl.RelativeTimeFormat.prototype.formatToParts()`. `formatToParts` and - * `format` methods accept either singular or plural unit names as input, - * but `formatToParts` only outputs singular (e.g. "day") not plural (e.g. - * "days"). + * @param value - Numeric value to use in the internationalized relative time message * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts). - */ - type RelativeTimeFormatUnitSingular = - | "year" - | "quarter" - | "month" - | "week" - | "day" - | "hour" - | "minute" - | "second"; - - /** - * The locale matching algorithm to use. + * @param unit - [Unit](https://tc39.es/ecma402/#sec-singularrelativetimeunit) to use in the relative time internationalized message. * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). - */ - type RelativeTimeFormatLocaleMatcher = "lookup" | "best fit"; - - /** - * The format of output message. + * @throws `RangeError` if `unit` was given something other than `unit` possible values * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). - */ - type RelativeTimeFormatNumeric = "always" | "auto"; - - /** - * The length of the internationalized message. + * @returns {string} Internationalized relative time message as string * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format). */ - type RelativeTimeFormatStyle = "long" | "short" | "narrow"; + format(value: number, unit: RelativeTimeFormatUnit): string; - /** - * The locale or locales to use + /** + * Returns an array of objects representing the relative time format in parts that can be used for custom locale-aware formatting. + * + * @param value - Numeric value to use in the internationalized relative time message * - * See [MDN - Intl - locales argument](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). + * @param unit - [Unit](https://tc39.es/ecma402/#sec-singularrelativetimeunit) to use in the relative time internationalized message. + * + * @throws `RangeError` if `unit` was given something other than `unit` possible values + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts). */ - type LocalesArgument = UnicodeBCP47LocaleIdentifier | Locale | readonly (UnicodeBCP47LocaleIdentifier | Locale)[] | undefined; + formatToParts(value: number, unit: RelativeTimeFormatUnit): RelativeTimeFormatPart[]; - /** - * An object with some or all of properties of `options` parameter - * of `Intl.RelativeTimeFormat` constructor. + /** + * Provides access to the locale and options computed during initialization of this `Intl.RelativeTimeFormat` object. * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions). */ - interface RelativeTimeFormatOptions { - /** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */ - localeMatcher?: RelativeTimeFormatLocaleMatcher; - - /** The format of output message. */ - numeric?: RelativeTimeFormatNumeric; - } + resolvedOptions(): ResolvedRelativeTimeFormatOptions; +} - /** - * An object with properties reflecting the locale - * and formatting options computed during initialization - * of the `Intl.RelativeTimeFormat` object +/** + * The [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) + * object is a constructor for objects that enable language-sensitive relative time formatting. + * + * [Compatibility](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat#Browser_compatibility). + */ + const RelativeTimeFormat: { + /** + * Creates [Intl.RelativeTimeFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) objects * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions#Description). + * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. + * For the general form and interpretation of the locales argument, + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters) + * with some or all of options of `RelativeTimeFormatOptions`. + * + * @returns [Intl.RelativeTimeFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat). */ - interface ResolvedRelativeTimeFormatOptions { - numeric: RelativeTimeFormatNumeric; - - numberingSystem: string; - } + new ( + locales?: LocalesArgument, + options?: RelativeTimeFormatOptions, + ): RelativeTimeFormat; - /** - * An object representing the relative time format in parts - * that can be used for custom locale-aware formatting. + /** + * Returns an array containing those of the provided locales + * that are supported in date and time formatting + * without having to fall back to the runtime's default locale. * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts). - */ - type RelativeTimeFormatPart = - | { - type: "literal"; - value: string; - } - | { - type: Exclude; - value: string; - unit: RelativeTimeFormatUnitSingular; - }; - - interface RelativeTimeFormat { - /** - * Formats a value and a unit according to the locale - * and formatting options of the given - * [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) - * object. - * - * While this method automatically provides the correct plural forms, - * the grammatical form is otherwise as neutral as possible. - * - * It is the caller's responsibility to handle cut-off logic - * such as deciding between displaying "in 7 days" or "in 1 week". - * This API does not support relative dates involving compound units. - * e.g "in 5 days and 4 hours". - * - * @param value - Numeric value to use in the internationalized relative time message - * - * @param unit - [Unit](https://tc39.es/ecma402/#sec-singularrelativetimeunit) to use in the relative time internationalized message. - * - * @throws `RangeError` if `unit` was given something other than `unit` possible values - * - * @returns {string} Internationalized relative time message as string - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format). - */ - format(value: number, unit: RelativeTimeFormatUnit): string; - - /** - * Returns an array of objects representing the relative time format in parts that can be used for custom locale-aware formatting. - * - * @param value - Numeric value to use in the internationalized relative time message - * - * @param unit - [Unit](https://tc39.es/ecma402/#sec-singularrelativetimeunit) to use in the relative time internationalized message. - * - * @throws `RangeError` if `unit` was given something other than `unit` possible values - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts). - */ - formatToParts(value: number, unit: RelativeTimeFormatUnit): RelativeTimeFormatPart[]; - - /** - * Provides access to the locale and options computed during initialization of this `Intl.RelativeTimeFormat` object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions). - */ - resolvedOptions(): ResolvedRelativeTimeFormatOptions; - } - - /** - * The [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) - * object is a constructor for objects that enable language-sensitive relative time formatting. + * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. + * For the general form and interpretation of the locales argument, + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). * - * [Compatibility](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat#Browser_compatibility). + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters) + * with some or all of options of the formatting. + * + * @returns An array containing those of the provided locales + * that are supported in date and time formatting + * without having to fall back to the runtime's default locale. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/supportedLocalesOf). */ - const RelativeTimeFormat: { - /** - * Creates [Intl.RelativeTimeFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) objects - * - * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. - * For the general form and interpretation of the locales argument, - * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). - * - * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters) - * with some or all of options of `RelativeTimeFormatOptions`. - * - * @returns [Intl.RelativeTimeFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat). - */ - new ( - locales?: LocalesArgument, - options?: RelativeTimeFormatOptions, - ): RelativeTimeFormat; - - /** - * Returns an array containing those of the provided locales - * that are supported in date and time formatting - * without having to fall back to the runtime's default locale. - * - * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. - * For the general form and interpretation of the locales argument, - * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). - * - * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters) - * with some or all of options of the formatting. - * - * @returns An array containing those of the provided locales - * that are supported in date and time formatting - * without having to fall back to the runtime's default locale. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/supportedLocalesOf). - */ - supportedLocalesOf( - locales?: LocalesArgument, - options?: RelativeTimeFormatOptions, - ): UnicodeBCP47LocaleIdentifier[]; - }; + supportedLocalesOf( + locales?: LocalesArgument, + options?: RelativeTimeFormatOptions, + ): UnicodeBCP47LocaleIdentifier[]; +}; - interface NumberFormatOptionsSignDisplayRegistry { - auto: never; +interface NumberFormatOptionsSignDisplayRegistry { + auto: never; - never: never; + never: never; - always: never; + always: never; - exceptZero: never; - } + exceptZero: never; +} - type NumberFormatOptionsSignDisplay = keyof NumberFormatOptionsSignDisplayRegistry; +type NumberFormatOptionsSignDisplay = keyof NumberFormatOptionsSignDisplayRegistry; - interface NumberFormatOptions { - numberingSystem?: string | undefined; +interface NumberFormatOptions { + numberingSystem?: string | undefined; - compactDisplay?: "short" | "long" | undefined; + compactDisplay?: "short" | "long" | undefined; - notation?: "standard" | "scientific" | "engineering" | "compact" | undefined; + notation?: "standard" | "scientific" | "engineering" | "compact" | undefined; - signDisplay?: NumberFormatOptionsSignDisplay | undefined; + signDisplay?: NumberFormatOptionsSignDisplay | undefined; - unit?: string | undefined; + unit?: string | undefined; - unitDisplay?: "short" | "long" | "narrow" | undefined; + unitDisplay?: "short" | "long" | "narrow" | undefined; - currencySign?: "standard" | "accounting" | undefined; - } + currencySign?: "standard" | "accounting" | undefined; +} - interface ResolvedNumberFormatOptions { - compactDisplay?: "short" | "long"; +interface ResolvedNumberFormatOptions { + compactDisplay?: "short" | "long"; - notation: "standard" | "scientific" | "engineering" | "compact"; + notation: "standard" | "scientific" | "engineering" | "compact"; - signDisplay: NumberFormatOptionsSignDisplay; + signDisplay: NumberFormatOptionsSignDisplay; - unit?: string; + unit?: string; - unitDisplay?: "short" | "long" | "narrow"; + unitDisplay?: "short" | "long" | "narrow"; - currencySign?: "standard" | "accounting"; - } + currencySign?: "standard" | "accounting"; +} - interface DateTimeFormatOptions { - calendar?: string | undefined; +interface DateTimeFormatOptions { + calendar?: string | undefined; - numberingSystem?: string | undefined; + numberingSystem?: string | undefined; - hourCycle?: "h11" | "h12" | "h23" | "h24" | undefined; - } + hourCycle?: "h11" | "h12" | "h23" | "h24" | undefined; +} - type LocaleHourCycleKey = "h12" | "h23" | "h11" | "h24"; +type LocaleHourCycleKey = "h12" | "h23" | "h11" | "h24"; - type LocaleCollationCaseFirst = "upper" | "lower" | "false"; +type LocaleCollationCaseFirst = "upper" | "lower" | "false"; - interface LocaleOptions { - /** The part of the Locale that indicates the locale's calendar era. */ - calendar?: string; +interface LocaleOptions { + /** The part of the Locale that indicates the locale's calendar era. */ + calendar?: string; - /** Flag that defines whether case is taken into account for the locale's collation rules. */ - caseFirst?: LocaleCollationCaseFirst; + /** Flag that defines whether case is taken into account for the locale's collation rules. */ + caseFirst?: LocaleCollationCaseFirst; - /** The collation type used for sorting */ - collation?: string; + /** The collation type used for sorting */ + collation?: string; - /** The time keeping format convention used by the locale. */ - hourCycle?: LocaleHourCycleKey; + /** The time keeping format convention used by the locale. */ + hourCycle?: LocaleHourCycleKey; - /** The numeral system used by the locale. */ - numberingSystem?: string; + /** The numeral system used by the locale. */ + numberingSystem?: string; - /** Flag that defines whether the locale has special collation handling for numeric characters. */ - numeric?: boolean; + /** Flag that defines whether the locale has special collation handling for numeric characters. */ + numeric?: boolean; - /** The region of the world (usually a country) associated with the locale. Possible values are region codes as defined by ISO 3166-1. */ - region?: string; + /** The region of the world (usually a country) associated with the locale. Possible values are region codes as defined by ISO 3166-1. */ + region?: string; - /** The script used for writing the particular language used in the locale. Possible values are script codes as defined by ISO 15924. */ - script?: string; - } + /** The script used for writing the particular language used in the locale. Possible values are script codes as defined by ISO 15924. */ + script?: string; +} - interface Locale extends LocaleOptions { - /** A string containing the language, and the script and region if available. */ - baseName: string; +interface Locale extends LocaleOptions { + /** A string containing the language, and the script and region if available. */ + baseName: string; - /** The primary language subtag associated with the locale. */ - language: string; + /** The primary language subtag associated with the locale. */ + language: string; - /** Gets the most likely values for the language, script, and region of the locale based on existing values. */ - maximize(): Locale; + /** Gets the most likely values for the language, script, and region of the locale based on existing values. */ + maximize(): Locale; - /** Attempts to remove information about the locale that would be added by calling `Locale.maximize()`. */ - minimize(): Locale; + /** Attempts to remove information about the locale that would be added by calling `Locale.maximize()`. */ + minimize(): Locale; - /** Returns the locale's full locale identifier string. */ - toString(): UnicodeBCP47LocaleIdentifier; - } + /** Returns the locale's full locale identifier string. */ + toString(): UnicodeBCP47LocaleIdentifier; +} - /** - * Constructor creates [Intl.Locale](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) - * objects - * - * @param tag - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646). - * For the general form and interpretation of the locales argument, - * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). - * - * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/Locale#Parameters) with some or all of options of the locale. - * - * @returns [Intl.Locale](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale). - */ - const Locale: { - new (tag: UnicodeBCP47LocaleIdentifier | Locale, options?: LocaleOptions): Locale; - }; +/** + * Constructor creates [Intl.Locale](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) + * objects + * + * @param tag - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646). + * For the general form and interpretation of the locales argument, + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/Locale#Parameters) with some or all of options of the locale. + * + * @returns [Intl.Locale](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale). + */ + const Locale: { + new (tag: UnicodeBCP47LocaleIdentifier | Locale, options?: LocaleOptions): Locale; +}; - type DisplayNamesFallback = - | "code" - | "none"; +type DisplayNamesFallback = + | "code" + | "none"; - type DisplayNamesType = - | "language" - | "region" - | "script" - | "calendar" - | "dateTimeField" - | "currency"; +type DisplayNamesType = + | "language" + | "region" + | "script" + | "calendar" + | "dateTimeField" + | "currency"; - type DisplayNamesLanguageDisplay = - | "dialect" - | "standard"; +type DisplayNamesLanguageDisplay = + | "dialect" + | "standard"; - interface DisplayNamesOptions { - localeMatcher?: RelativeTimeFormatLocaleMatcher; +interface DisplayNamesOptions { + localeMatcher?: RelativeTimeFormatLocaleMatcher; - style?: RelativeTimeFormatStyle; + style?: RelativeTimeFormatStyle; - type: DisplayNamesType; + type: DisplayNamesType; - languageDisplay?: DisplayNamesLanguageDisplay; + languageDisplay?: DisplayNamesLanguageDisplay; - fallback?: DisplayNamesFallback; - } + fallback?: DisplayNamesFallback; +} - interface ResolvedDisplayNamesOptions { - locale: UnicodeBCP47LocaleIdentifier; +interface ResolvedDisplayNamesOptions { + locale: UnicodeBCP47LocaleIdentifier; - style: RelativeTimeFormatStyle; + style: RelativeTimeFormatStyle; - type: DisplayNamesType; + type: DisplayNamesType; - fallback: DisplayNamesFallback; + fallback: DisplayNamesFallback; - languageDisplay?: DisplayNamesLanguageDisplay; - } + languageDisplay?: DisplayNamesLanguageDisplay; +} - interface DisplayNames { - /** - * Receives a code and returns a string based on the locale and options provided when instantiating - * [`Intl.DisplayNames()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) - * - * @param code The `code` to provide depends on the `type` passed to display name during creation: - * - If the type is `"region"`, code should be either an [ISO-3166 two letters region code](https://www.iso.org/iso-3166-country-codes.html), - * or a [three digits UN M49 Geographic Regions](https://unstats.un.org/unsd/methodology/m49/). - * - If the type is `"script"`, code should be an [ISO-15924 four letters script code](https://unicode.org/iso15924/iso15924-codes.html). - * - If the type is `"language"`, code should be a `languageCode` ["-" `scriptCode`] ["-" `regionCode` ] *("-" `variant` ) - * subsequence of the unicode_language_id grammar in [UTS 35's Unicode Language and Locale Identifiers grammar](https://unicode.org/reports/tr35/#Unicode_language_identifier). - * `languageCode` is either a two letters ISO 639-1 language code or a three letters ISO 639-2 language code. - * - If the type is `"currency"`, code should be a [3-letter ISO 4217 currency code](https://www.iso.org/iso-4217-currency-codes.html). - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/of). - */ - of(code: string): string | undefined; +interface DisplayNames { + /** + * Receives a code and returns a string based on the locale and options provided when instantiating + * [`Intl.DisplayNames()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) + * + * @param code The `code` to provide depends on the `type` passed to display name during creation: + * - If the type is `"region"`, code should be either an [ISO-3166 two letters region code](https://www.iso.org/iso-3166-country-codes.html), + * or a [three digits UN M49 Geographic Regions](https://unstats.un.org/unsd/methodology/m49/). + * - If the type is `"script"`, code should be an [ISO-15924 four letters script code](https://unicode.org/iso15924/iso15924-codes.html). + * - If the type is `"language"`, code should be a `languageCode` ["-" `scriptCode`] ["-" `regionCode` ] *("-" `variant` ) + * subsequence of the unicode_language_id grammar in [UTS 35's Unicode Language and Locale Identifiers grammar](https://unicode.org/reports/tr35/#Unicode_language_identifier). + * `languageCode` is either a two letters ISO 639-1 language code or a three letters ISO 639-2 language code. + * - If the type is `"currency"`, code should be a [3-letter ISO 4217 currency code](https://www.iso.org/iso-4217-currency-codes.html). + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/of). + */ + of(code: string): string | undefined; - /** - * Returns a new object with properties reflecting the locale and style formatting options computed during the construction of the current - * [`Intl/DisplayNames`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/resolvedOptions). - */ - resolvedOptions(): ResolvedDisplayNamesOptions; - } + /** + * Returns a new object with properties reflecting the locale and style formatting options computed during the construction of the current + * [`Intl/DisplayNames`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/resolvedOptions). + */ + resolvedOptions(): ResolvedDisplayNamesOptions; +} - /** - * The [`Intl.DisplayNames()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) - * object enables the consistent translation of language, region and script display names. +/** + * The [`Intl.DisplayNames()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) + * object enables the consistent translation of language, region and script display names. + * + * [Compatibility](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames#browser_compatibility). + */ + const DisplayNames: { + prototype: DisplayNames; + + /** + * @param locales A string with a BCP 47 language tag, or an array of such strings. + * For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) + * page. + * + * @param options An object for setting up a display name. * - * [Compatibility](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames#browser_compatibility). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/DisplayNames). */ - const DisplayNames: { - prototype: DisplayNames; - - /** - * @param locales A string with a BCP 47 language tag, or an array of such strings. - * For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) - * page. - * - * @param options An object for setting up a display name. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/DisplayNames). - */ - new (locales: LocalesArgument, options: DisplayNamesOptions): DisplayNames; - - /** - * Returns an array containing those of the provided locales that are supported in display names without having to fall back to the runtime's default locale. - * - * @param locales A string with a BCP 47 language tag, or an array of such strings. - * For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) - * page. - * - * @param options An object with a locale matcher. - * - * @returns An array of strings representing a subset of the given locale tags that are supported in display names without having to fall back to the runtime's default locale. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/supportedLocalesOf). - */ - supportedLocalesOf(locales?: LocalesArgument, options?: { localeMatcher?: RelativeTimeFormatLocaleMatcher; }): UnicodeBCP47LocaleIdentifier[]; - }; + new (locales: LocalesArgument, options: DisplayNamesOptions): DisplayNames; + + /** + * Returns an array containing those of the provided locales that are supported in display names without having to fall back to the runtime's default locale. + * + * @param locales A string with a BCP 47 language tag, or an array of such strings. + * For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) + * page. + * + * @param options An object with a locale matcher. + * + * @returns An array of strings representing a subset of the given locale tags that are supported in display names without having to fall back to the runtime's default locale. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/supportedLocalesOf). + */ + supportedLocalesOf(locales?: LocalesArgument, options?: { localeMatcher?: RelativeTimeFormatLocaleMatcher; }): UnicodeBCP47LocaleIdentifier[]; +}; - interface CollatorConstructor { - new (locales?: LocalesArgument, options?: CollatorOptions): Collator; +interface CollatorConstructor { + new (locales?: LocalesArgument, options?: CollatorOptions): Collator; - (locales?: LocalesArgument, options?: CollatorOptions): Collator; + (locales?: LocalesArgument, options?: CollatorOptions): Collator; - supportedLocalesOf(locales: LocalesArgument, options?: CollatorOptions): string[]; - } + supportedLocalesOf(locales: LocalesArgument, options?: CollatorOptions): string[]; +} - interface DateTimeFormatConstructor { - new (locales?: LocalesArgument, options?: DateTimeFormatOptions): DateTimeFormat; +interface DateTimeFormatConstructor { + new (locales?: LocalesArgument, options?: DateTimeFormatOptions): DateTimeFormat; - (locales?: LocalesArgument, options?: DateTimeFormatOptions): DateTimeFormat; + (locales?: LocalesArgument, options?: DateTimeFormatOptions): DateTimeFormat; - supportedLocalesOf(locales: LocalesArgument, options?: DateTimeFormatOptions): string[]; - } + supportedLocalesOf(locales: LocalesArgument, options?: DateTimeFormatOptions): string[]; +} - interface NumberFormatConstructor { - new (locales?: LocalesArgument, options?: NumberFormatOptions): NumberFormat; +interface NumberFormatConstructor { + new (locales?: LocalesArgument, options?: NumberFormatOptions): NumberFormat; - (locales?: LocalesArgument, options?: NumberFormatOptions): NumberFormat; + (locales?: LocalesArgument, options?: NumberFormatOptions): NumberFormat; - supportedLocalesOf(locales: LocalesArgument, options?: NumberFormatOptions): string[]; - } + supportedLocalesOf(locales: LocalesArgument, options?: NumberFormatOptions): string[]; +} - interface PluralRulesConstructor { - new (locales?: LocalesArgument, options?: PluralRulesOptions): PluralRules; +interface PluralRulesConstructor { + new (locales?: LocalesArgument, options?: PluralRulesOptions): PluralRules; - (locales?: LocalesArgument, options?: PluralRulesOptions): PluralRules; + (locales?: LocalesArgument, options?: PluralRulesOptions): PluralRules; - supportedLocalesOf(locales: LocalesArgument, options?: { localeMatcher?: "lookup" | "best fit"; }): string[]; - } + supportedLocalesOf(locales: LocalesArgument, options?: { localeMatcher?: "lookup" | "best fit"; }): string[]; +} } ///////////////////////////// // lib.es2020.number.d.ts ///////////////////////////// interface Number { - /** - * Converts a number to a string by using the current or specified locale. - * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.NumberFormatOptions): string; + /** + * Converts a number to a string by using the current or specified locale. + * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.NumberFormatOptions): string; } ///////////////////////////// // lib.es2020.promise.d.ts ///////////////////////////// interface PromiseFulfilledResult { - status: "fulfilled"; + status: "fulfilled"; - value: T; + value: T; } interface PromiseRejectedResult { - status: "rejected"; + status: "rejected"; - reason: any; + reason: any; } type PromiseSettledResult = PromiseFulfilledResult | PromiseRejectedResult; interface PromiseConstructor { - /** - * Creates a Promise that is resolved with an array of results when all - * of the provided Promises resolve or reject. - * @param values An array of Promises. - * @returns A new Promise. - */ - allSettled(values: T): Promise<{ -readonly [P in keyof T]: PromiseSettledResult>; }>; + /** + * Creates a Promise that is resolved with an array of results when all + * of the provided Promises resolve or reject. + * @param values An array of Promises. + * @returns A new Promise. + */ + allSettled(values: T): Promise<{ -readonly [P in keyof T]: PromiseSettledResult>; }>; - /** - * Creates a Promise that is resolved with an array of results when all - * of the provided Promises resolve or reject. - * @param values An array of Promises. - * @returns A new Promise. - */ - allSettled(values: Iterable>): Promise>[]>; + /** + * Creates a Promise that is resolved with an array of results when all + * of the provided Promises resolve or reject. + * @param values An array of Promises. + * @returns A new Promise. + */ + allSettled(values: Iterable>): Promise>[]>; } ///////////////////////////// // lib.es2020.sharedmemory.d.ts ///////////////////////////// interface Atomics { - /** - * Adds a value to the value at the given position in the array, returning the original value. - * Until this atomic operation completes, any other read or write operation against the array - * will block. - */ - add(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + /** + * Adds a value to the value at the given position in the array, returning the original value. + * Until this atomic operation completes, any other read or write operation against the array + * will block. + */ + add(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - /** - * Stores the bitwise AND of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or - * write operation against the array will block. - */ - and(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + /** + * Stores the bitwise AND of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or + * write operation against the array will block. + */ + and(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - /** - * Replaces the value at the given position in the array if the original value equals the given - * expected value, returning the original value. Until this atomic operation completes, any - * other read or write operation against the array will block. - */ - compareExchange(typedArray: BigInt64Array | BigUint64Array, index: number, expectedValue: bigint, replacementValue: bigint): bigint; + /** + * Replaces the value at the given position in the array if the original value equals the given + * expected value, returning the original value. Until this atomic operation completes, any + * other read or write operation against the array will block. + */ + compareExchange(typedArray: BigInt64Array | BigUint64Array, index: number, expectedValue: bigint, replacementValue: bigint): bigint; - /** - * Replaces the value at the given position in the array, returning the original value. Until - * this atomic operation completes, any other read or write operation against the array will - * block. - */ - exchange(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + /** + * Replaces the value at the given position in the array, returning the original value. Until + * this atomic operation completes, any other read or write operation against the array will + * block. + */ + exchange(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - /** - * Returns the value at the given position in the array. Until this atomic operation completes, - * any other read or write operation against the array will block. - */ - load(typedArray: BigInt64Array | BigUint64Array, index: number): bigint; + /** + * Returns the value at the given position in the array. Until this atomic operation completes, + * any other read or write operation against the array will block. + */ + load(typedArray: BigInt64Array | BigUint64Array, index: number): bigint; - /** - * Stores the bitwise OR of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or write - * operation against the array will block. - */ - or(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + /** + * Stores the bitwise OR of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or write + * operation against the array will block. + */ + or(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - /** - * Stores a value at the given position in the array, returning the new value. Until this - * atomic operation completes, any other read or write operation against the array will block. - */ - store(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + /** + * Stores a value at the given position in the array, returning the new value. Until this + * atomic operation completes, any other read or write operation against the array will block. + */ + store(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - /** - * Subtracts a value from the value at the given position in the array, returning the original - * value. Until this atomic operation completes, any other read or write operation against the - * array will block. - */ - sub(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + /** + * Subtracts a value from the value at the given position in the array, returning the original + * value. Until this atomic operation completes, any other read or write operation against the + * array will block. + */ + sub(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - /** - * If the value at the given position in the array is equal to the provided value, the current - * agent is put to sleep causing execution to suspend until the timeout expires (returning - * `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns - * `"not-equal"`. - */ - wait(typedArray: BigInt64Array, index: number, value: bigint, timeout?: number): "ok" | "not-equal" | "timed-out"; + /** + * If the value at the given position in the array is equal to the provided value, the current + * agent is put to sleep causing execution to suspend until the timeout expires (returning + * `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns + * `"not-equal"`. + */ + wait(typedArray: BigInt64Array, index: number, value: bigint, timeout?: number): "ok" | "not-equal" | "timed-out"; - /** - * Wakes up sleeping agents that are waiting on the given index of the array, returning the - * number of agents that were awoken. - * @param typedArray A shared BigInt64Array. - * @param index The position in the typedArray to wake up on. - * @param count The number of sleeping agents to notify. Defaults to +Infinity. - */ - notify(typedArray: BigInt64Array, index: number, count?: number): number; + /** + * Wakes up sleeping agents that are waiting on the given index of the array, returning the + * number of agents that were awoken. + * @param typedArray A shared BigInt64Array. + * @param index The position in the typedArray to wake up on. + * @param count The number of sleeping agents to notify. Defaults to +Infinity. + */ + notify(typedArray: BigInt64Array, index: number, count?: number): number; - /** - * Stores the bitwise XOR of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or write - * operation against the array will block. - */ - xor(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + /** + * Stores the bitwise XOR of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or write + * operation against the array will block. + */ + xor(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; } ///////////////////////////// // lib.es2020.string.d.ts ///////////////////////////// interface String { - /** - * Matches a string with a regular expression, and returns an iterable of matches - * containing the results of that search. - * @param regexp A regular expression - */ - matchAll(regexp: RegExp): RegExpStringIterator; + /** + * Matches a string with a regular expression, and returns an iterable of matches + * containing the results of that search. + * @param regexp A regular expression + */ + matchAll(regexp: RegExp): RegExpStringIterator; - /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */ - toLocaleLowerCase(locales?: Intl.LocalesArgument): string; + /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */ + toLocaleLowerCase(locales?: Intl.LocalesArgument): string; - /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */ - toLocaleUpperCase(locales?: Intl.LocalesArgument): string; + /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */ + toLocaleUpperCase(locales?: Intl.LocalesArgument): string; - /** - * Determines whether two strings are equivalent in the current or specified locale. - * @param that String to compare to target string - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details. - * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details. - */ - localeCompare(that: string, locales?: Intl.LocalesArgument, options?: Intl.CollatorOptions): number; + /** + * Determines whether two strings are equivalent in the current or specified locale. + * @param that String to compare to target string + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details. + * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details. + */ + localeCompare(that: string, locales?: Intl.LocalesArgument, options?: Intl.CollatorOptions): number; } ///////////////////////////// // lib.es2020.symbol.wellknown.d.ts ///////////////////////////// interface SymbolConstructor { - /** - * A regular expression method that matches the regular expression against a string. Called - * by the String.prototype.matchAll method. - */ - readonly matchAll: unique symbol; + /** + * A regular expression method that matches the regular expression against a string. Called + * by the String.prototype.matchAll method. + */ + readonly matchAll: unique symbol; } interface RegExpStringIterator extends IteratorObject { - [Symbol.iterator](): RegExpStringIterator; + [Symbol.iterator](): RegExpStringIterator; } interface RegExp { - /** - * Matches a string with this regular expression, and returns an iterable of matches - * containing the results of that search. - * @param string A string to search within. - */ - [Symbol.matchAll](str: string): RegExpStringIterator; + /** + * Matches a string with this regular expression, and returns an iterable of matches + * containing the results of that search. + * @param string A string to search within. + */ + [Symbol.matchAll](str: string): RegExpStringIterator; } ///////////////////////////// // lib.es2021.intl.d.ts ///////////////////////////// declare namespace Intl { - interface DateTimeFormatOptions { - dateStyle?: "full" | "long" | "medium" | "short" | undefined; +interface DateTimeFormatOptions { + dateStyle?: "full" | "long" | "medium" | "short" | undefined; - timeStyle?: "full" | "long" | "medium" | "short" | undefined; + timeStyle?: "full" | "long" | "medium" | "short" | undefined; - dayPeriod?: "narrow" | "short" | "long" | undefined; + dayPeriod?: "narrow" | "short" | "long" | undefined; - fractionalSecondDigits?: 1 | 2 | 3 | undefined; - } + fractionalSecondDigits?: 1 | 2 | 3 | undefined; +} - interface DateTimeRangeFormatPart extends DateTimeFormatPart { - source: "startRange" | "endRange" | "shared"; - } +interface DateTimeRangeFormatPart extends DateTimeFormatPart { + source: "startRange" | "endRange" | "shared"; +} - interface DateTimeFormat { - formatRange(startDate: Date | number | bigint, endDate: Date | number | bigint): string; +interface DateTimeFormat { + formatRange(startDate: Date | number | bigint, endDate: Date | number | bigint): string; - formatRangeToParts(startDate: Date | number | bigint, endDate: Date | number | bigint): DateTimeRangeFormatPart[]; - } + formatRangeToParts(startDate: Date | number | bigint, endDate: Date | number | bigint): DateTimeRangeFormatPart[]; +} - interface ResolvedDateTimeFormatOptions { - dateStyle?: "full" | "long" | "medium" | "short"; +interface ResolvedDateTimeFormatOptions { + dateStyle?: "full" | "long" | "medium" | "short"; - timeStyle?: "full" | "long" | "medium" | "short"; + timeStyle?: "full" | "long" | "medium" | "short"; - hourCycle?: "h11" | "h12" | "h23" | "h24"; + hourCycle?: "h11" | "h12" | "h23" | "h24"; - dayPeriod?: "narrow" | "short" | "long"; + dayPeriod?: "narrow" | "short" | "long"; - fractionalSecondDigits?: 1 | 2 | 3; - } + fractionalSecondDigits?: 1 | 2 | 3; +} - /** - * The locale matching algorithm to use. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). - */ - type ListFormatLocaleMatcher = "lookup" | "best fit"; +/** + * The locale matching algorithm to use. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). + */ + type ListFormatLocaleMatcher = "lookup" | "best fit"; - /** - * The format of output message. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). - */ - type ListFormatType = "conjunction" | "disjunction" | "unit"; +/** + * The format of output message. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). + */ + type ListFormatType = "conjunction" | "disjunction" | "unit"; - /** - * The length of the formatted message. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). - */ - type ListFormatStyle = "long" | "short" | "narrow"; +/** + * The length of the formatted message. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). + */ + type ListFormatStyle = "long" | "short" | "narrow"; - /** - * An object with some or all properties of the `Intl.ListFormat` constructor `options` parameter. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). - */ - interface ListFormatOptions { - /** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */ - localeMatcher?: ListFormatLocaleMatcher | undefined; - - /** The format of output message. */ - type?: ListFormatType | undefined; - - /** The length of the internationalized message. */ - style?: ListFormatStyle | undefined; - } - - interface ResolvedListFormatOptions { - locale: string; - - style: ListFormatStyle; - - type: ListFormatType; - } - - interface ListFormat { - /** - * Returns a string with a language-specific representation of the list. - * - * @param list - An iterable object, such as an [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array). - * - * @throws `TypeError` if `list` includes something other than the possible values. - * - * @returns {string} A language-specific formatted string representing the elements of the list. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/format). - */ - format(list: Iterable): string; - - /** - * Returns an Array of objects representing the different components that can be used to format a list of values in a locale-aware fashion. - * - * @param list - An iterable object, such as an [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array), to be formatted according to a locale. - * - * @throws `TypeError` if `list` includes something other than the possible values. - * - * @returns {{ type: "element" | "literal", value: string; }[]} An Array of components which contains the formatted parts from the list. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/formatToParts). - */ - formatToParts(list: Iterable): { type: "element" | "literal"; value: string; }[]; - - /** - * Returns a new object with properties reflecting the locale and style - * formatting options computed during the construction of the current - * `Intl.ListFormat` object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/resolvedOptions). - */ - resolvedOptions(): ResolvedListFormatOptions; - } - - const ListFormat: { - prototype: ListFormat; - - /** - * Creates [Intl.ListFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat) objects that - * enable language-sensitive list formatting. - * - * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. - * For the general form and interpretation of the `locales` argument, - * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). - * - * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters) - * with some or all options of `ListFormatOptions`. - * - * @returns [Intl.ListFormatOptions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat) object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat). - */ - new (locales?: LocalesArgument, options?: ListFormatOptions): ListFormat; - - /** - * Returns an array containing those of the provided locales that are - * supported in list formatting without having to fall back to the runtime's default locale. - * - * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. - * For the general form and interpretation of the `locales` argument, - * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). - * - * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf#parameters). - * with some or all possible options. - * - * @returns An array of strings representing a subset of the given locale tags that are supported in list - * formatting without having to fall back to the runtime's default locale. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf). - */ - supportedLocalesOf(locales: LocalesArgument, options?: Pick): UnicodeBCP47LocaleIdentifier[]; - }; -} +/** + * An object with some or all properties of the `Intl.ListFormat` constructor `options` parameter. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). + */ + interface ListFormatOptions { + /** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */ + localeMatcher?: ListFormatLocaleMatcher | undefined; -///////////////////////////// -// lib.es2021.promise.d.ts -///////////////////////////// -interface AggregateError extends Error { - errors: any[]; + /** The format of output message. */ + type?: ListFormatType | undefined; + + /** The length of the internationalized message. */ + style?: ListFormatStyle | undefined; } -interface AggregateErrorConstructor { - new (errors: Iterable, message?: string): AggregateError; +interface ResolvedListFormatOptions { + locale: string; - (errors: Iterable, message?: string): AggregateError; + style: ListFormatStyle; - readonly prototype: AggregateError; + type: ListFormatType; } -declare var AggregateError: AggregateErrorConstructor; +interface ListFormat { + /** + * Returns a string with a language-specific representation of the list. + * + * @param list - An iterable object, such as an [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array). + * + * @throws `TypeError` if `list` includes something other than the possible values. + * + * @returns {string} A language-specific formatted string representing the elements of the list. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/format). + */ + format(list: Iterable): string; -/** - * Represents the completion of an asynchronous operation - */ -interface PromiseConstructor { /** - * The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm. - * @param values An array or iterable of Promises. - * @returns A new Promise. + * Returns an Array of objects representing the different components that can be used to format a list of values in a locale-aware fashion. + * + * @param list - An iterable object, such as an [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array), to be formatted according to a locale. + * + * @throws `TypeError` if `list` includes something other than the possible values. + * + * @returns {{ type: "element" | "literal", value: string; }[]} An Array of components which contains the formatted parts from the list. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/formatToParts). */ - any(values: T): Promise>; + formatToParts(list: Iterable): { type: "element" | "literal"; value: string; }[]; /** - * The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm. - * @param values An array or iterable of Promises. - * @returns A new Promise. + * Returns a new object with properties reflecting the locale and style + * formatting options computed during the construction of the current + * `Intl.ListFormat` object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/resolvedOptions). */ - any(values: Iterable>): Promise>; + resolvedOptions(): ResolvedListFormatOptions; } -///////////////////////////// -// lib.es2021.string.d.ts -///////////////////////////// -interface String { +const ListFormat: { + prototype: ListFormat; + /** - * Replace all instances of a substring in a string, using a regular expression or search string. - * @param searchValue A string to search for. - * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string. + * Creates [Intl.ListFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat) objects that + * enable language-sensitive list formatting. + * + * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. + * For the general form and interpretation of the `locales` argument, + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters) + * with some or all options of `ListFormatOptions`. + * + * @returns [Intl.ListFormatOptions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat) object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat). */ - replaceAll(searchValue: string | RegExp, replaceValue: string): string; + new (locales?: LocalesArgument, options?: ListFormatOptions): ListFormat; /** - * Replace all instances of a substring in a string, using a regular expression or search string. - * @param searchValue A string to search for. - * @param replacer A function that returns the replacement text. + * Returns an array containing those of the provided locales that are + * supported in list formatting without having to fall back to the runtime's default locale. + * + * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. + * For the general form and interpretation of the `locales` argument, + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf#parameters). + * with some or all possible options. + * + * @returns An array of strings representing a subset of the given locale tags that are supported in list + * formatting without having to fall back to the runtime's default locale. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf). */ - replaceAll(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; + supportedLocalesOf(locales: LocalesArgument, options?: Pick): UnicodeBCP47LocaleIdentifier[]; +}; +} + +///////////////////////////// +// lib.es2021.promise.d.ts +///////////////////////////// +interface AggregateError extends Error { + errors: any[]; +} + +interface AggregateErrorConstructor { + new (errors: Iterable, message?: string): AggregateError; + + (errors: Iterable, message?: string): AggregateError; + + readonly prototype: AggregateError; +} + +declare var AggregateError: AggregateErrorConstructor; + +/** + * Represents the completion of an asynchronous operation + */ +interface PromiseConstructor { + /** + * The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm. + * @param values An array or iterable of Promises. + * @returns A new Promise. + */ + any(values: T): Promise>; + + /** + * The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm. + * @param values An array or iterable of Promises. + * @returns A new Promise. + */ + any(values: Iterable>): Promise>; +} + +///////////////////////////// +// lib.es2021.string.d.ts +///////////////////////////// +interface String { + /** + * Replace all instances of a substring in a string, using a regular expression or search string. + * @param searchValue A string to search for. + * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string. + */ + replaceAll(searchValue: string | RegExp, replaceValue: string): string; + + /** + * Replace all instances of a substring in a string, using a regular expression or search string. + * @param searchValue A string to search for. + * @param replacer A function that returns the replacement text. + */ + replaceAll(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; } ///////////////////////////// // lib.es2021.weakref.d.ts ///////////////////////////// interface WeakRef { - readonly [Symbol.toStringTag]: "WeakRef"; + readonly [Symbol.toStringTag]: "WeakRef"; - /** - * Returns the WeakRef instance's target value, or undefined if the target value has been - * reclaimed. - * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. - */ - deref(): T | undefined; + /** + * Returns the WeakRef instance's target value, or undefined if the target value has been + * reclaimed. + * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. + */ + deref(): T | undefined; } interface WeakRefConstructor { - readonly prototype: WeakRef; + readonly prototype: WeakRef; - /** - * Creates a WeakRef instance for the given target value. - * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. - * @param target The target value for the WeakRef instance. - */ - new (target: T): WeakRef; + /** + * Creates a WeakRef instance for the given target value. + * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. + * @param target The target value for the WeakRef instance. + */ + new (target: T): WeakRef; } declare var WeakRef: WeakRefConstructor; interface FinalizationRegistry { - readonly [Symbol.toStringTag]: "FinalizationRegistry"; + readonly [Symbol.toStringTag]: "FinalizationRegistry"; - /** - * Registers a value with the registry. - * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. - * @param target The target value to register. - * @param heldValue The value to pass to the finalizer for this value. This cannot be the - * target value. - * @param unregisterToken The token to pass to the unregister method to unregister the target - * value. If not provided, the target cannot be unregistered. - */ - register(target: WeakKey, heldValue: T, unregisterToken?: WeakKey): void; + /** + * Registers a value with the registry. + * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. + * @param target The target value to register. + * @param heldValue The value to pass to the finalizer for this value. This cannot be the + * target value. + * @param unregisterToken The token to pass to the unregister method to unregister the target + * value. If not provided, the target cannot be unregistered. + */ + register(target: WeakKey, heldValue: T, unregisterToken?: WeakKey): void; - /** - * Unregisters a value from the registry. - * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. - * @param unregisterToken The token that was used as the unregisterToken argument when calling - * register to register the target value. - */ - unregister(unregisterToken: WeakKey): boolean; + /** + * Unregisters a value from the registry. + * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. + * @param unregisterToken The token that was used as the unregisterToken argument when calling + * register to register the target value. + */ + unregister(unregisterToken: WeakKey): boolean; } interface FinalizationRegistryConstructor { - readonly prototype: FinalizationRegistry; + readonly prototype: FinalizationRegistry; - /** - * Creates a finalization registry with an associated cleanup callback - * @param cleanupCallback The callback to call after a value in the registry has been reclaimed. - */ - new (cleanupCallback: (heldValue: T) => void): FinalizationRegistry; + /** + * Creates a finalization registry with an associated cleanup callback + * @param cleanupCallback The callback to call after a value in the registry has been reclaimed. + */ + new (cleanupCallback: (heldValue: T) => void): FinalizationRegistry; } declare var FinalizationRegistry: FinalizationRegistryConstructor; @@ -4358,798 +4358,798 @@ declare var FinalizationRegistry: FinalizationRegistryConstructor; // lib.es2022.array.d.ts ///////////////////////////// interface Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): T | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): T | undefined; } interface ReadonlyArray { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): T | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): T | undefined; } interface Int8Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; } interface Uint8Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; } interface Uint8ClampedArray { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; } interface Int16Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; } interface Uint16Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; } interface Int32Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; } interface Uint32Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; } interface Float32Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; } interface Float64Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; } interface BigInt64Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): bigint | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): bigint | undefined; } interface BigUint64Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): bigint | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): bigint | undefined; } ///////////////////////////// // lib.es2022.error.d.ts ///////////////////////////// interface ErrorOptions { - cause?: unknown; + cause?: unknown; } interface Error { - cause?: unknown; + cause?: unknown; } interface ErrorConstructor { - new (message?: string, options?: ErrorOptions): Error; + new (message?: string, options?: ErrorOptions): Error; - (message?: string, options?: ErrorOptions): Error; + (message?: string, options?: ErrorOptions): Error; } interface EvalErrorConstructor { - new (message?: string, options?: ErrorOptions): EvalError; + new (message?: string, options?: ErrorOptions): EvalError; - (message?: string, options?: ErrorOptions): EvalError; + (message?: string, options?: ErrorOptions): EvalError; } interface RangeErrorConstructor { - new (message?: string, options?: ErrorOptions): RangeError; + new (message?: string, options?: ErrorOptions): RangeError; - (message?: string, options?: ErrorOptions): RangeError; + (message?: string, options?: ErrorOptions): RangeError; } interface ReferenceErrorConstructor { - new (message?: string, options?: ErrorOptions): ReferenceError; + new (message?: string, options?: ErrorOptions): ReferenceError; - (message?: string, options?: ErrorOptions): ReferenceError; + (message?: string, options?: ErrorOptions): ReferenceError; } interface SyntaxErrorConstructor { - new (message?: string, options?: ErrorOptions): SyntaxError; + new (message?: string, options?: ErrorOptions): SyntaxError; - (message?: string, options?: ErrorOptions): SyntaxError; + (message?: string, options?: ErrorOptions): SyntaxError; } interface TypeErrorConstructor { - new (message?: string, options?: ErrorOptions): TypeError; + new (message?: string, options?: ErrorOptions): TypeError; - (message?: string, options?: ErrorOptions): TypeError; + (message?: string, options?: ErrorOptions): TypeError; } interface URIErrorConstructor { - new (message?: string, options?: ErrorOptions): URIError; + new (message?: string, options?: ErrorOptions): URIError; - (message?: string, options?: ErrorOptions): URIError; + (message?: string, options?: ErrorOptions): URIError; } interface AggregateErrorConstructor { - new ( - errors: Iterable, - message?: string, - options?: ErrorOptions, - ): AggregateError; + new ( + errors: Iterable, + message?: string, + options?: ErrorOptions, + ): AggregateError; - ( - errors: Iterable, - message?: string, - options?: ErrorOptions, - ): AggregateError; + ( + errors: Iterable, + message?: string, + options?: ErrorOptions, + ): AggregateError; } ///////////////////////////// // lib.es2022.intl.d.ts ///////////////////////////// declare namespace Intl { - /** - * Returns a sorted array of the supported collation, calendar, currency, numbering system, timezones, and units by the implementation. - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf) - * - * @param key A string indicating the category of values to return. - * @returns A sorted array of the supported values. - */ - function supportedValuesOf(key: "calendar" | "collation" | "currency" | "numberingSystem" | "timeZone" | "unit"): string[]; +/** + * Returns a sorted array of the supported collation, calendar, currency, numbering system, timezones, and units by the implementation. + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf) + * + * @param key A string indicating the category of values to return. + * @returns A sorted array of the supported values. + */ + function supportedValuesOf(key: "calendar" | "collation" | "currency" | "numberingSystem" | "timeZone" | "unit"): string[]; } ///////////////////////////// // lib.es2022.object.d.ts ///////////////////////////// interface ObjectConstructor { - /** - * Determines whether an object has a property with the specified name. - * @param o An object. - * @param v A property name. - */ - hasOwn(o: object, v: PropertyKey): boolean; + /** + * Determines whether an object has a property with the specified name. + * @param o An object. + * @param v A property name. + */ + hasOwn(o: object, v: PropertyKey): boolean; } ///////////////////////////// // lib.es2022.regexp.d.ts ///////////////////////////// interface RegExp { - /** - * Returns a Boolean value indicating the state of the hasIndices flag (d) used with a regular expression. - * Default is false. Read-only. - */ - readonly hasIndices: boolean; + /** + * Returns a Boolean value indicating the state of the hasIndices flag (d) used with a regular expression. + * Default is false. Read-only. + */ + readonly hasIndices: boolean; } ///////////////////////////// // lib.es2022.string.d.ts ///////////////////////////// interface String { - /** - * Returns a new String consisting of the single UTF-16 code unit located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): string | undefined; + /** + * Returns a new String consisting of the single UTF-16 code unit located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): string | undefined; } ///////////////////////////// // lib.es2023.array.d.ts ///////////////////////////// interface Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S | undefined; - - findLast(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S | undefined; + + findLast(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): number; } interface ReadonlyArray { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: (value: T, index: number, array: readonly T[]) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: (value: T, index: number, array: readonly T[]) => unknown, - thisArg?: any, - ): T | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: (value: T, index: number, array: readonly T[]) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: (value: T, index: number, array: readonly T[]) => unknown, + thisArg?: any, + ): T | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: (value: T, index: number, array: readonly T[]) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: (value: T, index: number, array: readonly T[]) => unknown, + thisArg?: any, + ): number; } interface Int8Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, - ): number | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: (value: number, index: number, array: this) => unknown, + thisArg?: any, + ): number | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: (value: number, index: number, array: this) => unknown, + thisArg?: any, + ): number; } interface Uint8Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, - ): number | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: (value: number, index: number, array: this) => unknown, + thisArg?: any, + ): number | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: (value: number, index: number, array: this) => unknown, + thisArg?: any, + ): number; } interface Uint8ClampedArray { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number; } interface Int16Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, - ): number | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: (value: number, index: number, array: this) => unknown, + thisArg?: any, + ): number | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: (value: number, index: number, array: this) => unknown, + thisArg?: any, + ): number; } interface Uint16Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number; } interface Int32Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, - ): number | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: (value: number, index: number, array: this) => unknown, + thisArg?: any, + ): number | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: (value: number, index: number, array: this) => unknown, + thisArg?: any, + ): number; } interface Uint32Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number; } interface Float32Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number; } interface Float64Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number; } interface BigInt64Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: bigint, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: ( - value: bigint, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): bigint | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: bigint, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: ( + value: bigint, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): bigint | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: ( - value: bigint, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: ( + value: bigint, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number; } interface BigUint64Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: bigint, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: ( - value: bigint, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): bigint | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: bigint, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: ( + value: bigint, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): bigint | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: ( - value: bigint, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: ( + value: bigint, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number; } ///////////////////////////// // lib.es2023.intl.d.ts ///////////////////////////// declare namespace Intl { - type StringNumericLiteral = `${number}` | "Infinity" | "-Infinity" | "+Infinity"; +type StringNumericLiteral = `${number}` | "Infinity" | "-Infinity" | "+Infinity"; - interface NumberFormat { - format(value: number | bigint | StringNumericLiteral): string; +interface NumberFormat { + format(value: number | bigint | StringNumericLiteral): string; - formatToParts(value: number | bigint | StringNumericLiteral): NumberFormatPart[]; - } + formatToParts(value: number | bigint | StringNumericLiteral): NumberFormatPart[]; +} } ///////////////////////////// // lib.es2024.arraybuffer.d.ts ///////////////////////////// interface ArrayBufferConstructor { - new (byteLength: number): ArrayBuffer; + new (byteLength: number): ArrayBuffer; } ///////////////////////////// // lib.es2024.sharedmemory.d.ts ///////////////////////////// interface SharedArrayBufferConstructor { - new (byteLength: number): SharedArrayBuffer; + new (byteLength: number): SharedArrayBuffer; } ///////////////////////////// @@ -5221,177 +5221,177 @@ declare function encodeURI(uri: string): string; declare function encodeURIComponent(uriComponent: string | number | boolean): string; interface Symbol { - /** Returns a string representation of an object. */ - toString(): string; + /** Returns a string representation of an object. */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): symbol; + /** Returns the primitive value of the specified object. */ + valueOf(): symbol; } declare type PropertyKey = string | number | symbol; interface PropertyDescriptor { - configurable?: boolean; + configurable?: boolean; - enumerable?: boolean; + enumerable?: boolean; - value?: any; + value?: any; - writable?: boolean; + writable?: boolean; - get?(): any; + get?(): any; - set?(v: any): void; + set?(v: any): void; } interface PropertyDescriptorMap { - [key: PropertyKey]: PropertyDescriptor; + [key: PropertyKey]: PropertyDescriptor; } interface Object { - /** The initial value of Object.prototype.constructor is the standard built-in Object constructor. */ - constructor: Function; + /** The initial value of Object.prototype.constructor is the standard built-in Object constructor. */ + constructor: Function; - /** Returns a string representation of an object. */ - toString(): string; + /** Returns a string representation of an object. */ + toString(): string; - /** Returns a date converted to a string using the current locale. */ - toLocaleString(): string; + /** Returns a date converted to a string using the current locale. */ + toLocaleString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): Object; + /** Returns the primitive value of the specified object. */ + valueOf(): Object; - /** - * Determines whether an object has a property with the specified name. - * @param v A property name. - */ - hasOwnProperty(v: PropertyKey): boolean; + /** + * Determines whether an object has a property with the specified name. + * @param v A property name. + */ + hasOwnProperty(v: PropertyKey): boolean; - /** - * Determines whether an object exists in another object's prototype chain. - * @param v Another object whose prototype chain is to be checked. - */ - isPrototypeOf(v: Object): boolean; + /** + * Determines whether an object exists in another object's prototype chain. + * @param v Another object whose prototype chain is to be checked. + */ + isPrototypeOf(v: Object): boolean; - /** - * Determines whether a specified property is enumerable. - * @param v A property name. - */ - propertyIsEnumerable(v: PropertyKey): boolean; + /** + * Determines whether a specified property is enumerable. + * @param v A property name. + */ + propertyIsEnumerable(v: PropertyKey): boolean; } interface ObjectConstructor { - new (value?: any): Object; + new (value?: any): Object; - (): any; + (): any; - (value: any): any; + (value: any): any; - /** A reference to the prototype for a class of objects. */ - readonly prototype: Object; + /** A reference to the prototype for a class of objects. */ + readonly prototype: Object; - /** - * Returns the prototype of an object. - * @param o The object that references the prototype. - */ - getPrototypeOf(o: any): any; + /** + * Returns the prototype of an object. + * @param o The object that references the prototype. + */ + getPrototypeOf(o: any): any; - /** - * Gets the own property descriptor of the specified object. - * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype. - * @param o Object that contains the property. - * @param p Name of the property. - */ - getOwnPropertyDescriptor(o: any, p: PropertyKey): PropertyDescriptor | undefined; + /** + * Gets the own property descriptor of the specified object. + * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype. + * @param o Object that contains the property. + * @param p Name of the property. + */ + getOwnPropertyDescriptor(o: any, p: PropertyKey): PropertyDescriptor | undefined; - /** - * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly - * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions. - * @param o Object that contains the own properties. - */ - getOwnPropertyNames(o: any): string[]; + /** + * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly + * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions. + * @param o Object that contains the own properties. + */ + getOwnPropertyNames(o: any): string[]; - /** - * Creates an object that has the specified prototype or that has null prototype. - * @param o Object to use as a prototype. May be null. - */ - create(o: object | null): any; + /** + * Creates an object that has the specified prototype or that has null prototype. + * @param o Object to use as a prototype. May be null. + */ + create(o: object | null): any; - /** - * Creates an object that has the specified prototype, and that optionally contains specified properties. - * @param o Object to use as a prototype. May be null - * @param properties JavaScript object that contains one or more property descriptors. - */ - create(o: object | null, properties: PropertyDescriptorMap & ThisType): any; + /** + * Creates an object that has the specified prototype, and that optionally contains specified properties. + * @param o Object to use as a prototype. May be null + * @param properties JavaScript object that contains one or more property descriptors. + */ + create(o: object | null, properties: PropertyDescriptorMap & ThisType): any; - /** - * Adds a property to an object, or modifies attributes of an existing property. - * @param o Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object. - * @param p The property name. - * @param attributes Descriptor for the property. It can be for a data property or an accessor property. - */ - defineProperty(o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType): T; + /** + * Adds a property to an object, or modifies attributes of an existing property. + * @param o Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object. + * @param p The property name. + * @param attributes Descriptor for the property. It can be for a data property or an accessor property. + */ + defineProperty(o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType): T; - /** - * Adds one or more properties to an object, and/or modifies attributes of existing properties. - * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object. - * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property. - */ - defineProperties(o: T, properties: PropertyDescriptorMap & ThisType): T; + /** + * Adds one or more properties to an object, and/or modifies attributes of existing properties. + * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object. + * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property. + */ + defineProperties(o: T, properties: PropertyDescriptorMap & ThisType): T; - /** - * Prevents the modification of attributes of existing properties, and prevents the addition of new properties. - * @param o Object on which to lock the attributes. - */ - seal(o: T): T; + /** + * Prevents the modification of attributes of existing properties, and prevents the addition of new properties. + * @param o Object on which to lock the attributes. + */ + seal(o: T): T; - /** - * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. - * @param f Object on which to lock the attributes. - */ - freeze(f: T): T; + /** + * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. + * @param f Object on which to lock the attributes. + */ + freeze(f: T): T; - /** - * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. - * @param o Object on which to lock the attributes. - */ - freeze(o: T): Readonly; + /** + * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. + * @param o Object on which to lock the attributes. + */ + freeze(o: T): Readonly; - /** - * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. - * @param o Object on which to lock the attributes. - */ - freeze(o: T): Readonly; + /** + * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. + * @param o Object on which to lock the attributes. + */ + freeze(o: T): Readonly; - /** - * Prevents the addition of new properties to an object. - * @param o Object to make non-extensible. - */ - preventExtensions(o: T): T; + /** + * Prevents the addition of new properties to an object. + * @param o Object to make non-extensible. + */ + preventExtensions(o: T): T; - /** - * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object. - * @param o Object to test. - */ - isSealed(o: any): boolean; + /** + * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object. + * @param o Object to test. + */ + isSealed(o: any): boolean; - /** - * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object. - * @param o Object to test. - */ - isFrozen(o: any): boolean; + /** + * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object. + * @param o Object to test. + */ + isFrozen(o: any): boolean; - /** - * Returns a value that indicates whether new properties can be added to an object. - * @param o Object to test. - */ - isExtensible(o: any): boolean; + /** + * Returns a value that indicates whether new properties can be added to an object. + * @param o Object to test. + */ + isExtensible(o: any): boolean; - /** - * Returns the names of the enumerable string properties and methods of an object. - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - keys(o: object): string[]; + /** + * Returns the names of the enumerable string properties and methods of an object. + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + keys(o: object): string[]; } /** @@ -5403,46 +5403,46 @@ declare var Object: ObjectConstructor; * Creates a new function. */ interface Function { - /** - * Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function. - * @param thisArg The object to be used as the this object. - * @param argArray A set of arguments to be passed to the function. - */ - apply(this: Function, thisArg: any, argArray?: any): any; + /** + * Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function. + * @param thisArg The object to be used as the this object. + * @param argArray A set of arguments to be passed to the function. + */ + apply(this: Function, thisArg: any, argArray?: any): any; - /** - * Calls a method of an object, substituting another object for the current object. - * @param thisArg The object to be used as the current object. - * @param argArray A list of arguments to be passed to the method. - */ - call(this: Function, thisArg: any, ...argArray: any[]): any; + /** + * Calls a method of an object, substituting another object for the current object. + * @param thisArg The object to be used as the current object. + * @param argArray A list of arguments to be passed to the method. + */ + call(this: Function, thisArg: any, ...argArray: any[]): any; - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg An object to which the this keyword can refer inside the new function. - * @param argArray A list of arguments to be passed to the new function. - */ - bind(this: Function, thisArg: any, ...argArray: any[]): any; + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg An object to which the this keyword can refer inside the new function. + * @param argArray A list of arguments to be passed to the new function. + */ + bind(this: Function, thisArg: any, ...argArray: any[]): any; - /** Returns a string representation of a function. */ - toString(): string; + /** Returns a string representation of a function. */ + toString(): string; - prototype: any; + prototype: any; - readonly length: number; + readonly length: number; } interface FunctionConstructor { - /** - * Creates a new function. - * @param args A list of arguments the function accepts. - */ - new (...args: string[]): Function; + /** + * Creates a new function. + * @param args A list of arguments the function accepts. + */ + new (...args: string[]): Function; - (...args: string[]): Function; + (...args: string[]): Function; - readonly prototype: Function; + readonly prototype: Function; } declare var Function: FunctionConstructor; @@ -5458,208 +5458,208 @@ type ThisParameterType = T extends (this: infer U, ...args: never) => any ? U type OmitThisParameter = unknown extends ThisParameterType ? T : T extends (...args: infer A) => infer R ? (...args: A) => R : T; interface CallableFunction extends Function { - /** - * Calls the function with the specified object as the this value and the elements of specified array as the arguments. - * @param thisArg The object to be used as the this object. - */ - apply(this: (this: T) => R, thisArg: T): R; + /** + * Calls the function with the specified object as the this value and the elements of specified array as the arguments. + * @param thisArg The object to be used as the this object. + */ + apply(this: (this: T) => R, thisArg: T): R; - /** - * Calls the function with the specified object as the this value and the elements of specified array as the arguments. - * @param thisArg The object to be used as the this object. - * @param args An array of argument values to be passed to the function. - */ - apply(this: (this: T, ...args: A) => R, thisArg: T, args: A): R; + /** + * Calls the function with the specified object as the this value and the elements of specified array as the arguments. + * @param thisArg The object to be used as the this object. + * @param args An array of argument values to be passed to the function. + */ + apply(this: (this: T, ...args: A) => R, thisArg: T, args: A): R; - /** - * Calls the function with the specified object as the this value and the specified rest arguments as the arguments. - * @param thisArg The object to be used as the this object. - * @param args Argument values to be passed to the function. - */ - call(this: (this: T, ...args: A) => R, thisArg: T, ...args: A): R; + /** + * Calls the function with the specified object as the this value and the specified rest arguments as the arguments. + * @param thisArg The object to be used as the this object. + * @param args Argument values to be passed to the function. + */ + call(this: (this: T, ...args: A) => R, thisArg: T, ...args: A): R; - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg The object to be used as the this object. - */ - bind(this: T, thisArg: ThisParameterType): OmitThisParameter; + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg The object to be used as the this object. + */ + bind(this: T, thisArg: ThisParameterType): OmitThisParameter; - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg The object to be used as the this object. - * @param args Arguments to bind to the parameters of the function. - */ - bind(this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg The object to be used as the this object. + * @param args Arguments to bind to the parameters of the function. + */ + bind(this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } interface NewableFunction extends Function { - /** - * Calls the function with the specified object as the this value and the elements of specified array as the arguments. - * @param thisArg The object to be used as the this object. - */ - apply(this: new () => T, thisArg: T): void; + /** + * Calls the function with the specified object as the this value and the elements of specified array as the arguments. + * @param thisArg The object to be used as the this object. + */ + apply(this: new () => T, thisArg: T): void; - /** - * Calls the function with the specified object as the this value and the elements of specified array as the arguments. - * @param thisArg The object to be used as the this object. - * @param args An array of argument values to be passed to the function. - */ - apply(this: new (...args: A) => T, thisArg: T, args: A): void; + /** + * Calls the function with the specified object as the this value and the elements of specified array as the arguments. + * @param thisArg The object to be used as the this object. + * @param args An array of argument values to be passed to the function. + */ + apply(this: new (...args: A) => T, thisArg: T, args: A): void; - /** - * Calls the function with the specified object as the this value and the specified rest arguments as the arguments. - * @param thisArg The object to be used as the this object. - * @param args Argument values to be passed to the function. - */ - call(this: new (...args: A) => T, thisArg: T, ...args: A): void; + /** + * Calls the function with the specified object as the this value and the specified rest arguments as the arguments. + * @param thisArg The object to be used as the this object. + * @param args Argument values to be passed to the function. + */ + call(this: new (...args: A) => T, thisArg: T, ...args: A): void; - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg The object to be used as the this object. - */ - bind(this: T, thisArg: any): T; + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg The object to be used as the this object. + */ + bind(this: T, thisArg: any): T; - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg The object to be used as the this object. - * @param args Arguments to bind to the parameters of the function. - */ - bind(this: new (...args: [...A, ...B]) => R, thisArg: any, ...args: A): new (...args: B) => R; + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg The object to be used as the this object. + * @param args Arguments to bind to the parameters of the function. + */ + bind(this: new (...args: [...A, ...B]) => R, thisArg: any, ...args: A): new (...args: B) => R; } interface IArguments { - [index: number]: any; + [index: number]: any; - length: number; + length: number; } interface String { - /** Returns a string representation of a string. */ - toString(): string; + /** Returns a string representation of a string. */ + toString(): string; - /** - * Returns the character at the specified index. - * @param pos The zero-based index of the desired character. - */ - charAt(pos: number): string; + /** + * Returns the character at the specified index. + * @param pos The zero-based index of the desired character. + */ + charAt(pos: number): string; - /** - * Returns the Unicode value of the character at the specified location, or NaN if the index is out of bounds. - * @param index The zero-based index of the desired character. - */ - charCodeAt(index: number): number; + /** + * Returns the Unicode value of the character at the specified location, or NaN if the index is out of bounds. + * @param index The zero-based index of the desired character. + */ + charCodeAt(index: number): number; - /** - * Returns a string that contains the concatenation of two or more strings. - * @param strings The strings to append to the end of the string. - */ - concat(...strings: string[]): string; + /** + * Returns a string that contains the concatenation of two or more strings. + * @param strings The strings to append to the end of the string. + */ + concat(...strings: string[]): string; - /** - * Returns the position of the first occurrence of a substring, or -1 if it is not present. - * @param searchString The substring to search for in the string - * @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string. - */ - indexOf(searchString: string, position?: number): number; + /** + * Returns the position of the first occurrence of a substring, or -1 if it is not present. + * @param searchString The substring to search for in the string + * @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string. + */ + indexOf(searchString: string, position?: number): number; - /** - * Returns the last occurrence of a substring in the string, or -1 if it is not present. - * @param searchString The substring to search for. - * @param position The index at which to begin searching. If omitted, the search begins at the end of the string. - */ - lastIndexOf(searchString: string, position?: number): number; + /** + * Returns the last occurrence of a substring in the string, or -1 if it is not present. + * @param searchString The substring to search for. + * @param position The index at which to begin searching. If omitted, the search begins at the end of the string. + */ + lastIndexOf(searchString: string, position?: number): number; - /** - * Determines whether two strings are equivalent in the current locale. - * @param that String to compare to target string - */ - localeCompare(that: string): number; + /** + * Determines whether two strings are equivalent in the current locale. + * @param that String to compare to target string + */ + localeCompare(that: string): number; - /** - * Matches a string with a regular expression, and returns an array containing the results of that search. - * @param regexp A variable name or string literal containing the regular expression pattern and flags. - */ - match(regexp: string | RegExp): RegExpMatchArray | null; + /** + * Matches a string with a regular expression, and returns an array containing the results of that search. + * @param regexp A variable name or string literal containing the regular expression pattern and flags. + */ + match(regexp: string | RegExp): RegExpMatchArray | null; - /** - * Replaces text in a string, using a regular expression or search string. - * @param searchValue A string or regular expression to search for. - * @param replaceValue A string containing the text to replace. When the {@linkcode searchValue} is a `RegExp`, all matches are replaced if the `g` flag is set (or only those matches at the beginning, if the `y` flag is also present). Otherwise, only the first match of {@linkcode searchValue} is replaced. - */ - replace(searchValue: string | RegExp, replaceValue: string): string; + /** + * Replaces text in a string, using a regular expression or search string. + * @param searchValue A string or regular expression to search for. + * @param replaceValue A string containing the text to replace. When the {@linkcode searchValue} is a `RegExp`, all matches are replaced if the `g` flag is set (or only those matches at the beginning, if the `y` flag is also present). Otherwise, only the first match of {@linkcode searchValue} is replaced. + */ + replace(searchValue: string | RegExp, replaceValue: string): string; - /** - * Replaces text in a string, using a regular expression or search string. - * @param searchValue A string to search for. - * @param replacer A function that returns the replacement text. - */ - replace(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; + /** + * Replaces text in a string, using a regular expression or search string. + * @param searchValue A string to search for. + * @param replacer A function that returns the replacement text. + */ + replace(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; - /** - * Finds the first substring match in a regular expression search. - * @param regexp The regular expression pattern and applicable flags. - */ - search(regexp: string | RegExp): number; + /** + * Finds the first substring match in a regular expression search. + * @param regexp The regular expression pattern and applicable flags. + */ + search(regexp: string | RegExp): number; - /** - * Returns a section of a string. - * @param start The index to the beginning of the specified portion of stringObj. - * @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end. - * If this value is not specified, the substring continues to the end of stringObj. - */ - slice(start?: number, end?: number): string; + /** + * Returns a section of a string. + * @param start The index to the beginning of the specified portion of stringObj. + * @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end. + * If this value is not specified, the substring continues to the end of stringObj. + */ + slice(start?: number, end?: number): string; - /** - * Split a string into substrings using the specified separator and return them as an array. - * @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned. - * @param limit A value used to limit the number of elements returned in the array. - */ - split(separator: string | RegExp, limit?: number): string[]; + /** + * Split a string into substrings using the specified separator and return them as an array. + * @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned. + * @param limit A value used to limit the number of elements returned in the array. + */ + split(separator: string | RegExp, limit?: number): string[]; - /** - * Returns the substring at the specified location within a String object. - * @param start The zero-based index number indicating the beginning of the substring. - * @param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end. - * If end is omitted, the characters from start through the end of the original string are returned. - */ - substring(start: number, end?: number): string; + /** + * Returns the substring at the specified location within a String object. + * @param start The zero-based index number indicating the beginning of the substring. + * @param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end. + * If end is omitted, the characters from start through the end of the original string are returned. + */ + substring(start: number, end?: number): string; - /** Converts all the alphabetic characters in a string to lowercase. */ - toLowerCase(): string; + /** Converts all the alphabetic characters in a string to lowercase. */ + toLowerCase(): string; - /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */ - toLocaleLowerCase(locales?: string | string[]): string; + /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */ + toLocaleLowerCase(locales?: string | string[]): string; - /** Converts all the alphabetic characters in a string to uppercase. */ - toUpperCase(): string; + /** Converts all the alphabetic characters in a string to uppercase. */ + toUpperCase(): string; - /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */ - toLocaleUpperCase(locales?: string | string[]): string; + /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */ + toLocaleUpperCase(locales?: string | string[]): string; - /** Removes the leading and trailing white space and line terminator characters from a string. */ - trim(): string; + /** Removes the leading and trailing white space and line terminator characters from a string. */ + trim(): string; - /** Returns the length of a String object. */ - readonly length: number; + /** Returns the length of a String object. */ + readonly length: number; - /** Returns the primitive value of the specified object. */ - valueOf(): string; + /** Returns the primitive value of the specified object. */ + valueOf(): string; - readonly [index: number]: string; + readonly [index: number]: string; } interface StringConstructor { - new (value?: any): String; + new (value?: any): String; - (value?: any): string; + (value?: any): string; - readonly prototype: String; + readonly prototype: String; - fromCharCode(...codes: number[]): string; + fromCharCode(...codes: number[]): string; } /** @@ -5668,220 +5668,220 @@ interface StringConstructor { declare var String: StringConstructor; interface Boolean { - /** Returns the primitive value of the specified object. */ - valueOf(): boolean; + /** Returns the primitive value of the specified object. */ + valueOf(): boolean; } interface BooleanConstructor { - new (value?: any): Boolean; + new (value?: any): Boolean; - (value?: T): boolean; + (value?: T): boolean; - readonly prototype: Boolean; + readonly prototype: Boolean; } declare var Boolean: BooleanConstructor; interface Number { - /** - * Returns a string representation of an object. - * @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers. - */ - toString(radix?: number): string; + /** + * Returns a string representation of an object. + * @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers. + */ + toString(radix?: number): string; - /** - * Returns a string representing a number in fixed-point notation. - * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 100, inclusive. - */ - toFixed(fractionDigits?: number): string; + /** + * Returns a string representing a number in fixed-point notation. + * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 100, inclusive. + */ + toFixed(fractionDigits?: number): string; - /** - * Returns a string containing a number represented in exponential notation. - * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 100, inclusive. - */ - toExponential(fractionDigits?: number): string; + /** + * Returns a string containing a number represented in exponential notation. + * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 100, inclusive. + */ + toExponential(fractionDigits?: number): string; - /** - * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits. - * @param precision Number of significant digits. Must be in the range 1 - 100, inclusive. - */ - toPrecision(precision?: number): string; + /** + * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits. + * @param precision Number of significant digits. Must be in the range 1 - 100, inclusive. + */ + toPrecision(precision?: number): string; - /** Returns the primitive value of the specified object. */ - valueOf(): number; + /** Returns the primitive value of the specified object. */ + valueOf(): number; } interface NumberConstructor { - new (value?: any): Number; + new (value?: any): Number; - (value?: any): number; + (value?: any): number; - readonly prototype: Number; + readonly prototype: Number; - /** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */ - readonly MAX_VALUE: number; + /** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */ + readonly MAX_VALUE: number; - /** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */ - readonly MIN_VALUE: number; + /** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */ + readonly MIN_VALUE: number; - /** - * A value that is not a number. - * In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function. - */ - readonly NaN: number; + /** + * A value that is not a number. + * In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function. + */ + readonly NaN: number; - /** - * A value that is less than the largest negative number that can be represented in JavaScript. - * JavaScript displays NEGATIVE_INFINITY values as -infinity. - */ - readonly NEGATIVE_INFINITY: number; + /** + * A value that is less than the largest negative number that can be represented in JavaScript. + * JavaScript displays NEGATIVE_INFINITY values as -infinity. + */ + readonly NEGATIVE_INFINITY: number; - /** - * A value greater than the largest number that can be represented in JavaScript. - * JavaScript displays POSITIVE_INFINITY values as infinity. - */ - readonly POSITIVE_INFINITY: number; + /** + * A value greater than the largest number that can be represented in JavaScript. + * JavaScript displays POSITIVE_INFINITY values as infinity. + */ + readonly POSITIVE_INFINITY: number; } /** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */ declare var Number: NumberConstructor; interface TemplateStringsArray extends ReadonlyArray { - readonly raw: readonly string[]; + readonly raw: readonly string[]; } interface Math { - /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */ - readonly E: number; + /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */ + readonly E: number; - /** The natural logarithm of 10. */ - readonly LN10: number; + /** The natural logarithm of 10. */ + readonly LN10: number; - /** The natural logarithm of 2. */ - readonly LN2: number; + /** The natural logarithm of 2. */ + readonly LN2: number; - /** The base-2 logarithm of e. */ - readonly LOG2E: number; + /** The base-2 logarithm of e. */ + readonly LOG2E: number; - /** The base-10 logarithm of e. */ - readonly LOG10E: number; + /** The base-10 logarithm of e. */ + readonly LOG10E: number; - /** Pi. This is the ratio of the circumference of a circle to its diameter. */ - readonly PI: number; + /** Pi. This is the ratio of the circumference of a circle to its diameter. */ + readonly PI: number; - /** The square root of 0.5, or, equivalently, one divided by the square root of 2. */ - readonly SQRT1_2: number; + /** The square root of 0.5, or, equivalently, one divided by the square root of 2. */ + readonly SQRT1_2: number; - /** The square root of 2. */ - readonly SQRT2: number; + /** The square root of 2. */ + readonly SQRT2: number; - /** - * Returns the absolute value of a number (the value without regard to whether it is positive or negative). - * For example, the absolute value of -5 is the same as the absolute value of 5. - * @param x A numeric expression for which the absolute value is needed. - */ - abs(x: number): number; + /** + * Returns the absolute value of a number (the value without regard to whether it is positive or negative). + * For example, the absolute value of -5 is the same as the absolute value of 5. + * @param x A numeric expression for which the absolute value is needed. + */ + abs(x: number): number; - /** - * Returns the arc cosine (or inverse cosine) of a number. - * @param x A numeric expression. - */ - acos(x: number): number; + /** + * Returns the arc cosine (or inverse cosine) of a number. + * @param x A numeric expression. + */ + acos(x: number): number; - /** - * Returns the arcsine of a number. - * @param x A numeric expression. - */ - asin(x: number): number; + /** + * Returns the arcsine of a number. + * @param x A numeric expression. + */ + asin(x: number): number; - /** - * Returns the arctangent of a number. - * @param x A numeric expression for which the arctangent is needed. - */ - atan(x: number): number; + /** + * Returns the arctangent of a number. + * @param x A numeric expression for which the arctangent is needed. + */ + atan(x: number): number; - /** - * Returns the angle (in radians) between the X axis and the line going through both the origin and the given point. - * @param y A numeric expression representing the cartesian y-coordinate. - * @param x A numeric expression representing the cartesian x-coordinate. - */ - atan2(y: number, x: number): number; + /** + * Returns the angle (in radians) between the X axis and the line going through both the origin and the given point. + * @param y A numeric expression representing the cartesian y-coordinate. + * @param x A numeric expression representing the cartesian x-coordinate. + */ + atan2(y: number, x: number): number; - /** - * Returns the smallest integer greater than or equal to its numeric argument. - * @param x A numeric expression. - */ - ceil(x: number): number; + /** + * Returns the smallest integer greater than or equal to its numeric argument. + * @param x A numeric expression. + */ + ceil(x: number): number; - /** - * Returns the cosine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - cos(x: number): number; + /** + * Returns the cosine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + cos(x: number): number; - /** - * Returns e (the base of natural logarithms) raised to a power. - * @param x A numeric expression representing the power of e. - */ - exp(x: number): number; + /** + * Returns e (the base of natural logarithms) raised to a power. + * @param x A numeric expression representing the power of e. + */ + exp(x: number): number; - /** - * Returns the greatest integer less than or equal to its numeric argument. - * @param x A numeric expression. - */ - floor(x: number): number; + /** + * Returns the greatest integer less than or equal to its numeric argument. + * @param x A numeric expression. + */ + floor(x: number): number; - /** - * Returns the natural logarithm (base e) of a number. - * @param x A numeric expression. - */ - log(x: number): number; + /** + * Returns the natural logarithm (base e) of a number. + * @param x A numeric expression. + */ + log(x: number): number; - /** - * Returns the larger of a set of supplied numeric expressions. - * @param values Numeric expressions to be evaluated. - */ - max(...values: number[]): number; + /** + * Returns the larger of a set of supplied numeric expressions. + * @param values Numeric expressions to be evaluated. + */ + max(...values: number[]): number; - /** - * Returns the smaller of a set of supplied numeric expressions. - * @param values Numeric expressions to be evaluated. - */ - min(...values: number[]): number; + /** + * Returns the smaller of a set of supplied numeric expressions. + * @param values Numeric expressions to be evaluated. + */ + min(...values: number[]): number; - /** - * Returns the value of a base expression taken to a specified power. - * @param x The base value of the expression. - * @param y The exponent value of the expression. - */ - pow(x: number, y: number): number; + /** + * Returns the value of a base expression taken to a specified power. + * @param x The base value of the expression. + * @param y The exponent value of the expression. + */ + pow(x: number, y: number): number; - /** Returns a pseudorandom number between 0 and 1. */ - random(): number; + /** Returns a pseudorandom number between 0 and 1. */ + random(): number; - /** - * Returns a supplied numeric expression rounded to the nearest integer. - * @param x The value to be rounded to the nearest integer. - */ - round(x: number): number; + /** + * Returns a supplied numeric expression rounded to the nearest integer. + * @param x The value to be rounded to the nearest integer. + */ + round(x: number): number; - /** - * Returns the sine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - sin(x: number): number; + /** + * Returns the sine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + sin(x: number): number; - /** - * Returns the square root of a number. - * @param x A numeric expression. - */ - sqrt(x: number): number; + /** + * Returns the square root of a number. + * @param x A numeric expression. + */ + sqrt(x: number): number; - /** - * Returns the tangent of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - tan(x: number): number; + /** + * Returns the tangent of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + tan(x: number): number; } /** An intrinsic object that provides basic mathematics functionality and constants. */ @@ -5889,334 +5889,334 @@ declare var Math: Math; /** Enables basic storage and retrieval of dates and times. */ interface Date { - /** Returns a string representation of a date. The format of the string depends on the locale. */ - toString(): string; + /** Returns a string representation of a date. The format of the string depends on the locale. */ + toString(): string; - /** Returns a date as a string value. */ - toDateString(): string; + /** Returns a date as a string value. */ + toDateString(): string; - /** Returns a time as a string value. */ - toTimeString(): string; + /** Returns a time as a string value. */ + toTimeString(): string; - /** Returns a value as a string value appropriate to the host environment's current locale. */ - toLocaleString(): string; + /** Returns a value as a string value appropriate to the host environment's current locale. */ + toLocaleString(): string; - /** Returns a date as a string value appropriate to the host environment's current locale. */ - toLocaleDateString(): string; + /** Returns a date as a string value appropriate to the host environment's current locale. */ + toLocaleDateString(): string; - /** Returns a time as a string value appropriate to the host environment's current locale. */ - toLocaleTimeString(): string; + /** Returns a time as a string value appropriate to the host environment's current locale. */ + toLocaleTimeString(): string; - /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */ - valueOf(): number; + /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */ + valueOf(): number; - /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */ - getTime(): number; + /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */ + getTime(): number; - /** Gets the year, using local time. */ - getFullYear(): number; + /** Gets the year, using local time. */ + getFullYear(): number; - /** Gets the year using Universal Coordinated Time (UTC). */ - getUTCFullYear(): number; + /** Gets the year using Universal Coordinated Time (UTC). */ + getUTCFullYear(): number; - /** Gets the month, using local time. */ - getMonth(): number; + /** Gets the month, using local time. */ + getMonth(): number; - /** Gets the month of a Date object using Universal Coordinated Time (UTC). */ - getUTCMonth(): number; + /** Gets the month of a Date object using Universal Coordinated Time (UTC). */ + getUTCMonth(): number; - /** Gets the day-of-the-month, using local time. */ - getDate(): number; + /** Gets the day-of-the-month, using local time. */ + getDate(): number; - /** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */ - getUTCDate(): number; + /** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */ + getUTCDate(): number; - /** Gets the day of the week, using local time. */ - getDay(): number; + /** Gets the day of the week, using local time. */ + getDay(): number; - /** Gets the day of the week using Universal Coordinated Time (UTC). */ - getUTCDay(): number; + /** Gets the day of the week using Universal Coordinated Time (UTC). */ + getUTCDay(): number; - /** Gets the hours in a date, using local time. */ - getHours(): number; + /** Gets the hours in a date, using local time. */ + getHours(): number; - /** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */ - getUTCHours(): number; + /** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */ + getUTCHours(): number; - /** Gets the minutes of a Date object, using local time. */ - getMinutes(): number; + /** Gets the minutes of a Date object, using local time. */ + getMinutes(): number; - /** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */ - getUTCMinutes(): number; + /** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */ + getUTCMinutes(): number; - /** Gets the seconds of a Date object, using local time. */ - getSeconds(): number; + /** Gets the seconds of a Date object, using local time. */ + getSeconds(): number; - /** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */ - getUTCSeconds(): number; + /** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */ + getUTCSeconds(): number; - /** Gets the milliseconds of a Date, using local time. */ - getMilliseconds(): number; + /** Gets the milliseconds of a Date, using local time. */ + getMilliseconds(): number; - /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */ - getUTCMilliseconds(): number; + /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */ + getUTCMilliseconds(): number; - /** Gets the difference in minutes between Universal Coordinated Time (UTC) and the time on the local computer. */ - getTimezoneOffset(): number; + /** Gets the difference in minutes between Universal Coordinated Time (UTC) and the time on the local computer. */ + getTimezoneOffset(): number; - /** - * Sets the date and time value in the Date object. - * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT. - */ - setTime(time: number): number; + /** + * Sets the date and time value in the Date object. + * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT. + */ + setTime(time: number): number; - /** - * Sets the milliseconds value in the Date object using local time. - * @param ms A numeric value equal to the millisecond value. - */ - setMilliseconds(ms: number): number; + /** + * Sets the milliseconds value in the Date object using local time. + * @param ms A numeric value equal to the millisecond value. + */ + setMilliseconds(ms: number): number; - /** - * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC). - * @param ms A numeric value equal to the millisecond value. - */ - setUTCMilliseconds(ms: number): number; + /** + * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC). + * @param ms A numeric value equal to the millisecond value. + */ + setUTCMilliseconds(ms: number): number; - /** - * Sets the seconds value in the Date object using local time. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setSeconds(sec: number, ms?: number): number; + /** + * Sets the seconds value in the Date object using local time. + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setSeconds(sec: number, ms?: number): number; - /** - * Sets the seconds value in the Date object using Universal Coordinated Time (UTC). - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setUTCSeconds(sec: number, ms?: number): number; + /** + * Sets the seconds value in the Date object using Universal Coordinated Time (UTC). + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setUTCSeconds(sec: number, ms?: number): number; - /** - * Sets the minutes value in the Date object using local time. - * @param min A numeric value equal to the minutes value. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setMinutes(min: number, sec?: number, ms?: number): number; + /** + * Sets the minutes value in the Date object using local time. + * @param min A numeric value equal to the minutes value. + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setMinutes(min: number, sec?: number, ms?: number): number; - /** - * Sets the minutes value in the Date object using Universal Coordinated Time (UTC). - * @param min A numeric value equal to the minutes value. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setUTCMinutes(min: number, sec?: number, ms?: number): number; + /** + * Sets the minutes value in the Date object using Universal Coordinated Time (UTC). + * @param min A numeric value equal to the minutes value. + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setUTCMinutes(min: number, sec?: number, ms?: number): number; - /** - * Sets the hour value in the Date object using local time. - * @param hours A numeric value equal to the hours value. - * @param min A numeric value equal to the minutes value. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setHours(hours: number, min?: number, sec?: number, ms?: number): number; + /** + * Sets the hour value in the Date object using local time. + * @param hours A numeric value equal to the hours value. + * @param min A numeric value equal to the minutes value. + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setHours(hours: number, min?: number, sec?: number, ms?: number): number; - /** - * Sets the hours value in the Date object using Universal Coordinated Time (UTC). - * @param hours A numeric value equal to the hours value. - * @param min A numeric value equal to the minutes value. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number; + /** + * Sets the hours value in the Date object using Universal Coordinated Time (UTC). + * @param hours A numeric value equal to the hours value. + * @param min A numeric value equal to the minutes value. + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number; - /** - * Sets the numeric day-of-the-month value of the Date object using local time. - * @param date A numeric value equal to the day of the month. - */ - setDate(date: number): number; + /** + * Sets the numeric day-of-the-month value of the Date object using local time. + * @param date A numeric value equal to the day of the month. + */ + setDate(date: number): number; - /** - * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC). - * @param date A numeric value equal to the day of the month. - */ - setUTCDate(date: number): number; + /** + * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC). + * @param date A numeric value equal to the day of the month. + */ + setUTCDate(date: number): number; - /** - * Sets the month value in the Date object using local time. - * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. - * @param date A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used. - */ - setMonth(month: number, date?: number): number; + /** + * Sets the month value in the Date object using local time. + * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. + * @param date A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used. + */ + setMonth(month: number, date?: number): number; - /** - * Sets the month value in the Date object using Universal Coordinated Time (UTC). - * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. - * @param date A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used. - */ - setUTCMonth(month: number, date?: number): number; + /** + * Sets the month value in the Date object using Universal Coordinated Time (UTC). + * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. + * @param date A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used. + */ + setUTCMonth(month: number, date?: number): number; - /** - * Sets the year of the Date object using local time. - * @param year A numeric value for the year. - * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified. - * @param date A numeric value equal for the day of the month. - */ - setFullYear(year: number, month?: number, date?: number): number; + /** + * Sets the year of the Date object using local time. + * @param year A numeric value for the year. + * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified. + * @param date A numeric value equal for the day of the month. + */ + setFullYear(year: number, month?: number, date?: number): number; - /** - * Sets the year value in the Date object using Universal Coordinated Time (UTC). - * @param year A numeric value equal to the year. - * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied. - * @param date A numeric value equal to the day of the month. - */ - setUTCFullYear(year: number, month?: number, date?: number): number; + /** + * Sets the year value in the Date object using Universal Coordinated Time (UTC). + * @param year A numeric value equal to the year. + * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied. + * @param date A numeric value equal to the day of the month. + */ + setUTCFullYear(year: number, month?: number, date?: number): number; - /** Returns a date converted to a string using Universal Coordinated Time (UTC). */ - toUTCString(): string; + /** Returns a date converted to a string using Universal Coordinated Time (UTC). */ + toUTCString(): string; - /** Returns a date as a string value in ISO format. */ - toISOString(): string; + /** Returns a date as a string value in ISO format. */ + toISOString(): string; - /** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */ - toJSON(key?: any): string; + /** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */ + toJSON(key?: any): string; } interface DateConstructor { - new (): Date; + new (): Date; - new (value: number | string): Date; + new (value: number | string): Date; - /** - * Creates a new Date. - * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. - * @param monthIndex The month as a number between 0 and 11 (January to December). - * @param date The date as a number between 1 and 31. - * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. - * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. - * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. - * @param ms A number from 0 to 999 that specifies the milliseconds. - */ - new (year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; + /** + * Creates a new Date. + * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. + * @param monthIndex The month as a number between 0 and 11 (January to December). + * @param date The date as a number between 1 and 31. + * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. + * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. + * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. + * @param ms A number from 0 to 999 that specifies the milliseconds. + */ + new (year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; - (): string; + (): string; - readonly prototype: Date; + readonly prototype: Date; - /** - * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970. - * @param s A date string - */ - parse(s: string): number; + /** + * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970. + * @param s A date string + */ + parse(s: string): number; - /** - * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. - * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. - * @param monthIndex The month as a number between 0 and 11 (January to December). - * @param date The date as a number between 1 and 31. - * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. - * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. - * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. - * @param ms A number from 0 to 999 that specifies the milliseconds. - */ - UTC(year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; + /** + * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. + * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. + * @param monthIndex The month as a number between 0 and 11 (January to December). + * @param date The date as a number between 1 and 31. + * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. + * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. + * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. + * @param ms A number from 0 to 999 that specifies the milliseconds. + */ + UTC(year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; - /** Returns the number of milliseconds elapsed since midnight, January 1, 1970 Universal Coordinated Time (UTC). */ - now(): number; + /** Returns the number of milliseconds elapsed since midnight, January 1, 1970 Universal Coordinated Time (UTC). */ + now(): number; } declare var Date: DateConstructor; interface RegExpMatchArray extends Array { - /** - * The index of the search at which the result was found. - */ - index?: number; + /** + * The index of the search at which the result was found. + */ + index?: number; - /** - * A copy of the search string. - */ - input?: string; + /** + * A copy of the search string. + */ + input?: string; - /** - * The first match. This will always be present because `null` will be returned if there are no matches. - */ - 0: string; + /** + * The first match. This will always be present because `null` will be returned if there are no matches. + */ + 0: string; } interface RegExpExecArray extends Array { - /** - * The index of the search at which the result was found. - */ - index: number; + /** + * The index of the search at which the result was found. + */ + index: number; - /** - * A copy of the search string. - */ - input: string; + /** + * A copy of the search string. + */ + input: string; - /** - * The first match. This will always be present because `null` will be returned if there are no matches. - */ - 0: string; + /** + * The first match. This will always be present because `null` will be returned if there are no matches. + */ + 0: string; } interface RegExp { - /** - * Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search. - * @param string The String object or string literal on which to perform the search. - */ - exec(string: string): RegExpExecArray | null; + /** + * Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search. + * @param string The String object or string literal on which to perform the search. + */ + exec(string: string): RegExpExecArray | null; - /** - * Returns a Boolean value that indicates whether or not a pattern exists in a searched string. - * @param string String on which to perform the search. - */ - test(string: string): boolean; + /** + * Returns a Boolean value that indicates whether or not a pattern exists in a searched string. + * @param string String on which to perform the search. + */ + test(string: string): boolean; - /** Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. */ - readonly source: string; + /** Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. */ + readonly source: string; - /** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */ - readonly global: boolean; + /** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */ + readonly global: boolean; - /** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */ - readonly ignoreCase: boolean; + /** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */ + readonly ignoreCase: boolean; - /** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */ - readonly multiline: boolean; + /** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */ + readonly multiline: boolean; - lastIndex: number; + lastIndex: number; } interface RegExpConstructor { - new (pattern: RegExp | string): RegExp; + new (pattern: RegExp | string): RegExp; - new (pattern: string, flags?: string): RegExp; + new (pattern: string, flags?: string): RegExp; - (pattern: RegExp | string): RegExp; + (pattern: RegExp | string): RegExp; - (pattern: string, flags?: string): RegExp; + (pattern: string, flags?: string): RegExp; - readonly "prototype": RegExp; + readonly "prototype": RegExp; } declare var RegExp: RegExpConstructor; interface Error { - name: string; + name: string; - message: string; + message: string; - stack?: string; + stack?: string; } interface ErrorConstructor { - new (message?: string): Error; + new (message?: string): Error; - (message?: string): Error; + (message?: string): Error; - readonly prototype: Error; + readonly prototype: Error; } declare var Error: ErrorConstructor; @@ -6225,11 +6225,11 @@ interface EvalError extends Error { } interface EvalErrorConstructor extends ErrorConstructor { - new (message?: string): EvalError; + new (message?: string): EvalError; - (message?: string): EvalError; + (message?: string): EvalError; - readonly prototype: EvalError; + readonly prototype: EvalError; } declare var EvalError: EvalErrorConstructor; @@ -6238,11 +6238,11 @@ interface RangeError extends Error { } interface RangeErrorConstructor extends ErrorConstructor { - new (message?: string): RangeError; + new (message?: string): RangeError; - (message?: string): RangeError; + (message?: string): RangeError; - readonly prototype: RangeError; + readonly prototype: RangeError; } declare var RangeError: RangeErrorConstructor; @@ -6251,11 +6251,11 @@ interface ReferenceError extends Error { } interface ReferenceErrorConstructor extends ErrorConstructor { - new (message?: string): ReferenceError; + new (message?: string): ReferenceError; - (message?: string): ReferenceError; + (message?: string): ReferenceError; - readonly prototype: ReferenceError; + readonly prototype: ReferenceError; } declare var ReferenceError: ReferenceErrorConstructor; @@ -6264,11 +6264,11 @@ interface SyntaxError extends Error { } interface SyntaxErrorConstructor extends ErrorConstructor { - new (message?: string): SyntaxError; + new (message?: string): SyntaxError; - (message?: string): SyntaxError; + (message?: string): SyntaxError; - readonly prototype: SyntaxError; + readonly prototype: SyntaxError; } declare var SyntaxError: SyntaxErrorConstructor; @@ -6277,11 +6277,11 @@ interface TypeError extends Error { } interface TypeErrorConstructor extends ErrorConstructor { - new (message?: string): TypeError; + new (message?: string): TypeError; - (message?: string): TypeError; + (message?: string): TypeError; - readonly prototype: TypeError; + readonly prototype: TypeError; } declare var TypeError: TypeErrorConstructor; @@ -6290,42 +6290,42 @@ interface URIError extends Error { } interface URIErrorConstructor extends ErrorConstructor { - new (message?: string): URIError; + new (message?: string): URIError; - (message?: string): URIError; + (message?: string): URIError; - readonly prototype: URIError; + readonly prototype: URIError; } declare var URIError: URIErrorConstructor; interface JSON { - /** - * Converts a JavaScript Object Notation (JSON) string into an object. - * @param text A valid JSON string. - * @param reviver A function that transforms the results. This function is called for each member of the object. - * If a member contains nested objects, the nested objects are transformed before the parent object is. - * @throws {SyntaxError} If `text` is not valid JSON. - */ - parse(text: string, reviver?: (this: any, key: string, value: any) => any): any; + /** + * Converts a JavaScript Object Notation (JSON) string into an object. + * @param text A valid JSON string. + * @param reviver A function that transforms the results. This function is called for each member of the object. + * If a member contains nested objects, the nested objects are transformed before the parent object is. + * @throws {SyntaxError} If `text` is not valid JSON. + */ + parse(text: string, reviver?: (this: any, key: string, value: any) => any): any; - /** - * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. - * @param value A JavaScript value, usually an object or array, to be converted. - * @param replacer A function that transforms the results. - * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. - * @throws {TypeError} If a circular reference or a BigInt value is found. - */ - stringify(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string; + /** + * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. + * @param value A JavaScript value, usually an object or array, to be converted. + * @param replacer A function that transforms the results. + * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. + * @throws {TypeError} If a circular reference or a BigInt value is found. + */ + stringify(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string; - /** - * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. - * @param value A JavaScript value, usually an object or array, to be converted. - * @param replacer An array of strings and numbers that acts as an approved list for selecting the object properties that will be stringified. - * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. - * @throws {TypeError} If a circular reference or a BigInt value is found. - */ - stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string; + /** + * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. + * @param value A JavaScript value, usually an object or array, to be converted. + * @param replacer An array of strings and numbers that acts as an approved list for selecting the object properties that will be stringified. + * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. + * @throws {TypeError} If a circular reference or a BigInt value is found. + */ + stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string; } /** @@ -6338,444 +6338,444 @@ declare var JSON: JSON; ///////////////////////////// interface ReadonlyArray { - /** - * Gets the length of the array. This is a number one higher than the highest element defined in an array. - */ - readonly length: number; + /** + * Gets the length of the array. This is a number one higher than the highest element defined in an array. + */ + readonly length: number; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** - * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods. - */ - toLocaleString(): string; + /** + * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods. + */ + toLocaleString(): string; - /** - * Combines two or more arrays. - * @param items Additional items to add to the end of array1. - */ - concat(...items: ConcatArray[]): T[]; + /** + * Combines two or more arrays. + * @param items Additional items to add to the end of array1. + */ + concat(...items: ConcatArray[]): T[]; - /** - * Combines two or more arrays. - * @param items Additional items to add to the end of array1. - */ - concat(...items: (T | ConcatArray)[]): T[]; + /** + * Combines two or more arrays. + * @param items Additional items to add to the end of array1. + */ + concat(...items: (T | ConcatArray)[]): T[]; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): T[]; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): T[]; - /** - * Returns the index of the first occurrence of a value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. - */ - indexOf(searchElement: T, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. + */ + indexOf(searchElement: T, fromIndex?: number): number; - /** - * Returns the index of the last occurrence of a specified value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array. - */ - lastIndexOf(searchElement: T, fromIndex?: number): number; + /** + * Returns the index of the last occurrence of a specified value in an array. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array. + */ + lastIndexOf(searchElement: T, fromIndex?: number): number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): this is readonly S[]; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): this is readonly S[]; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: T, index: number, array: readonly T[]) => void, thisArg?: any): void; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: T, index: number, array: readonly T[]) => void, thisArg?: any): void; - /** - * Calls a defined callback function on each element of an array, and returns an array that contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: T, index: number, array: readonly T[]) => U, thisArg?: any): U[]; + /** + * Calls a defined callback function on each element of an array, and returns an array that contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: T, index: number, array: readonly T[]) => U, thisArg?: any): U[]; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): S[]; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): S[]; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): T[]; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): T[]; - /** - * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T; + /** + * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T; - reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T; + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T; - /** - * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U; - /** - * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T; + /** + * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T; - reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T; + reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T; - /** - * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U; - readonly [n: number]: T; + readonly [n: number]: T; } interface ConcatArray { - readonly length: number; + readonly length: number; - readonly [n: number]: T; + readonly [n: number]: T; - join(separator?: string): string; + join(separator?: string): string; - slice(start?: number, end?: number): T[]; + slice(start?: number, end?: number): T[]; } interface Array { - /** - * Gets or sets the length of the array. This is a number one higher than the highest index in the array. - */ - length: number; + /** + * Gets or sets the length of the array. This is a number one higher than the highest index in the array. + */ + length: number; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** - * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods. - */ - toLocaleString(): string; + /** + * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods. + */ + toLocaleString(): string; - /** - * Removes the last element from an array and returns it. - * If the array is empty, undefined is returned and the array is not modified. - */ - pop(): T | undefined; + /** + * Removes the last element from an array and returns it. + * If the array is empty, undefined is returned and the array is not modified. + */ + pop(): T | undefined; - /** - * Appends new elements to the end of an array, and returns the new length of the array. - * @param items New elements to add to the array. - */ - push(...items: T[]): number; + /** + * Appends new elements to the end of an array, and returns the new length of the array. + * @param items New elements to add to the array. + */ + push(...items: T[]): number; - /** - * Combines two or more arrays. - * This method returns a new array without modifying any existing arrays. - * @param items Additional arrays and/or items to add to the end of the array. - */ - concat(...items: ConcatArray[]): T[]; + /** + * Combines two or more arrays. + * This method returns a new array without modifying any existing arrays. + * @param items Additional arrays and/or items to add to the end of the array. + */ + concat(...items: ConcatArray[]): T[]; - /** - * Combines two or more arrays. - * This method returns a new array without modifying any existing arrays. - * @param items Additional arrays and/or items to add to the end of the array. - */ - concat(...items: (T | ConcatArray)[]): T[]; + /** + * Combines two or more arrays. + * This method returns a new array without modifying any existing arrays. + * @param items Additional arrays and/or items to add to the end of the array. + */ + concat(...items: (T | ConcatArray)[]): T[]; - /** - * Adds all the elements of an array into a string, separated by the specified separator string. - * @param separator A string used to separate one element of the array from the next in the resulting string. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Adds all the elements of an array into a string, separated by the specified separator string. + * @param separator A string used to separate one element of the array from the next in the resulting string. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Reverses the elements in an array in place. - * This method mutates the array and returns a reference to the same array. - */ - reverse(): T[]; + /** + * Reverses the elements in an array in place. + * This method mutates the array and returns a reference to the same array. + */ + reverse(): T[]; - /** - * Removes the first element from an array and returns it. - * If the array is empty, undefined is returned and the array is not modified. - */ - shift(): T | undefined; + /** + * Removes the first element from an array and returns it. + * If the array is empty, undefined is returned and the array is not modified. + */ + shift(): T | undefined; - /** - * Returns a copy of a section of an array. - * For both start and end, a negative index can be used to indicate an offset from the end of the array. - * For example, -2 refers to the second to last element of the array. - * @param start The beginning index of the specified portion of the array. - * If start is undefined, then the slice begins at index 0. - * @param end The end index of the specified portion of the array. This is exclusive of the element at the index 'end'. - * If end is undefined, then the slice extends to the end of the array. - */ - slice(start?: number, end?: number): T[]; + /** + * Returns a copy of a section of an array. + * For both start and end, a negative index can be used to indicate an offset from the end of the array. + * For example, -2 refers to the second to last element of the array. + * @param start The beginning index of the specified portion of the array. + * If start is undefined, then the slice begins at index 0. + * @param end The end index of the specified portion of the array. This is exclusive of the element at the index 'end'. + * If end is undefined, then the slice extends to the end of the array. + */ + slice(start?: number, end?: number): T[]; - /** - * Sorts an array in place. - * This method mutates the array and returns a reference to the same array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: T, b: T) => number): this; + /** + * Sorts an array in place. + * This method mutates the array and returns a reference to the same array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: T, b: T) => number): this; - /** - * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. - * @param start The zero-based location in the array from which to start removing elements. - * @param deleteCount The number of elements to remove. Omitting this argument will remove all elements from the start - * paramater location to end of the array. If value of this argument is either a negative number, zero, undefined, or a type - * that cannot be converted to an integer, the function will evaluate the argument as zero and not remove any elements. - * @returns An array containing the elements that were deleted. - */ - splice(start: number, deleteCount?: number): T[]; + /** + * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. + * @param start The zero-based location in the array from which to start removing elements. + * @param deleteCount The number of elements to remove. Omitting this argument will remove all elements from the start + * paramater location to end of the array. If value of this argument is either a negative number, zero, undefined, or a type + * that cannot be converted to an integer, the function will evaluate the argument as zero and not remove any elements. + * @returns An array containing the elements that were deleted. + */ + splice(start: number, deleteCount?: number): T[]; - /** - * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. - * @param start The zero-based location in the array from which to start removing elements. - * @param deleteCount The number of elements to remove. If value of this argument is either a negative number, zero, - * undefined, or a type that cannot be converted to an integer, the function will evaluate the argument as zero and - * not remove any elements. - * @param items Elements to insert into the array in place of the deleted elements. - * @returns An array containing the elements that were deleted. - */ - splice(start: number, deleteCount: number, ...items: T[]): T[]; + /** + * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. + * @param start The zero-based location in the array from which to start removing elements. + * @param deleteCount The number of elements to remove. If value of this argument is either a negative number, zero, + * undefined, or a type that cannot be converted to an integer, the function will evaluate the argument as zero and + * not remove any elements. + * @param items Elements to insert into the array in place of the deleted elements. + * @returns An array containing the elements that were deleted. + */ + splice(start: number, deleteCount: number, ...items: T[]): T[]; - /** - * Inserts new elements at the start of an array, and returns the new length of the array. - * @param items Elements to insert at the start of the array. - */ - unshift(...items: T[]): number; + /** + * Inserts new elements at the start of an array, and returns the new length of the array. + * @param items Elements to insert at the start of the array. + */ + unshift(...items: T[]): number; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. - */ - indexOf(searchElement: T, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. + */ + indexOf(searchElement: T, fromIndex?: number): number; - /** - * Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin searching backward. If fromIndex is omitted, the search starts at the last index in the array. - */ - lastIndexOf(searchElement: T, fromIndex?: number): number; + /** + * Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin searching backward. If fromIndex is omitted, the search starts at the last index in the array. + */ + lastIndexOf(searchElement: T, fromIndex?: number): number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): this is S[]; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): this is S[]; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void; - /** - * Calls a defined callback function on each element of an array, and returns an array that contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[]; + /** + * Calls a defined callback function on each element of an array, and returns an array that contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[]; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T[]; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T[]; - /** - * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; + /** + * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; - reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; - /** - * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; - /** - * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; + /** + * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; - reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; + reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; - /** - * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; - [n: number]: T; + [n: number]: T; } interface ArrayConstructor { - new (arrayLength?: number): any[]; + new (arrayLength?: number): any[]; - new (arrayLength: number): T[]; + new (arrayLength: number): T[]; - new (...items: T[]): T[]; + new (...items: T[]): T[]; - (arrayLength?: number): any[]; + (arrayLength?: number): any[]; - (arrayLength: number): T[]; + (arrayLength: number): T[]; - (...items: T[]): T[]; + (...items: T[]): T[]; - isArray(arg: any): arg is any[]; + isArray(arg: any): arg is any[]; - readonly prototype: any[]; + readonly prototype: any[]; } declare var Array: ArrayConstructor; interface TypedPropertyDescriptor { - enumerable?: boolean; + enumerable?: boolean; - configurable?: boolean; + configurable?: boolean; - writable?: boolean; + writable?: boolean; - value?: T; + value?: T; - get?: () => T; + get?: () => T; - set?: (value: T) => void; + set?: (value: T) => void; } declare type PromiseConstructorLike = new (executor: (resolve: (value: T | PromiseLike) => void, reject: (reason?: any) => void) => void) => PromiseLike; interface PromiseLike { - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): PromiseLike; + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): PromiseLike; } /** * Represents the completion of an asynchronous operation */ interface Promise { - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise; + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise; - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise; + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise; } /** @@ -6791,9 +6791,9 @@ type Awaited = T extends null | undefined ? T : // special case for `null | u // non-object or non-thenable interface ArrayLike { - readonly length: number; + readonly length: number; - readonly [n: number]: T; + readonly [n: number]: T; } /** @@ -6906,7 +6906,7 @@ interface ThisType { * Stores types to be used with WeakSet, WeakMap, WeakRef, and FinalizationRegistry */ interface WeakKeyTypes { - object: object; + object: object; } type WeakKey = WeakKeyTypes[keyof WeakKeyTypes]; @@ -6918,189 +6918,189 @@ type WeakKey = WeakKeyTypes[keyof WeakKeyTypes]; * buffer as needed. */ interface ArrayBuffer { - /** - * Read-only. The length of the ArrayBuffer (in bytes). - */ - readonly byteLength: number; + /** + * Read-only. The length of the ArrayBuffer (in bytes). + */ + readonly byteLength: number; - /** - * Returns a section of an ArrayBuffer. - */ - slice(begin?: number, end?: number): ArrayBuffer; + /** + * Returns a section of an ArrayBuffer. + */ + slice(begin?: number, end?: number): ArrayBuffer; } /** * Allowed ArrayBuffer types for the buffer of an ArrayBufferView and related Typed Arrays. */ interface ArrayBufferTypes { - ArrayBuffer: ArrayBuffer; + ArrayBuffer: ArrayBuffer; } type ArrayBufferLike = ArrayBufferTypes[keyof ArrayBufferTypes]; interface ArrayBufferConstructor { - readonly prototype: ArrayBuffer; + readonly prototype: ArrayBuffer; - new (byteLength: number): ArrayBuffer; + new (byteLength: number): ArrayBuffer; - isView(arg: any): arg is ArrayBufferView; + isView(arg: any): arg is ArrayBufferView; } declare var ArrayBuffer: ArrayBufferConstructor; interface ArrayBufferView { - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; } interface DataView { - readonly buffer: TArrayBuffer; + readonly buffer: TArrayBuffer; - readonly byteLength: number; + readonly byteLength: number; - readonly byteOffset: number; + readonly byteOffset: number; - /** - * Gets the Float32 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getFloat32(byteOffset: number, littleEndian?: boolean): number; + /** + * Gets the Float32 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getFloat32(byteOffset: number, littleEndian?: boolean): number; - /** - * Gets the Float64 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getFloat64(byteOffset: number, littleEndian?: boolean): number; + /** + * Gets the Float64 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getFloat64(byteOffset: number, littleEndian?: boolean): number; - /** - * Gets the Int8 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - */ - getInt8(byteOffset: number): number; + /** + * Gets the Int8 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + */ + getInt8(byteOffset: number): number; - /** - * Gets the Int16 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getInt16(byteOffset: number, littleEndian?: boolean): number; + /** + * Gets the Int16 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getInt16(byteOffset: number, littleEndian?: boolean): number; - /** - * Gets the Int32 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getInt32(byteOffset: number, littleEndian?: boolean): number; + /** + * Gets the Int32 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getInt32(byteOffset: number, littleEndian?: boolean): number; - /** - * Gets the Uint8 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - */ - getUint8(byteOffset: number): number; + /** + * Gets the Uint8 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + */ + getUint8(byteOffset: number): number; - /** - * Gets the Uint16 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getUint16(byteOffset: number, littleEndian?: boolean): number; + /** + * Gets the Uint16 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getUint16(byteOffset: number, littleEndian?: boolean): number; - /** - * Gets the Uint32 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getUint32(byteOffset: number, littleEndian?: boolean): number; + /** + * Gets the Uint32 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getUint32(byteOffset: number, littleEndian?: boolean): number; - /** - * Stores an Float32 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void; + /** + * Stores an Float32 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void; - /** - * Stores an Float64 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void; + /** + * Stores an Float64 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void; - /** - * Stores an Int8 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - */ - setInt8(byteOffset: number, value: number): void; + /** + * Stores an Int8 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + */ + setInt8(byteOffset: number, value: number): void; - /** - * Stores an Int16 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setInt16(byteOffset: number, value: number, littleEndian?: boolean): void; + /** + * Stores an Int16 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setInt16(byteOffset: number, value: number, littleEndian?: boolean): void; - /** - * Stores an Int32 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setInt32(byteOffset: number, value: number, littleEndian?: boolean): void; + /** + * Stores an Int32 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setInt32(byteOffset: number, value: number, littleEndian?: boolean): void; - /** - * Stores an Uint8 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - */ - setUint8(byteOffset: number, value: number): void; + /** + * Stores an Uint8 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + */ + setUint8(byteOffset: number, value: number): void; - /** - * Stores an Uint16 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setUint16(byteOffset: number, value: number, littleEndian?: boolean): void; + /** + * Stores an Uint16 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setUint16(byteOffset: number, value: number, littleEndian?: boolean): void; - /** - * Stores an Uint32 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setUint32(byteOffset: number, value: number, littleEndian?: boolean): void; + /** + * Stores an Uint32 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setUint32(byteOffset: number, value: number, littleEndian?: boolean): void; } interface DataViewConstructor { - readonly prototype: DataView; + readonly prototype: DataView; - new (buffer: TArrayBuffer, byteOffset?: number, byteLength?: number): DataView; + new (buffer: TArrayBuffer, byteOffset?: number, byteLength?: number): DataView; } declare var DataView: DataViewConstructor; @@ -7110,288 +7110,288 @@ declare var DataView: DataViewConstructor; * number of bytes could not be allocated an exception is raised. */ interface Int8Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int8Array; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int8Array; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; - - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int8Array; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int8Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Int8Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Int8Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Int8Array; + /** + * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Int8Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Int8ArrayConstructor { - readonly prototype: Int8Array; + readonly prototype: Int8Array; - new (length: number): Int8Array; + new (length: number): Int8Array; - new (array: ArrayLike): Int8Array; + new (array: ArrayLike): Int8Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int8Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int8Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int8Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int8Array; - new (array: ArrayLike | ArrayBuffer): Int8Array; + new (array: ArrayLike | ArrayBuffer): Int8Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Int8Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Int8Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Int8Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Int8Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } declare var Int8Array: Int8ArrayConstructor; @@ -7401,288 +7401,288 @@ declare var Int8Array: Int8ArrayConstructor; * requested number of bytes could not be allocated an exception is raised. */ interface Uint8Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint8Array; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint8Array; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint8Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint8Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Uint8Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Uint8Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Uint8Array; + /** + * Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Uint8Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Uint8ArrayConstructor { - readonly prototype: Uint8Array; + readonly prototype: Uint8Array; - new (length: number): Uint8Array; + new (length: number): Uint8Array; - new (array: ArrayLike): Uint8Array; + new (array: ArrayLike): Uint8Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint8Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint8Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8Array; - new (array: ArrayLike | ArrayBuffer): Uint8Array; + new (array: ArrayLike | ArrayBuffer): Uint8Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Uint8Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Uint8Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Uint8Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Uint8Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } declare var Uint8Array: Uint8ArrayConstructor; @@ -7692,288 +7692,288 @@ declare var Uint8Array: Uint8ArrayConstructor; * If the requested number of bytes could not be allocated an exception is raised. */ interface Uint8ClampedArray { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint8ClampedArray; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint8ClampedArray; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint8ClampedArray; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint8ClampedArray; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Uint8ClampedArray; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Uint8ClampedArray; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Uint8ClampedArray; + /** + * Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Uint8ClampedArray; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Uint8ClampedArrayConstructor { - readonly prototype: Uint8ClampedArray; + readonly prototype: Uint8ClampedArray; - new (length: number): Uint8ClampedArray; + new (length: number): Uint8ClampedArray; - new (array: ArrayLike): Uint8ClampedArray; + new (array: ArrayLike): Uint8ClampedArray; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray; - new (array: ArrayLike | ArrayBuffer): Uint8ClampedArray; + new (array: ArrayLike | ArrayBuffer): Uint8ClampedArray; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Uint8ClampedArray; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Uint8ClampedArray; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Uint8ClampedArray; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Uint8ClampedArray; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } declare var Uint8ClampedArray: Uint8ClampedArrayConstructor; @@ -7983,288 +7983,288 @@ declare var Uint8ClampedArray: Uint8ClampedArrayConstructor; * requested number of bytes could not be allocated an exception is raised. */ interface Int16Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * The length in bytes of the array. - */ - readonly byteLength: number; - - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; - - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int16Array; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int16Array; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int16Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int16Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Int16Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Int16Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Int16Array; + /** + * Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Int16Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Int16ArrayConstructor { - readonly prototype: Int16Array; + readonly prototype: Int16Array; - new (length: number): Int16Array; + new (length: number): Int16Array; - new (array: ArrayLike): Int16Array; + new (array: ArrayLike): Int16Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int16Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int16Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int16Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int16Array; - new (array: ArrayLike | ArrayBuffer): Int16Array; + new (array: ArrayLike | ArrayBuffer): Int16Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Int16Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Int16Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Int16Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Int16Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } declare var Int16Array: Int16ArrayConstructor; @@ -8274,288 +8274,288 @@ declare var Int16Array: Int16ArrayConstructor; * requested number of bytes could not be allocated an exception is raised. */ interface Uint16Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint16Array; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint16Array; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint16Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint16Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Uint16Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Uint16Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Uint16Array; + /** + * Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Uint16Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Uint16ArrayConstructor { - readonly prototype: Uint16Array; + readonly prototype: Uint16Array; - new (length: number): Uint16Array; + new (length: number): Uint16Array; - new (array: ArrayLike): Uint16Array; + new (array: ArrayLike): Uint16Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint16Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint16Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint16Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint16Array; - new (array: ArrayLike | ArrayBuffer): Uint16Array; + new (array: ArrayLike | ArrayBuffer): Uint16Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Uint16Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Uint16Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Uint16Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Uint16Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } declare var Uint16Array: Uint16ArrayConstructor; @@ -8565,288 +8565,288 @@ declare var Uint16Array: Uint16ArrayConstructor; * requested number of bytes could not be allocated an exception is raised. */ interface Int32Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int32Array; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int32Array; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int32Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int32Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Int32Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Int32Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Int32Array; + /** + * Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Int32Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Int32ArrayConstructor { - readonly prototype: Int32Array; + readonly prototype: Int32Array; - new (length: number): Int32Array; + new (length: number): Int32Array; - new (array: ArrayLike): Int32Array; + new (array: ArrayLike): Int32Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int32Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int32Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int32Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int32Array; - new (array: ArrayLike | ArrayBuffer): Int32Array; + new (array: ArrayLike | ArrayBuffer): Int32Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Int32Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Int32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Int32Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Int32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } declare var Int32Array: Int32ArrayConstructor; @@ -8856,288 +8856,288 @@ declare var Int32Array: Int32ArrayConstructor; * requested number of bytes could not be allocated an exception is raised. */ interface Uint32Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; - - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint32Array; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint32Array; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * The length of the array. - */ - readonly length: number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint32Array; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * The length of the array. + */ + readonly length: number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint32Array; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Uint32Array; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Uint32Array; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Gets a new Uint32Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Uint32Array; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Gets a new Uint32Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Uint32Array; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; + + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Uint32ArrayConstructor { - readonly prototype: Uint32Array; + readonly prototype: Uint32Array; - new (length: number): Uint32Array; + new (length: number): Uint32Array; - new (array: ArrayLike): Uint32Array; + new (array: ArrayLike): Uint32Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint32Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint32Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint32Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint32Array; - new (array: ArrayLike | ArrayBuffer): Uint32Array; + new (array: ArrayLike | ArrayBuffer): Uint32Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Uint32Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Uint32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Uint32Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Uint32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } declare var Uint32Array: Uint32ArrayConstructor; @@ -9147,288 +9147,288 @@ declare var Uint32Array: Uint32ArrayConstructor; * of bytes could not be allocated an exception is raised. */ interface Float32Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float32Array; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float32Array; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float32Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float32Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Float32Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Float32Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Float32Array; + /** + * Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Float32Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Float32ArrayConstructor { - readonly prototype: Float32Array; + readonly prototype: Float32Array; - new (length: number): Float32Array; + new (length: number): Float32Array; - new (array: ArrayLike): Float32Array; + new (array: ArrayLike): Float32Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Float32Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Float32Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float32Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float32Array; - new (array: ArrayLike | ArrayBuffer): Float32Array; + new (array: ArrayLike | ArrayBuffer): Float32Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Float32Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Float32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Float32Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Float32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } declare var Float32Array: Float32ArrayConstructor; @@ -9438,288 +9438,288 @@ declare var Float32Array: Float32ArrayConstructor; * number of bytes could not be allocated an exception is raised. */ interface Float64Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float64Array; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float64Array; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float64Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float64Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Float64Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Float64Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Float64Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Float64Array; + /** + * Gets a new Float64Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Float64Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Float64ArrayConstructor { - readonly prototype: Float64Array; + readonly prototype: Float64Array; - new (length: number): Float64Array; + new (length: number): Float64Array; - new (array: ArrayLike): Float64Array; + new (array: ArrayLike): Float64Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Float64Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Float64Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float64Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float64Array; - new (array: ArrayLike | ArrayBuffer): Float64Array; + new (array: ArrayLike | ArrayBuffer): Float64Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Float64Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Float64Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Float64Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Float64Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } declare var Float64Array: Float64ArrayConstructor; @@ -9729,260 +9729,260 @@ declare var Float64Array: Float64ArrayConstructor; ///////////////////////////// declare namespace Intl { - interface CollatorOptions { - usage?: "sort" | "search" | undefined; +interface CollatorOptions { + usage?: "sort" | "search" | undefined; - localeMatcher?: "lookup" | "best fit" | undefined; + localeMatcher?: "lookup" | "best fit" | undefined; - numeric?: boolean | undefined; + numeric?: boolean | undefined; - caseFirst?: "upper" | "lower" | "false" | undefined; + caseFirst?: "upper" | "lower" | "false" | undefined; - sensitivity?: "base" | "accent" | "case" | "variant" | undefined; + sensitivity?: "base" | "accent" | "case" | "variant" | undefined; - collation?: "big5han" | "compat" | "default" | "dict" | "direct" | "ducet" | "emoji" | "eor" | "gb2312" | "phonebk" | "phonetic" | "pinyin" | "reformed" | "searchjl" | "stroke" | "trad" | "unihan" | "zhuyin" | undefined; + collation?: "big5han" | "compat" | "default" | "dict" | "direct" | "ducet" | "emoji" | "eor" | "gb2312" | "phonebk" | "phonetic" | "pinyin" | "reformed" | "searchjl" | "stroke" | "trad" | "unihan" | "zhuyin" | undefined; - ignorePunctuation?: boolean | undefined; - } + ignorePunctuation?: boolean | undefined; +} - interface ResolvedCollatorOptions { - locale: string; +interface ResolvedCollatorOptions { + locale: string; - usage: string; + usage: string; - sensitivity: string; + sensitivity: string; - ignorePunctuation: boolean; + ignorePunctuation: boolean; - collation: string; + collation: string; - caseFirst: string; + caseFirst: string; - numeric: boolean; - } + numeric: boolean; +} - interface Collator { - compare(x: string, y: string): number; +interface Collator { + compare(x: string, y: string): number; - resolvedOptions(): ResolvedCollatorOptions; - } + resolvedOptions(): ResolvedCollatorOptions; +} - interface CollatorConstructor { - new (locales?: string | string[], options?: CollatorOptions): Collator; +interface CollatorConstructor { + new (locales?: string | string[], options?: CollatorOptions): Collator; - (locales?: string | string[], options?: CollatorOptions): Collator; + (locales?: string | string[], options?: CollatorOptions): Collator; - supportedLocalesOf(locales: string | string[], options?: CollatorOptions): string[]; - } + supportedLocalesOf(locales: string | string[], options?: CollatorOptions): string[]; +} - var Collator: CollatorConstructor; +var Collator: CollatorConstructor; - interface NumberFormatOptionsStyleRegistry { - decimal: never; +interface NumberFormatOptionsStyleRegistry { + decimal: never; - percent: never; + percent: never; - currency: never; - } + currency: never; +} - type NumberFormatOptionsStyle = keyof NumberFormatOptionsStyleRegistry; +type NumberFormatOptionsStyle = keyof NumberFormatOptionsStyleRegistry; - interface NumberFormatOptionsCurrencyDisplayRegistry { - code: never; +interface NumberFormatOptionsCurrencyDisplayRegistry { + code: never; - symbol: never; + symbol: never; - name: never; - } + name: never; +} - type NumberFormatOptionsCurrencyDisplay = keyof NumberFormatOptionsCurrencyDisplayRegistry; +type NumberFormatOptionsCurrencyDisplay = keyof NumberFormatOptionsCurrencyDisplayRegistry; - interface NumberFormatOptionsUseGroupingRegistry { - } +interface NumberFormatOptionsUseGroupingRegistry { +} - type NumberFormatOptionsUseGrouping = {} extends NumberFormatOptionsUseGroupingRegistry ? boolean : keyof NumberFormatOptionsUseGroupingRegistry | "true" | "false" | boolean; +type NumberFormatOptionsUseGrouping = {} extends NumberFormatOptionsUseGroupingRegistry ? boolean : keyof NumberFormatOptionsUseGroupingRegistry | "true" | "false" | boolean; - type ResolvedNumberFormatOptionsUseGrouping = {} extends NumberFormatOptionsUseGroupingRegistry ? boolean : keyof NumberFormatOptionsUseGroupingRegistry | false; +type ResolvedNumberFormatOptionsUseGrouping = {} extends NumberFormatOptionsUseGroupingRegistry ? boolean : keyof NumberFormatOptionsUseGroupingRegistry | false; - interface NumberFormatOptions { - localeMatcher?: "lookup" | "best fit" | undefined; +interface NumberFormatOptions { + localeMatcher?: "lookup" | "best fit" | undefined; - style?: NumberFormatOptionsStyle | undefined; + style?: NumberFormatOptionsStyle | undefined; - currency?: string | undefined; + currency?: string | undefined; - currencyDisplay?: NumberFormatOptionsCurrencyDisplay | undefined; + currencyDisplay?: NumberFormatOptionsCurrencyDisplay | undefined; - useGrouping?: NumberFormatOptionsUseGrouping | undefined; + useGrouping?: NumberFormatOptionsUseGrouping | undefined; - minimumIntegerDigits?: number | undefined; + minimumIntegerDigits?: number | undefined; - minimumFractionDigits?: number | undefined; + minimumFractionDigits?: number | undefined; - maximumFractionDigits?: number | undefined; + maximumFractionDigits?: number | undefined; - minimumSignificantDigits?: number | undefined; + minimumSignificantDigits?: number | undefined; - maximumSignificantDigits?: number | undefined; - } + maximumSignificantDigits?: number | undefined; +} - interface ResolvedNumberFormatOptions { - locale: string; +interface ResolvedNumberFormatOptions { + locale: string; - numberingSystem: string; + numberingSystem: string; - style: NumberFormatOptionsStyle; + style: NumberFormatOptionsStyle; - currency?: string; + currency?: string; - currencyDisplay?: NumberFormatOptionsCurrencyDisplay; + currencyDisplay?: NumberFormatOptionsCurrencyDisplay; - minimumIntegerDigits: number; + minimumIntegerDigits: number; - minimumFractionDigits?: number; + minimumFractionDigits?: number; - maximumFractionDigits?: number; + maximumFractionDigits?: number; - minimumSignificantDigits?: number; + minimumSignificantDigits?: number; - maximumSignificantDigits?: number; + maximumSignificantDigits?: number; - useGrouping: ResolvedNumberFormatOptionsUseGrouping; - } + useGrouping: ResolvedNumberFormatOptionsUseGrouping; +} - interface NumberFormat { - format(value: number): string; +interface NumberFormat { + format(value: number): string; - resolvedOptions(): ResolvedNumberFormatOptions; - } + resolvedOptions(): ResolvedNumberFormatOptions; +} - interface NumberFormatConstructor { - new (locales?: string | string[], options?: NumberFormatOptions): NumberFormat; +interface NumberFormatConstructor { + new (locales?: string | string[], options?: NumberFormatOptions): NumberFormat; - (locales?: string | string[], options?: NumberFormatOptions): NumberFormat; + (locales?: string | string[], options?: NumberFormatOptions): NumberFormat; - supportedLocalesOf(locales: string | string[], options?: NumberFormatOptions): string[]; + supportedLocalesOf(locales: string | string[], options?: NumberFormatOptions): string[]; - readonly prototype: NumberFormat; - } + readonly prototype: NumberFormat; +} - var NumberFormat: NumberFormatConstructor; +var NumberFormat: NumberFormatConstructor; - interface DateTimeFormatOptions { - localeMatcher?: "best fit" | "lookup" | undefined; +interface DateTimeFormatOptions { + localeMatcher?: "best fit" | "lookup" | undefined; - weekday?: "long" | "short" | "narrow" | undefined; + weekday?: "long" | "short" | "narrow" | undefined; - era?: "long" | "short" | "narrow" | undefined; + era?: "long" | "short" | "narrow" | undefined; - year?: "numeric" | "2-digit" | undefined; + year?: "numeric" | "2-digit" | undefined; - month?: "numeric" | "2-digit" | "long" | "short" | "narrow" | undefined; + month?: "numeric" | "2-digit" | "long" | "short" | "narrow" | undefined; - day?: "numeric" | "2-digit" | undefined; + day?: "numeric" | "2-digit" | undefined; - hour?: "numeric" | "2-digit" | undefined; + hour?: "numeric" | "2-digit" | undefined; - minute?: "numeric" | "2-digit" | undefined; + minute?: "numeric" | "2-digit" | undefined; - second?: "numeric" | "2-digit" | undefined; + second?: "numeric" | "2-digit" | undefined; - timeZoneName?: "short" | "long" | "shortOffset" | "longOffset" | "shortGeneric" | "longGeneric" | undefined; + timeZoneName?: "short" | "long" | "shortOffset" | "longOffset" | "shortGeneric" | "longGeneric" | undefined; - formatMatcher?: "best fit" | "basic" | undefined; + formatMatcher?: "best fit" | "basic" | undefined; - hour12?: boolean | undefined; + hour12?: boolean | undefined; - timeZone?: string | undefined; - } + timeZone?: string | undefined; +} - interface ResolvedDateTimeFormatOptions { - locale: string; +interface ResolvedDateTimeFormatOptions { + locale: string; - calendar: string; + calendar: string; - numberingSystem: string; + numberingSystem: string; - timeZone: string; + timeZone: string; - hour12?: boolean; + hour12?: boolean; - weekday?: string; + weekday?: string; - era?: string; + era?: string; - year?: string; + year?: string; - month?: string; + month?: string; - day?: string; + day?: string; - hour?: string; + hour?: string; - minute?: string; + minute?: string; - second?: string; + second?: string; - timeZoneName?: string; - } + timeZoneName?: string; +} - interface DateTimeFormat { - format(date?: Date | number): string; +interface DateTimeFormat { + format(date?: Date | number): string; - resolvedOptions(): ResolvedDateTimeFormatOptions; - } + resolvedOptions(): ResolvedDateTimeFormatOptions; +} - interface DateTimeFormatConstructor { - new (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat; +interface DateTimeFormatConstructor { + new (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat; - (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat; + (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat; - supportedLocalesOf(locales: string | string[], options?: DateTimeFormatOptions): string[]; + supportedLocalesOf(locales: string | string[], options?: DateTimeFormatOptions): string[]; - readonly prototype: DateTimeFormat; - } + readonly prototype: DateTimeFormat; +} - var DateTimeFormat: DateTimeFormatConstructor; +var DateTimeFormat: DateTimeFormatConstructor; } interface String { - /** - * Determines whether two strings are equivalent in the current or specified locale. - * @param that String to compare to target string - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details. - * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details. - */ - localeCompare(that: string, locales?: string | string[], options?: Intl.CollatorOptions): number; + /** + * Determines whether two strings are equivalent in the current or specified locale. + * @param that String to compare to target string + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details. + * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details. + */ + localeCompare(that: string, locales?: string | string[], options?: Intl.CollatorOptions): number; } interface Number { - /** - * Converts a number to a string by using the current or specified locale. - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; + /** + * Converts a number to a string by using the current or specified locale. + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; } interface Date { - /** - * Converts a date and time to a string by using the current or specified locale. - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; + /** + * Converts a date and time to a string by using the current or specified locale. + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; - /** - * Converts a date to a string by using the current or specified locale. - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleDateString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; + /** + * Converts a date to a string by using the current or specified locale. + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleDateString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; - /** - * Converts a time to a string by using the current or specified locale. - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleTimeString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; + /** + * Converts a time to a string by using the current or specified locale. + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleTimeString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; } diff --git a/generated/current/year/2023/index.d.ts b/generated/current/year/2023/index.d.ts index 617fc94..2511f87 100644 --- a/generated/current/year/2023/index.d.ts +++ b/generated/current/year/2023/index.d.ts @@ -22,175 +22,175 @@ and limitations under the License. // lib.es2015.collection.d.ts ///////////////////////////// interface Map { - /** - * Removes all elements from the Map. - */ - clear(): void; + /** + * Removes all elements from the Map. + */ + clear(): void; - /** - * @returns true if an element in the Map existed and has been removed, or false if the element does not exist. - */ - delete(key: K): boolean; + /** + * @returns true if an element in the Map existed and has been removed, or false if the element does not exist. + */ + delete(key: K): boolean; - /** - * Executes a provided function once per each key/value pair in the Map, in insertion order. - */ - forEach(callbackfn: (value: V, key: K, map: Map) => void, thisArg?: any): void; + /** + * Executes a provided function once per each key/value pair in the Map, in insertion order. + */ + forEach(callbackfn: (value: V, key: K, map: Map) => void, thisArg?: any): void; - /** - * Returns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map. - * @returns Returns the element associated with the specified key. If no element is associated with the specified key, undefined is returned. - */ - get(key: K): V | undefined; + /** + * Returns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map. + * @returns Returns the element associated with the specified key. If no element is associated with the specified key, undefined is returned. + */ + get(key: K): V | undefined; - /** - * @returns boolean indicating whether an element with the specified key exists or not. - */ - has(key: K): boolean; + /** + * @returns boolean indicating whether an element with the specified key exists or not. + */ + has(key: K): boolean; - /** - * Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated. - */ - set(key: K, value: V): this; + /** + * Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated. + */ + set(key: K, value: V): this; - /** - * @returns the number of elements in the Map. - */ - readonly size: number; + /** + * @returns the number of elements in the Map. + */ + readonly size: number; } interface MapConstructor { - new (): Map; + new (): Map; - new (entries?: readonly (readonly [K, V])[] | null): Map; + new (entries?: readonly (readonly [K, V])[] | null): Map; - readonly prototype: Map; + readonly prototype: Map; } declare var Map: MapConstructor; interface ReadonlyMap { - forEach(callbackfn: (value: V, key: K, map: ReadonlyMap) => void, thisArg?: any): void; + forEach(callbackfn: (value: V, key: K, map: ReadonlyMap) => void, thisArg?: any): void; - get(key: K): V | undefined; + get(key: K): V | undefined; - has(key: K): boolean; + has(key: K): boolean; - readonly size: number; + readonly size: number; } interface WeakMap { - /** - * Removes the specified element from the WeakMap. - * @returns true if the element was successfully removed, or false if it was not present. - */ - delete(key: K): boolean; + /** + * Removes the specified element from the WeakMap. + * @returns true if the element was successfully removed, or false if it was not present. + */ + delete(key: K): boolean; - /** - * @returns a specified element. - */ - get(key: K): V | undefined; + /** + * @returns a specified element. + */ + get(key: K): V | undefined; - /** - * @returns a boolean indicating whether an element with the specified key exists or not. - */ - has(key: K): boolean; + /** + * @returns a boolean indicating whether an element with the specified key exists or not. + */ + has(key: K): boolean; - /** - * Adds a new element with a specified key and value. - * @param key Must be an object or symbol. - */ - set(key: K, value: V): this; + /** + * Adds a new element with a specified key and value. + * @param key Must be an object or symbol. + */ + set(key: K, value: V): this; } interface WeakMapConstructor { - new (entries?: readonly (readonly [K, V])[] | null): WeakMap; + new (entries?: readonly (readonly [K, V])[] | null): WeakMap; - readonly prototype: WeakMap; + readonly prototype: WeakMap; } declare var WeakMap: WeakMapConstructor; interface Set { - /** - * Appends a new element with a specified value to the end of the Set. - */ - add(value: T): this; + /** + * Appends a new element with a specified value to the end of the Set. + */ + add(value: T): this; - /** - * Removes all elements from the Set. - */ - clear(): void; + /** + * Removes all elements from the Set. + */ + clear(): void; - /** - * Removes a specified value from the Set. - * @returns Returns true if an element in the Set existed and has been removed, or false if the element does not exist. - */ - delete(value: T): boolean; + /** + * Removes a specified value from the Set. + * @returns Returns true if an element in the Set existed and has been removed, or false if the element does not exist. + */ + delete(value: T): boolean; - /** - * Executes a provided function once per each value in the Set object, in insertion order. - */ - forEach(callbackfn: (value: T, value2: T, set: Set) => void, thisArg?: any): void; + /** + * Executes a provided function once per each value in the Set object, in insertion order. + */ + forEach(callbackfn: (value: T, value2: T, set: Set) => void, thisArg?: any): void; - /** - * @returns a boolean indicating whether an element with the specified value exists in the Set or not. - */ - has(value: T): boolean; + /** + * @returns a boolean indicating whether an element with the specified value exists in the Set or not. + */ + has(value: T): boolean; - /** - * @returns the number of (unique) elements in the Set. - */ - readonly size: number; + /** + * @returns the number of (unique) elements in the Set. + */ + readonly size: number; } interface SetConstructor { - new (values?: readonly T[] | null): Set; + new (values?: readonly T[] | null): Set; - readonly prototype: Set; + readonly prototype: Set; } declare var Set: SetConstructor; interface ReadonlySet { - /** - * Executes a provided function once per each value in the ReadonlySet object, in insertion order. - */ - forEach(callbackfn: (value: T, value2: T, set: ReadonlySet) => void, thisArg?: any): void; + /** + * Executes a provided function once per each value in the ReadonlySet object, in insertion order. + */ + forEach(callbackfn: (value: T, value2: T, set: ReadonlySet) => void, thisArg?: any): void; - /** - * @returns a boolean indicating whether an element with the specified value exists in the Set or not. - */ - has(value: T): boolean; + /** + * @returns a boolean indicating whether an element with the specified value exists in the Set or not. + */ + has(value: T): boolean; - /** - * @returns the number of (unique) elements in the Set. - */ - readonly size: number; + /** + * @returns the number of (unique) elements in the Set. + */ + readonly size: number; } interface WeakSet { - /** - * Appends a new value to the end of the WeakSet. - */ - add(value: T): this; + /** + * Appends a new value to the end of the WeakSet. + */ + add(value: T): this; - /** - * Removes the specified element from the WeakSet. - * @returns Returns true if the element existed and has been removed, or false if the element does not exist. - */ - delete(value: T): boolean; + /** + * Removes the specified element from the WeakSet. + * @returns Returns true if the element existed and has been removed, or false if the element does not exist. + */ + delete(value: T): boolean; - /** - * @returns a boolean indicating whether a value exists in the WeakSet or not. - */ - has(value: T): boolean; + /** + * @returns a boolean indicating whether a value exists in the WeakSet or not. + */ + has(value: T): boolean; } interface WeakSetConstructor { - new (values?: readonly T[] | null): WeakSet; + new (values?: readonly T[] | null): WeakSet; - readonly prototype: WeakSet; + readonly prototype: WeakSet; } declare var WeakSet: WeakSetConstructor; @@ -199,596 +199,596 @@ declare var WeakSet: WeakSetConstructor; // lib.es2015.core.d.ts ///////////////////////////// interface Array { - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: T, index: number, obj: T[]) => value is S, thisArg?: any): S | undefined; - - find(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): T | undefined; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: T, index: number, obj: T[]) => value is S, thisArg?: any): S | undefined; + + find(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): T | undefined; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: T, start?: number, end?: number): this; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: T, start?: number, end?: number): this; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } interface ArrayConstructor { - /** - * Creates an array from an array-like object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): T[]; + /** + * Creates an array from an array-like object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): T[]; - /** - * Creates an array from an iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; + /** + * Creates an array from an iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: T[]): T[]; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: T[]): T[]; } interface DateConstructor { - new (value: number | string | Date): Date; + new (value: number | string | Date): Date; } interface Function { - /** - * Returns the name of the function. Function names are read-only and can not be changed. - */ - readonly name: string; + /** + * Returns the name of the function. Function names are read-only and can not be changed. + */ + readonly name: string; } interface Math { - /** - * Returns the number of leading zero bits in the 32-bit binary representation of a number. - * @param x A numeric expression. - */ - clz32(x: number): number; + /** + * Returns the number of leading zero bits in the 32-bit binary representation of a number. + * @param x A numeric expression. + */ + clz32(x: number): number; - /** - * Returns the result of 32-bit multiplication of two numbers. - * @param x First number - * @param y Second number - */ - imul(x: number, y: number): number; + /** + * Returns the result of 32-bit multiplication of two numbers. + * @param x First number + * @param y Second number + */ + imul(x: number, y: number): number; - /** - * Returns the sign of x, indicating whether x is positive, negative, or zero. - * @param x The numeric expression to test - */ - sign(x: number): number; + /** + * Returns the sign of x, indicating whether x is positive, negative, or zero. + * @param x The numeric expression to test + */ + sign(x: number): number; - /** - * Returns the base 10 logarithm of a number. - * @param x A numeric expression. - */ - log10(x: number): number; + /** + * Returns the base 10 logarithm of a number. + * @param x A numeric expression. + */ + log10(x: number): number; - /** - * Returns the base 2 logarithm of a number. - * @param x A numeric expression. - */ - log2(x: number): number; + /** + * Returns the base 2 logarithm of a number. + * @param x A numeric expression. + */ + log2(x: number): number; - /** - * Returns the natural logarithm of 1 + x. - * @param x A numeric expression. - */ - log1p(x: number): number; + /** + * Returns the natural logarithm of 1 + x. + * @param x A numeric expression. + */ + log1p(x: number): number; - /** - * Returns the result of (e^x - 1), which is an implementation-dependent approximation to - * subtracting 1 from the exponential function of x (e raised to the power of x, where e - * is the base of the natural logarithms). - * @param x A numeric expression. - */ - expm1(x: number): number; + /** + * Returns the result of (e^x - 1), which is an implementation-dependent approximation to + * subtracting 1 from the exponential function of x (e raised to the power of x, where e + * is the base of the natural logarithms). + * @param x A numeric expression. + */ + expm1(x: number): number; - /** - * Returns the hyperbolic cosine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - cosh(x: number): number; + /** + * Returns the hyperbolic cosine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + cosh(x: number): number; - /** - * Returns the hyperbolic sine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - sinh(x: number): number; + /** + * Returns the hyperbolic sine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + sinh(x: number): number; - /** - * Returns the hyperbolic tangent of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - tanh(x: number): number; + /** + * Returns the hyperbolic tangent of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + tanh(x: number): number; - /** - * Returns the inverse hyperbolic cosine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - acosh(x: number): number; + /** + * Returns the inverse hyperbolic cosine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + acosh(x: number): number; - /** - * Returns the inverse hyperbolic sine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - asinh(x: number): number; + /** + * Returns the inverse hyperbolic sine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + asinh(x: number): number; - /** - * Returns the inverse hyperbolic tangent of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - atanh(x: number): number; + /** + * Returns the inverse hyperbolic tangent of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + atanh(x: number): number; - /** - * Returns the square root of the sum of squares of its arguments. - * @param values Values to compute the square root for. - * If no arguments are passed, the result is +0. - * If there is only one argument, the result is the absolute value. - * If any argument is +Infinity or -Infinity, the result is +Infinity. - * If any argument is NaN, the result is NaN. - * If all arguments are either +0 or −0, the result is +0. - */ - hypot(...values: number[]): number; + /** + * Returns the square root of the sum of squares of its arguments. + * @param values Values to compute the square root for. + * If no arguments are passed, the result is +0. + * If there is only one argument, the result is the absolute value. + * If any argument is +Infinity or -Infinity, the result is +Infinity. + * If any argument is NaN, the result is NaN. + * If all arguments are either +0 or −0, the result is +0. + */ + hypot(...values: number[]): number; - /** - * Returns the integral part of the numeric expression x, removing any fractional digits. - * If x is already an integer, the result is x. - * @param x A numeric expression. - */ - trunc(x: number): number; + /** + * Returns the integral part of the numeric expression x, removing any fractional digits. + * If x is already an integer, the result is x. + * @param x A numeric expression. + */ + trunc(x: number): number; - /** - * Returns the nearest single precision float representation of a number. - * @param x A numeric expression. - */ - fround(x: number): number; + /** + * Returns the nearest single precision float representation of a number. + * @param x A numeric expression. + */ + fround(x: number): number; - /** - * Returns an implementation-dependent approximation to the cube root of number. - * @param x A numeric expression. - */ - cbrt(x: number): number; + /** + * Returns an implementation-dependent approximation to the cube root of number. + * @param x A numeric expression. + */ + cbrt(x: number): number; } interface NumberConstructor { - /** - * The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1 - * that is representable as a Number value, which is approximately: - * 2.2204460492503130808472633361816 x 10‍−‍16. - */ - readonly EPSILON: number; + /** + * The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1 + * that is representable as a Number value, which is approximately: + * 2.2204460492503130808472633361816 x 10‍−‍16. + */ + readonly EPSILON: number; - /** - * Returns true if passed value is finite. - * Unlike the global isFinite, Number.isFinite doesn't forcibly convert the parameter to a - * number. Only finite values of the type number, result in true. - * @param number A numeric value. - */ - isFinite(number: unknown): boolean; + /** + * Returns true if passed value is finite. + * Unlike the global isFinite, Number.isFinite doesn't forcibly convert the parameter to a + * number. Only finite values of the type number, result in true. + * @param number A numeric value. + */ + isFinite(number: unknown): boolean; - /** - * Returns true if the value passed is an integer, false otherwise. - * @param number A numeric value. - */ - isInteger(number: unknown): boolean; + /** + * Returns true if the value passed is an integer, false otherwise. + * @param number A numeric value. + */ + isInteger(number: unknown): boolean; - /** - * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a - * number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter - * to a number. Only values of the type number, that are also NaN, result in true. - * @param number A numeric value. - */ - isNaN(number: unknown): boolean; + /** + * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a + * number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter + * to a number. Only values of the type number, that are also NaN, result in true. + * @param number A numeric value. + */ + isNaN(number: unknown): boolean; - /** - * Returns true if the value passed is a safe integer. - * @param number A numeric value. - */ - isSafeInteger(number: unknown): boolean; + /** + * Returns true if the value passed is a safe integer. + * @param number A numeric value. + */ + isSafeInteger(number: unknown): boolean; - /** - * The value of the largest integer n such that n and n + 1 are both exactly representable as - * a Number value. - * The value of Number.MAX_SAFE_INTEGER is 9007199254740991 2^53 − 1. - */ - readonly MAX_SAFE_INTEGER: number; + /** + * The value of the largest integer n such that n and n + 1 are both exactly representable as + * a Number value. + * The value of Number.MAX_SAFE_INTEGER is 9007199254740991 2^53 − 1. + */ + readonly MAX_SAFE_INTEGER: number; - /** - * The value of the smallest integer n such that n and n − 1 are both exactly representable as - * a Number value. - * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)). - */ - readonly MIN_SAFE_INTEGER: number; + /** + * The value of the smallest integer n such that n and n − 1 are both exactly representable as + * a Number value. + * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)). + */ + readonly MIN_SAFE_INTEGER: number; - /** - * Converts a string to a floating-point number. - * @param string A string that contains a floating-point number. - */ - parseFloat(string: string): number; + /** + * Converts a string to a floating-point number. + * @param string A string that contains a floating-point number. + */ + parseFloat(string: string): number; - /** - * Converts A string to an integer. - * @param string A string to convert into a number. - * @param radix A value between 2 and 36 that specifies the base of the number in `string`. - * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. - * All other strings are considered decimal. - */ - parseInt(string: string, radix?: number): number; + /** + * Converts A string to an integer. + * @param string A string to convert into a number. + * @param radix A value between 2 and 36 that specifies the base of the number in `string`. + * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. + * All other strings are considered decimal. + */ + parseInt(string: string, radix?: number): number; } interface ObjectConstructor { - /** - * Copy the values of all of the enumerable own properties from one or more source objects to a - * target object. Returns the target object. - * @param target The target object to copy to. - * @param source The source object from which to copy properties. - */ - assign(target: T, source: U): T & U; + /** + * Copy the values of all of the enumerable own properties from one or more source objects to a + * target object. Returns the target object. + * @param target The target object to copy to. + * @param source The source object from which to copy properties. + */ + assign(target: T, source: U): T & U; - /** - * Copy the values of all of the enumerable own properties from one or more source objects to a - * target object. Returns the target object. - * @param target The target object to copy to. - * @param source1 The first source object from which to copy properties. - * @param source2 The second source object from which to copy properties. - */ - assign(target: T, source1: U, source2: V): T & U & V; + /** + * Copy the values of all of the enumerable own properties from one or more source objects to a + * target object. Returns the target object. + * @param target The target object to copy to. + * @param source1 The first source object from which to copy properties. + * @param source2 The second source object from which to copy properties. + */ + assign(target: T, source1: U, source2: V): T & U & V; - /** - * Copy the values of all of the enumerable own properties from one or more source objects to a - * target object. Returns the target object. - * @param target The target object to copy to. - * @param source1 The first source object from which to copy properties. - * @param source2 The second source object from which to copy properties. - * @param source3 The third source object from which to copy properties. - */ - assign(target: T, source1: U, source2: V, source3: W): T & U & V & W; + /** + * Copy the values of all of the enumerable own properties from one or more source objects to a + * target object. Returns the target object. + * @param target The target object to copy to. + * @param source1 The first source object from which to copy properties. + * @param source2 The second source object from which to copy properties. + * @param source3 The third source object from which to copy properties. + */ + assign(target: T, source1: U, source2: V, source3: W): T & U & V & W; - /** - * Copy the values of all of the enumerable own properties from one or more source objects to a - * target object. Returns the target object. - * @param target The target object to copy to. - * @param sources One or more source objects from which to copy properties - */ - assign(target: object, ...sources: any[]): any; + /** + * Copy the values of all of the enumerable own properties from one or more source objects to a + * target object. Returns the target object. + * @param target The target object to copy to. + * @param sources One or more source objects from which to copy properties + */ + assign(target: object, ...sources: any[]): any; - /** - * Returns an array of all symbol properties found directly on object o. - * @param o Object to retrieve the symbols from. - */ - getOwnPropertySymbols(o: any): symbol[]; + /** + * Returns an array of all symbol properties found directly on object o. + * @param o Object to retrieve the symbols from. + */ + getOwnPropertySymbols(o: any): symbol[]; - /** - * Returns the names of the enumerable string properties and methods of an object. - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - keys(o: {}): string[]; + /** + * Returns the names of the enumerable string properties and methods of an object. + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + keys(o: {}): string[]; - /** - * Returns true if the values are the same value, false otherwise. - * @param value1 The first value. - * @param value2 The second value. - */ - is(value1: any, value2: any): boolean; + /** + * Returns true if the values are the same value, false otherwise. + * @param value1 The first value. + * @param value2 The second value. + */ + is(value1: any, value2: any): boolean; - /** - * Sets the prototype of a specified object o to object proto or null. Returns the object o. - * @param o The object to change its prototype. - * @param proto The value of the new prototype or null. - */ - setPrototypeOf(o: any, proto: object | null): any; + /** + * Sets the prototype of a specified object o to object proto or null. Returns the object o. + * @param o The object to change its prototype. + * @param proto The value of the new prototype or null. + */ + setPrototypeOf(o: any, proto: object | null): any; } interface ReadonlyArray { - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: T, index: number, obj: readonly T[]) => value is S, thisArg?: any): S | undefined; - - find(predicate: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): T | undefined; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: T, index: number, obj: readonly T[]) => value is S, thisArg?: any): S | undefined; + + find(predicate: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): T | undefined; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): number; - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } interface RegExp { - /** - * Returns a string indicating the flags of the regular expression in question. This field is read-only. - * The characters in this string are sequenced and concatenated in the following order: - * - * - "g" for global - * - "i" for ignoreCase - * - "m" for multiline - * - "u" for unicode - * - "y" for sticky - * - * If no flags are set, the value is the empty string. - */ - readonly flags: string; + /** + * Returns a string indicating the flags of the regular expression in question. This field is read-only. + * The characters in this string are sequenced and concatenated in the following order: + * + * - "g" for global + * - "i" for ignoreCase + * - "m" for multiline + * - "u" for unicode + * - "y" for sticky + * + * If no flags are set, the value is the empty string. + */ + readonly flags: string; - /** - * Returns a Boolean value indicating the state of the sticky flag (y) used with a regular - * expression. Default is false. Read-only. - */ - readonly sticky: boolean; + /** + * Returns a Boolean value indicating the state of the sticky flag (y) used with a regular + * expression. Default is false. Read-only. + */ + readonly sticky: boolean; - /** - * Returns a Boolean value indicating the state of the Unicode flag (u) used with a regular - * expression. Default is false. Read-only. - */ - readonly unicode: boolean; + /** + * Returns a Boolean value indicating the state of the Unicode flag (u) used with a regular + * expression. Default is false. Read-only. + */ + readonly unicode: boolean; } interface RegExpConstructor { - new (pattern: RegExp | string, flags?: string): RegExp; + new (pattern: RegExp | string, flags?: string): RegExp; - (pattern: RegExp | string, flags?: string): RegExp; + (pattern: RegExp | string, flags?: string): RegExp; } interface String { - /** - * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point - * value of the UTF-16 encoded code point starting at the string element at position pos in - * the String resulting from converting this object to a String. - * If there is no element at that position, the result is undefined. - * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos. - */ - codePointAt(pos: number): number | undefined; + /** + * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point + * value of the UTF-16 encoded code point starting at the string element at position pos in + * the String resulting from converting this object to a String. + * If there is no element at that position, the result is undefined. + * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos. + */ + codePointAt(pos: number): number | undefined; - /** - * Returns true if searchString appears as a substring of the result of converting this - * object to a String, at one or more positions that are - * greater than or equal to position; otherwise, returns false. - * @param searchString search string - * @param position If position is undefined, 0 is assumed, so as to search all of the String. - */ - includes(searchString: string, position?: number): boolean; + /** + * Returns true if searchString appears as a substring of the result of converting this + * object to a String, at one or more positions that are + * greater than or equal to position; otherwise, returns false. + * @param searchString search string + * @param position If position is undefined, 0 is assumed, so as to search all of the String. + */ + includes(searchString: string, position?: number): boolean; - /** - * Returns true if the sequence of elements of searchString converted to a String is the - * same as the corresponding elements of this object (converted to a String) starting at - * endPosition – length(this). Otherwise returns false. - */ - endsWith(searchString: string, endPosition?: number): boolean; + /** + * Returns true if the sequence of elements of searchString converted to a String is the + * same as the corresponding elements of this object (converted to a String) starting at + * endPosition – length(this). Otherwise returns false. + */ + endsWith(searchString: string, endPosition?: number): boolean; - /** - * Returns the String value result of normalizing the string into the normalization form - * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms. - * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default - * is "NFC" - */ - normalize(form: "NFC" | "NFD" | "NFKC" | "NFKD"): string; + /** + * Returns the String value result of normalizing the string into the normalization form + * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms. + * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default + * is "NFC" + */ + normalize(form: "NFC" | "NFD" | "NFKC" | "NFKD"): string; - /** - * Returns the String value result of normalizing the string into the normalization form - * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms. - * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default - * is "NFC" - */ - normalize(form?: string): string; + /** + * Returns the String value result of normalizing the string into the normalization form + * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms. + * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default + * is "NFC" + */ + normalize(form?: string): string; - /** - * Returns a String value that is made from count copies appended together. If count is 0, - * the empty string is returned. - * @param count number of copies to append - */ - repeat(count: number): string; + /** + * Returns a String value that is made from count copies appended together. If count is 0, + * the empty string is returned. + * @param count number of copies to append + */ + repeat(count: number): string; - /** - * Returns true if the sequence of elements of searchString converted to a String is the - * same as the corresponding elements of this object (converted to a String) starting at - * position. Otherwise returns false. - */ - startsWith(searchString: string, position?: number): boolean; + /** + * Returns true if the sequence of elements of searchString converted to a String is the + * same as the corresponding elements of this object (converted to a String) starting at + * position. Otherwise returns false. + */ + startsWith(searchString: string, position?: number): boolean; } interface StringConstructor { - /** - * Return the String value whose elements are, in order, the elements in the List elements. - * If length is 0, the empty string is returned. - */ - fromCodePoint(...codePoints: number[]): string; + /** + * Return the String value whose elements are, in order, the elements in the List elements. + * If length is 0, the empty string is returned. + */ + fromCodePoint(...codePoints: number[]): string; - /** - * String.raw is usually used as a tag function of a Tagged Template String. When called as - * such, the first argument will be a well formed template call site object and the rest - * parameter will contain the substitution values. It can also be called directly, for example, - * to interleave strings and values from your own tag function, and in this case the only thing - * it needs from the first argument is the raw property. - * @param template A well-formed template string call site representation. - * @param substitutions A set of substitution values. - */ - raw(template: { raw: readonly string[] | ArrayLike; }, ...substitutions: any[]): string; + /** + * String.raw is usually used as a tag function of a Tagged Template String. When called as + * such, the first argument will be a well formed template call site object and the rest + * parameter will contain the substitution values. It can also be called directly, for example, + * to interleave strings and values from your own tag function, and in this case the only thing + * it needs from the first argument is the raw property. + * @param template A well-formed template string call site representation. + * @param substitutions A set of substitution values. + */ + raw(template: { raw: readonly string[] | ArrayLike; }, ...substitutions: any[]): string; } interface Int8Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Uint8Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Uint8ClampedArray { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Int16Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Uint16Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Int32Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Uint32Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Float32Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Float64Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } ///////////////////////////// // lib.es2015.generator.d.ts ///////////////////////////// interface Generator extends IteratorObject { - // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. - next(...[value]: [] | [TNext]): IteratorResult; + // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. + next(...[value]: [] | [TNext]): IteratorResult; - return(value: TReturn): IteratorResult; + return(value: TReturn): IteratorResult; - throw(e: any): IteratorResult; + throw(e: any): IteratorResult; - [Symbol.iterator](): Generator; + [Symbol.iterator](): Generator; } interface GeneratorFunction { - /** - * Creates a new Generator object. - * @param args A list of arguments the function accepts. - */ - new (...args: any[]): Generator; + /** + * Creates a new Generator object. + * @param args A list of arguments the function accepts. + */ + new (...args: any[]): Generator; - /** - * Creates a new Generator object. - * @param args A list of arguments the function accepts. - */ - (...args: any[]): Generator; + /** + * Creates a new Generator object. + * @param args A list of arguments the function accepts. + */ + (...args: any[]): Generator; - /** - * The length of the arguments. - */ - readonly length: number; + /** + * The length of the arguments. + */ + readonly length: number; - /** - * Returns the name of the function. - */ - readonly name: string; + /** + * Returns the name of the function. + */ + readonly name: string; - /** - * A reference to the prototype. - */ - readonly prototype: Generator; + /** + * A reference to the prototype. + */ + readonly prototype: Generator; } ///////////////////////////// // lib.es2015.iterable.d.ts ///////////////////////////// interface SymbolConstructor { - /** - * A method that returns the default iterator for an object. Called by the semantics of the - * for-of statement. - */ - readonly iterator: unique symbol; + /** + * A method that returns the default iterator for an object. Called by the semantics of the + * for-of statement. + */ + readonly iterator: unique symbol; } interface IteratorYieldResult { - done?: false; + done?: false; - value: TYield; + value: TYield; } interface IteratorReturnResult { - done: true; + done: true; - value: TReturn; + value: TReturn; } type IteratorResult = IteratorYieldResult | IteratorReturnResult; interface Iterator { - // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. - next(...[value]: [] | [TNext]): IteratorResult; + // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. + next(...[value]: [] | [TNext]): IteratorResult; - return?(value?: TReturn): IteratorResult; + return?(value?: TReturn): IteratorResult; - throw?(e?: any): IteratorResult; + throw?(e?: any): IteratorResult; } interface Iterable { - [Symbol.iterator](): Iterator; + [Symbol.iterator](): Iterator; } /** * Describes a user-defined {@link Iterator} that is also iterable. */ interface IterableIterator extends Iterator { - [Symbol.iterator](): IterableIterator; + [Symbol.iterator](): IterableIterator; } /** * Describes an {@link Iterator} produced by the runtime that inherits from the intrinsic `Iterator.prototype`. */ interface IteratorObject extends Iterator { - [Symbol.iterator](): IteratorObject; + [Symbol.iterator](): IteratorObject; } /** @@ -798,589 +798,589 @@ interface IteratorObject extends Iterator type BuiltinIteratorReturn = intrinsic; interface ArrayIterator extends IteratorObject { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; } interface Array { - /** Iterator */ - [Symbol.iterator](): ArrayIterator; + /** Iterator */ + [Symbol.iterator](): ArrayIterator; - /** - * Returns an iterable of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, T]>; + /** + * Returns an iterable of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, T]>; - /** - * Returns an iterable of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an iterable of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an iterable of values in the array - */ - values(): ArrayIterator; + /** + * Returns an iterable of values in the array + */ + values(): ArrayIterator; } interface ArrayConstructor { - /** - * Creates an array from an iterable object. - * @param iterable An iterable object to convert to an array. - */ - from(iterable: Iterable | ArrayLike): T[]; + /** + * Creates an array from an iterable object. + * @param iterable An iterable object to convert to an array. + */ + from(iterable: Iterable | ArrayLike): T[]; - /** - * Creates an array from an iterable object. - * @param iterable An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; + /** + * Creates an array from an iterable object. + * @param iterable An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } interface ReadonlyArray { - /** Iterator of values in the array. */ - [Symbol.iterator](): ArrayIterator; + /** Iterator of values in the array. */ + [Symbol.iterator](): ArrayIterator; - /** - * Returns an iterable of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, T]>; + /** + * Returns an iterable of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, T]>; - /** - * Returns an iterable of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an iterable of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an iterable of values in the array - */ - values(): ArrayIterator; + /** + * Returns an iterable of values in the array + */ + values(): ArrayIterator; } interface IArguments { - /** Iterator */ - [Symbol.iterator](): ArrayIterator; + /** Iterator */ + [Symbol.iterator](): ArrayIterator; } interface MapIterator extends IteratorObject { - [Symbol.iterator](): MapIterator; + [Symbol.iterator](): MapIterator; } interface Map { - /** Returns an iterable of entries in the map. */ - [Symbol.iterator](): MapIterator<[K, V]>; + /** Returns an iterable of entries in the map. */ + [Symbol.iterator](): MapIterator<[K, V]>; - /** - * Returns an iterable of key, value pairs for every entry in the map. - */ - entries(): MapIterator<[K, V]>; + /** + * Returns an iterable of key, value pairs for every entry in the map. + */ + entries(): MapIterator<[K, V]>; - /** - * Returns an iterable of keys in the map - */ - keys(): MapIterator; + /** + * Returns an iterable of keys in the map + */ + keys(): MapIterator; - /** - * Returns an iterable of values in the map - */ - values(): MapIterator; + /** + * Returns an iterable of values in the map + */ + values(): MapIterator; } interface ReadonlyMap { - /** Returns an iterable of entries in the map. */ - [Symbol.iterator](): MapIterator<[K, V]>; + /** Returns an iterable of entries in the map. */ + [Symbol.iterator](): MapIterator<[K, V]>; - /** - * Returns an iterable of key, value pairs for every entry in the map. - */ - entries(): MapIterator<[K, V]>; + /** + * Returns an iterable of key, value pairs for every entry in the map. + */ + entries(): MapIterator<[K, V]>; - /** - * Returns an iterable of keys in the map - */ - keys(): MapIterator; + /** + * Returns an iterable of keys in the map + */ + keys(): MapIterator; - /** - * Returns an iterable of values in the map - */ - values(): MapIterator; + /** + * Returns an iterable of values in the map + */ + values(): MapIterator; } interface MapConstructor { - new (): Map; + new (): Map; - new (iterable?: Iterable | null): Map; + new (iterable?: Iterable | null): Map; } interface WeakMap { } interface WeakMapConstructor { - new (iterable?: Iterable | null): WeakMap; + new (iterable?: Iterable | null): WeakMap; } interface SetIterator extends IteratorObject { - [Symbol.iterator](): SetIterator; + [Symbol.iterator](): SetIterator; } interface Set { - /** Iterates over values in the set. */ - [Symbol.iterator](): SetIterator; + /** Iterates over values in the set. */ + [Symbol.iterator](): SetIterator; - /** - * Returns an iterable of [v,v] pairs for every value `v` in the set. - */ - entries(): SetIterator<[T, T]>; + /** + * Returns an iterable of [v,v] pairs for every value `v` in the set. + */ + entries(): SetIterator<[T, T]>; - /** - * Despite its name, returns an iterable of the values in the set. - */ - keys(): SetIterator; + /** + * Despite its name, returns an iterable of the values in the set. + */ + keys(): SetIterator; - /** - * Returns an iterable of values in the set. - */ - values(): SetIterator; + /** + * Returns an iterable of values in the set. + */ + values(): SetIterator; } interface ReadonlySet { - /** Iterates over values in the set. */ - [Symbol.iterator](): SetIterator; + /** Iterates over values in the set. */ + [Symbol.iterator](): SetIterator; - /** - * Returns an iterable of [v,v] pairs for every value `v` in the set. - */ - entries(): SetIterator<[T, T]>; + /** + * Returns an iterable of [v,v] pairs for every value `v` in the set. + */ + entries(): SetIterator<[T, T]>; - /** - * Despite its name, returns an iterable of the values in the set. - */ - keys(): SetIterator; + /** + * Despite its name, returns an iterable of the values in the set. + */ + keys(): SetIterator; - /** - * Returns an iterable of values in the set. - */ - values(): SetIterator; + /** + * Returns an iterable of values in the set. + */ + values(): SetIterator; } interface SetConstructor { - new (iterable?: Iterable | null): Set; + new (iterable?: Iterable | null): Set; } interface WeakSet { } interface WeakSetConstructor { - new (iterable: Iterable): WeakSet; + new (iterable: Iterable): WeakSet; } interface PromiseConstructor { - /** - * Creates a Promise that is resolved with an array of results when all of the provided Promises - * resolve, or rejected when any Promise is rejected. - * @param values An iterable of Promises. - * @returns A new Promise. - */ - all(values: Iterable>): Promise[]>; + /** + * Creates a Promise that is resolved with an array of results when all of the provided Promises + * resolve, or rejected when any Promise is rejected. + * @param values An iterable of Promises. + * @returns A new Promise. + */ + all(values: Iterable>): Promise[]>; - /** - * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved - * or rejected. - * @param values An iterable of Promises. - * @returns A new Promise. - */ - race(values: Iterable>): Promise>; + /** + * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved + * or rejected. + * @param values An iterable of Promises. + * @returns A new Promise. + */ + race(values: Iterable>): Promise>; } interface StringIterator extends IteratorObject { - [Symbol.iterator](): StringIterator; + [Symbol.iterator](): StringIterator; } interface String { - /** Iterator */ - [Symbol.iterator](): StringIterator; + /** Iterator */ + [Symbol.iterator](): StringIterator; } interface Int8Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Int8ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Int8Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Int8Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int8Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int8Array; } interface Uint8Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Uint8ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Uint8Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Uint8Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8Array; } interface Uint8ClampedArray { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Uint8ClampedArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Uint8ClampedArray; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Uint8ClampedArray; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } interface Int16Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Int16ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Int16Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Int16Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int16Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int16Array; } interface Uint16Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Uint16ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Uint16Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Uint16Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint16Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint16Array; } interface Int32Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Int32ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Int32Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Int32Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int32Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int32Array; } interface Uint32Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Uint32ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Uint32Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Uint32Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint32Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint32Array; } interface Float32Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Float32ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Float32Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Float32Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Float32Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Float32Array; } interface Float64Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Float64ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Float64Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Float64Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Float64Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Float64Array; } ///////////////////////////// // lib.es2015.promise.d.ts ///////////////////////////// interface PromiseConstructor { - /** - * A reference to the prototype. - */ - readonly prototype: Promise; + /** + * A reference to the prototype. + */ + readonly prototype: Promise; - /** - * Creates a new Promise. - * @param executor A callback used to initialize the promise. This callback is passed two arguments: - * a resolve callback used to resolve the promise with a value or the result of another promise, - * and a reject callback used to reject the promise with a provided reason or error. - */ - new (executor: (resolve: (value: T | PromiseLike) => void, reject: (reason?: any) => void) => void): Promise; + /** + * Creates a new Promise. + * @param executor A callback used to initialize the promise. This callback is passed two arguments: + * a resolve callback used to resolve the promise with a value or the result of another promise, + * and a reject callback used to reject the promise with a provided reason or error. + */ + new (executor: (resolve: (value: T | PromiseLike) => void, reject: (reason?: any) => void) => void): Promise; - /** - * Creates a Promise that is resolved with an array of results when all of the provided Promises - * resolve, or rejected when any Promise is rejected. - * @param values An array of Promises. - * @returns A new Promise. - */ - all(values: T): Promise<{ -readonly [P in keyof T]: Awaited; }>; + /** + * Creates a Promise that is resolved with an array of results when all of the provided Promises + * resolve, or rejected when any Promise is rejected. + * @param values An array of Promises. + * @returns A new Promise. + */ + all(values: T): Promise<{ -readonly [P in keyof T]: Awaited; }>; - // see: lib.es2015.iterable.d.ts - // all(values: Iterable>): Promise[]>; + // see: lib.es2015.iterable.d.ts + // all(values: Iterable>): Promise[]>; - /** - * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved - * or rejected. - * @param values An array of Promises. - * @returns A new Promise. - */ - race(values: T): Promise>; + /** + * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved + * or rejected. + * @param values An array of Promises. + * @returns A new Promise. + */ + race(values: T): Promise>; - // see: lib.es2015.iterable.d.ts - // race(values: Iterable>): Promise>; + // see: lib.es2015.iterable.d.ts + // race(values: Iterable>): Promise>; - /** - * Creates a new rejected promise for the provided reason. - * @param reason The reason the promise was rejected. - * @returns A new rejected Promise. - */ - reject(reason?: any): Promise; + /** + * Creates a new rejected promise for the provided reason. + * @param reason The reason the promise was rejected. + * @returns A new rejected Promise. + */ + reject(reason?: any): Promise; - /** - * Creates a new resolved promise. - * @returns A resolved promise. - */ - resolve(): Promise; + /** + * Creates a new resolved promise. + * @returns A resolved promise. + */ + resolve(): Promise; - /** - * Creates a new resolved promise for the provided value. - * @param value A promise. - * @returns A promise whose internal state matches the provided promise. - */ - resolve(value: T): Promise>; + /** + * Creates a new resolved promise for the provided value. + * @param value A promise. + * @returns A promise whose internal state matches the provided promise. + */ + resolve(value: T): Promise>; - /** - * Creates a new resolved promise for the provided value. - * @param value A promise. - * @returns A promise whose internal state matches the provided promise. - */ - resolve(value: T | PromiseLike): Promise>; + /** + * Creates a new resolved promise for the provided value. + * @param value A promise. + * @returns A promise whose internal state matches the provided promise. + */ + resolve(value: T | PromiseLike): Promise>; } declare var Promise: PromiseConstructor; @@ -1389,113 +1389,113 @@ declare var Promise: PromiseConstructor; // lib.es2015.proxy.d.ts ///////////////////////////// interface ProxyHandler { - /** - * A trap method for a function call. - * @param target The original callable object which is being proxied. - */ - apply?(target: T, thisArg: any, argArray: any[]): any; + /** + * A trap method for a function call. + * @param target The original callable object which is being proxied. + */ + apply?(target: T, thisArg: any, argArray: any[]): any; - /** - * A trap for the `new` operator. - * @param target The original object which is being proxied. - * @param newTarget The constructor that was originally called. - */ - construct?(target: T, argArray: any[], newTarget: Function): object; + /** + * A trap for the `new` operator. + * @param target The original object which is being proxied. + * @param newTarget The constructor that was originally called. + */ + construct?(target: T, argArray: any[], newTarget: Function): object; - /** - * A trap for `Object.defineProperty()`. - * @param target The original object which is being proxied. - * @returns A `Boolean` indicating whether or not the property has been defined. - */ - defineProperty?(target: T, property: string | symbol, attributes: PropertyDescriptor): boolean; + /** + * A trap for `Object.defineProperty()`. + * @param target The original object which is being proxied. + * @returns A `Boolean` indicating whether or not the property has been defined. + */ + defineProperty?(target: T, property: string | symbol, attributes: PropertyDescriptor): boolean; - /** - * A trap for the `delete` operator. - * @param target The original object which is being proxied. - * @param p The name or `Symbol` of the property to delete. - * @returns A `Boolean` indicating whether or not the property was deleted. - */ - deleteProperty?(target: T, p: string | symbol): boolean; + /** + * A trap for the `delete` operator. + * @param target The original object which is being proxied. + * @param p The name or `Symbol` of the property to delete. + * @returns A `Boolean` indicating whether or not the property was deleted. + */ + deleteProperty?(target: T, p: string | symbol): boolean; - /** - * A trap for getting a property value. - * @param target The original object which is being proxied. - * @param p The name or `Symbol` of the property to get. - * @param receiver The proxy or an object that inherits from the proxy. - */ - get?(target: T, p: string | symbol, receiver: any): any; + /** + * A trap for getting a property value. + * @param target The original object which is being proxied. + * @param p The name or `Symbol` of the property to get. + * @param receiver The proxy or an object that inherits from the proxy. + */ + get?(target: T, p: string | symbol, receiver: any): any; - /** - * A trap for `Object.getOwnPropertyDescriptor()`. - * @param target The original object which is being proxied. - * @param p The name of the property whose description should be retrieved. - */ - getOwnPropertyDescriptor?(target: T, p: string | symbol): PropertyDescriptor | undefined; + /** + * A trap for `Object.getOwnPropertyDescriptor()`. + * @param target The original object which is being proxied. + * @param p The name of the property whose description should be retrieved. + */ + getOwnPropertyDescriptor?(target: T, p: string | symbol): PropertyDescriptor | undefined; - /** - * A trap for the `[[GetPrototypeOf]]` internal method. - * @param target The original object which is being proxied. - */ - getPrototypeOf?(target: T): object | null; + /** + * A trap for the `[[GetPrototypeOf]]` internal method. + * @param target The original object which is being proxied. + */ + getPrototypeOf?(target: T): object | null; - /** - * A trap for the `in` operator. - * @param target The original object which is being proxied. - * @param p The name or `Symbol` of the property to check for existence. - */ - has?(target: T, p: string | symbol): boolean; + /** + * A trap for the `in` operator. + * @param target The original object which is being proxied. + * @param p The name or `Symbol` of the property to check for existence. + */ + has?(target: T, p: string | symbol): boolean; - /** - * A trap for `Object.isExtensible()`. - * @param target The original object which is being proxied. - */ - isExtensible?(target: T): boolean; + /** + * A trap for `Object.isExtensible()`. + * @param target The original object which is being proxied. + */ + isExtensible?(target: T): boolean; - /** - * A trap for `Reflect.ownKeys()`. - * @param target The original object which is being proxied. - */ - ownKeys?(target: T): ArrayLike; + /** + * A trap for `Reflect.ownKeys()`. + * @param target The original object which is being proxied. + */ + ownKeys?(target: T): ArrayLike; - /** - * A trap for `Object.preventExtensions()`. - * @param target The original object which is being proxied. - */ - preventExtensions?(target: T): boolean; + /** + * A trap for `Object.preventExtensions()`. + * @param target The original object which is being proxied. + */ + preventExtensions?(target: T): boolean; - /** - * A trap for setting a property value. - * @param target The original object which is being proxied. - * @param p The name or `Symbol` of the property to set. - * @param receiver The object to which the assignment was originally directed. - * @returns A `Boolean` indicating whether or not the property was set. - */ - set?(target: T, p: string | symbol, newValue: any, receiver: any): boolean; + /** + * A trap for setting a property value. + * @param target The original object which is being proxied. + * @param p The name or `Symbol` of the property to set. + * @param receiver The object to which the assignment was originally directed. + * @returns A `Boolean` indicating whether or not the property was set. + */ + set?(target: T, p: string | symbol, newValue: any, receiver: any): boolean; - /** - * A trap for `Object.setPrototypeOf()`. - * @param target The original object which is being proxied. - * @param newPrototype The object's new prototype or `null`. - */ - setPrototypeOf?(target: T, v: object | null): boolean; + /** + * A trap for `Object.setPrototypeOf()`. + * @param target The original object which is being proxied. + * @param newPrototype The object's new prototype or `null`. + */ + setPrototypeOf?(target: T, v: object | null): boolean; } interface ProxyConstructor { - /** - * Creates a revocable Proxy object. - * @param target A target object to wrap with Proxy. - * @param handler An object whose properties define the behavior of Proxy when an operation is attempted on it. - */ - revocable(target: T, handler: ProxyHandler): { proxy: T; revoke: () => void; }; + /** + * Creates a revocable Proxy object. + * @param target A target object to wrap with Proxy. + * @param handler An object whose properties define the behavior of Proxy when an operation is attempted on it. + */ + revocable(target: T, handler: ProxyHandler): { proxy: T; revoke: () => void; }; - /** - * Creates a Proxy object. The Proxy object allows you to create an object that can be used in place of the - * original object, but which may redefine fundamental Object operations like getting, setting, and defining - * properties. Proxy objects are commonly used to log property accesses, validate, format, or sanitize inputs. - * @param target A target object to wrap with Proxy. - * @param handler An object whose properties define the behavior of Proxy when an operation is attempted on it. - */ - new (target: T, handler: ProxyHandler): T; + /** + * Creates a Proxy object. The Proxy object allows you to create an object that can be used in place of the + * original object, but which may redefine fundamental Object operations like getting, setting, and defining + * properties. Proxy objects are commonly used to log property accesses, validate, format, or sanitize inputs. + * @param target A target object to wrap with Proxy. + * @param handler An object whose properties define the behavior of Proxy when an operation is attempted on it. + */ + new (target: T, handler: ProxyHandler): T; } declare var Proxy: ProxyConstructor; @@ -1504,163 +1504,163 @@ declare var Proxy: ProxyConstructor; // lib.es2015.reflect.d.ts ///////////////////////////// declare namespace Reflect { - /** - * Calls the function with the specified object as the this value - * and the elements of specified array as the arguments. - * @param target The function to call. - * @param thisArgument The object to be used as the this object. - * @param argumentsList An array of argument values to be passed to the function. - */ - function apply( - target: (this: T, ...args: A) => R, - thisArgument: T, - argumentsList: Readonly, - ): R; - - function apply(target: Function, thisArgument: any, argumentsList: ArrayLike): any; - - /** - * Constructs the target with the elements of specified array as the arguments - * and the specified constructor as the `new.target` value. - * @param target The constructor to invoke. - * @param argumentsList An array of argument values to be passed to the constructor. - * @param newTarget The constructor to be used as the `new.target` object. - */ - function construct( - target: new (...args: A) => R, - argumentsList: Readonly, - newTarget?: new (...args: any) => any, - ): R; - - function construct(target: Function, argumentsList: ArrayLike, newTarget?: Function): any; +/** + * Calls the function with the specified object as the this value + * and the elements of specified array as the arguments. + * @param target The function to call. + * @param thisArgument The object to be used as the this object. + * @param argumentsList An array of argument values to be passed to the function. + */ + function apply( + target: (this: T, ...args: A) => R, + thisArgument: T, + argumentsList: Readonly, + ): R; + +function apply(target: Function, thisArgument: any, argumentsList: ArrayLike): any; - /** - * Adds a property to an object, or modifies attributes of an existing property. - * @param target Object on which to add or modify the property. This can be a native JavaScript object - * (that is, a user-defined object or a built in object) or a DOM object. - * @param propertyKey The property name. - * @param attributes Descriptor for the property. It can be for a data property or an accessor property. - */ - function defineProperty(target: object, propertyKey: PropertyKey, attributes: PropertyDescriptor & ThisType): boolean; +/** + * Constructs the target with the elements of specified array as the arguments + * and the specified constructor as the `new.target` value. + * @param target The constructor to invoke. + * @param argumentsList An array of argument values to be passed to the constructor. + * @param newTarget The constructor to be used as the `new.target` object. + */ + function construct( + target: new (...args: A) => R, + argumentsList: Readonly, + newTarget?: new (...args: any) => any, + ): R; + +function construct(target: Function, argumentsList: ArrayLike, newTarget?: Function): any; - /** - * Removes a property from an object, equivalent to `delete target[propertyKey]`, - * except it won't throw if `target[propertyKey]` is non-configurable. - * @param target Object from which to remove the own property. - * @param propertyKey The property name. - */ - function deleteProperty(target: object, propertyKey: PropertyKey): boolean; +/** + * Adds a property to an object, or modifies attributes of an existing property. + * @param target Object on which to add or modify the property. This can be a native JavaScript object + * (that is, a user-defined object or a built in object) or a DOM object. + * @param propertyKey The property name. + * @param attributes Descriptor for the property. It can be for a data property or an accessor property. + */ + function defineProperty(target: object, propertyKey: PropertyKey, attributes: PropertyDescriptor & ThisType): boolean; - /** - * Gets the property of target, equivalent to `target[propertyKey]` when `receiver === target`. - * @param target Object that contains the property on itself or in its prototype chain. - * @param propertyKey The property name. - * @param receiver The reference to use as the `this` value in the getter function, - * if `target[propertyKey]` is an accessor property. - */ - function get( - target: T, - propertyKey: P, - receiver?: unknown, - ): P extends keyof T ? T[P] : any; +/** + * Removes a property from an object, equivalent to `delete target[propertyKey]`, + * except it won't throw if `target[propertyKey]` is non-configurable. + * @param target Object from which to remove the own property. + * @param propertyKey The property name. + */ + function deleteProperty(target: object, propertyKey: PropertyKey): boolean; - /** - * Gets the own property descriptor of the specified object. - * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype. - * @param target Object that contains the property. - * @param propertyKey The property name. - */ - function getOwnPropertyDescriptor( - target: T, - propertyKey: P, - ): TypedPropertyDescriptor

| undefined; +/** + * Gets the property of target, equivalent to `target[propertyKey]` when `receiver === target`. + * @param target Object that contains the property on itself or in its prototype chain. + * @param propertyKey The property name. + * @param receiver The reference to use as the `this` value in the getter function, + * if `target[propertyKey]` is an accessor property. + */ + function get( + target: T, + propertyKey: P, + receiver?: unknown, + ): P extends keyof T ? T[P] : any; - /** - * Returns the prototype of an object. - * @param target The object that references the prototype. - */ - function getPrototypeOf(target: object): object | null; +/** + * Gets the own property descriptor of the specified object. + * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype. + * @param target Object that contains the property. + * @param propertyKey The property name. + */ + function getOwnPropertyDescriptor( + target: T, + propertyKey: P, + ): TypedPropertyDescriptor

| undefined; - /** - * Equivalent to `propertyKey in target`. - * @param target Object that contains the property on itself or in its prototype chain. - * @param propertyKey Name of the property. - */ - function has(target: object, propertyKey: PropertyKey): boolean; +/** + * Returns the prototype of an object. + * @param target The object that references the prototype. + */ + function getPrototypeOf(target: object): object | null; - /** - * Returns a value that indicates whether new properties can be added to an object. - * @param target Object to test. - */ - function isExtensible(target: object): boolean; +/** + * Equivalent to `propertyKey in target`. + * @param target Object that contains the property on itself or in its prototype chain. + * @param propertyKey Name of the property. + */ + function has(target: object, propertyKey: PropertyKey): boolean; - /** - * Returns the string and symbol keys of the own properties of an object. The own properties of an object - * are those that are defined directly on that object, and are not inherited from the object's prototype. - * @param target Object that contains the own properties. - */ - function ownKeys(target: object): (string | symbol)[]; +/** + * Returns a value that indicates whether new properties can be added to an object. + * @param target Object to test. + */ + function isExtensible(target: object): boolean; - /** - * Prevents the addition of new properties to an object. - * @param target Object to make non-extensible. - * @return Whether the object has been made non-extensible. - */ - function preventExtensions(target: object): boolean; +/** + * Returns the string and symbol keys of the own properties of an object. The own properties of an object + * are those that are defined directly on that object, and are not inherited from the object's prototype. + * @param target Object that contains the own properties. + */ + function ownKeys(target: object): (string | symbol)[]; - /** - * Sets the property of target, equivalent to `target[propertyKey] = value` when `receiver === target`. - * @param target Object that contains the property on itself or in its prototype chain. - * @param propertyKey Name of the property. - * @param receiver The reference to use as the `this` value in the setter function, - * if `target[propertyKey]` is an accessor property. - */ - function set( - target: T, - propertyKey: P, - value: P extends keyof T ? T[P] : any, - receiver?: any, - ): boolean; +/** + * Prevents the addition of new properties to an object. + * @param target Object to make non-extensible. + * @return Whether the object has been made non-extensible. + */ + function preventExtensions(target: object): boolean; - function set(target: object, propertyKey: PropertyKey, value: any, receiver?: any): boolean; +/** + * Sets the property of target, equivalent to `target[propertyKey] = value` when `receiver === target`. + * @param target Object that contains the property on itself or in its prototype chain. + * @param propertyKey Name of the property. + * @param receiver The reference to use as the `this` value in the setter function, + * if `target[propertyKey]` is an accessor property. + */ + function set( + target: T, + propertyKey: P, + value: P extends keyof T ? T[P] : any, + receiver?: any, + ): boolean; + +function set(target: object, propertyKey: PropertyKey, value: any, receiver?: any): boolean; - /** - * Sets the prototype of a specified object o to object proto or null. - * @param target The object to change its prototype. - * @param proto The value of the new prototype or null. - * @return Whether setting the prototype was successful. - */ - function setPrototypeOf(target: object, proto: object | null): boolean; +/** + * Sets the prototype of a specified object o to object proto or null. + * @param target The object to change its prototype. + * @param proto The value of the new prototype or null. + * @return Whether setting the prototype was successful. + */ + function setPrototypeOf(target: object, proto: object | null): boolean; } ///////////////////////////// // lib.es2015.symbol.d.ts ///////////////////////////// interface SymbolConstructor { - /** - * A reference to the prototype. - */ - readonly prototype: Symbol; + /** + * A reference to the prototype. + */ + readonly prototype: Symbol; - /** - * Returns a new unique Symbol value. - * @param description Description of the new Symbol object. - */ - (description?: string | number): symbol; + /** + * Returns a new unique Symbol value. + * @param description Description of the new Symbol object. + */ + (description?: string | number): symbol; - /** - * Returns a Symbol object from the global symbol registry matching the given key if found. - * Otherwise, returns a new symbol with this key. - * @param key key to search for. - */ - for(key: string): symbol; + /** + * Returns a Symbol object from the global symbol registry matching the given key if found. + * Otherwise, returns a new symbol with this key. + * @param key key to search for. + */ + for(key: string): symbol; - /** - * Returns a key from the global symbol registry matching the given Symbol if found. - * Otherwise, returns undefined. - * @param sym Symbol to find the key for. - */ - keyFor(sym: symbol): string | undefined; + /** + * Returns a key from the global symbol registry matching the given Symbol if found. + * Otherwise, returns undefined. + * @param sym Symbol to find the key for. + */ + keyFor(sym: symbol): string | undefined; } declare var Symbol: SymbolConstructor; @@ -1669,590 +1669,590 @@ declare var Symbol: SymbolConstructor; // lib.es2015.symbol.wellknown.d.ts ///////////////////////////// interface SymbolConstructor { - /** - * A method that determines if a constructor object recognizes an object as one of the - * constructor’s instances. Called by the semantics of the instanceof operator. - */ - readonly hasInstance: unique symbol; + /** + * A method that determines if a constructor object recognizes an object as one of the + * constructor’s instances. Called by the semantics of the instanceof operator. + */ + readonly hasInstance: unique symbol; - /** - * A Boolean value that if true indicates that an object should flatten to its array elements - * by Array.prototype.concat. - */ - readonly isConcatSpreadable: unique symbol; + /** + * A Boolean value that if true indicates that an object should flatten to its array elements + * by Array.prototype.concat. + */ + readonly isConcatSpreadable: unique symbol; - /** - * A regular expression method that matches the regular expression against a string. Called - * by the String.prototype.match method. - */ - readonly match: unique symbol; + /** + * A regular expression method that matches the regular expression against a string. Called + * by the String.prototype.match method. + */ + readonly match: unique symbol; - /** - * A regular expression method that replaces matched substrings of a string. Called by the - * String.prototype.replace method. - */ - readonly replace: unique symbol; + /** + * A regular expression method that replaces matched substrings of a string. Called by the + * String.prototype.replace method. + */ + readonly replace: unique symbol; - /** - * A regular expression method that returns the index within a string that matches the - * regular expression. Called by the String.prototype.search method. - */ - readonly search: unique symbol; + /** + * A regular expression method that returns the index within a string that matches the + * regular expression. Called by the String.prototype.search method. + */ + readonly search: unique symbol; - /** - * A function valued property that is the constructor function that is used to create - * derived objects. - */ - readonly species: unique symbol; + /** + * A function valued property that is the constructor function that is used to create + * derived objects. + */ + readonly species: unique symbol; - /** - * A regular expression method that splits a string at the indices that match the regular - * expression. Called by the String.prototype.split method. - */ - readonly split: unique symbol; + /** + * A regular expression method that splits a string at the indices that match the regular + * expression. Called by the String.prototype.split method. + */ + readonly split: unique symbol; - /** - * A method that converts an object to a corresponding primitive value. - * Called by the ToPrimitive abstract operation. - */ - readonly toPrimitive: unique symbol; + /** + * A method that converts an object to a corresponding primitive value. + * Called by the ToPrimitive abstract operation. + */ + readonly toPrimitive: unique symbol; - /** - * A String value that is used in the creation of the default string description of an object. - * Called by the built-in method Object.prototype.toString. - */ - readonly toStringTag: unique symbol; + /** + * A String value that is used in the creation of the default string description of an object. + * Called by the built-in method Object.prototype.toString. + */ + readonly toStringTag: unique symbol; - /** - * An Object whose truthy properties are properties that are excluded from the 'with' - * environment bindings of the associated objects. - */ - readonly unscopables: unique symbol; + /** + * An Object whose truthy properties are properties that are excluded from the 'with' + * environment bindings of the associated objects. + */ + readonly unscopables: unique symbol; } interface Symbol { - /** - * Converts a Symbol object to a symbol. - */ - [Symbol.toPrimitive](hint: string): symbol; + /** + * Converts a Symbol object to a symbol. + */ + [Symbol.toPrimitive](hint: string): symbol; } interface Array { - /** - * Is an object whose properties have the value 'true' - * when they will be absent when used in a 'with' statement. - */ - readonly [Symbol.unscopables]: { - [K in keyof any[]]?: boolean; - }; + /** + * Is an object whose properties have the value 'true' + * when they will be absent when used in a 'with' statement. + */ + readonly [Symbol.unscopables]: { + [K in keyof any[]]?: boolean; + }; } interface ReadonlyArray { - /** - * Is an object whose properties have the value 'true' - * when they will be absent when used in a 'with' statement. - */ - readonly [Symbol.unscopables]: { - [K in keyof readonly any[]]?: boolean; - }; + /** + * Is an object whose properties have the value 'true' + * when they will be absent when used in a 'with' statement. + */ + readonly [Symbol.unscopables]: { + [K in keyof readonly any[]]?: boolean; + }; } interface Date { - /** - * Converts a Date object to a string. - */ - [Symbol.toPrimitive](hint: "default"): string; + /** + * Converts a Date object to a string. + */ + [Symbol.toPrimitive](hint: "default"): string; - /** - * Converts a Date object to a string. - */ - [Symbol.toPrimitive](hint: "string"): string; + /** + * Converts a Date object to a string. + */ + [Symbol.toPrimitive](hint: "string"): string; - /** - * Converts a Date object to a number. - */ - [Symbol.toPrimitive](hint: "number"): number; + /** + * Converts a Date object to a number. + */ + [Symbol.toPrimitive](hint: "number"): number; - /** - * Converts a Date object to a string or number. - * - * @param hint The strings "number", "string", or "default" to specify what primitive to return. - * - * @throws {TypeError} If 'hint' was given something other than "number", "string", or "default". - * @returns A number if 'hint' was "number", a string if 'hint' was "string" or "default". - */ - [Symbol.toPrimitive](hint: string): string | number; + /** + * Converts a Date object to a string or number. + * + * @param hint The strings "number", "string", or "default" to specify what primitive to return. + * + * @throws {TypeError} If 'hint' was given something other than "number", "string", or "default". + * @returns A number if 'hint' was "number", a string if 'hint' was "string" or "default". + */ + [Symbol.toPrimitive](hint: string): string | number; } interface Map { - readonly [Symbol.toStringTag]: string; + readonly [Symbol.toStringTag]: string; } interface WeakMap { - readonly [Symbol.toStringTag]: string; + readonly [Symbol.toStringTag]: string; } interface Set { - readonly [Symbol.toStringTag]: string; + readonly [Symbol.toStringTag]: string; } interface WeakSet { - readonly [Symbol.toStringTag]: string; + readonly [Symbol.toStringTag]: string; } interface Function { - /** - * Determines whether the given value inherits from this function if this function was used - * as a constructor function. - * - * A constructor function can control which objects are recognized as its instances by - * 'instanceof' by overriding this method. - */ - [Symbol.hasInstance](value: any): boolean; + /** + * Determines whether the given value inherits from this function if this function was used + * as a constructor function. + * + * A constructor function can control which objects are recognized as its instances by + * 'instanceof' by overriding this method. + */ + [Symbol.hasInstance](value: any): boolean; } interface GeneratorFunction { - readonly [Symbol.toStringTag]: string; + readonly [Symbol.toStringTag]: string; } interface PromiseConstructor { - readonly [Symbol.species]: PromiseConstructor; + readonly [Symbol.species]: PromiseConstructor; } interface RegExp { - /** - * Matches a string with this regular expression, and returns an array containing the results of - * that search. - * @param string A string to search within. - */ - [Symbol.match](string: string): RegExpMatchArray | null; + /** + * Matches a string with this regular expression, and returns an array containing the results of + * that search. + * @param string A string to search within. + */ + [Symbol.match](string: string): RegExpMatchArray | null; - /** - * Replaces text in a string, using this regular expression. - * @param string A String object or string literal whose contents matching against - * this regular expression will be replaced - * @param replaceValue A String object or string literal containing the text to replace for every - * successful match of this regular expression. - */ - [Symbol.replace](string: string, replaceValue: string): string; + /** + * Replaces text in a string, using this regular expression. + * @param string A String object or string literal whose contents matching against + * this regular expression will be replaced + * @param replaceValue A String object or string literal containing the text to replace for every + * successful match of this regular expression. + */ + [Symbol.replace](string: string, replaceValue: string): string; - /** - * Replaces text in a string, using this regular expression. - * @param string A String object or string literal whose contents matching against - * this regular expression will be replaced - * @param replacer A function that returns the replacement text. - */ - [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; + /** + * Replaces text in a string, using this regular expression. + * @param string A String object or string literal whose contents matching against + * this regular expression will be replaced + * @param replacer A function that returns the replacement text. + */ + [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; - /** - * Finds the position beginning first substring match in a regular expression search - * using this regular expression. - * - * @param string The string to search within. - */ - [Symbol.search](string: string): number; + /** + * Finds the position beginning first substring match in a regular expression search + * using this regular expression. + * + * @param string The string to search within. + */ + [Symbol.search](string: string): number; - /** - * Returns an array of substrings that were delimited by strings in the original input that - * match against this regular expression. - * - * If the regular expression contains capturing parentheses, then each time this - * regular expression matches, the results (including any undefined results) of the - * capturing parentheses are spliced. - * - * @param string string value to split - * @param limit if not undefined, the output array is truncated so that it contains no more - * than 'limit' elements. - */ - [Symbol.split](string: string, limit?: number): string[]; + /** + * Returns an array of substrings that were delimited by strings in the original input that + * match against this regular expression. + * + * If the regular expression contains capturing parentheses, then each time this + * regular expression matches, the results (including any undefined results) of the + * capturing parentheses are spliced. + * + * @param string string value to split + * @param limit if not undefined, the output array is truncated so that it contains no more + * than 'limit' elements. + */ + [Symbol.split](string: string, limit?: number): string[]; } interface RegExpConstructor { - readonly [Symbol.species]: RegExpConstructor; + readonly [Symbol.species]: RegExpConstructor; } interface String { - /** - * Matches a string or an object that supports being matched against, and returns an array - * containing the results of that search, or null if no matches are found. - * @param matcher An object that supports being matched against. - */ - match(matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null; + /** + * Matches a string or an object that supports being matched against, and returns an array + * containing the results of that search, or null if no matches are found. + * @param matcher An object that supports being matched against. + */ + match(matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null; - /** - * Passes a string and {@linkcode replaceValue} to the `[Symbol.replace]` method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. - * @param searchValue An object that supports searching for and replacing matches within a string. - * @param replaceValue The replacement text. - */ - replace(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string; + /** + * Passes a string and {@linkcode replaceValue} to the `[Symbol.replace]` method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. + * @param searchValue An object that supports searching for and replacing matches within a string. + * @param replaceValue The replacement text. + */ + replace(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string; - /** - * Replaces text in a string, using an object that supports replacement within a string. - * @param searchValue A object can search for and replace matches within a string. - * @param replacer A function that returns the replacement text. - */ - replace(searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string; + /** + * Replaces text in a string, using an object that supports replacement within a string. + * @param searchValue A object can search for and replace matches within a string. + * @param replacer A function that returns the replacement text. + */ + replace(searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string; - /** - * Finds the first substring match in a regular expression search. - * @param searcher An object which supports searching within a string. - */ - search(searcher: { [Symbol.search](string: string): number; }): number; + /** + * Finds the first substring match in a regular expression search. + * @param searcher An object which supports searching within a string. + */ + search(searcher: { [Symbol.search](string: string): number; }): number; - /** - * Split a string into substrings using the specified separator and return them as an array. - * @param splitter An object that can split a string. - * @param limit A value used to limit the number of elements returned in the array. - */ - split(splitter: { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number): string[]; + /** + * Split a string into substrings using the specified separator and return them as an array. + * @param splitter An object that can split a string. + * @param limit A value used to limit the number of elements returned in the array. + */ + split(splitter: { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number): string[]; } interface ArrayConstructor { - readonly [Symbol.species]: ArrayConstructor; + readonly [Symbol.species]: ArrayConstructor; } interface MapConstructor { - readonly [Symbol.species]: MapConstructor; + readonly [Symbol.species]: MapConstructor; } interface SetConstructor { - readonly [Symbol.species]: SetConstructor; + readonly [Symbol.species]: SetConstructor; } interface ArrayBufferConstructor { - readonly [Symbol.species]: ArrayBufferConstructor; + readonly [Symbol.species]: ArrayBufferConstructor; } ///////////////////////////// // lib.es2016.array.include.d.ts ///////////////////////////// interface Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: T, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: T, fromIndex?: number): boolean; } interface ReadonlyArray { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: T, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: T, fromIndex?: number): boolean; } interface Int8Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Uint8Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Uint8ClampedArray { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Int16Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Uint16Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Int32Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Uint32Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Float32Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Float64Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } ///////////////////////////// // lib.es2016.intl.d.ts ///////////////////////////// declare namespace Intl { - /** - * The `Intl.getCanonicalLocales()` method returns an array containing - * the canonical locale names. Duplicates will be omitted and elements - * will be validated as structurally valid language tags. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/getCanonicalLocales) - * - * @param locale A list of String values for which to get the canonical locale names - * @returns An array containing the canonical and validated locale names. - */ - function getCanonicalLocales(locale?: string | readonly string[]): string[]; +/** + * The `Intl.getCanonicalLocales()` method returns an array containing + * the canonical locale names. Duplicates will be omitted and elements + * will be validated as structurally valid language tags. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/getCanonicalLocales) + * + * @param locale A list of String values for which to get the canonical locale names + * @returns An array containing the canonical and validated locale names. + */ + function getCanonicalLocales(locale?: string | readonly string[]): string[]; } ///////////////////////////// // lib.es2017.date.d.ts ///////////////////////////// interface DateConstructor { - /** - * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. - * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. - * @param monthIndex The month as a number between 0 and 11 (January to December). - * @param date The date as a number between 1 and 31. - * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. - * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. - * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. - * @param ms A number from 0 to 999 that specifies the milliseconds. - */ - UTC(year: number, monthIndex?: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; + /** + * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. + * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. + * @param monthIndex The month as a number between 0 and 11 (January to December). + * @param date The date as a number between 1 and 31. + * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. + * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. + * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. + * @param ms A number from 0 to 999 that specifies the milliseconds. + */ + UTC(year: number, monthIndex?: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; } ///////////////////////////// // lib.es2017.intl.d.ts ///////////////////////////// declare namespace Intl { - interface DateTimeFormatPartTypesRegistry { - day: any; +interface DateTimeFormatPartTypesRegistry { + day: any; - dayPeriod: any; + dayPeriod: any; - era: any; + era: any; - hour: any; + hour: any; - literal: any; + literal: any; - minute: any; + minute: any; - month: any; + month: any; - second: any; + second: any; - timeZoneName: any; + timeZoneName: any; - weekday: any; + weekday: any; - year: any; - } + year: any; +} - type DateTimeFormatPartTypes = keyof DateTimeFormatPartTypesRegistry; +type DateTimeFormatPartTypes = keyof DateTimeFormatPartTypesRegistry; - interface DateTimeFormatPart { - type: DateTimeFormatPartTypes; +interface DateTimeFormatPart { + type: DateTimeFormatPartTypes; - value: string; - } + value: string; +} - interface DateTimeFormat { - formatToParts(date?: Date | number): DateTimeFormatPart[]; - } +interface DateTimeFormat { + formatToParts(date?: Date | number): DateTimeFormatPart[]; +} } ///////////////////////////// // lib.es2017.object.d.ts ///////////////////////////// interface ObjectConstructor { - /** - * Returns an array of values of the enumerable own properties of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - values(o: { [s: string]: T; } | ArrayLike): T[]; + /** + * Returns an array of values of the enumerable own properties of an object + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + values(o: { [s: string]: T; } | ArrayLike): T[]; - /** - * Returns an array of values of the enumerable own properties of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - values(o: {}): any[]; + /** + * Returns an array of values of the enumerable own properties of an object + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + values(o: {}): any[]; - /** - * Returns an array of key/values of the enumerable own properties of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - entries(o: { [s: string]: T; } | ArrayLike): [string, T][]; + /** + * Returns an array of key/values of the enumerable own properties of an object + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + entries(o: { [s: string]: T; } | ArrayLike): [string, T][]; - /** - * Returns an array of key/values of the enumerable own properties of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - entries(o: {}): [string, any][]; + /** + * Returns an array of key/values of the enumerable own properties of an object + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + entries(o: {}): [string, any][]; - /** - * Returns an object containing all own property descriptors of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - getOwnPropertyDescriptors(o: T): { [P in keyof T]: TypedPropertyDescriptor; } & { [x: string]: PropertyDescriptor; }; + /** + * Returns an object containing all own property descriptors of an object + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + getOwnPropertyDescriptors(o: T): { [P in keyof T]: TypedPropertyDescriptor; } & { [x: string]: PropertyDescriptor; }; } ///////////////////////////// // lib.es2017.sharedmemory.d.ts ///////////////////////////// interface SharedArrayBuffer { - /** - * Read-only. The length of the ArrayBuffer (in bytes). - */ - readonly byteLength: number; + /** + * Read-only. The length of the ArrayBuffer (in bytes). + */ + readonly byteLength: number; - /** - * Returns a section of an SharedArrayBuffer. - */ - slice(begin?: number, end?: number): SharedArrayBuffer; + /** + * Returns a section of an SharedArrayBuffer. + */ + slice(begin?: number, end?: number): SharedArrayBuffer; - readonly [Symbol.toStringTag]: "SharedArrayBuffer"; + readonly [Symbol.toStringTag]: "SharedArrayBuffer"; } interface SharedArrayBufferConstructor { - readonly prototype: SharedArrayBuffer; + readonly prototype: SharedArrayBuffer; - new (byteLength?: number): SharedArrayBuffer; + new (byteLength?: number): SharedArrayBuffer; - readonly [Symbol.species]: SharedArrayBufferConstructor; + readonly [Symbol.species]: SharedArrayBufferConstructor; } declare var SharedArrayBuffer: SharedArrayBufferConstructor; interface ArrayBufferTypes { - SharedArrayBuffer: SharedArrayBuffer; + SharedArrayBuffer: SharedArrayBuffer; } interface Atomics { - /** - * Adds a value to the value at the given position in the array, returning the original value. - * Until this atomic operation completes, any other read or write operation against the array - * will block. - */ - add(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + /** + * Adds a value to the value at the given position in the array, returning the original value. + * Until this atomic operation completes, any other read or write operation against the array + * will block. + */ + add(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - /** - * Stores the bitwise AND of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or - * write operation against the array will block. - */ - and(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + /** + * Stores the bitwise AND of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or + * write operation against the array will block. + */ + and(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - /** - * Replaces the value at the given position in the array if the original value equals the given - * expected value, returning the original value. Until this atomic operation completes, any - * other read or write operation against the array will block. - */ - compareExchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, expectedValue: number, replacementValue: number): number; + /** + * Replaces the value at the given position in the array if the original value equals the given + * expected value, returning the original value. Until this atomic operation completes, any + * other read or write operation against the array will block. + */ + compareExchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, expectedValue: number, replacementValue: number): number; - /** - * Replaces the value at the given position in the array, returning the original value. Until - * this atomic operation completes, any other read or write operation against the array will - * block. - */ - exchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + /** + * Replaces the value at the given position in the array, returning the original value. Until + * this atomic operation completes, any other read or write operation against the array will + * block. + */ + exchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - /** - * Returns a value indicating whether high-performance algorithms can use atomic operations - * (`true`) or must use locks (`false`) for the given number of bytes-per-element of a typed - * array. - */ - isLockFree(size: number): boolean; + /** + * Returns a value indicating whether high-performance algorithms can use atomic operations + * (`true`) or must use locks (`false`) for the given number of bytes-per-element of a typed + * array. + */ + isLockFree(size: number): boolean; - /** - * Returns the value at the given position in the array. Until this atomic operation completes, - * any other read or write operation against the array will block. - */ - load(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number): number; + /** + * Returns the value at the given position in the array. Until this atomic operation completes, + * any other read or write operation against the array will block. + */ + load(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number): number; - /** - * Stores the bitwise OR of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or write - * operation against the array will block. - */ - or(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + /** + * Stores the bitwise OR of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or write + * operation against the array will block. + */ + or(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - /** - * Stores a value at the given position in the array, returning the new value. Until this - * atomic operation completes, any other read or write operation against the array will block. - */ - store(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + /** + * Stores a value at the given position in the array, returning the new value. Until this + * atomic operation completes, any other read or write operation against the array will block. + */ + store(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - /** - * Subtracts a value from the value at the given position in the array, returning the original - * value. Until this atomic operation completes, any other read or write operation against the - * array will block. - */ - sub(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + /** + * Subtracts a value from the value at the given position in the array, returning the original + * value. Until this atomic operation completes, any other read or write operation against the + * array will block. + */ + sub(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - /** - * If the value at the given position in the array is equal to the provided value, the current - * agent is put to sleep causing execution to suspend until the timeout expires (returning - * `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns - * `"not-equal"`. - */ - wait(typedArray: Int32Array, index: number, value: number, timeout?: number): "ok" | "not-equal" | "timed-out"; + /** + * If the value at the given position in the array is equal to the provided value, the current + * agent is put to sleep causing execution to suspend until the timeout expires (returning + * `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns + * `"not-equal"`. + */ + wait(typedArray: Int32Array, index: number, value: number, timeout?: number): "ok" | "not-equal" | "timed-out"; - /** - * Wakes up sleeping agents that are waiting on the given index of the array, returning the - * number of agents that were awoken. - * @param typedArray A shared Int32Array. - * @param index The position in the typedArray to wake up on. - * @param count The number of sleeping agents to notify. Defaults to +Infinity. - */ - notify(typedArray: Int32Array, index: number, count?: number): number; + /** + * Wakes up sleeping agents that are waiting on the given index of the array, returning the + * number of agents that were awoken. + * @param typedArray A shared Int32Array. + * @param index The position in the typedArray to wake up on. + * @param count The number of sleeping agents to notify. Defaults to +Infinity. + */ + notify(typedArray: Int32Array, index: number, count?: number): number; - /** - * Stores the bitwise XOR of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or write - * operation against the array will block. - */ - xor(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + /** + * Stores the bitwise XOR of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or write + * operation against the array will block. + */ + xor(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - readonly [Symbol.toStringTag]: "Atomics"; + readonly [Symbol.toStringTag]: "Atomics"; } declare var Atomics: Atomics; @@ -2261,249 +2261,249 @@ declare var Atomics: Atomics; // lib.es2017.string.d.ts ///////////////////////////// interface String { - /** - * Pads the current string with a given string (repeated and/or truncated, if needed) so that the resulting string has a given length. - * The padding is applied from the start of the current string. - * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart) - * - * @param targetLength The length of the resulting string once the current `str` has been padded. - * If the value is less than or equal to `str.length`, then `str` is returned as-is. - * - * @param padString The string to pad the current `str` with. - * If `padString` is too long to stay within `targetLength`, it will be truncated from the end. - * The default value is the space character (U+0020). - */ - padStart(targetLength: number, padString?: string): string; + /** + * Pads the current string with a given string (repeated and/or truncated, if needed) so that the resulting string has a given length. + * The padding is applied from the start of the current string. + * + * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart) + * + * @param targetLength The length of the resulting string once the current `str` has been padded. + * If the value is less than or equal to `str.length`, then `str` is returned as-is. + * + * @param padString The string to pad the current `str` with. + * If `padString` is too long to stay within `targetLength`, it will be truncated from the end. + * The default value is the space character (U+0020). + */ + padStart(targetLength: number, padString?: string): string; - /** - * Pads the current string with a given string (repeated and/or truncated, if needed) so that the resulting string has a given length. - * The padding is applied from the end of the current string. - * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padEnd) - * - * @param targetLength The length of the resulting string once the current `str` has been padded. - * If the value is less than or equal to `str.length`, then `str` is returned as-is. - * - * @param padString The string to pad the current `str` with. - * If `padString` is too long to stay within `targetLength`, it will be truncated from the end. - * The default value is the space character (U+0020). - */ - padEnd(targetLength: number, padString?: string): string; + /** + * Pads the current string with a given string (repeated and/or truncated, if needed) so that the resulting string has a given length. + * The padding is applied from the end of the current string. + * + * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padEnd) + * + * @param targetLength The length of the resulting string once the current `str` has been padded. + * If the value is less than or equal to `str.length`, then `str` is returned as-is. + * + * @param padString The string to pad the current `str` with. + * If `padString` is too long to stay within `targetLength`, it will be truncated from the end. + * The default value is the space character (U+0020). + */ + padEnd(targetLength: number, padString?: string): string; } ///////////////////////////// // lib.es2017.typedarrays.d.ts ///////////////////////////// interface Int8ArrayConstructor { - new (): Int8Array; + new (): Int8Array; } interface Uint8ArrayConstructor { - new (): Uint8Array; + new (): Uint8Array; } interface Uint8ClampedArrayConstructor { - new (): Uint8ClampedArray; + new (): Uint8ClampedArray; } interface Int16ArrayConstructor { - new (): Int16Array; + new (): Int16Array; } interface Uint16ArrayConstructor { - new (): Uint16Array; + new (): Uint16Array; } interface Int32ArrayConstructor { - new (): Int32Array; + new (): Int32Array; } interface Uint32ArrayConstructor { - new (): Uint32Array; + new (): Uint32Array; } interface Float32ArrayConstructor { - new (): Float32Array; + new (): Float32Array; } interface Float64ArrayConstructor { - new (): Float64Array; + new (): Float64Array; } ///////////////////////////// // lib.es2018.asyncgenerator.d.ts ///////////////////////////// interface AsyncGenerator extends AsyncIteratorObject { - // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. - next(...[value]: [] | [TNext]): Promise>; + // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. + next(...[value]: [] | [TNext]): Promise>; - return(value: TReturn | PromiseLike): Promise>; + return(value: TReturn | PromiseLike): Promise>; - throw(e: any): Promise>; + throw(e: any): Promise>; - [Symbol.asyncIterator](): AsyncGenerator; + [Symbol.asyncIterator](): AsyncGenerator; } interface AsyncGeneratorFunction { - /** - * Creates a new AsyncGenerator object. - * @param args A list of arguments the function accepts. - */ - new (...args: any[]): AsyncGenerator; + /** + * Creates a new AsyncGenerator object. + * @param args A list of arguments the function accepts. + */ + new (...args: any[]): AsyncGenerator; - /** - * Creates a new AsyncGenerator object. - * @param args A list of arguments the function accepts. - */ - (...args: any[]): AsyncGenerator; + /** + * Creates a new AsyncGenerator object. + * @param args A list of arguments the function accepts. + */ + (...args: any[]): AsyncGenerator; - /** - * The length of the arguments. - */ - readonly length: number; + /** + * The length of the arguments. + */ + readonly length: number; - /** - * Returns the name of the function. - */ - readonly name: string; + /** + * Returns the name of the function. + */ + readonly name: string; - /** - * A reference to the prototype. - */ - readonly prototype: AsyncGenerator; + /** + * A reference to the prototype. + */ + readonly prototype: AsyncGenerator; } ///////////////////////////// // lib.es2018.asynciterable.d.ts ///////////////////////////// interface SymbolConstructor { - /** - * A method that returns the default async iterator for an object. Called by the semantics of - * the for-await-of statement. - */ - readonly asyncIterator: unique symbol; + /** + * A method that returns the default async iterator for an object. Called by the semantics of + * the for-await-of statement. + */ + readonly asyncIterator: unique symbol; } interface AsyncIterator { - // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. - next(...[value]: [] | [TNext]): Promise>; + // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. + next(...[value]: [] | [TNext]): Promise>; - return?(value?: TReturn | PromiseLike): Promise>; + return?(value?: TReturn | PromiseLike): Promise>; - throw?(e?: any): Promise>; + throw?(e?: any): Promise>; } interface AsyncIterable { - [Symbol.asyncIterator](): AsyncIterator; + [Symbol.asyncIterator](): AsyncIterator; } /** * Describes a user-defined {@link AsyncIterator} that is also async iterable. */ interface AsyncIterableIterator extends AsyncIterator { - [Symbol.asyncIterator](): AsyncIterableIterator; + [Symbol.asyncIterator](): AsyncIterableIterator; } /** * Describes an {@link AsyncIterator} produced by the runtime that inherits from the intrinsic `AsyncIterator.prototype`. */ interface AsyncIteratorObject extends AsyncIterator { - [Symbol.asyncIterator](): AsyncIteratorObject; + [Symbol.asyncIterator](): AsyncIteratorObject; } ///////////////////////////// // lib.es2018.intl.d.ts ///////////////////////////// declare namespace Intl { - // http://cldr.unicode.org/index/cldr-spec/plural-rules#TOC-Determining-Plural-Categories - type LDMLPluralRule = "zero" | "one" | "two" | "few" | "many" | "other"; +// http://cldr.unicode.org/index/cldr-spec/plural-rules#TOC-Determining-Plural-Categories + type LDMLPluralRule = "zero" | "one" | "two" | "few" | "many" | "other"; - type PluralRuleType = "cardinal" | "ordinal"; +type PluralRuleType = "cardinal" | "ordinal"; - interface PluralRulesOptions { - localeMatcher?: "lookup" | "best fit" | undefined; +interface PluralRulesOptions { + localeMatcher?: "lookup" | "best fit" | undefined; - type?: PluralRuleType | undefined; + type?: PluralRuleType | undefined; - minimumIntegerDigits?: number | undefined; + minimumIntegerDigits?: number | undefined; - minimumFractionDigits?: number | undefined; + minimumFractionDigits?: number | undefined; - maximumFractionDigits?: number | undefined; + maximumFractionDigits?: number | undefined; - minimumSignificantDigits?: number | undefined; + minimumSignificantDigits?: number | undefined; - maximumSignificantDigits?: number | undefined; - } + maximumSignificantDigits?: number | undefined; +} - interface ResolvedPluralRulesOptions { - locale: string; +interface ResolvedPluralRulesOptions { + locale: string; - pluralCategories: LDMLPluralRule[]; + pluralCategories: LDMLPluralRule[]; - type: PluralRuleType; + type: PluralRuleType; - minimumIntegerDigits: number; + minimumIntegerDigits: number; - minimumFractionDigits: number; + minimumFractionDigits: number; - maximumFractionDigits: number; + maximumFractionDigits: number; - minimumSignificantDigits?: number; + minimumSignificantDigits?: number; - maximumSignificantDigits?: number; - } + maximumSignificantDigits?: number; +} - interface PluralRules { - resolvedOptions(): ResolvedPluralRulesOptions; +interface PluralRules { + resolvedOptions(): ResolvedPluralRulesOptions; - select(n: number): LDMLPluralRule; - } + select(n: number): LDMLPluralRule; +} - interface PluralRulesConstructor { - new (locales?: string | readonly string[], options?: PluralRulesOptions): PluralRules; +interface PluralRulesConstructor { + new (locales?: string | readonly string[], options?: PluralRulesOptions): PluralRules; - (locales?: string | readonly string[], options?: PluralRulesOptions): PluralRules; + (locales?: string | readonly string[], options?: PluralRulesOptions): PluralRules; - supportedLocalesOf(locales: string | readonly string[], options?: { localeMatcher?: "lookup" | "best fit"; }): string[]; - } + supportedLocalesOf(locales: string | readonly string[], options?: { localeMatcher?: "lookup" | "best fit"; }): string[]; +} - const PluralRules: PluralRulesConstructor; +const PluralRules: PluralRulesConstructor; - interface NumberFormatPartTypeRegistry { - literal: never; +interface NumberFormatPartTypeRegistry { + literal: never; - nan: never; + nan: never; - infinity: never; + infinity: never; - percent: never; + percent: never; - integer: never; + integer: never; - group: never; + group: never; - decimal: never; + decimal: never; - fraction: never; + fraction: never; - plusSign: never; + plusSign: never; - minusSign: never; + minusSign: never; - percentSign: never; + percentSign: never; - currency: never; - } + currency: never; +} - type NumberFormatPartTypes = keyof NumberFormatPartTypeRegistry; +type NumberFormatPartTypes = keyof NumberFormatPartTypeRegistry; - interface NumberFormatPart { - type: NumberFormatPartTypes; +interface NumberFormatPart { + type: NumberFormatPartTypes; - value: string; - } + value: string; +} } ///////////////////////////// @@ -2513,24 +2513,24 @@ declare namespace Intl { * Represents the completion of an asynchronous operation */ interface Promise { - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): Promise; + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): Promise; } ///////////////////////////// // lib.es2018.regexp.d.ts ///////////////////////////// interface RegExp { - /** - * Returns a Boolean value indicating the state of the dotAll flag (s) used with a regular expression. - * Default is false. Read-only. - */ - readonly dotAll: boolean; + /** + * Returns a Boolean value indicating the state of the dotAll flag (s) used with a regular expression. + * Default is false. Read-only. + */ + readonly dotAll: boolean; } ///////////////////////////// @@ -2543,226 +2543,226 @@ type FlatArray = { }[Depth extends -1 ? "done" : "recur"]; interface ReadonlyArray { - /** - * Calls a defined callback function on each element of an array. Then, flattens the result into - * a new array. - * This is identical to a map followed by flat with depth 1. - * - * @param callback A function that accepts up to three arguments. The flatMap method calls the - * callback function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callback function. If - * thisArg is omitted, undefined is used as the this value. - */ - flatMap( - callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray, - thisArg?: This, - ): U[]; + /** + * Calls a defined callback function on each element of an array. Then, flattens the result into + * a new array. + * This is identical to a map followed by flat with depth 1. + * + * @param callback A function that accepts up to three arguments. The flatMap method calls the + * callback function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callback function. If + * thisArg is omitted, undefined is used as the this value. + */ + flatMap( + callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray, + thisArg?: This, + ): U[]; - /** - * Returns a new array with all sub-array elements concatenated into it recursively up to the - * specified depth. - * - * @param depth The maximum recursion depth - */ - flat( - this: A, - depth?: D, - ): FlatArray[]; + /** + * Returns a new array with all sub-array elements concatenated into it recursively up to the + * specified depth. + * + * @param depth The maximum recursion depth + */ + flat( + this: A, + depth?: D, + ): FlatArray[]; } interface Array { - /** - * Calls a defined callback function on each element of an array. Then, flattens the result into - * a new array. - * This is identical to a map followed by flat with depth 1. - * - * @param callback A function that accepts up to three arguments. The flatMap method calls the - * callback function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callback function. If - * thisArg is omitted, undefined is used as the this value. - */ - flatMap( - callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray, - thisArg?: This, - ): U[]; + /** + * Calls a defined callback function on each element of an array. Then, flattens the result into + * a new array. + * This is identical to a map followed by flat with depth 1. + * + * @param callback A function that accepts up to three arguments. The flatMap method calls the + * callback function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callback function. If + * thisArg is omitted, undefined is used as the this value. + */ + flatMap( + callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray, + thisArg?: This, + ): U[]; - /** - * Returns a new array with all sub-array elements concatenated into it recursively up to the - * specified depth. - * - * @param depth The maximum recursion depth - */ - flat( - this: A, - depth?: D, - ): FlatArray[]; + /** + * Returns a new array with all sub-array elements concatenated into it recursively up to the + * specified depth. + * + * @param depth The maximum recursion depth + */ + flat( + this: A, + depth?: D, + ): FlatArray[]; } ///////////////////////////// // lib.es2019.object.d.ts ///////////////////////////// interface ObjectConstructor { - /** - * Returns an object created by key-value entries for properties and methods - * @param entries An iterable object that contains key-value entries for properties and methods. - */ - fromEntries(entries: Iterable): { [k: string]: T; }; + /** + * Returns an object created by key-value entries for properties and methods + * @param entries An iterable object that contains key-value entries for properties and methods. + */ + fromEntries(entries: Iterable): { [k: string]: T; }; - /** - * Returns an object created by key-value entries for properties and methods - * @param entries An iterable object that contains key-value entries for properties and methods. - */ - fromEntries(entries: Iterable): any; + /** + * Returns an object created by key-value entries for properties and methods + * @param entries An iterable object that contains key-value entries for properties and methods. + */ + fromEntries(entries: Iterable): any; } ///////////////////////////// // lib.es2019.string.d.ts ///////////////////////////// interface String { - /** Removes the trailing white space and line terminator characters from a string. */ - trimEnd(): string; + /** Removes the trailing white space and line terminator characters from a string. */ + trimEnd(): string; - /** Removes the leading white space and line terminator characters from a string. */ - trimStart(): string; + /** Removes the leading white space and line terminator characters from a string. */ + trimStart(): string; } ///////////////////////////// // lib.es2019.symbol.d.ts ///////////////////////////// interface Symbol { - /** - * Expose the [[Description]] internal slot of a symbol directly. - */ - readonly description: string | undefined; + /** + * Expose the [[Description]] internal slot of a symbol directly. + */ + readonly description: string | undefined; } ///////////////////////////// // lib.es2020.bigint.d.ts ///////////////////////////// interface BigIntToLocaleStringOptions { - /** - * The locale matching algorithm to use.The default is "best fit". For information about this option, see the {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation Intl page}. - */ - localeMatcher?: string; + /** + * The locale matching algorithm to use.The default is "best fit". For information about this option, see the {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation Intl page}. + */ + localeMatcher?: string; - /** - * The formatting style to use , the default is "decimal". - */ - style?: string; + /** + * The formatting style to use , the default is "decimal". + */ + style?: string; - numberingSystem?: string; + numberingSystem?: string; - /** - * The unit to use in unit formatting, Possible values are core unit identifiers, defined in UTS #35, Part 2, Section 6. A subset of units from the full list was selected for use in ECMAScript. Pairs of simple units can be concatenated with "-per-" to make a compound unit. There is no default value; if the style is "unit", the unit property must be provided. - */ - unit?: string; + /** + * The unit to use in unit formatting, Possible values are core unit identifiers, defined in UTS #35, Part 2, Section 6. A subset of units from the full list was selected for use in ECMAScript. Pairs of simple units can be concatenated with "-per-" to make a compound unit. There is no default value; if the style is "unit", the unit property must be provided. + */ + unit?: string; - /** - * The unit formatting style to use in unit formatting, the defaults is "short". - */ - unitDisplay?: string; + /** + * The unit formatting style to use in unit formatting, the defaults is "short". + */ + unitDisplay?: string; - /** - * The currency to use in currency formatting. Possible values are the ISO 4217 currency codes, such as "USD" for the US dollar, "EUR" for the euro, or "CNY" for the Chinese RMB — see the Current currency & funds code list. There is no default value; if the style is "currency", the currency property must be provided. It is only used when [[Style]] has the value "currency". - */ - currency?: string; + /** + * The currency to use in currency formatting. Possible values are the ISO 4217 currency codes, such as "USD" for the US dollar, "EUR" for the euro, or "CNY" for the Chinese RMB — see the Current currency & funds code list. There is no default value; if the style is "currency", the currency property must be provided. It is only used when [[Style]] has the value "currency". + */ + currency?: string; - /** - * How to display the currency in currency formatting. It is only used when [[Style]] has the value "currency". The default is "symbol". - * - * "symbol" to use a localized currency symbol such as €, - * - * "code" to use the ISO currency code, - * - * "name" to use a localized currency name such as "dollar" - */ - currencyDisplay?: string; + /** + * How to display the currency in currency formatting. It is only used when [[Style]] has the value "currency". The default is "symbol". + * + * "symbol" to use a localized currency symbol such as €, + * + * "code" to use the ISO currency code, + * + * "name" to use a localized currency name such as "dollar" + */ + currencyDisplay?: string; - /** - * Whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators. The default is true. - */ - useGrouping?: boolean; + /** + * Whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators. The default is true. + */ + useGrouping?: boolean; - /** - * The minimum number of integer digits to use. Possible values are from 1 to 21; the default is 1. - */ - minimumIntegerDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; + /** + * The minimum number of integer digits to use. Possible values are from 1 to 21; the default is 1. + */ + minimumIntegerDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; - /** - * The minimum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number and percent formatting is 0; the default for currency formatting is the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html ISO 4217 currency codes list} (2 if the list doesn't provide that information). - */ - minimumFractionDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20; + /** + * The minimum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number and percent formatting is 0; the default for currency formatting is the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html ISO 4217 currency codes list} (2 if the list doesn't provide that information). + */ + minimumFractionDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20; - /** - * The maximum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number formatting is the larger of minimumFractionDigits and 3; the default for currency formatting is the larger of minimumFractionDigits and the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html ISO 4217 currency codes list} (2 if the list doesn't provide that information); the default for percent formatting is the larger of minimumFractionDigits and 0. - */ - maximumFractionDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20; + /** + * The maximum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number formatting is the larger of minimumFractionDigits and 3; the default for currency formatting is the larger of minimumFractionDigits and the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html ISO 4217 currency codes list} (2 if the list doesn't provide that information); the default for percent formatting is the larger of minimumFractionDigits and 0. + */ + maximumFractionDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20; - /** - * The minimum number of significant digits to use. Possible values are from 1 to 21; the default is 1. - */ - minimumSignificantDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; + /** + * The minimum number of significant digits to use. Possible values are from 1 to 21; the default is 1. + */ + minimumSignificantDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; - /** - * The maximum number of significant digits to use. Possible values are from 1 to 21; the default is 21. - */ - maximumSignificantDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; + /** + * The maximum number of significant digits to use. Possible values are from 1 to 21; the default is 21. + */ + maximumSignificantDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; - /** - * The formatting that should be displayed for the number, the defaults is "standard" - * - * "standard" plain number formatting - * - * "scientific" return the order-of-magnitude for formatted number. - * - * "engineering" return the exponent of ten when divisible by three - * - * "compact" string representing exponent, defaults is using the "short" form - */ - notation?: string; + /** + * The formatting that should be displayed for the number, the defaults is "standard" + * + * "standard" plain number formatting + * + * "scientific" return the order-of-magnitude for formatted number. + * + * "engineering" return the exponent of ten when divisible by three + * + * "compact" string representing exponent, defaults is using the "short" form + */ + notation?: string; - /** - * used only when notation is "compact" - */ - compactDisplay?: string; + /** + * used only when notation is "compact" + */ + compactDisplay?: string; } interface BigInt { - /** - * Returns a string representation of an object. - * @param radix Specifies a radix for converting numeric values to strings. - */ - toString(radix?: number): string; + /** + * Returns a string representation of an object. + * @param radix Specifies a radix for converting numeric values to strings. + */ + toString(radix?: number): string; - /** Returns a string representation appropriate to the host environment's current locale. */ - toLocaleString(locales?: Intl.LocalesArgument, options?: BigIntToLocaleStringOptions): string; + /** Returns a string representation appropriate to the host environment's current locale. */ + toLocaleString(locales?: Intl.LocalesArgument, options?: BigIntToLocaleStringOptions): string; - /** Returns the primitive value of the specified object. */ - valueOf(): bigint; + /** Returns the primitive value of the specified object. */ + valueOf(): bigint; - readonly [Symbol.toStringTag]: "BigInt"; + readonly [Symbol.toStringTag]: "BigInt"; } interface BigIntConstructor { - (value: bigint | boolean | number | string): bigint; + (value: bigint | boolean | number | string): bigint; - readonly prototype: BigInt; + readonly prototype: BigInt; - /** - * Interprets the low bits of a BigInt as a 2's-complement signed integer. - * All higher bits are discarded. - * @param bits The number of low bits to use - * @param int The BigInt whose bits to extract - */ - asIntN(bits: number, int: bigint): bigint; + /** + * Interprets the low bits of a BigInt as a 2's-complement signed integer. + * All higher bits are discarded. + * @param bits The number of low bits to use + * @param int The BigInt whose bits to extract + */ + asIntN(bits: number, int: bigint): bigint; - /** - * Interprets the low bits of a BigInt as an unsigned integer. - * All higher bits are discarded. - * @param bits The number of low bits to use - * @param int The BigInt whose bits to extract - */ - asUintN(bits: number, int: bigint): bigint; + /** + * Interprets the low bits of a BigInt as an unsigned integer. + * All higher bits are discarded. + * @param bits The number of low bits to use + * @param int The BigInt whose bits to extract + */ + asUintN(bits: number, int: bigint): bigint; } declare var BigInt: BigIntConstructor; @@ -2772,295 +2772,295 @@ declare var BigInt: BigIntConstructor; * requested number of bytes could not be allocated, an exception is raised. */ interface BigInt64Array { - /** The size in bytes of each element in the array. */ - readonly BYTES_PER_ELEMENT: number; - - /** The ArrayBuffer instance referenced by the array. */ - readonly buffer: TArrayBuffer; - - /** The length in bytes of the array. */ - readonly byteLength: number; + /** The size in bytes of each element in the array. */ + readonly BYTES_PER_ELEMENT: number; - /** The offset in bytes of the array. */ - readonly byteOffset: number; + /** The ArrayBuffer instance referenced by the array. */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** The length in bytes of the array. */ + readonly byteLength: number; - /** Yields index, value pairs for every entry in the array. */ - entries(): ArrayIterator<[number, bigint]>; + /** The offset in bytes of the array. */ + readonly byteOffset: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns false, - * or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; + + /** Yields index, value pairs for every entry in the array. */ + entries(): ArrayIterator<[number, bigint]>; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: bigint, start?: number, end?: number): this; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns false, + * or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: bigint, index: number, array: BigInt64Array) => any, thisArg?: any): BigInt64Array; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: bigint, start?: number, end?: number): this; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): bigint | undefined; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: bigint, index: number, array: BigInt64Array) => any, thisArg?: any): BigInt64Array; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): number; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): bigint | undefined; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: bigint, index: number, array: BigInt64Array) => void, thisArg?: any): void; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): number; - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: bigint, fromIndex?: number): boolean; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: bigint, index: number, array: BigInt64Array) => void, thisArg?: any): void; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: bigint, fromIndex?: number): number; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: bigint, fromIndex?: number): boolean; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: bigint, fromIndex?: number): number; - /** Yields each index in the array. */ - keys(): ArrayIterator; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: bigint, fromIndex?: number): number; + /** Yields each index in the array. */ + keys(): ArrayIterator; - /** The length of the array. */ - readonly length: number; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: bigint, fromIndex?: number): number; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: bigint, index: number, array: BigInt64Array) => bigint, thisArg?: any): BigInt64Array; + /** The length of the array. */ + readonly length: number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: bigint, index: number, array: BigInt64Array) => bigint, thisArg?: any): BigInt64Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint; - /** Reverses the elements in the array. */ - reverse(): this; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U; + + /** Reverses the elements in the array. */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. - */ - slice(start?: number, end?: number): BigInt64Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. + */ + slice(start?: number, end?: number): BigInt64Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls the - * predicate function for each element in the array until the predicate returns true, or until - * the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls the + * predicate function for each element in the array until the predicate returns true, or until + * the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean; - /** - * Sorts the array. - * @param compareFn The function used to determine the order of the elements. If omitted, the elements are sorted in ascending order. - */ - sort(compareFn?: (a: bigint, b: bigint) => number | bigint): this; + /** + * Sorts the array. + * @param compareFn The function used to determine the order of the elements. If omitted, the elements are sorted in ascending order. + */ + sort(compareFn?: (a: bigint, b: bigint) => number | bigint): this; - /** - * Gets a new BigInt64Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): BigInt64Array; + /** + * Gets a new BigInt64Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): BigInt64Array; - /** Converts the array to a string by using the current locale. */ - toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; + /** Converts the array to a string by using the current locale. */ + toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; - /** Returns a string representation of the array. */ - toString(): string; + /** Returns a string representation of the array. */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): BigInt64Array; + /** Returns the primitive value of the specified object. */ + valueOf(): BigInt64Array; - /** Yields each value in the array. */ - values(): ArrayIterator; + /** Yields each value in the array. */ + values(): ArrayIterator; - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - readonly [Symbol.toStringTag]: "BigInt64Array"; + readonly [Symbol.toStringTag]: "BigInt64Array"; - [index: number]: bigint; + [index: number]: bigint; } interface BigInt64ArrayConstructor { - readonly prototype: BigInt64Array; + readonly prototype: BigInt64Array; - new (length?: number): BigInt64Array; + new (length?: number): BigInt64Array; - new (array: ArrayLike | Iterable): BigInt64Array; + new (array: ArrayLike | Iterable): BigInt64Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): BigInt64Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): BigInt64Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): BigInt64Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): BigInt64Array; - new (array: ArrayLike | ArrayBuffer): BigInt64Array; + new (array: ArrayLike | ArrayBuffer): BigInt64Array; - /** The size in bytes of each element in the array. */ - readonly BYTES_PER_ELEMENT: number; + /** The size in bytes of each element in the array. */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: bigint[]): BigInt64Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: bigint[]): BigInt64Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): BigInt64Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): BigInt64Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigInt64Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigInt64Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): BigInt64Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): BigInt64Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => bigint, thisArg?: any): BigInt64Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => bigint, thisArg?: any): BigInt64Array; } declare var BigInt64Array: BigInt64ArrayConstructor; @@ -3070,1286 +3070,1286 @@ declare var BigInt64Array: BigInt64ArrayConstructor; * requested number of bytes could not be allocated, an exception is raised. */ interface BigUint64Array { - /** The size in bytes of each element in the array. */ - readonly BYTES_PER_ELEMENT: number; + /** The size in bytes of each element in the array. */ + readonly BYTES_PER_ELEMENT: number; - /** The ArrayBuffer instance referenced by the array. */ - readonly buffer: TArrayBuffer; + /** The ArrayBuffer instance referenced by the array. */ + readonly buffer: TArrayBuffer; - /** The length in bytes of the array. */ - readonly byteLength: number; + /** The length in bytes of the array. */ + readonly byteLength: number; - /** The offset in bytes of the array. */ - readonly byteOffset: number; + /** The offset in bytes of the array. */ + readonly byteOffset: number; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; + + /** Yields index, value pairs for every entry in the array. */ + entries(): ArrayIterator<[number, bigint]>; - /** Yields index, value pairs for every entry in the array. */ - entries(): ArrayIterator<[number, bigint]>; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns false, + * or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns false, - * or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: bigint, start?: number, end?: number): this; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: bigint, start?: number, end?: number): this; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: bigint, index: number, array: BigUint64Array) => any, thisArg?: any): BigUint64Array; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: bigint, index: number, array: BigUint64Array) => any, thisArg?: any): BigUint64Array; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): bigint | undefined; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): bigint | undefined; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): number; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): number; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: bigint, index: number, array: BigUint64Array) => void, thisArg?: any): void; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: bigint, index: number, array: BigUint64Array) => void, thisArg?: any): void; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: bigint, fromIndex?: number): boolean; - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: bigint, fromIndex?: number): boolean; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: bigint, fromIndex?: number): number; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: bigint, fromIndex?: number): number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** Yields each index in the array. */ + keys(): ArrayIterator; - /** Yields each index in the array. */ - keys(): ArrayIterator; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: bigint, fromIndex?: number): number; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: bigint, fromIndex?: number): number; + /** The length of the array. */ + readonly length: number; - /** The length of the array. */ - readonly length: number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: bigint, index: number, array: BigUint64Array) => bigint, thisArg?: any): BigUint64Array; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: bigint, index: number, array: BigUint64Array) => bigint, thisArg?: any): BigUint64Array; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint; - /** Reverses the elements in the array. */ - reverse(): this; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U; + + /** Reverses the elements in the array. */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. - */ - slice(start?: number, end?: number): BigUint64Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. + */ + slice(start?: number, end?: number): BigUint64Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls the - * predicate function for each element in the array until the predicate returns true, or until - * the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls the + * predicate function for each element in the array until the predicate returns true, or until + * the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean; - /** - * Sorts the array. - * @param compareFn The function used to determine the order of the elements. If omitted, the elements are sorted in ascending order. - */ - sort(compareFn?: (a: bigint, b: bigint) => number | bigint): this; + /** + * Sorts the array. + * @param compareFn The function used to determine the order of the elements. If omitted, the elements are sorted in ascending order. + */ + sort(compareFn?: (a: bigint, b: bigint) => number | bigint): this; - /** - * Gets a new BigUint64Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): BigUint64Array; + /** + * Gets a new BigUint64Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): BigUint64Array; - /** Converts the array to a string by using the current locale. */ - toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; + /** Converts the array to a string by using the current locale. */ + toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; - /** Returns a string representation of the array. */ - toString(): string; + /** Returns a string representation of the array. */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): BigUint64Array; + /** Returns the primitive value of the specified object. */ + valueOf(): BigUint64Array; - /** Yields each value in the array. */ - values(): ArrayIterator; + /** Yields each value in the array. */ + values(): ArrayIterator; - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - readonly [Symbol.toStringTag]: "BigUint64Array"; + readonly [Symbol.toStringTag]: "BigUint64Array"; - [index: number]: bigint; + [index: number]: bigint; } interface BigUint64ArrayConstructor { - readonly prototype: BigUint64Array; + readonly prototype: BigUint64Array; - new (length?: number): BigUint64Array; + new (length?: number): BigUint64Array; - new (array: ArrayLike | Iterable): BigUint64Array; + new (array: ArrayLike | Iterable): BigUint64Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): BigUint64Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): BigUint64Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): BigUint64Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): BigUint64Array; - new (array: ArrayLike | ArrayBuffer): BigUint64Array; + new (array: ArrayLike | ArrayBuffer): BigUint64Array; - /** The size in bytes of each element in the array. */ - readonly BYTES_PER_ELEMENT: number; + /** The size in bytes of each element in the array. */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: bigint[]): BigUint64Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: bigint[]): BigUint64Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): BigUint64Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): BigUint64Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigUint64Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigUint64Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): BigUint64Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): BigUint64Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => bigint, thisArg?: any): BigUint64Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => bigint, thisArg?: any): BigUint64Array; } declare var BigUint64Array: BigUint64ArrayConstructor; interface DataView { - /** - * Gets the BigInt64 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getBigInt64(byteOffset: number, littleEndian?: boolean): bigint; + /** + * Gets the BigInt64 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getBigInt64(byteOffset: number, littleEndian?: boolean): bigint; - /** - * Gets the BigUint64 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getBigUint64(byteOffset: number, littleEndian?: boolean): bigint; + /** + * Gets the BigUint64 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getBigUint64(byteOffset: number, littleEndian?: boolean): bigint; - /** - * Stores a BigInt64 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setBigInt64(byteOffset: number, value: bigint, littleEndian?: boolean): void; + /** + * Stores a BigInt64 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setBigInt64(byteOffset: number, value: bigint, littleEndian?: boolean): void; - /** - * Stores a BigUint64 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setBigUint64(byteOffset: number, value: bigint, littleEndian?: boolean): void; + /** + * Stores a BigUint64 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setBigUint64(byteOffset: number, value: bigint, littleEndian?: boolean): void; } ///////////////////////////// // lib.es2020.date.d.ts ///////////////////////////// interface Date { - /** - * Converts a date and time to a string by using the current or specified locale. - * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; + /** + * Converts a date and time to a string by using the current or specified locale. + * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; - /** - * Converts a date to a string by using the current or specified locale. - * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleDateString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; + /** + * Converts a date to a string by using the current or specified locale. + * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleDateString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; - /** - * Converts a time to a string by using the current or specified locale. - * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleTimeString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; + /** + * Converts a time to a string by using the current or specified locale. + * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleTimeString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; } ///////////////////////////// // lib.es2020.intl.d.ts ///////////////////////////// declare namespace Intl { - /** - * A string that is a valid [Unicode BCP 47 Locale Identifier](https://unicode.org/reports/tr35/#Unicode_locale_identifier). +/** + * A string that is a valid [Unicode BCP 47 Locale Identifier](https://unicode.org/reports/tr35/#Unicode_locale_identifier). + * + * For example: "fa", "es-MX", "zh-Hant-TW". + * + * See [MDN - Intl - locales argument](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). + */ + type UnicodeBCP47LocaleIdentifier = string; + +/** + * Unit to use in the relative time internationalized message. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format#Parameters). + */ + type RelativeTimeFormatUnit = + | "year" + | "years" + | "quarter" + | "quarters" + | "month" + | "months" + | "week" + | "weeks" + | "day" + | "days" + | "hour" + | "hours" + | "minute" + | "minutes" + | "second" + | "seconds"; + +/** + * Value of the `unit` property in objects returned by + * `Intl.RelativeTimeFormat.prototype.formatToParts()`. `formatToParts` and + * `format` methods accept either singular or plural unit names as input, + * but `formatToParts` only outputs singular (e.g. "day") not plural (e.g. + * "days"). + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts). + */ + type RelativeTimeFormatUnitSingular = + | "year" + | "quarter" + | "month" + | "week" + | "day" + | "hour" + | "minute" + | "second"; + +/** + * The locale matching algorithm to use. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). + */ + type RelativeTimeFormatLocaleMatcher = "lookup" | "best fit"; + +/** + * The format of output message. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). + */ + type RelativeTimeFormatNumeric = "always" | "auto"; + +/** + * The length of the internationalized message. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). + */ + type RelativeTimeFormatStyle = "long" | "short" | "narrow"; + +/** + * The locale or locales to use + * + * See [MDN - Intl - locales argument](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). + */ + type LocalesArgument = UnicodeBCP47LocaleIdentifier | Locale | readonly (UnicodeBCP47LocaleIdentifier | Locale)[] | undefined; + +/** + * An object with some or all of properties of `options` parameter + * of `Intl.RelativeTimeFormat` constructor. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). + */ + interface RelativeTimeFormatOptions { + /** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */ + localeMatcher?: RelativeTimeFormatLocaleMatcher; + + /** The format of output message. */ + numeric?: RelativeTimeFormatNumeric; +} + +/** + * An object with properties reflecting the locale + * and formatting options computed during initialization + * of the `Intl.RelativeTimeFormat` object + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions#Description). + */ + interface ResolvedRelativeTimeFormatOptions { + numeric: RelativeTimeFormatNumeric; + + numberingSystem: string; +} + +/** + * An object representing the relative time format in parts + * that can be used for custom locale-aware formatting. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts). + */ + type RelativeTimeFormatPart = + | { + type: "literal"; + value: string; + } + | { + type: Exclude; + value: string; + unit: RelativeTimeFormatUnitSingular; + }; + +interface RelativeTimeFormat { + /** + * Formats a value and a unit according to the locale + * and formatting options of the given + * [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) + * object. * - * For example: "fa", "es-MX", "zh-Hant-TW". + * While this method automatically provides the correct plural forms, + * the grammatical form is otherwise as neutral as possible. * - * See [MDN - Intl - locales argument](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). - */ - type UnicodeBCP47LocaleIdentifier = string; - - /** - * Unit to use in the relative time internationalized message. + * It is the caller's responsibility to handle cut-off logic + * such as deciding between displaying "in 7 days" or "in 1 week". + * This API does not support relative dates involving compound units. + * e.g "in 5 days and 4 hours". * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format#Parameters). - */ - type RelativeTimeFormatUnit = - | "year" - | "years" - | "quarter" - | "quarters" - | "month" - | "months" - | "week" - | "weeks" - | "day" - | "days" - | "hour" - | "hours" - | "minute" - | "minutes" - | "second" - | "seconds"; - - /** - * Value of the `unit` property in objects returned by - * `Intl.RelativeTimeFormat.prototype.formatToParts()`. `formatToParts` and - * `format` methods accept either singular or plural unit names as input, - * but `formatToParts` only outputs singular (e.g. "day") not plural (e.g. - * "days"). + * @param value - Numeric value to use in the internationalized relative time message * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts). - */ - type RelativeTimeFormatUnitSingular = - | "year" - | "quarter" - | "month" - | "week" - | "day" - | "hour" - | "minute" - | "second"; - - /** - * The locale matching algorithm to use. + * @param unit - [Unit](https://tc39.es/ecma402/#sec-singularrelativetimeunit) to use in the relative time internationalized message. * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). - */ - type RelativeTimeFormatLocaleMatcher = "lookup" | "best fit"; - - /** - * The format of output message. + * @throws `RangeError` if `unit` was given something other than `unit` possible values * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). - */ - type RelativeTimeFormatNumeric = "always" | "auto"; - - /** - * The length of the internationalized message. + * @returns {string} Internationalized relative time message as string * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format). */ - type RelativeTimeFormatStyle = "long" | "short" | "narrow"; + format(value: number, unit: RelativeTimeFormatUnit): string; - /** - * The locale or locales to use + /** + * Returns an array of objects representing the relative time format in parts that can be used for custom locale-aware formatting. + * + * @param value - Numeric value to use in the internationalized relative time message * - * See [MDN - Intl - locales argument](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). + * @param unit - [Unit](https://tc39.es/ecma402/#sec-singularrelativetimeunit) to use in the relative time internationalized message. + * + * @throws `RangeError` if `unit` was given something other than `unit` possible values + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts). */ - type LocalesArgument = UnicodeBCP47LocaleIdentifier | Locale | readonly (UnicodeBCP47LocaleIdentifier | Locale)[] | undefined; + formatToParts(value: number, unit: RelativeTimeFormatUnit): RelativeTimeFormatPart[]; - /** - * An object with some or all of properties of `options` parameter - * of `Intl.RelativeTimeFormat` constructor. + /** + * Provides access to the locale and options computed during initialization of this `Intl.RelativeTimeFormat` object. * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions). */ - interface RelativeTimeFormatOptions { - /** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */ - localeMatcher?: RelativeTimeFormatLocaleMatcher; - - /** The format of output message. */ - numeric?: RelativeTimeFormatNumeric; - } + resolvedOptions(): ResolvedRelativeTimeFormatOptions; +} - /** - * An object with properties reflecting the locale - * and formatting options computed during initialization - * of the `Intl.RelativeTimeFormat` object +/** + * The [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) + * object is a constructor for objects that enable language-sensitive relative time formatting. + * + * [Compatibility](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat#Browser_compatibility). + */ + const RelativeTimeFormat: { + /** + * Creates [Intl.RelativeTimeFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) objects * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions#Description). + * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. + * For the general form and interpretation of the locales argument, + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters) + * with some or all of options of `RelativeTimeFormatOptions`. + * + * @returns [Intl.RelativeTimeFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat). */ - interface ResolvedRelativeTimeFormatOptions { - numeric: RelativeTimeFormatNumeric; - - numberingSystem: string; - } + new ( + locales?: LocalesArgument, + options?: RelativeTimeFormatOptions, + ): RelativeTimeFormat; - /** - * An object representing the relative time format in parts - * that can be used for custom locale-aware formatting. + /** + * Returns an array containing those of the provided locales + * that are supported in date and time formatting + * without having to fall back to the runtime's default locale. * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts). - */ - type RelativeTimeFormatPart = - | { - type: "literal"; - value: string; - } - | { - type: Exclude; - value: string; - unit: RelativeTimeFormatUnitSingular; - }; - - interface RelativeTimeFormat { - /** - * Formats a value and a unit according to the locale - * and formatting options of the given - * [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) - * object. - * - * While this method automatically provides the correct plural forms, - * the grammatical form is otherwise as neutral as possible. - * - * It is the caller's responsibility to handle cut-off logic - * such as deciding between displaying "in 7 days" or "in 1 week". - * This API does not support relative dates involving compound units. - * e.g "in 5 days and 4 hours". - * - * @param value - Numeric value to use in the internationalized relative time message - * - * @param unit - [Unit](https://tc39.es/ecma402/#sec-singularrelativetimeunit) to use in the relative time internationalized message. - * - * @throws `RangeError` if `unit` was given something other than `unit` possible values - * - * @returns {string} Internationalized relative time message as string - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format). - */ - format(value: number, unit: RelativeTimeFormatUnit): string; - - /** - * Returns an array of objects representing the relative time format in parts that can be used for custom locale-aware formatting. - * - * @param value - Numeric value to use in the internationalized relative time message - * - * @param unit - [Unit](https://tc39.es/ecma402/#sec-singularrelativetimeunit) to use in the relative time internationalized message. - * - * @throws `RangeError` if `unit` was given something other than `unit` possible values - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts). - */ - formatToParts(value: number, unit: RelativeTimeFormatUnit): RelativeTimeFormatPart[]; - - /** - * Provides access to the locale and options computed during initialization of this `Intl.RelativeTimeFormat` object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions). - */ - resolvedOptions(): ResolvedRelativeTimeFormatOptions; - } - - /** - * The [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) - * object is a constructor for objects that enable language-sensitive relative time formatting. + * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. + * For the general form and interpretation of the locales argument, + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). * - * [Compatibility](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat#Browser_compatibility). + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters) + * with some or all of options of the formatting. + * + * @returns An array containing those of the provided locales + * that are supported in date and time formatting + * without having to fall back to the runtime's default locale. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/supportedLocalesOf). */ - const RelativeTimeFormat: { - /** - * Creates [Intl.RelativeTimeFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) objects - * - * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. - * For the general form and interpretation of the locales argument, - * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). - * - * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters) - * with some or all of options of `RelativeTimeFormatOptions`. - * - * @returns [Intl.RelativeTimeFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat). - */ - new ( - locales?: LocalesArgument, - options?: RelativeTimeFormatOptions, - ): RelativeTimeFormat; - - /** - * Returns an array containing those of the provided locales - * that are supported in date and time formatting - * without having to fall back to the runtime's default locale. - * - * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. - * For the general form and interpretation of the locales argument, - * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). - * - * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters) - * with some or all of options of the formatting. - * - * @returns An array containing those of the provided locales - * that are supported in date and time formatting - * without having to fall back to the runtime's default locale. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/supportedLocalesOf). - */ - supportedLocalesOf( - locales?: LocalesArgument, - options?: RelativeTimeFormatOptions, - ): UnicodeBCP47LocaleIdentifier[]; - }; + supportedLocalesOf( + locales?: LocalesArgument, + options?: RelativeTimeFormatOptions, + ): UnicodeBCP47LocaleIdentifier[]; +}; - interface NumberFormatOptionsSignDisplayRegistry { - auto: never; +interface NumberFormatOptionsSignDisplayRegistry { + auto: never; - never: never; + never: never; - always: never; + always: never; - exceptZero: never; - } + exceptZero: never; +} - type NumberFormatOptionsSignDisplay = keyof NumberFormatOptionsSignDisplayRegistry; +type NumberFormatOptionsSignDisplay = keyof NumberFormatOptionsSignDisplayRegistry; - interface NumberFormatOptions { - numberingSystem?: string | undefined; +interface NumberFormatOptions { + numberingSystem?: string | undefined; - compactDisplay?: "short" | "long" | undefined; + compactDisplay?: "short" | "long" | undefined; - notation?: "standard" | "scientific" | "engineering" | "compact" | undefined; + notation?: "standard" | "scientific" | "engineering" | "compact" | undefined; - signDisplay?: NumberFormatOptionsSignDisplay | undefined; + signDisplay?: NumberFormatOptionsSignDisplay | undefined; - unit?: string | undefined; + unit?: string | undefined; - unitDisplay?: "short" | "long" | "narrow" | undefined; + unitDisplay?: "short" | "long" | "narrow" | undefined; - currencySign?: "standard" | "accounting" | undefined; - } + currencySign?: "standard" | "accounting" | undefined; +} - interface ResolvedNumberFormatOptions { - compactDisplay?: "short" | "long"; +interface ResolvedNumberFormatOptions { + compactDisplay?: "short" | "long"; - notation: "standard" | "scientific" | "engineering" | "compact"; + notation: "standard" | "scientific" | "engineering" | "compact"; - signDisplay: NumberFormatOptionsSignDisplay; + signDisplay: NumberFormatOptionsSignDisplay; - unit?: string; + unit?: string; - unitDisplay?: "short" | "long" | "narrow"; + unitDisplay?: "short" | "long" | "narrow"; - currencySign?: "standard" | "accounting"; - } + currencySign?: "standard" | "accounting"; +} - interface DateTimeFormatOptions { - calendar?: string | undefined; +interface DateTimeFormatOptions { + calendar?: string | undefined; - numberingSystem?: string | undefined; + numberingSystem?: string | undefined; - hourCycle?: "h11" | "h12" | "h23" | "h24" | undefined; - } + hourCycle?: "h11" | "h12" | "h23" | "h24" | undefined; +} - type LocaleHourCycleKey = "h12" | "h23" | "h11" | "h24"; +type LocaleHourCycleKey = "h12" | "h23" | "h11" | "h24"; - type LocaleCollationCaseFirst = "upper" | "lower" | "false"; +type LocaleCollationCaseFirst = "upper" | "lower" | "false"; - interface LocaleOptions { - /** The part of the Locale that indicates the locale's calendar era. */ - calendar?: string; +interface LocaleOptions { + /** The part of the Locale that indicates the locale's calendar era. */ + calendar?: string; - /** Flag that defines whether case is taken into account for the locale's collation rules. */ - caseFirst?: LocaleCollationCaseFirst; + /** Flag that defines whether case is taken into account for the locale's collation rules. */ + caseFirst?: LocaleCollationCaseFirst; - /** The collation type used for sorting */ - collation?: string; + /** The collation type used for sorting */ + collation?: string; - /** The time keeping format convention used by the locale. */ - hourCycle?: LocaleHourCycleKey; + /** The time keeping format convention used by the locale. */ + hourCycle?: LocaleHourCycleKey; - /** The numeral system used by the locale. */ - numberingSystem?: string; + /** The numeral system used by the locale. */ + numberingSystem?: string; - /** Flag that defines whether the locale has special collation handling for numeric characters. */ - numeric?: boolean; + /** Flag that defines whether the locale has special collation handling for numeric characters. */ + numeric?: boolean; - /** The region of the world (usually a country) associated with the locale. Possible values are region codes as defined by ISO 3166-1. */ - region?: string; + /** The region of the world (usually a country) associated with the locale. Possible values are region codes as defined by ISO 3166-1. */ + region?: string; - /** The script used for writing the particular language used in the locale. Possible values are script codes as defined by ISO 15924. */ - script?: string; - } + /** The script used for writing the particular language used in the locale. Possible values are script codes as defined by ISO 15924. */ + script?: string; +} - interface Locale extends LocaleOptions { - /** A string containing the language, and the script and region if available. */ - baseName: string; +interface Locale extends LocaleOptions { + /** A string containing the language, and the script and region if available. */ + baseName: string; - /** The primary language subtag associated with the locale. */ - language: string; + /** The primary language subtag associated with the locale. */ + language: string; - /** Gets the most likely values for the language, script, and region of the locale based on existing values. */ - maximize(): Locale; + /** Gets the most likely values for the language, script, and region of the locale based on existing values. */ + maximize(): Locale; - /** Attempts to remove information about the locale that would be added by calling `Locale.maximize()`. */ - minimize(): Locale; + /** Attempts to remove information about the locale that would be added by calling `Locale.maximize()`. */ + minimize(): Locale; - /** Returns the locale's full locale identifier string. */ - toString(): UnicodeBCP47LocaleIdentifier; - } + /** Returns the locale's full locale identifier string. */ + toString(): UnicodeBCP47LocaleIdentifier; +} - /** - * Constructor creates [Intl.Locale](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) - * objects - * - * @param tag - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646). - * For the general form and interpretation of the locales argument, - * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). - * - * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/Locale#Parameters) with some or all of options of the locale. - * - * @returns [Intl.Locale](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale). - */ - const Locale: { - new (tag: UnicodeBCP47LocaleIdentifier | Locale, options?: LocaleOptions): Locale; - }; +/** + * Constructor creates [Intl.Locale](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) + * objects + * + * @param tag - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646). + * For the general form and interpretation of the locales argument, + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/Locale#Parameters) with some or all of options of the locale. + * + * @returns [Intl.Locale](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale). + */ + const Locale: { + new (tag: UnicodeBCP47LocaleIdentifier | Locale, options?: LocaleOptions): Locale; +}; - type DisplayNamesFallback = - | "code" - | "none"; +type DisplayNamesFallback = + | "code" + | "none"; - type DisplayNamesType = - | "language" - | "region" - | "script" - | "calendar" - | "dateTimeField" - | "currency"; +type DisplayNamesType = + | "language" + | "region" + | "script" + | "calendar" + | "dateTimeField" + | "currency"; - type DisplayNamesLanguageDisplay = - | "dialect" - | "standard"; +type DisplayNamesLanguageDisplay = + | "dialect" + | "standard"; - interface DisplayNamesOptions { - localeMatcher?: RelativeTimeFormatLocaleMatcher; +interface DisplayNamesOptions { + localeMatcher?: RelativeTimeFormatLocaleMatcher; - style?: RelativeTimeFormatStyle; + style?: RelativeTimeFormatStyle; - type: DisplayNamesType; + type: DisplayNamesType; - languageDisplay?: DisplayNamesLanguageDisplay; + languageDisplay?: DisplayNamesLanguageDisplay; - fallback?: DisplayNamesFallback; - } + fallback?: DisplayNamesFallback; +} - interface ResolvedDisplayNamesOptions { - locale: UnicodeBCP47LocaleIdentifier; +interface ResolvedDisplayNamesOptions { + locale: UnicodeBCP47LocaleIdentifier; - style: RelativeTimeFormatStyle; + style: RelativeTimeFormatStyle; - type: DisplayNamesType; + type: DisplayNamesType; - fallback: DisplayNamesFallback; + fallback: DisplayNamesFallback; - languageDisplay?: DisplayNamesLanguageDisplay; - } + languageDisplay?: DisplayNamesLanguageDisplay; +} - interface DisplayNames { - /** - * Receives a code and returns a string based on the locale and options provided when instantiating - * [`Intl.DisplayNames()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) - * - * @param code The `code` to provide depends on the `type` passed to display name during creation: - * - If the type is `"region"`, code should be either an [ISO-3166 two letters region code](https://www.iso.org/iso-3166-country-codes.html), - * or a [three digits UN M49 Geographic Regions](https://unstats.un.org/unsd/methodology/m49/). - * - If the type is `"script"`, code should be an [ISO-15924 four letters script code](https://unicode.org/iso15924/iso15924-codes.html). - * - If the type is `"language"`, code should be a `languageCode` ["-" `scriptCode`] ["-" `regionCode` ] *("-" `variant` ) - * subsequence of the unicode_language_id grammar in [UTS 35's Unicode Language and Locale Identifiers grammar](https://unicode.org/reports/tr35/#Unicode_language_identifier). - * `languageCode` is either a two letters ISO 639-1 language code or a three letters ISO 639-2 language code. - * - If the type is `"currency"`, code should be a [3-letter ISO 4217 currency code](https://www.iso.org/iso-4217-currency-codes.html). - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/of). - */ - of(code: string): string | undefined; +interface DisplayNames { + /** + * Receives a code and returns a string based on the locale and options provided when instantiating + * [`Intl.DisplayNames()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) + * + * @param code The `code` to provide depends on the `type` passed to display name during creation: + * - If the type is `"region"`, code should be either an [ISO-3166 two letters region code](https://www.iso.org/iso-3166-country-codes.html), + * or a [three digits UN M49 Geographic Regions](https://unstats.un.org/unsd/methodology/m49/). + * - If the type is `"script"`, code should be an [ISO-15924 four letters script code](https://unicode.org/iso15924/iso15924-codes.html). + * - If the type is `"language"`, code should be a `languageCode` ["-" `scriptCode`] ["-" `regionCode` ] *("-" `variant` ) + * subsequence of the unicode_language_id grammar in [UTS 35's Unicode Language and Locale Identifiers grammar](https://unicode.org/reports/tr35/#Unicode_language_identifier). + * `languageCode` is either a two letters ISO 639-1 language code or a three letters ISO 639-2 language code. + * - If the type is `"currency"`, code should be a [3-letter ISO 4217 currency code](https://www.iso.org/iso-4217-currency-codes.html). + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/of). + */ + of(code: string): string | undefined; - /** - * Returns a new object with properties reflecting the locale and style formatting options computed during the construction of the current - * [`Intl/DisplayNames`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/resolvedOptions). - */ - resolvedOptions(): ResolvedDisplayNamesOptions; - } + /** + * Returns a new object with properties reflecting the locale and style formatting options computed during the construction of the current + * [`Intl/DisplayNames`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/resolvedOptions). + */ + resolvedOptions(): ResolvedDisplayNamesOptions; +} - /** - * The [`Intl.DisplayNames()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) - * object enables the consistent translation of language, region and script display names. +/** + * The [`Intl.DisplayNames()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) + * object enables the consistent translation of language, region and script display names. + * + * [Compatibility](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames#browser_compatibility). + */ + const DisplayNames: { + prototype: DisplayNames; + + /** + * @param locales A string with a BCP 47 language tag, or an array of such strings. + * For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) + * page. + * + * @param options An object for setting up a display name. * - * [Compatibility](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames#browser_compatibility). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/DisplayNames). */ - const DisplayNames: { - prototype: DisplayNames; - - /** - * @param locales A string with a BCP 47 language tag, or an array of such strings. - * For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) - * page. - * - * @param options An object for setting up a display name. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/DisplayNames). - */ - new (locales: LocalesArgument, options: DisplayNamesOptions): DisplayNames; - - /** - * Returns an array containing those of the provided locales that are supported in display names without having to fall back to the runtime's default locale. - * - * @param locales A string with a BCP 47 language tag, or an array of such strings. - * For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) - * page. - * - * @param options An object with a locale matcher. - * - * @returns An array of strings representing a subset of the given locale tags that are supported in display names without having to fall back to the runtime's default locale. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/supportedLocalesOf). - */ - supportedLocalesOf(locales?: LocalesArgument, options?: { localeMatcher?: RelativeTimeFormatLocaleMatcher; }): UnicodeBCP47LocaleIdentifier[]; - }; + new (locales: LocalesArgument, options: DisplayNamesOptions): DisplayNames; + + /** + * Returns an array containing those of the provided locales that are supported in display names without having to fall back to the runtime's default locale. + * + * @param locales A string with a BCP 47 language tag, or an array of such strings. + * For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) + * page. + * + * @param options An object with a locale matcher. + * + * @returns An array of strings representing a subset of the given locale tags that are supported in display names without having to fall back to the runtime's default locale. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/supportedLocalesOf). + */ + supportedLocalesOf(locales?: LocalesArgument, options?: { localeMatcher?: RelativeTimeFormatLocaleMatcher; }): UnicodeBCP47LocaleIdentifier[]; +}; - interface CollatorConstructor { - new (locales?: LocalesArgument, options?: CollatorOptions): Collator; +interface CollatorConstructor { + new (locales?: LocalesArgument, options?: CollatorOptions): Collator; - (locales?: LocalesArgument, options?: CollatorOptions): Collator; + (locales?: LocalesArgument, options?: CollatorOptions): Collator; - supportedLocalesOf(locales: LocalesArgument, options?: CollatorOptions): string[]; - } + supportedLocalesOf(locales: LocalesArgument, options?: CollatorOptions): string[]; +} - interface DateTimeFormatConstructor { - new (locales?: LocalesArgument, options?: DateTimeFormatOptions): DateTimeFormat; +interface DateTimeFormatConstructor { + new (locales?: LocalesArgument, options?: DateTimeFormatOptions): DateTimeFormat; - (locales?: LocalesArgument, options?: DateTimeFormatOptions): DateTimeFormat; + (locales?: LocalesArgument, options?: DateTimeFormatOptions): DateTimeFormat; - supportedLocalesOf(locales: LocalesArgument, options?: DateTimeFormatOptions): string[]; - } + supportedLocalesOf(locales: LocalesArgument, options?: DateTimeFormatOptions): string[]; +} - interface NumberFormatConstructor { - new (locales?: LocalesArgument, options?: NumberFormatOptions): NumberFormat; +interface NumberFormatConstructor { + new (locales?: LocalesArgument, options?: NumberFormatOptions): NumberFormat; - (locales?: LocalesArgument, options?: NumberFormatOptions): NumberFormat; + (locales?: LocalesArgument, options?: NumberFormatOptions): NumberFormat; - supportedLocalesOf(locales: LocalesArgument, options?: NumberFormatOptions): string[]; - } + supportedLocalesOf(locales: LocalesArgument, options?: NumberFormatOptions): string[]; +} - interface PluralRulesConstructor { - new (locales?: LocalesArgument, options?: PluralRulesOptions): PluralRules; +interface PluralRulesConstructor { + new (locales?: LocalesArgument, options?: PluralRulesOptions): PluralRules; - (locales?: LocalesArgument, options?: PluralRulesOptions): PluralRules; + (locales?: LocalesArgument, options?: PluralRulesOptions): PluralRules; - supportedLocalesOf(locales: LocalesArgument, options?: { localeMatcher?: "lookup" | "best fit"; }): string[]; - } + supportedLocalesOf(locales: LocalesArgument, options?: { localeMatcher?: "lookup" | "best fit"; }): string[]; +} } ///////////////////////////// // lib.es2020.number.d.ts ///////////////////////////// interface Number { - /** - * Converts a number to a string by using the current or specified locale. - * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.NumberFormatOptions): string; + /** + * Converts a number to a string by using the current or specified locale. + * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.NumberFormatOptions): string; } ///////////////////////////// // lib.es2020.promise.d.ts ///////////////////////////// interface PromiseFulfilledResult { - status: "fulfilled"; + status: "fulfilled"; - value: T; + value: T; } interface PromiseRejectedResult { - status: "rejected"; + status: "rejected"; - reason: any; + reason: any; } type PromiseSettledResult = PromiseFulfilledResult | PromiseRejectedResult; interface PromiseConstructor { - /** - * Creates a Promise that is resolved with an array of results when all - * of the provided Promises resolve or reject. - * @param values An array of Promises. - * @returns A new Promise. - */ - allSettled(values: T): Promise<{ -readonly [P in keyof T]: PromiseSettledResult>; }>; + /** + * Creates a Promise that is resolved with an array of results when all + * of the provided Promises resolve or reject. + * @param values An array of Promises. + * @returns A new Promise. + */ + allSettled(values: T): Promise<{ -readonly [P in keyof T]: PromiseSettledResult>; }>; - /** - * Creates a Promise that is resolved with an array of results when all - * of the provided Promises resolve or reject. - * @param values An array of Promises. - * @returns A new Promise. - */ - allSettled(values: Iterable>): Promise>[]>; + /** + * Creates a Promise that is resolved with an array of results when all + * of the provided Promises resolve or reject. + * @param values An array of Promises. + * @returns A new Promise. + */ + allSettled(values: Iterable>): Promise>[]>; } ///////////////////////////// // lib.es2020.sharedmemory.d.ts ///////////////////////////// interface Atomics { - /** - * Adds a value to the value at the given position in the array, returning the original value. - * Until this atomic operation completes, any other read or write operation against the array - * will block. - */ - add(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + /** + * Adds a value to the value at the given position in the array, returning the original value. + * Until this atomic operation completes, any other read or write operation against the array + * will block. + */ + add(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - /** - * Stores the bitwise AND of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or - * write operation against the array will block. - */ - and(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + /** + * Stores the bitwise AND of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or + * write operation against the array will block. + */ + and(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - /** - * Replaces the value at the given position in the array if the original value equals the given - * expected value, returning the original value. Until this atomic operation completes, any - * other read or write operation against the array will block. - */ - compareExchange(typedArray: BigInt64Array | BigUint64Array, index: number, expectedValue: bigint, replacementValue: bigint): bigint; + /** + * Replaces the value at the given position in the array if the original value equals the given + * expected value, returning the original value. Until this atomic operation completes, any + * other read or write operation against the array will block. + */ + compareExchange(typedArray: BigInt64Array | BigUint64Array, index: number, expectedValue: bigint, replacementValue: bigint): bigint; - /** - * Replaces the value at the given position in the array, returning the original value. Until - * this atomic operation completes, any other read or write operation against the array will - * block. - */ - exchange(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + /** + * Replaces the value at the given position in the array, returning the original value. Until + * this atomic operation completes, any other read or write operation against the array will + * block. + */ + exchange(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - /** - * Returns the value at the given position in the array. Until this atomic operation completes, - * any other read or write operation against the array will block. - */ - load(typedArray: BigInt64Array | BigUint64Array, index: number): bigint; + /** + * Returns the value at the given position in the array. Until this atomic operation completes, + * any other read or write operation against the array will block. + */ + load(typedArray: BigInt64Array | BigUint64Array, index: number): bigint; - /** - * Stores the bitwise OR of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or write - * operation against the array will block. - */ - or(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + /** + * Stores the bitwise OR of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or write + * operation against the array will block. + */ + or(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - /** - * Stores a value at the given position in the array, returning the new value. Until this - * atomic operation completes, any other read or write operation against the array will block. - */ - store(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + /** + * Stores a value at the given position in the array, returning the new value. Until this + * atomic operation completes, any other read or write operation against the array will block. + */ + store(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - /** - * Subtracts a value from the value at the given position in the array, returning the original - * value. Until this atomic operation completes, any other read or write operation against the - * array will block. - */ - sub(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + /** + * Subtracts a value from the value at the given position in the array, returning the original + * value. Until this atomic operation completes, any other read or write operation against the + * array will block. + */ + sub(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - /** - * If the value at the given position in the array is equal to the provided value, the current - * agent is put to sleep causing execution to suspend until the timeout expires (returning - * `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns - * `"not-equal"`. - */ - wait(typedArray: BigInt64Array, index: number, value: bigint, timeout?: number): "ok" | "not-equal" | "timed-out"; + /** + * If the value at the given position in the array is equal to the provided value, the current + * agent is put to sleep causing execution to suspend until the timeout expires (returning + * `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns + * `"not-equal"`. + */ + wait(typedArray: BigInt64Array, index: number, value: bigint, timeout?: number): "ok" | "not-equal" | "timed-out"; - /** - * Wakes up sleeping agents that are waiting on the given index of the array, returning the - * number of agents that were awoken. - * @param typedArray A shared BigInt64Array. - * @param index The position in the typedArray to wake up on. - * @param count The number of sleeping agents to notify. Defaults to +Infinity. - */ - notify(typedArray: BigInt64Array, index: number, count?: number): number; + /** + * Wakes up sleeping agents that are waiting on the given index of the array, returning the + * number of agents that were awoken. + * @param typedArray A shared BigInt64Array. + * @param index The position in the typedArray to wake up on. + * @param count The number of sleeping agents to notify. Defaults to +Infinity. + */ + notify(typedArray: BigInt64Array, index: number, count?: number): number; - /** - * Stores the bitwise XOR of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or write - * operation against the array will block. - */ - xor(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + /** + * Stores the bitwise XOR of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or write + * operation against the array will block. + */ + xor(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; } ///////////////////////////// // lib.es2020.string.d.ts ///////////////////////////// interface String { - /** - * Matches a string with a regular expression, and returns an iterable of matches - * containing the results of that search. - * @param regexp A regular expression - */ - matchAll(regexp: RegExp): RegExpStringIterator; + /** + * Matches a string with a regular expression, and returns an iterable of matches + * containing the results of that search. + * @param regexp A regular expression + */ + matchAll(regexp: RegExp): RegExpStringIterator; - /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */ - toLocaleLowerCase(locales?: Intl.LocalesArgument): string; + /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */ + toLocaleLowerCase(locales?: Intl.LocalesArgument): string; - /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */ - toLocaleUpperCase(locales?: Intl.LocalesArgument): string; + /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */ + toLocaleUpperCase(locales?: Intl.LocalesArgument): string; - /** - * Determines whether two strings are equivalent in the current or specified locale. - * @param that String to compare to target string - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details. - * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details. - */ - localeCompare(that: string, locales?: Intl.LocalesArgument, options?: Intl.CollatorOptions): number; + /** + * Determines whether two strings are equivalent in the current or specified locale. + * @param that String to compare to target string + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details. + * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details. + */ + localeCompare(that: string, locales?: Intl.LocalesArgument, options?: Intl.CollatorOptions): number; } ///////////////////////////// // lib.es2020.symbol.wellknown.d.ts ///////////////////////////// interface SymbolConstructor { - /** - * A regular expression method that matches the regular expression against a string. Called - * by the String.prototype.matchAll method. - */ - readonly matchAll: unique symbol; + /** + * A regular expression method that matches the regular expression against a string. Called + * by the String.prototype.matchAll method. + */ + readonly matchAll: unique symbol; } interface RegExpStringIterator extends IteratorObject { - [Symbol.iterator](): RegExpStringIterator; + [Symbol.iterator](): RegExpStringIterator; } interface RegExp { - /** - * Matches a string with this regular expression, and returns an iterable of matches - * containing the results of that search. - * @param string A string to search within. - */ - [Symbol.matchAll](str: string): RegExpStringIterator; + /** + * Matches a string with this regular expression, and returns an iterable of matches + * containing the results of that search. + * @param string A string to search within. + */ + [Symbol.matchAll](str: string): RegExpStringIterator; } ///////////////////////////// // lib.es2021.intl.d.ts ///////////////////////////// declare namespace Intl { - interface DateTimeFormatOptions { - dateStyle?: "full" | "long" | "medium" | "short" | undefined; +interface DateTimeFormatOptions { + dateStyle?: "full" | "long" | "medium" | "short" | undefined; - timeStyle?: "full" | "long" | "medium" | "short" | undefined; + timeStyle?: "full" | "long" | "medium" | "short" | undefined; - dayPeriod?: "narrow" | "short" | "long" | undefined; + dayPeriod?: "narrow" | "short" | "long" | undefined; - fractionalSecondDigits?: 1 | 2 | 3 | undefined; - } + fractionalSecondDigits?: 1 | 2 | 3 | undefined; +} - interface DateTimeRangeFormatPart extends DateTimeFormatPart { - source: "startRange" | "endRange" | "shared"; - } +interface DateTimeRangeFormatPart extends DateTimeFormatPart { + source: "startRange" | "endRange" | "shared"; +} - interface DateTimeFormat { - formatRange(startDate: Date | number | bigint, endDate: Date | number | bigint): string; +interface DateTimeFormat { + formatRange(startDate: Date | number | bigint, endDate: Date | number | bigint): string; - formatRangeToParts(startDate: Date | number | bigint, endDate: Date | number | bigint): DateTimeRangeFormatPart[]; - } + formatRangeToParts(startDate: Date | number | bigint, endDate: Date | number | bigint): DateTimeRangeFormatPart[]; +} - interface ResolvedDateTimeFormatOptions { - dateStyle?: "full" | "long" | "medium" | "short"; +interface ResolvedDateTimeFormatOptions { + dateStyle?: "full" | "long" | "medium" | "short"; - timeStyle?: "full" | "long" | "medium" | "short"; + timeStyle?: "full" | "long" | "medium" | "short"; - hourCycle?: "h11" | "h12" | "h23" | "h24"; + hourCycle?: "h11" | "h12" | "h23" | "h24"; - dayPeriod?: "narrow" | "short" | "long"; + dayPeriod?: "narrow" | "short" | "long"; - fractionalSecondDigits?: 1 | 2 | 3; - } + fractionalSecondDigits?: 1 | 2 | 3; +} - /** - * The locale matching algorithm to use. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). - */ - type ListFormatLocaleMatcher = "lookup" | "best fit"; +/** + * The locale matching algorithm to use. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). + */ + type ListFormatLocaleMatcher = "lookup" | "best fit"; - /** - * The format of output message. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). - */ - type ListFormatType = "conjunction" | "disjunction" | "unit"; +/** + * The format of output message. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). + */ + type ListFormatType = "conjunction" | "disjunction" | "unit"; - /** - * The length of the formatted message. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). - */ - type ListFormatStyle = "long" | "short" | "narrow"; +/** + * The length of the formatted message. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). + */ + type ListFormatStyle = "long" | "short" | "narrow"; - /** - * An object with some or all properties of the `Intl.ListFormat` constructor `options` parameter. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). - */ - interface ListFormatOptions { - /** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */ - localeMatcher?: ListFormatLocaleMatcher | undefined; - - /** The format of output message. */ - type?: ListFormatType | undefined; - - /** The length of the internationalized message. */ - style?: ListFormatStyle | undefined; - } - - interface ResolvedListFormatOptions { - locale: string; - - style: ListFormatStyle; - - type: ListFormatType; - } - - interface ListFormat { - /** - * Returns a string with a language-specific representation of the list. - * - * @param list - An iterable object, such as an [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array). - * - * @throws `TypeError` if `list` includes something other than the possible values. - * - * @returns {string} A language-specific formatted string representing the elements of the list. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/format). - */ - format(list: Iterable): string; - - /** - * Returns an Array of objects representing the different components that can be used to format a list of values in a locale-aware fashion. - * - * @param list - An iterable object, such as an [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array), to be formatted according to a locale. - * - * @throws `TypeError` if `list` includes something other than the possible values. - * - * @returns {{ type: "element" | "literal", value: string; }[]} An Array of components which contains the formatted parts from the list. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/formatToParts). - */ - formatToParts(list: Iterable): { type: "element" | "literal"; value: string; }[]; - - /** - * Returns a new object with properties reflecting the locale and style - * formatting options computed during the construction of the current - * `Intl.ListFormat` object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/resolvedOptions). - */ - resolvedOptions(): ResolvedListFormatOptions; - } - - const ListFormat: { - prototype: ListFormat; - - /** - * Creates [Intl.ListFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat) objects that - * enable language-sensitive list formatting. - * - * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. - * For the general form and interpretation of the `locales` argument, - * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). - * - * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters) - * with some or all options of `ListFormatOptions`. - * - * @returns [Intl.ListFormatOptions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat) object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat). - */ - new (locales?: LocalesArgument, options?: ListFormatOptions): ListFormat; - - /** - * Returns an array containing those of the provided locales that are - * supported in list formatting without having to fall back to the runtime's default locale. - * - * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. - * For the general form and interpretation of the `locales` argument, - * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). - * - * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf#parameters). - * with some or all possible options. - * - * @returns An array of strings representing a subset of the given locale tags that are supported in list - * formatting without having to fall back to the runtime's default locale. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf). - */ - supportedLocalesOf(locales: LocalesArgument, options?: Pick): UnicodeBCP47LocaleIdentifier[]; - }; -} +/** + * An object with some or all properties of the `Intl.ListFormat` constructor `options` parameter. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). + */ + interface ListFormatOptions { + /** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */ + localeMatcher?: ListFormatLocaleMatcher | undefined; -///////////////////////////// -// lib.es2021.promise.d.ts -///////////////////////////// -interface AggregateError extends Error { - errors: any[]; + /** The format of output message. */ + type?: ListFormatType | undefined; + + /** The length of the internationalized message. */ + style?: ListFormatStyle | undefined; } -interface AggregateErrorConstructor { - new (errors: Iterable, message?: string): AggregateError; +interface ResolvedListFormatOptions { + locale: string; - (errors: Iterable, message?: string): AggregateError; + style: ListFormatStyle; - readonly prototype: AggregateError; + type: ListFormatType; } -declare var AggregateError: AggregateErrorConstructor; +interface ListFormat { + /** + * Returns a string with a language-specific representation of the list. + * + * @param list - An iterable object, such as an [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array). + * + * @throws `TypeError` if `list` includes something other than the possible values. + * + * @returns {string} A language-specific formatted string representing the elements of the list. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/format). + */ + format(list: Iterable): string; -/** - * Represents the completion of an asynchronous operation - */ -interface PromiseConstructor { /** - * The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm. - * @param values An array or iterable of Promises. - * @returns A new Promise. + * Returns an Array of objects representing the different components that can be used to format a list of values in a locale-aware fashion. + * + * @param list - An iterable object, such as an [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array), to be formatted according to a locale. + * + * @throws `TypeError` if `list` includes something other than the possible values. + * + * @returns {{ type: "element" | "literal", value: string; }[]} An Array of components which contains the formatted parts from the list. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/formatToParts). */ - any(values: T): Promise>; + formatToParts(list: Iterable): { type: "element" | "literal"; value: string; }[]; /** - * The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm. - * @param values An array or iterable of Promises. - * @returns A new Promise. + * Returns a new object with properties reflecting the locale and style + * formatting options computed during the construction of the current + * `Intl.ListFormat` object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/resolvedOptions). */ - any(values: Iterable>): Promise>; + resolvedOptions(): ResolvedListFormatOptions; } -///////////////////////////// -// lib.es2021.string.d.ts -///////////////////////////// -interface String { +const ListFormat: { + prototype: ListFormat; + /** - * Replace all instances of a substring in a string, using a regular expression or search string. - * @param searchValue A string to search for. - * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string. + * Creates [Intl.ListFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat) objects that + * enable language-sensitive list formatting. + * + * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. + * For the general form and interpretation of the `locales` argument, + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters) + * with some or all options of `ListFormatOptions`. + * + * @returns [Intl.ListFormatOptions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat) object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat). */ - replaceAll(searchValue: string | RegExp, replaceValue: string): string; + new (locales?: LocalesArgument, options?: ListFormatOptions): ListFormat; /** - * Replace all instances of a substring in a string, using a regular expression or search string. - * @param searchValue A string to search for. - * @param replacer A function that returns the replacement text. + * Returns an array containing those of the provided locales that are + * supported in list formatting without having to fall back to the runtime's default locale. + * + * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. + * For the general form and interpretation of the `locales` argument, + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf#parameters). + * with some or all possible options. + * + * @returns An array of strings representing a subset of the given locale tags that are supported in list + * formatting without having to fall back to the runtime's default locale. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf). */ - replaceAll(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; + supportedLocalesOf(locales: LocalesArgument, options?: Pick): UnicodeBCP47LocaleIdentifier[]; +}; +} + +///////////////////////////// +// lib.es2021.promise.d.ts +///////////////////////////// +interface AggregateError extends Error { + errors: any[]; +} + +interface AggregateErrorConstructor { + new (errors: Iterable, message?: string): AggregateError; + + (errors: Iterable, message?: string): AggregateError; + + readonly prototype: AggregateError; +} + +declare var AggregateError: AggregateErrorConstructor; + +/** + * Represents the completion of an asynchronous operation + */ +interface PromiseConstructor { + /** + * The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm. + * @param values An array or iterable of Promises. + * @returns A new Promise. + */ + any(values: T): Promise>; + + /** + * The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm. + * @param values An array or iterable of Promises. + * @returns A new Promise. + */ + any(values: Iterable>): Promise>; +} + +///////////////////////////// +// lib.es2021.string.d.ts +///////////////////////////// +interface String { + /** + * Replace all instances of a substring in a string, using a regular expression or search string. + * @param searchValue A string to search for. + * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string. + */ + replaceAll(searchValue: string | RegExp, replaceValue: string): string; + + /** + * Replace all instances of a substring in a string, using a regular expression or search string. + * @param searchValue A string to search for. + * @param replacer A function that returns the replacement text. + */ + replaceAll(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; } ///////////////////////////// // lib.es2021.weakref.d.ts ///////////////////////////// interface WeakRef { - readonly [Symbol.toStringTag]: "WeakRef"; + readonly [Symbol.toStringTag]: "WeakRef"; - /** - * Returns the WeakRef instance's target value, or undefined if the target value has been - * reclaimed. - * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. - */ - deref(): T | undefined; + /** + * Returns the WeakRef instance's target value, or undefined if the target value has been + * reclaimed. + * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. + */ + deref(): T | undefined; } interface WeakRefConstructor { - readonly prototype: WeakRef; + readonly prototype: WeakRef; - /** - * Creates a WeakRef instance for the given target value. - * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. - * @param target The target value for the WeakRef instance. - */ - new (target: T): WeakRef; + /** + * Creates a WeakRef instance for the given target value. + * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. + * @param target The target value for the WeakRef instance. + */ + new (target: T): WeakRef; } declare var WeakRef: WeakRefConstructor; interface FinalizationRegistry { - readonly [Symbol.toStringTag]: "FinalizationRegistry"; + readonly [Symbol.toStringTag]: "FinalizationRegistry"; - /** - * Registers a value with the registry. - * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. - * @param target The target value to register. - * @param heldValue The value to pass to the finalizer for this value. This cannot be the - * target value. - * @param unregisterToken The token to pass to the unregister method to unregister the target - * value. If not provided, the target cannot be unregistered. - */ - register(target: WeakKey, heldValue: T, unregisterToken?: WeakKey): void; + /** + * Registers a value with the registry. + * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. + * @param target The target value to register. + * @param heldValue The value to pass to the finalizer for this value. This cannot be the + * target value. + * @param unregisterToken The token to pass to the unregister method to unregister the target + * value. If not provided, the target cannot be unregistered. + */ + register(target: WeakKey, heldValue: T, unregisterToken?: WeakKey): void; - /** - * Unregisters a value from the registry. - * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. - * @param unregisterToken The token that was used as the unregisterToken argument when calling - * register to register the target value. - */ - unregister(unregisterToken: WeakKey): boolean; + /** + * Unregisters a value from the registry. + * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. + * @param unregisterToken The token that was used as the unregisterToken argument when calling + * register to register the target value. + */ + unregister(unregisterToken: WeakKey): boolean; } interface FinalizationRegistryConstructor { - readonly prototype: FinalizationRegistry; + readonly prototype: FinalizationRegistry; - /** - * Creates a finalization registry with an associated cleanup callback - * @param cleanupCallback The callback to call after a value in the registry has been reclaimed. - */ - new (cleanupCallback: (heldValue: T) => void): FinalizationRegistry; + /** + * Creates a finalization registry with an associated cleanup callback + * @param cleanupCallback The callback to call after a value in the registry has been reclaimed. + */ + new (cleanupCallback: (heldValue: T) => void): FinalizationRegistry; } declare var FinalizationRegistry: FinalizationRegistryConstructor; @@ -4358,1236 +4358,1236 @@ declare var FinalizationRegistry: FinalizationRegistryConstructor; // lib.es2022.array.d.ts ///////////////////////////// interface Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): T | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): T | undefined; } interface ReadonlyArray { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): T | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): T | undefined; } interface Int8Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; } interface Uint8Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; } interface Uint8ClampedArray { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; } interface Int16Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; } interface Uint16Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; } interface Int32Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; } interface Uint32Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; } interface Float32Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; } interface Float64Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; } interface BigInt64Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): bigint | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): bigint | undefined; } interface BigUint64Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): bigint | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): bigint | undefined; } ///////////////////////////// // lib.es2022.error.d.ts ///////////////////////////// interface ErrorOptions { - cause?: unknown; + cause?: unknown; } interface Error { - cause?: unknown; + cause?: unknown; } interface ErrorConstructor { - new (message?: string, options?: ErrorOptions): Error; + new (message?: string, options?: ErrorOptions): Error; - (message?: string, options?: ErrorOptions): Error; + (message?: string, options?: ErrorOptions): Error; } interface EvalErrorConstructor { - new (message?: string, options?: ErrorOptions): EvalError; + new (message?: string, options?: ErrorOptions): EvalError; - (message?: string, options?: ErrorOptions): EvalError; + (message?: string, options?: ErrorOptions): EvalError; } interface RangeErrorConstructor { - new (message?: string, options?: ErrorOptions): RangeError; + new (message?: string, options?: ErrorOptions): RangeError; - (message?: string, options?: ErrorOptions): RangeError; + (message?: string, options?: ErrorOptions): RangeError; } interface ReferenceErrorConstructor { - new (message?: string, options?: ErrorOptions): ReferenceError; + new (message?: string, options?: ErrorOptions): ReferenceError; - (message?: string, options?: ErrorOptions): ReferenceError; + (message?: string, options?: ErrorOptions): ReferenceError; } interface SyntaxErrorConstructor { - new (message?: string, options?: ErrorOptions): SyntaxError; + new (message?: string, options?: ErrorOptions): SyntaxError; - (message?: string, options?: ErrorOptions): SyntaxError; + (message?: string, options?: ErrorOptions): SyntaxError; } interface TypeErrorConstructor { - new (message?: string, options?: ErrorOptions): TypeError; + new (message?: string, options?: ErrorOptions): TypeError; - (message?: string, options?: ErrorOptions): TypeError; + (message?: string, options?: ErrorOptions): TypeError; } interface URIErrorConstructor { - new (message?: string, options?: ErrorOptions): URIError; + new (message?: string, options?: ErrorOptions): URIError; - (message?: string, options?: ErrorOptions): URIError; + (message?: string, options?: ErrorOptions): URIError; } interface AggregateErrorConstructor { - new ( - errors: Iterable, - message?: string, - options?: ErrorOptions, - ): AggregateError; + new ( + errors: Iterable, + message?: string, + options?: ErrorOptions, + ): AggregateError; - ( - errors: Iterable, - message?: string, - options?: ErrorOptions, - ): AggregateError; + ( + errors: Iterable, + message?: string, + options?: ErrorOptions, + ): AggregateError; } ///////////////////////////// // lib.es2022.intl.d.ts ///////////////////////////// declare namespace Intl { - /** - * Returns a sorted array of the supported collation, calendar, currency, numbering system, timezones, and units by the implementation. - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf) - * - * @param key A string indicating the category of values to return. - * @returns A sorted array of the supported values. - */ - function supportedValuesOf(key: "calendar" | "collation" | "currency" | "numberingSystem" | "timeZone" | "unit"): string[]; +/** + * Returns a sorted array of the supported collation, calendar, currency, numbering system, timezones, and units by the implementation. + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf) + * + * @param key A string indicating the category of values to return. + * @returns A sorted array of the supported values. + */ + function supportedValuesOf(key: "calendar" | "collation" | "currency" | "numberingSystem" | "timeZone" | "unit"): string[]; } ///////////////////////////// // lib.es2022.object.d.ts ///////////////////////////// interface ObjectConstructor { - /** - * Determines whether an object has a property with the specified name. - * @param o An object. - * @param v A property name. - */ - hasOwn(o: object, v: PropertyKey): boolean; + /** + * Determines whether an object has a property with the specified name. + * @param o An object. + * @param v A property name. + */ + hasOwn(o: object, v: PropertyKey): boolean; } ///////////////////////////// // lib.es2022.regexp.d.ts ///////////////////////////// interface RegExp { - /** - * Returns a Boolean value indicating the state of the hasIndices flag (d) used with a regular expression. - * Default is false. Read-only. - */ - readonly hasIndices: boolean; + /** + * Returns a Boolean value indicating the state of the hasIndices flag (d) used with a regular expression. + * Default is false. Read-only. + */ + readonly hasIndices: boolean; } ///////////////////////////// // lib.es2022.string.d.ts ///////////////////////////// interface String { - /** - * Returns a new String consisting of the single UTF-16 code unit located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): string | undefined; + /** + * Returns a new String consisting of the single UTF-16 code unit located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): string | undefined; } ///////////////////////////// // lib.es2023.array.d.ts ///////////////////////////// interface Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S | undefined; - - findLast(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S | undefined; + + findLast(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): number; - /** - * Returns a copy of an array with its elements reversed. - */ - toReversed(): T[]; + /** + * Returns a copy of an array with its elements reversed. + */ + toReversed(): T[]; - /** - * Returns a copy of an array with its elements sorted. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order. - * ```ts - * [11, 2, 22, 1].toSorted((a, b) => a - b) // [1, 2, 11, 22] - * ``` - */ - toSorted(compareFn?: (a: T, b: T) => number): T[]; + /** + * Returns a copy of an array with its elements sorted. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order. + * ```ts + * [11, 2, 22, 1].toSorted((a, b) => a - b) // [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: T, b: T) => number): T[]; - /** - * Copies an array and removes elements and, if necessary, inserts new elements in their place. Returns the copied array. - * @param start The zero-based location in the array from which to start removing elements. - * @param deleteCount The number of elements to remove. - * @param items Elements to insert into the copied array in place of the deleted elements. - * @returns The copied array. - */ - toSpliced(start: number, deleteCount: number, ...items: T[]): T[]; + /** + * Copies an array and removes elements and, if necessary, inserts new elements in their place. Returns the copied array. + * @param start The zero-based location in the array from which to start removing elements. + * @param deleteCount The number of elements to remove. + * @param items Elements to insert into the copied array in place of the deleted elements. + * @returns The copied array. + */ + toSpliced(start: number, deleteCount: number, ...items: T[]): T[]; - /** - * Copies an array and removes elements while returning the remaining elements. - * @param start The zero-based location in the array from which to start removing elements. - * @param deleteCount The number of elements to remove. - * @returns A copy of the original array with the remaining elements. - */ - toSpliced(start: number, deleteCount?: number): T[]; + /** + * Copies an array and removes elements while returning the remaining elements. + * @param start The zero-based location in the array from which to start removing elements. + * @param deleteCount The number of elements to remove. + * @returns A copy of the original array with the remaining elements. + */ + toSpliced(start: number, deleteCount?: number): T[]; - /** - * Copies an array, then overwrites the value at the provided index with the - * given value. If the index is negative, then it replaces from the end - * of the array. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to write into the copied array. - * @returns The copied array with the updated value. - */ - with(index: number, value: T): T[]; + /** + * Copies an array, then overwrites the value at the provided index with the + * given value. If the index is negative, then it replaces from the end + * of the array. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to write into the copied array. + * @returns The copied array with the updated value. + */ + with(index: number, value: T): T[]; } interface ReadonlyArray { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: (value: T, index: number, array: readonly T[]) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: (value: T, index: number, array: readonly T[]) => unknown, - thisArg?: any, - ): T | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: (value: T, index: number, array: readonly T[]) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: (value: T, index: number, array: readonly T[]) => unknown, + thisArg?: any, + ): T | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: (value: T, index: number, array: readonly T[]) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: (value: T, index: number, array: readonly T[]) => unknown, + thisArg?: any, + ): number; - /** - * Copies the array and returns the copied array with all of its elements reversed. - */ - toReversed(): T[]; + /** + * Copies the array and returns the copied array with all of its elements reversed. + */ + toReversed(): T[]; - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order. - * ```ts - * [11, 2, 22, 1].toSorted((a, b) => a - b) // [1, 2, 11, 22] - * ``` - */ - toSorted(compareFn?: (a: T, b: T) => number): T[]; + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order. + * ```ts + * [11, 2, 22, 1].toSorted((a, b) => a - b) // [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: T, b: T) => number): T[]; - /** - * Copies an array and removes elements while, if necessary, inserting new elements in their place, returning the remaining elements. - * @param start The zero-based location in the array from which to start removing elements. - * @param deleteCount The number of elements to remove. - * @param items Elements to insert into the copied array in place of the deleted elements. - * @returns A copy of the original array with the remaining elements. - */ - toSpliced(start: number, deleteCount: number, ...items: T[]): T[]; + /** + * Copies an array and removes elements while, if necessary, inserting new elements in their place, returning the remaining elements. + * @param start The zero-based location in the array from which to start removing elements. + * @param deleteCount The number of elements to remove. + * @param items Elements to insert into the copied array in place of the deleted elements. + * @returns A copy of the original array with the remaining elements. + */ + toSpliced(start: number, deleteCount: number, ...items: T[]): T[]; - /** - * Copies an array and removes elements while returning the remaining elements. - * @param start The zero-based location in the array from which to start removing elements. - * @param deleteCount The number of elements to remove. - * @returns A copy of the original array with the remaining elements. - */ - toSpliced(start: number, deleteCount?: number): T[]; + /** + * Copies an array and removes elements while returning the remaining elements. + * @param start The zero-based location in the array from which to start removing elements. + * @param deleteCount The number of elements to remove. + * @returns A copy of the original array with the remaining elements. + */ + toSpliced(start: number, deleteCount?: number): T[]; - /** - * Copies an array, then overwrites the value at the provided index with the - * given value. If the index is negative, then it replaces from the end - * of the array - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: T): T[]; + /** + * Copies an array, then overwrites the value at the provided index with the + * given value. If the index is negative, then it replaces from the end + * of the array + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: T): T[]; } interface Int8Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, - ): number | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: (value: number, index: number, array: this) => unknown, + thisArg?: any, + ): number | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: (value: number, index: number, array: this) => unknown, + thisArg?: any, + ): number; - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): Int8Array; + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Int8Array; - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = Int8Array.from([11, 2, 22, 1]); - * myNums.toSorted((a, b) => a - b) // Int8Array(4) [1, 2, 11, 22] - * ``` - */ - toSorted(compareFn?: (a: number, b: number) => number): Int8Array; + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = Int8Array.from([11, 2, 22, 1]); + * myNums.toSorted((a, b) => a - b) // Int8Array(4) [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Int8Array; - /** - * Copies the array and inserts the given number at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: number): Int8Array; + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Int8Array; } interface Uint8Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, - ): number | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: (value: number, index: number, array: this) => unknown, + thisArg?: any, + ): number | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: (value: number, index: number, array: this) => unknown, + thisArg?: any, + ): number; - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): Uint8Array; + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Uint8Array; - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = Uint8Array.from([11, 2, 22, 1]); - * myNums.toSorted((a, b) => a - b) // Uint8Array(4) [1, 2, 11, 22] - * ``` - */ - toSorted(compareFn?: (a: number, b: number) => number): Uint8Array; + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = Uint8Array.from([11, 2, 22, 1]); + * myNums.toSorted((a, b) => a - b) // Uint8Array(4) [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Uint8Array; - /** - * Copies the array and inserts the given number at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: number): Uint8Array; + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Uint8Array; } interface Uint8ClampedArray { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number; - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): Uint8ClampedArray; + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Uint8ClampedArray; - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = Uint8ClampedArray.from([11, 2, 22, 1]); - * myNums.toSorted((a, b) => a - b) // Uint8ClampedArray(4) [1, 2, 11, 22] - * ``` - */ - toSorted(compareFn?: (a: number, b: number) => number): Uint8ClampedArray; + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = Uint8ClampedArray.from([11, 2, 22, 1]); + * myNums.toSorted((a, b) => a - b) // Uint8ClampedArray(4) [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Uint8ClampedArray; - /** - * Copies the array and inserts the given number at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: number): Uint8ClampedArray; + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Uint8ClampedArray; } interface Int16Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, - ): number | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: (value: number, index: number, array: this) => unknown, + thisArg?: any, + ): number | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: (value: number, index: number, array: this) => unknown, + thisArg?: any, + ): number; - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): Int16Array; + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Int16Array; - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = Int16Array.from([11, 2, -22, 1]); - * myNums.toSorted((a, b) => a - b) // Int16Array(4) [-22, 1, 2, 11] - * ``` - */ - toSorted(compareFn?: (a: number, b: number) => number): Int16Array; + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = Int16Array.from([11, 2, -22, 1]); + * myNums.toSorted((a, b) => a - b) // Int16Array(4) [-22, 1, 2, 11] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Int16Array; - /** - * Copies the array and inserts the given number at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: number): Int16Array; + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Int16Array; } interface Uint16Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number; - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): Uint16Array; + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Uint16Array; - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = Uint16Array.from([11, 2, 22, 1]); - * myNums.toSorted((a, b) => a - b) // Uint16Array(4) [1, 2, 11, 22] - * ``` - */ - toSorted(compareFn?: (a: number, b: number) => number): Uint16Array; + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = Uint16Array.from([11, 2, 22, 1]); + * myNums.toSorted((a, b) => a - b) // Uint16Array(4) [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Uint16Array; - /** - * Copies the array and inserts the given number at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: number): Uint16Array; + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Uint16Array; } interface Int32Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, - ): number | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: (value: number, index: number, array: this) => unknown, + thisArg?: any, + ): number | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: (value: number, index: number, array: this) => unknown, + thisArg?: any, + ): number; - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): Int32Array; + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Int32Array; - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = Int32Array.from([11, 2, -22, 1]); - * myNums.toSorted((a, b) => a - b) // Int32Array(4) [-22, 1, 2, 11] - * ``` - */ - toSorted(compareFn?: (a: number, b: number) => number): Int32Array; + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = Int32Array.from([11, 2, -22, 1]); + * myNums.toSorted((a, b) => a - b) // Int32Array(4) [-22, 1, 2, 11] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Int32Array; - /** - * Copies the array and inserts the given number at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: number): Int32Array; + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Int32Array; } interface Uint32Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number; - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): Uint32Array; + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Uint32Array; - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = Uint32Array.from([11, 2, 22, 1]); - * myNums.toSorted((a, b) => a - b) // Uint32Array(4) [1, 2, 11, 22] - * ``` - */ - toSorted(compareFn?: (a: number, b: number) => number): Uint32Array; + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = Uint32Array.from([11, 2, 22, 1]); + * myNums.toSorted((a, b) => a - b) // Uint32Array(4) [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Uint32Array; - /** - * Copies the array and inserts the given number at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: number): Uint32Array; + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Uint32Array; } interface Float32Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number; - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): Float32Array; + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Float32Array; - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = Float32Array.from([11.25, 2, -22.5, 1]); - * myNums.toSorted((a, b) => a - b) // Float32Array(4) [-22.5, 1, 2, 11.5] - * ``` - */ - toSorted(compareFn?: (a: number, b: number) => number): Float32Array; + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = Float32Array.from([11.25, 2, -22.5, 1]); + * myNums.toSorted((a, b) => a - b) // Float32Array(4) [-22.5, 1, 2, 11.5] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Float32Array; - /** - * Copies the array and inserts the given number at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: number): Float32Array; + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Float32Array; } interface Float64Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number; - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): Float64Array; + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Float64Array; - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = Float64Array.from([11.25, 2, -22.5, 1]); - * myNums.toSorted((a, b) => a - b) // Float64Array(4) [-22.5, 1, 2, 11.5] - * ``` - */ - toSorted(compareFn?: (a: number, b: number) => number): Float64Array; + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = Float64Array.from([11.25, 2, -22.5, 1]); + * myNums.toSorted((a, b) => a - b) // Float64Array(4) [-22.5, 1, 2, 11.5] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Float64Array; - /** - * Copies the array and inserts the given number at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: number): Float64Array; + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Float64Array; } interface BigInt64Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: bigint, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: ( - value: bigint, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): bigint | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: bigint, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: ( + value: bigint, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): bigint | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: ( - value: bigint, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: ( + value: bigint, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number; - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): BigInt64Array; + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): BigInt64Array; - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = BigInt64Array.from([11n, 2n, -22n, 1n]); - * myNums.toSorted((a, b) => Number(a - b)) // BigInt64Array(4) [-22n, 1n, 2n, 11n] - * ``` - */ - toSorted(compareFn?: (a: bigint, b: bigint) => number): BigInt64Array; + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = BigInt64Array.from([11n, 2n, -22n, 1n]); + * myNums.toSorted((a, b) => Number(a - b)) // BigInt64Array(4) [-22n, 1n, 2n, 11n] + * ``` + */ + toSorted(compareFn?: (a: bigint, b: bigint) => number): BigInt64Array; - /** - * Copies the array and inserts the given bigint at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: bigint): BigInt64Array; + /** + * Copies the array and inserts the given bigint at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: bigint): BigInt64Array; } interface BigUint64Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: bigint, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: ( - value: bigint, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): bigint | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: bigint, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: ( + value: bigint, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): bigint | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: ( - value: bigint, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: ( + value: bigint, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number; - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): BigUint64Array; + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): BigUint64Array; - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = BigUint64Array.from([11n, 2n, 22n, 1n]); - * myNums.toSorted((a, b) => Number(a - b)) // BigUint64Array(4) [1n, 2n, 11n, 22n] - * ``` - */ - toSorted(compareFn?: (a: bigint, b: bigint) => number): BigUint64Array; + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = BigUint64Array.from([11n, 2n, 22n, 1n]); + * myNums.toSorted((a, b) => Number(a - b)) // BigUint64Array(4) [1n, 2n, 11n, 22n] + * ``` + */ + toSorted(compareFn?: (a: bigint, b: bigint) => number): BigUint64Array; - /** - * Copies the array and inserts the given bigint at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: bigint): BigUint64Array; + /** + * Copies the array and inserts the given bigint at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: bigint): BigUint64Array; } ///////////////////////////// // lib.es2023.intl.d.ts ///////////////////////////// declare namespace Intl { - interface NumberFormatRangePartTypeRegistry extends NumberFormatPartTypeRegistry { - approximatelySign: never; - } +interface NumberFormatRangePartTypeRegistry extends NumberFormatPartTypeRegistry { + approximatelySign: never; +} - type NumberFormatRangePartTypes = keyof NumberFormatRangePartTypeRegistry; +type NumberFormatRangePartTypes = keyof NumberFormatRangePartTypeRegistry; - interface NumberFormatOptions { - roundingPriority?: "auto" | "morePrecision" | "lessPrecision" | undefined; +interface NumberFormatOptions { + roundingPriority?: "auto" | "morePrecision" | "lessPrecision" | undefined; - roundingIncrement?: 1 | 2 | 5 | 10 | 20 | 25 | 50 | 100 | 200 | 250 | 500 | 1000 | 2000 | 2500 | 5000 | undefined; + roundingIncrement?: 1 | 2 | 5 | 10 | 20 | 25 | 50 | 100 | 200 | 250 | 500 | 1000 | 2000 | 2500 | 5000 | undefined; - roundingMode?: "ceil" | "floor" | "expand" | "trunc" | "halfCeil" | "halfFloor" | "halfExpand" | "halfTrunc" | "halfEven" | undefined; + roundingMode?: "ceil" | "floor" | "expand" | "trunc" | "halfCeil" | "halfFloor" | "halfExpand" | "halfTrunc" | "halfEven" | undefined; - trailingZeroDisplay?: "auto" | "stripIfInteger" | undefined; - } + trailingZeroDisplay?: "auto" | "stripIfInteger" | undefined; +} - interface ResolvedNumberFormatOptions { - roundingPriority: "auto" | "morePrecision" | "lessPrecision"; +interface ResolvedNumberFormatOptions { + roundingPriority: "auto" | "morePrecision" | "lessPrecision"; - roundingMode: "ceil" | "floor" | "expand" | "trunc" | "halfCeil" | "halfFloor" | "halfExpand" | "halfTrunc" | "halfEven"; + roundingMode: "ceil" | "floor" | "expand" | "trunc" | "halfCeil" | "halfFloor" | "halfExpand" | "halfTrunc" | "halfEven"; - roundingIncrement: 1 | 2 | 5 | 10 | 20 | 25 | 50 | 100 | 200 | 250 | 500 | 1000 | 2000 | 2500 | 5000; + roundingIncrement: 1 | 2 | 5 | 10 | 20 | 25 | 50 | 100 | 200 | 250 | 500 | 1000 | 2000 | 2500 | 5000; - trailingZeroDisplay: "auto" | "stripIfInteger"; - } + trailingZeroDisplay: "auto" | "stripIfInteger"; +} - interface NumberRangeFormatPart { - type: NumberFormatRangePartTypes; +interface NumberRangeFormatPart { + type: NumberFormatRangePartTypes; - value: string; + value: string; - source: "startRange" | "endRange" | "shared"; - } + source: "startRange" | "endRange" | "shared"; +} - type StringNumericLiteral = `${number}` | "Infinity" | "-Infinity" | "+Infinity"; +type StringNumericLiteral = `${number}` | "Infinity" | "-Infinity" | "+Infinity"; - interface NumberFormat { - format(value: number | bigint | StringNumericLiteral): string; +interface NumberFormat { + format(value: number | bigint | StringNumericLiteral): string; - formatToParts(value: number | bigint | StringNumericLiteral): NumberFormatPart[]; + formatToParts(value: number | bigint | StringNumericLiteral): NumberFormatPart[]; - formatRange(start: number | bigint | StringNumericLiteral, end: number | bigint | StringNumericLiteral): string; + formatRange(start: number | bigint | StringNumericLiteral, end: number | bigint | StringNumericLiteral): string; - formatRangeToParts(start: number | bigint | StringNumericLiteral, end: number | bigint | StringNumericLiteral): NumberRangeFormatPart[]; - } + formatRangeToParts(start: number | bigint | StringNumericLiteral, end: number | bigint | StringNumericLiteral): NumberRangeFormatPart[]; +} } ///////////////////////////// // lib.es2024.arraybuffer.d.ts ///////////////////////////// interface ArrayBufferConstructor { - new (byteLength: number): ArrayBuffer; + new (byteLength: number): ArrayBuffer; } ///////////////////////////// // lib.es2024.regexp.d.ts ///////////////////////////// interface RegExp { - /** - * Returns a Boolean value indicating the state of the unicodeSets flag (v) used with a regular expression. - * Default is false. Read-only. - */ - readonly unicodeSets: boolean; + /** + * Returns a Boolean value indicating the state of the unicodeSets flag (v) used with a regular expression. + * Default is false. Read-only. + */ + readonly unicodeSets: boolean; } ///////////////////////////// // lib.es2024.sharedmemory.d.ts ///////////////////////////// interface SharedArrayBufferConstructor { - new (byteLength: number): SharedArrayBuffer; + new (byteLength: number): SharedArrayBuffer; } ///////////////////////////// // lib.es2024.string.d.ts ///////////////////////////// interface String { - /** - * Returns true if all leading surrogates and trailing surrogates appear paired and in order. - */ - isWellFormed(): boolean; + /** + * Returns true if all leading surrogates and trailing surrogates appear paired and in order. + */ + isWellFormed(): boolean; - /** - * Returns a string where all lone or out-of-order surrogates have been replaced by the Unicode replacement character (U+FFFD). - */ - toWellFormed(): string; + /** + * Returns a string where all lone or out-of-order surrogates have been replaced by the Unicode replacement character (U+FFFD). + */ + toWellFormed(): string; } ///////////////////////////// @@ -5659,177 +5659,177 @@ declare function encodeURI(uri: string): string; declare function encodeURIComponent(uriComponent: string | number | boolean): string; interface Symbol { - /** Returns a string representation of an object. */ - toString(): string; + /** Returns a string representation of an object. */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): symbol; + /** Returns the primitive value of the specified object. */ + valueOf(): symbol; } declare type PropertyKey = string | number | symbol; interface PropertyDescriptor { - configurable?: boolean; + configurable?: boolean; - enumerable?: boolean; + enumerable?: boolean; - value?: any; + value?: any; - writable?: boolean; + writable?: boolean; - get?(): any; + get?(): any; - set?(v: any): void; + set?(v: any): void; } interface PropertyDescriptorMap { - [key: PropertyKey]: PropertyDescriptor; + [key: PropertyKey]: PropertyDescriptor; } interface Object { - /** The initial value of Object.prototype.constructor is the standard built-in Object constructor. */ - constructor: Function; + /** The initial value of Object.prototype.constructor is the standard built-in Object constructor. */ + constructor: Function; - /** Returns a string representation of an object. */ - toString(): string; + /** Returns a string representation of an object. */ + toString(): string; - /** Returns a date converted to a string using the current locale. */ - toLocaleString(): string; + /** Returns a date converted to a string using the current locale. */ + toLocaleString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): Object; + /** Returns the primitive value of the specified object. */ + valueOf(): Object; - /** - * Determines whether an object has a property with the specified name. - * @param v A property name. - */ - hasOwnProperty(v: PropertyKey): boolean; + /** + * Determines whether an object has a property with the specified name. + * @param v A property name. + */ + hasOwnProperty(v: PropertyKey): boolean; - /** - * Determines whether an object exists in another object's prototype chain. - * @param v Another object whose prototype chain is to be checked. - */ - isPrototypeOf(v: Object): boolean; + /** + * Determines whether an object exists in another object's prototype chain. + * @param v Another object whose prototype chain is to be checked. + */ + isPrototypeOf(v: Object): boolean; - /** - * Determines whether a specified property is enumerable. - * @param v A property name. - */ - propertyIsEnumerable(v: PropertyKey): boolean; + /** + * Determines whether a specified property is enumerable. + * @param v A property name. + */ + propertyIsEnumerable(v: PropertyKey): boolean; } interface ObjectConstructor { - new (value?: any): Object; + new (value?: any): Object; - (): any; + (): any; - (value: any): any; + (value: any): any; - /** A reference to the prototype for a class of objects. */ - readonly prototype: Object; + /** A reference to the prototype for a class of objects. */ + readonly prototype: Object; - /** - * Returns the prototype of an object. - * @param o The object that references the prototype. - */ - getPrototypeOf(o: any): any; + /** + * Returns the prototype of an object. + * @param o The object that references the prototype. + */ + getPrototypeOf(o: any): any; - /** - * Gets the own property descriptor of the specified object. - * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype. - * @param o Object that contains the property. - * @param p Name of the property. - */ - getOwnPropertyDescriptor(o: any, p: PropertyKey): PropertyDescriptor | undefined; + /** + * Gets the own property descriptor of the specified object. + * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype. + * @param o Object that contains the property. + * @param p Name of the property. + */ + getOwnPropertyDescriptor(o: any, p: PropertyKey): PropertyDescriptor | undefined; - /** - * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly - * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions. - * @param o Object that contains the own properties. - */ - getOwnPropertyNames(o: any): string[]; + /** + * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly + * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions. + * @param o Object that contains the own properties. + */ + getOwnPropertyNames(o: any): string[]; - /** - * Creates an object that has the specified prototype or that has null prototype. - * @param o Object to use as a prototype. May be null. - */ - create(o: object | null): any; + /** + * Creates an object that has the specified prototype or that has null prototype. + * @param o Object to use as a prototype. May be null. + */ + create(o: object | null): any; - /** - * Creates an object that has the specified prototype, and that optionally contains specified properties. - * @param o Object to use as a prototype. May be null - * @param properties JavaScript object that contains one or more property descriptors. - */ - create(o: object | null, properties: PropertyDescriptorMap & ThisType): any; + /** + * Creates an object that has the specified prototype, and that optionally contains specified properties. + * @param o Object to use as a prototype. May be null + * @param properties JavaScript object that contains one or more property descriptors. + */ + create(o: object | null, properties: PropertyDescriptorMap & ThisType): any; - /** - * Adds a property to an object, or modifies attributes of an existing property. - * @param o Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object. - * @param p The property name. - * @param attributes Descriptor for the property. It can be for a data property or an accessor property. - */ - defineProperty(o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType): T; + /** + * Adds a property to an object, or modifies attributes of an existing property. + * @param o Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object. + * @param p The property name. + * @param attributes Descriptor for the property. It can be for a data property or an accessor property. + */ + defineProperty(o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType): T; - /** - * Adds one or more properties to an object, and/or modifies attributes of existing properties. - * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object. - * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property. - */ - defineProperties(o: T, properties: PropertyDescriptorMap & ThisType): T; + /** + * Adds one or more properties to an object, and/or modifies attributes of existing properties. + * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object. + * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property. + */ + defineProperties(o: T, properties: PropertyDescriptorMap & ThisType): T; - /** - * Prevents the modification of attributes of existing properties, and prevents the addition of new properties. - * @param o Object on which to lock the attributes. - */ - seal(o: T): T; + /** + * Prevents the modification of attributes of existing properties, and prevents the addition of new properties. + * @param o Object on which to lock the attributes. + */ + seal(o: T): T; - /** - * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. - * @param f Object on which to lock the attributes. - */ - freeze(f: T): T; + /** + * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. + * @param f Object on which to lock the attributes. + */ + freeze(f: T): T; - /** - * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. - * @param o Object on which to lock the attributes. - */ - freeze(o: T): Readonly; + /** + * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. + * @param o Object on which to lock the attributes. + */ + freeze(o: T): Readonly; - /** - * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. - * @param o Object on which to lock the attributes. - */ - freeze(o: T): Readonly; + /** + * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. + * @param o Object on which to lock the attributes. + */ + freeze(o: T): Readonly; - /** - * Prevents the addition of new properties to an object. - * @param o Object to make non-extensible. - */ - preventExtensions(o: T): T; + /** + * Prevents the addition of new properties to an object. + * @param o Object to make non-extensible. + */ + preventExtensions(o: T): T; - /** - * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object. - * @param o Object to test. - */ - isSealed(o: any): boolean; + /** + * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object. + * @param o Object to test. + */ + isSealed(o: any): boolean; - /** - * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object. - * @param o Object to test. - */ - isFrozen(o: any): boolean; + /** + * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object. + * @param o Object to test. + */ + isFrozen(o: any): boolean; - /** - * Returns a value that indicates whether new properties can be added to an object. - * @param o Object to test. - */ - isExtensible(o: any): boolean; + /** + * Returns a value that indicates whether new properties can be added to an object. + * @param o Object to test. + */ + isExtensible(o: any): boolean; - /** - * Returns the names of the enumerable string properties and methods of an object. - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - keys(o: object): string[]; + /** + * Returns the names of the enumerable string properties and methods of an object. + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + keys(o: object): string[]; } /** @@ -5841,46 +5841,46 @@ declare var Object: ObjectConstructor; * Creates a new function. */ interface Function { - /** - * Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function. - * @param thisArg The object to be used as the this object. - * @param argArray A set of arguments to be passed to the function. - */ - apply(this: Function, thisArg: any, argArray?: any): any; + /** + * Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function. + * @param thisArg The object to be used as the this object. + * @param argArray A set of arguments to be passed to the function. + */ + apply(this: Function, thisArg: any, argArray?: any): any; - /** - * Calls a method of an object, substituting another object for the current object. - * @param thisArg The object to be used as the current object. - * @param argArray A list of arguments to be passed to the method. - */ - call(this: Function, thisArg: any, ...argArray: any[]): any; + /** + * Calls a method of an object, substituting another object for the current object. + * @param thisArg The object to be used as the current object. + * @param argArray A list of arguments to be passed to the method. + */ + call(this: Function, thisArg: any, ...argArray: any[]): any; - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg An object to which the this keyword can refer inside the new function. - * @param argArray A list of arguments to be passed to the new function. - */ - bind(this: Function, thisArg: any, ...argArray: any[]): any; + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg An object to which the this keyword can refer inside the new function. + * @param argArray A list of arguments to be passed to the new function. + */ + bind(this: Function, thisArg: any, ...argArray: any[]): any; - /** Returns a string representation of a function. */ - toString(): string; + /** Returns a string representation of a function. */ + toString(): string; - prototype: any; + prototype: any; - readonly length: number; + readonly length: number; } interface FunctionConstructor { - /** - * Creates a new function. - * @param args A list of arguments the function accepts. - */ - new (...args: string[]): Function; + /** + * Creates a new function. + * @param args A list of arguments the function accepts. + */ + new (...args: string[]): Function; - (...args: string[]): Function; + (...args: string[]): Function; - readonly prototype: Function; + readonly prototype: Function; } declare var Function: FunctionConstructor; @@ -5896,208 +5896,208 @@ type ThisParameterType = T extends (this: infer U, ...args: never) => any ? U type OmitThisParameter = unknown extends ThisParameterType ? T : T extends (...args: infer A) => infer R ? (...args: A) => R : T; interface CallableFunction extends Function { - /** - * Calls the function with the specified object as the this value and the elements of specified array as the arguments. - * @param thisArg The object to be used as the this object. - */ - apply(this: (this: T) => R, thisArg: T): R; + /** + * Calls the function with the specified object as the this value and the elements of specified array as the arguments. + * @param thisArg The object to be used as the this object. + */ + apply(this: (this: T) => R, thisArg: T): R; - /** - * Calls the function with the specified object as the this value and the elements of specified array as the arguments. - * @param thisArg The object to be used as the this object. - * @param args An array of argument values to be passed to the function. - */ - apply(this: (this: T, ...args: A) => R, thisArg: T, args: A): R; + /** + * Calls the function with the specified object as the this value and the elements of specified array as the arguments. + * @param thisArg The object to be used as the this object. + * @param args An array of argument values to be passed to the function. + */ + apply(this: (this: T, ...args: A) => R, thisArg: T, args: A): R; - /** - * Calls the function with the specified object as the this value and the specified rest arguments as the arguments. - * @param thisArg The object to be used as the this object. - * @param args Argument values to be passed to the function. - */ - call(this: (this: T, ...args: A) => R, thisArg: T, ...args: A): R; + /** + * Calls the function with the specified object as the this value and the specified rest arguments as the arguments. + * @param thisArg The object to be used as the this object. + * @param args Argument values to be passed to the function. + */ + call(this: (this: T, ...args: A) => R, thisArg: T, ...args: A): R; - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg The object to be used as the this object. - */ - bind(this: T, thisArg: ThisParameterType): OmitThisParameter; + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg The object to be used as the this object. + */ + bind(this: T, thisArg: ThisParameterType): OmitThisParameter; - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg The object to be used as the this object. - * @param args Arguments to bind to the parameters of the function. - */ - bind(this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg The object to be used as the this object. + * @param args Arguments to bind to the parameters of the function. + */ + bind(this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } interface NewableFunction extends Function { - /** - * Calls the function with the specified object as the this value and the elements of specified array as the arguments. - * @param thisArg The object to be used as the this object. - */ - apply(this: new () => T, thisArg: T): void; + /** + * Calls the function with the specified object as the this value and the elements of specified array as the arguments. + * @param thisArg The object to be used as the this object. + */ + apply(this: new () => T, thisArg: T): void; - /** - * Calls the function with the specified object as the this value and the elements of specified array as the arguments. - * @param thisArg The object to be used as the this object. - * @param args An array of argument values to be passed to the function. - */ - apply(this: new (...args: A) => T, thisArg: T, args: A): void; + /** + * Calls the function with the specified object as the this value and the elements of specified array as the arguments. + * @param thisArg The object to be used as the this object. + * @param args An array of argument values to be passed to the function. + */ + apply(this: new (...args: A) => T, thisArg: T, args: A): void; - /** - * Calls the function with the specified object as the this value and the specified rest arguments as the arguments. - * @param thisArg The object to be used as the this object. - * @param args Argument values to be passed to the function. - */ - call(this: new (...args: A) => T, thisArg: T, ...args: A): void; + /** + * Calls the function with the specified object as the this value and the specified rest arguments as the arguments. + * @param thisArg The object to be used as the this object. + * @param args Argument values to be passed to the function. + */ + call(this: new (...args: A) => T, thisArg: T, ...args: A): void; - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg The object to be used as the this object. - */ - bind(this: T, thisArg: any): T; + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg The object to be used as the this object. + */ + bind(this: T, thisArg: any): T; - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg The object to be used as the this object. - * @param args Arguments to bind to the parameters of the function. - */ - bind(this: new (...args: [...A, ...B]) => R, thisArg: any, ...args: A): new (...args: B) => R; + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg The object to be used as the this object. + * @param args Arguments to bind to the parameters of the function. + */ + bind(this: new (...args: [...A, ...B]) => R, thisArg: any, ...args: A): new (...args: B) => R; } interface IArguments { - [index: number]: any; + [index: number]: any; - length: number; + length: number; } interface String { - /** Returns a string representation of a string. */ - toString(): string; + /** Returns a string representation of a string. */ + toString(): string; - /** - * Returns the character at the specified index. - * @param pos The zero-based index of the desired character. - */ - charAt(pos: number): string; + /** + * Returns the character at the specified index. + * @param pos The zero-based index of the desired character. + */ + charAt(pos: number): string; - /** - * Returns the Unicode value of the character at the specified location, or NaN if the index is out of bounds. - * @param index The zero-based index of the desired character. - */ - charCodeAt(index: number): number; + /** + * Returns the Unicode value of the character at the specified location, or NaN if the index is out of bounds. + * @param index The zero-based index of the desired character. + */ + charCodeAt(index: number): number; - /** - * Returns a string that contains the concatenation of two or more strings. - * @param strings The strings to append to the end of the string. - */ - concat(...strings: string[]): string; + /** + * Returns a string that contains the concatenation of two or more strings. + * @param strings The strings to append to the end of the string. + */ + concat(...strings: string[]): string; - /** - * Returns the position of the first occurrence of a substring, or -1 if it is not present. - * @param searchString The substring to search for in the string - * @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string. - */ - indexOf(searchString: string, position?: number): number; + /** + * Returns the position of the first occurrence of a substring, or -1 if it is not present. + * @param searchString The substring to search for in the string + * @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string. + */ + indexOf(searchString: string, position?: number): number; - /** - * Returns the last occurrence of a substring in the string, or -1 if it is not present. - * @param searchString The substring to search for. - * @param position The index at which to begin searching. If omitted, the search begins at the end of the string. - */ - lastIndexOf(searchString: string, position?: number): number; + /** + * Returns the last occurrence of a substring in the string, or -1 if it is not present. + * @param searchString The substring to search for. + * @param position The index at which to begin searching. If omitted, the search begins at the end of the string. + */ + lastIndexOf(searchString: string, position?: number): number; - /** - * Determines whether two strings are equivalent in the current locale. - * @param that String to compare to target string - */ - localeCompare(that: string): number; + /** + * Determines whether two strings are equivalent in the current locale. + * @param that String to compare to target string + */ + localeCompare(that: string): number; - /** - * Matches a string with a regular expression, and returns an array containing the results of that search. - * @param regexp A variable name or string literal containing the regular expression pattern and flags. - */ - match(regexp: string | RegExp): RegExpMatchArray | null; + /** + * Matches a string with a regular expression, and returns an array containing the results of that search. + * @param regexp A variable name or string literal containing the regular expression pattern and flags. + */ + match(regexp: string | RegExp): RegExpMatchArray | null; - /** - * Replaces text in a string, using a regular expression or search string. - * @param searchValue A string or regular expression to search for. - * @param replaceValue A string containing the text to replace. When the {@linkcode searchValue} is a `RegExp`, all matches are replaced if the `g` flag is set (or only those matches at the beginning, if the `y` flag is also present). Otherwise, only the first match of {@linkcode searchValue} is replaced. - */ - replace(searchValue: string | RegExp, replaceValue: string): string; + /** + * Replaces text in a string, using a regular expression or search string. + * @param searchValue A string or regular expression to search for. + * @param replaceValue A string containing the text to replace. When the {@linkcode searchValue} is a `RegExp`, all matches are replaced if the `g` flag is set (or only those matches at the beginning, if the `y` flag is also present). Otherwise, only the first match of {@linkcode searchValue} is replaced. + */ + replace(searchValue: string | RegExp, replaceValue: string): string; - /** - * Replaces text in a string, using a regular expression or search string. - * @param searchValue A string to search for. - * @param replacer A function that returns the replacement text. - */ - replace(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; + /** + * Replaces text in a string, using a regular expression or search string. + * @param searchValue A string to search for. + * @param replacer A function that returns the replacement text. + */ + replace(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; - /** - * Finds the first substring match in a regular expression search. - * @param regexp The regular expression pattern and applicable flags. - */ - search(regexp: string | RegExp): number; + /** + * Finds the first substring match in a regular expression search. + * @param regexp The regular expression pattern and applicable flags. + */ + search(regexp: string | RegExp): number; - /** - * Returns a section of a string. - * @param start The index to the beginning of the specified portion of stringObj. - * @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end. - * If this value is not specified, the substring continues to the end of stringObj. - */ - slice(start?: number, end?: number): string; + /** + * Returns a section of a string. + * @param start The index to the beginning of the specified portion of stringObj. + * @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end. + * If this value is not specified, the substring continues to the end of stringObj. + */ + slice(start?: number, end?: number): string; - /** - * Split a string into substrings using the specified separator and return them as an array. - * @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned. - * @param limit A value used to limit the number of elements returned in the array. - */ - split(separator: string | RegExp, limit?: number): string[]; + /** + * Split a string into substrings using the specified separator and return them as an array. + * @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned. + * @param limit A value used to limit the number of elements returned in the array. + */ + split(separator: string | RegExp, limit?: number): string[]; - /** - * Returns the substring at the specified location within a String object. - * @param start The zero-based index number indicating the beginning of the substring. - * @param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end. - * If end is omitted, the characters from start through the end of the original string are returned. - */ - substring(start: number, end?: number): string; + /** + * Returns the substring at the specified location within a String object. + * @param start The zero-based index number indicating the beginning of the substring. + * @param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end. + * If end is omitted, the characters from start through the end of the original string are returned. + */ + substring(start: number, end?: number): string; - /** Converts all the alphabetic characters in a string to lowercase. */ - toLowerCase(): string; + /** Converts all the alphabetic characters in a string to lowercase. */ + toLowerCase(): string; - /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */ - toLocaleLowerCase(locales?: string | string[]): string; + /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */ + toLocaleLowerCase(locales?: string | string[]): string; - /** Converts all the alphabetic characters in a string to uppercase. */ - toUpperCase(): string; + /** Converts all the alphabetic characters in a string to uppercase. */ + toUpperCase(): string; - /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */ - toLocaleUpperCase(locales?: string | string[]): string; + /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */ + toLocaleUpperCase(locales?: string | string[]): string; - /** Removes the leading and trailing white space and line terminator characters from a string. */ - trim(): string; + /** Removes the leading and trailing white space and line terminator characters from a string. */ + trim(): string; - /** Returns the length of a String object. */ - readonly length: number; + /** Returns the length of a String object. */ + readonly length: number; - /** Returns the primitive value of the specified object. */ - valueOf(): string; + /** Returns the primitive value of the specified object. */ + valueOf(): string; - readonly [index: number]: string; + readonly [index: number]: string; } interface StringConstructor { - new (value?: any): String; + new (value?: any): String; - (value?: any): string; + (value?: any): string; - readonly prototype: String; + readonly prototype: String; - fromCharCode(...codes: number[]): string; + fromCharCode(...codes: number[]): string; } /** @@ -6106,220 +6106,220 @@ interface StringConstructor { declare var String: StringConstructor; interface Boolean { - /** Returns the primitive value of the specified object. */ - valueOf(): boolean; + /** Returns the primitive value of the specified object. */ + valueOf(): boolean; } interface BooleanConstructor { - new (value?: any): Boolean; + new (value?: any): Boolean; - (value?: T): boolean; + (value?: T): boolean; - readonly prototype: Boolean; + readonly prototype: Boolean; } declare var Boolean: BooleanConstructor; interface Number { - /** - * Returns a string representation of an object. - * @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers. - */ - toString(radix?: number): string; + /** + * Returns a string representation of an object. + * @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers. + */ + toString(radix?: number): string; - /** - * Returns a string representing a number in fixed-point notation. - * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 100, inclusive. - */ - toFixed(fractionDigits?: number): string; + /** + * Returns a string representing a number in fixed-point notation. + * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 100, inclusive. + */ + toFixed(fractionDigits?: number): string; - /** - * Returns a string containing a number represented in exponential notation. - * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 100, inclusive. - */ - toExponential(fractionDigits?: number): string; + /** + * Returns a string containing a number represented in exponential notation. + * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 100, inclusive. + */ + toExponential(fractionDigits?: number): string; - /** - * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits. - * @param precision Number of significant digits. Must be in the range 1 - 100, inclusive. - */ - toPrecision(precision?: number): string; + /** + * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits. + * @param precision Number of significant digits. Must be in the range 1 - 100, inclusive. + */ + toPrecision(precision?: number): string; - /** Returns the primitive value of the specified object. */ - valueOf(): number; + /** Returns the primitive value of the specified object. */ + valueOf(): number; } interface NumberConstructor { - new (value?: any): Number; + new (value?: any): Number; - (value?: any): number; + (value?: any): number; - readonly prototype: Number; + readonly prototype: Number; - /** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */ - readonly MAX_VALUE: number; + /** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */ + readonly MAX_VALUE: number; - /** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */ - readonly MIN_VALUE: number; + /** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */ + readonly MIN_VALUE: number; - /** - * A value that is not a number. - * In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function. - */ - readonly NaN: number; + /** + * A value that is not a number. + * In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function. + */ + readonly NaN: number; - /** - * A value that is less than the largest negative number that can be represented in JavaScript. - * JavaScript displays NEGATIVE_INFINITY values as -infinity. - */ - readonly NEGATIVE_INFINITY: number; + /** + * A value that is less than the largest negative number that can be represented in JavaScript. + * JavaScript displays NEGATIVE_INFINITY values as -infinity. + */ + readonly NEGATIVE_INFINITY: number; - /** - * A value greater than the largest number that can be represented in JavaScript. - * JavaScript displays POSITIVE_INFINITY values as infinity. - */ - readonly POSITIVE_INFINITY: number; + /** + * A value greater than the largest number that can be represented in JavaScript. + * JavaScript displays POSITIVE_INFINITY values as infinity. + */ + readonly POSITIVE_INFINITY: number; } /** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */ declare var Number: NumberConstructor; interface TemplateStringsArray extends ReadonlyArray { - readonly raw: readonly string[]; + readonly raw: readonly string[]; } interface Math { - /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */ - readonly E: number; + /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */ + readonly E: number; - /** The natural logarithm of 10. */ - readonly LN10: number; + /** The natural logarithm of 10. */ + readonly LN10: number; - /** The natural logarithm of 2. */ - readonly LN2: number; + /** The natural logarithm of 2. */ + readonly LN2: number; - /** The base-2 logarithm of e. */ - readonly LOG2E: number; + /** The base-2 logarithm of e. */ + readonly LOG2E: number; - /** The base-10 logarithm of e. */ - readonly LOG10E: number; + /** The base-10 logarithm of e. */ + readonly LOG10E: number; - /** Pi. This is the ratio of the circumference of a circle to its diameter. */ - readonly PI: number; + /** Pi. This is the ratio of the circumference of a circle to its diameter. */ + readonly PI: number; - /** The square root of 0.5, or, equivalently, one divided by the square root of 2. */ - readonly SQRT1_2: number; + /** The square root of 0.5, or, equivalently, one divided by the square root of 2. */ + readonly SQRT1_2: number; - /** The square root of 2. */ - readonly SQRT2: number; + /** The square root of 2. */ + readonly SQRT2: number; - /** - * Returns the absolute value of a number (the value without regard to whether it is positive or negative). - * For example, the absolute value of -5 is the same as the absolute value of 5. - * @param x A numeric expression for which the absolute value is needed. - */ - abs(x: number): number; + /** + * Returns the absolute value of a number (the value without regard to whether it is positive or negative). + * For example, the absolute value of -5 is the same as the absolute value of 5. + * @param x A numeric expression for which the absolute value is needed. + */ + abs(x: number): number; - /** - * Returns the arc cosine (or inverse cosine) of a number. - * @param x A numeric expression. - */ - acos(x: number): number; + /** + * Returns the arc cosine (or inverse cosine) of a number. + * @param x A numeric expression. + */ + acos(x: number): number; - /** - * Returns the arcsine of a number. - * @param x A numeric expression. - */ - asin(x: number): number; + /** + * Returns the arcsine of a number. + * @param x A numeric expression. + */ + asin(x: number): number; - /** - * Returns the arctangent of a number. - * @param x A numeric expression for which the arctangent is needed. - */ - atan(x: number): number; + /** + * Returns the arctangent of a number. + * @param x A numeric expression for which the arctangent is needed. + */ + atan(x: number): number; - /** - * Returns the angle (in radians) between the X axis and the line going through both the origin and the given point. - * @param y A numeric expression representing the cartesian y-coordinate. - * @param x A numeric expression representing the cartesian x-coordinate. - */ - atan2(y: number, x: number): number; + /** + * Returns the angle (in radians) between the X axis and the line going through both the origin and the given point. + * @param y A numeric expression representing the cartesian y-coordinate. + * @param x A numeric expression representing the cartesian x-coordinate. + */ + atan2(y: number, x: number): number; - /** - * Returns the smallest integer greater than or equal to its numeric argument. - * @param x A numeric expression. - */ - ceil(x: number): number; + /** + * Returns the smallest integer greater than or equal to its numeric argument. + * @param x A numeric expression. + */ + ceil(x: number): number; - /** - * Returns the cosine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - cos(x: number): number; + /** + * Returns the cosine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + cos(x: number): number; - /** - * Returns e (the base of natural logarithms) raised to a power. - * @param x A numeric expression representing the power of e. - */ - exp(x: number): number; + /** + * Returns e (the base of natural logarithms) raised to a power. + * @param x A numeric expression representing the power of e. + */ + exp(x: number): number; - /** - * Returns the greatest integer less than or equal to its numeric argument. - * @param x A numeric expression. - */ - floor(x: number): number; + /** + * Returns the greatest integer less than or equal to its numeric argument. + * @param x A numeric expression. + */ + floor(x: number): number; - /** - * Returns the natural logarithm (base e) of a number. - * @param x A numeric expression. - */ - log(x: number): number; + /** + * Returns the natural logarithm (base e) of a number. + * @param x A numeric expression. + */ + log(x: number): number; - /** - * Returns the larger of a set of supplied numeric expressions. - * @param values Numeric expressions to be evaluated. - */ - max(...values: number[]): number; + /** + * Returns the larger of a set of supplied numeric expressions. + * @param values Numeric expressions to be evaluated. + */ + max(...values: number[]): number; - /** - * Returns the smaller of a set of supplied numeric expressions. - * @param values Numeric expressions to be evaluated. - */ - min(...values: number[]): number; + /** + * Returns the smaller of a set of supplied numeric expressions. + * @param values Numeric expressions to be evaluated. + */ + min(...values: number[]): number; - /** - * Returns the value of a base expression taken to a specified power. - * @param x The base value of the expression. - * @param y The exponent value of the expression. - */ - pow(x: number, y: number): number; + /** + * Returns the value of a base expression taken to a specified power. + * @param x The base value of the expression. + * @param y The exponent value of the expression. + */ + pow(x: number, y: number): number; - /** Returns a pseudorandom number between 0 and 1. */ - random(): number; + /** Returns a pseudorandom number between 0 and 1. */ + random(): number; - /** - * Returns a supplied numeric expression rounded to the nearest integer. - * @param x The value to be rounded to the nearest integer. - */ - round(x: number): number; + /** + * Returns a supplied numeric expression rounded to the nearest integer. + * @param x The value to be rounded to the nearest integer. + */ + round(x: number): number; - /** - * Returns the sine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - sin(x: number): number; + /** + * Returns the sine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + sin(x: number): number; - /** - * Returns the square root of a number. - * @param x A numeric expression. - */ - sqrt(x: number): number; + /** + * Returns the square root of a number. + * @param x A numeric expression. + */ + sqrt(x: number): number; - /** - * Returns the tangent of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - tan(x: number): number; + /** + * Returns the tangent of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + tan(x: number): number; } /** An intrinsic object that provides basic mathematics functionality and constants. */ @@ -6327,334 +6327,334 @@ declare var Math: Math; /** Enables basic storage and retrieval of dates and times. */ interface Date { - /** Returns a string representation of a date. The format of the string depends on the locale. */ - toString(): string; + /** Returns a string representation of a date. The format of the string depends on the locale. */ + toString(): string; - /** Returns a date as a string value. */ - toDateString(): string; + /** Returns a date as a string value. */ + toDateString(): string; - /** Returns a time as a string value. */ - toTimeString(): string; + /** Returns a time as a string value. */ + toTimeString(): string; - /** Returns a value as a string value appropriate to the host environment's current locale. */ - toLocaleString(): string; + /** Returns a value as a string value appropriate to the host environment's current locale. */ + toLocaleString(): string; - /** Returns a date as a string value appropriate to the host environment's current locale. */ - toLocaleDateString(): string; + /** Returns a date as a string value appropriate to the host environment's current locale. */ + toLocaleDateString(): string; - /** Returns a time as a string value appropriate to the host environment's current locale. */ - toLocaleTimeString(): string; + /** Returns a time as a string value appropriate to the host environment's current locale. */ + toLocaleTimeString(): string; - /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */ - valueOf(): number; + /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */ + valueOf(): number; - /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */ - getTime(): number; + /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */ + getTime(): number; - /** Gets the year, using local time. */ - getFullYear(): number; + /** Gets the year, using local time. */ + getFullYear(): number; - /** Gets the year using Universal Coordinated Time (UTC). */ - getUTCFullYear(): number; + /** Gets the year using Universal Coordinated Time (UTC). */ + getUTCFullYear(): number; - /** Gets the month, using local time. */ - getMonth(): number; + /** Gets the month, using local time. */ + getMonth(): number; - /** Gets the month of a Date object using Universal Coordinated Time (UTC). */ - getUTCMonth(): number; + /** Gets the month of a Date object using Universal Coordinated Time (UTC). */ + getUTCMonth(): number; - /** Gets the day-of-the-month, using local time. */ - getDate(): number; + /** Gets the day-of-the-month, using local time. */ + getDate(): number; - /** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */ - getUTCDate(): number; + /** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */ + getUTCDate(): number; - /** Gets the day of the week, using local time. */ - getDay(): number; + /** Gets the day of the week, using local time. */ + getDay(): number; - /** Gets the day of the week using Universal Coordinated Time (UTC). */ - getUTCDay(): number; + /** Gets the day of the week using Universal Coordinated Time (UTC). */ + getUTCDay(): number; - /** Gets the hours in a date, using local time. */ - getHours(): number; + /** Gets the hours in a date, using local time. */ + getHours(): number; - /** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */ - getUTCHours(): number; + /** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */ + getUTCHours(): number; - /** Gets the minutes of a Date object, using local time. */ - getMinutes(): number; + /** Gets the minutes of a Date object, using local time. */ + getMinutes(): number; - /** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */ - getUTCMinutes(): number; + /** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */ + getUTCMinutes(): number; - /** Gets the seconds of a Date object, using local time. */ - getSeconds(): number; + /** Gets the seconds of a Date object, using local time. */ + getSeconds(): number; - /** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */ - getUTCSeconds(): number; + /** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */ + getUTCSeconds(): number; - /** Gets the milliseconds of a Date, using local time. */ - getMilliseconds(): number; + /** Gets the milliseconds of a Date, using local time. */ + getMilliseconds(): number; - /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */ - getUTCMilliseconds(): number; + /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */ + getUTCMilliseconds(): number; - /** Gets the difference in minutes between Universal Coordinated Time (UTC) and the time on the local computer. */ - getTimezoneOffset(): number; + /** Gets the difference in minutes between Universal Coordinated Time (UTC) and the time on the local computer. */ + getTimezoneOffset(): number; - /** - * Sets the date and time value in the Date object. - * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT. - */ - setTime(time: number): number; + /** + * Sets the date and time value in the Date object. + * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT. + */ + setTime(time: number): number; - /** - * Sets the milliseconds value in the Date object using local time. - * @param ms A numeric value equal to the millisecond value. - */ - setMilliseconds(ms: number): number; + /** + * Sets the milliseconds value in the Date object using local time. + * @param ms A numeric value equal to the millisecond value. + */ + setMilliseconds(ms: number): number; - /** - * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC). - * @param ms A numeric value equal to the millisecond value. - */ - setUTCMilliseconds(ms: number): number; + /** + * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC). + * @param ms A numeric value equal to the millisecond value. + */ + setUTCMilliseconds(ms: number): number; - /** - * Sets the seconds value in the Date object using local time. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setSeconds(sec: number, ms?: number): number; + /** + * Sets the seconds value in the Date object using local time. + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setSeconds(sec: number, ms?: number): number; - /** - * Sets the seconds value in the Date object using Universal Coordinated Time (UTC). - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setUTCSeconds(sec: number, ms?: number): number; + /** + * Sets the seconds value in the Date object using Universal Coordinated Time (UTC). + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setUTCSeconds(sec: number, ms?: number): number; - /** - * Sets the minutes value in the Date object using local time. - * @param min A numeric value equal to the minutes value. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setMinutes(min: number, sec?: number, ms?: number): number; + /** + * Sets the minutes value in the Date object using local time. + * @param min A numeric value equal to the minutes value. + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setMinutes(min: number, sec?: number, ms?: number): number; - /** - * Sets the minutes value in the Date object using Universal Coordinated Time (UTC). - * @param min A numeric value equal to the minutes value. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setUTCMinutes(min: number, sec?: number, ms?: number): number; + /** + * Sets the minutes value in the Date object using Universal Coordinated Time (UTC). + * @param min A numeric value equal to the minutes value. + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setUTCMinutes(min: number, sec?: number, ms?: number): number; - /** - * Sets the hour value in the Date object using local time. - * @param hours A numeric value equal to the hours value. - * @param min A numeric value equal to the minutes value. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setHours(hours: number, min?: number, sec?: number, ms?: number): number; + /** + * Sets the hour value in the Date object using local time. + * @param hours A numeric value equal to the hours value. + * @param min A numeric value equal to the minutes value. + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setHours(hours: number, min?: number, sec?: number, ms?: number): number; - /** - * Sets the hours value in the Date object using Universal Coordinated Time (UTC). - * @param hours A numeric value equal to the hours value. - * @param min A numeric value equal to the minutes value. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number; + /** + * Sets the hours value in the Date object using Universal Coordinated Time (UTC). + * @param hours A numeric value equal to the hours value. + * @param min A numeric value equal to the minutes value. + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number; - /** - * Sets the numeric day-of-the-month value of the Date object using local time. - * @param date A numeric value equal to the day of the month. - */ - setDate(date: number): number; + /** + * Sets the numeric day-of-the-month value of the Date object using local time. + * @param date A numeric value equal to the day of the month. + */ + setDate(date: number): number; - /** - * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC). - * @param date A numeric value equal to the day of the month. - */ - setUTCDate(date: number): number; + /** + * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC). + * @param date A numeric value equal to the day of the month. + */ + setUTCDate(date: number): number; - /** - * Sets the month value in the Date object using local time. - * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. - * @param date A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used. - */ - setMonth(month: number, date?: number): number; + /** + * Sets the month value in the Date object using local time. + * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. + * @param date A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used. + */ + setMonth(month: number, date?: number): number; - /** - * Sets the month value in the Date object using Universal Coordinated Time (UTC). - * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. - * @param date A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used. - */ - setUTCMonth(month: number, date?: number): number; + /** + * Sets the month value in the Date object using Universal Coordinated Time (UTC). + * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. + * @param date A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used. + */ + setUTCMonth(month: number, date?: number): number; - /** - * Sets the year of the Date object using local time. - * @param year A numeric value for the year. - * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified. - * @param date A numeric value equal for the day of the month. - */ - setFullYear(year: number, month?: number, date?: number): number; + /** + * Sets the year of the Date object using local time. + * @param year A numeric value for the year. + * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified. + * @param date A numeric value equal for the day of the month. + */ + setFullYear(year: number, month?: number, date?: number): number; - /** - * Sets the year value in the Date object using Universal Coordinated Time (UTC). - * @param year A numeric value equal to the year. - * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied. - * @param date A numeric value equal to the day of the month. - */ - setUTCFullYear(year: number, month?: number, date?: number): number; + /** + * Sets the year value in the Date object using Universal Coordinated Time (UTC). + * @param year A numeric value equal to the year. + * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied. + * @param date A numeric value equal to the day of the month. + */ + setUTCFullYear(year: number, month?: number, date?: number): number; - /** Returns a date converted to a string using Universal Coordinated Time (UTC). */ - toUTCString(): string; + /** Returns a date converted to a string using Universal Coordinated Time (UTC). */ + toUTCString(): string; - /** Returns a date as a string value in ISO format. */ - toISOString(): string; + /** Returns a date as a string value in ISO format. */ + toISOString(): string; - /** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */ - toJSON(key?: any): string; + /** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */ + toJSON(key?: any): string; } interface DateConstructor { - new (): Date; + new (): Date; - new (value: number | string): Date; + new (value: number | string): Date; - /** - * Creates a new Date. - * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. - * @param monthIndex The month as a number between 0 and 11 (January to December). - * @param date The date as a number between 1 and 31. - * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. - * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. - * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. - * @param ms A number from 0 to 999 that specifies the milliseconds. - */ - new (year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; + /** + * Creates a new Date. + * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. + * @param monthIndex The month as a number between 0 and 11 (January to December). + * @param date The date as a number between 1 and 31. + * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. + * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. + * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. + * @param ms A number from 0 to 999 that specifies the milliseconds. + */ + new (year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; - (): string; + (): string; - readonly prototype: Date; + readonly prototype: Date; - /** - * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970. - * @param s A date string - */ - parse(s: string): number; + /** + * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970. + * @param s A date string + */ + parse(s: string): number; - /** - * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. - * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. - * @param monthIndex The month as a number between 0 and 11 (January to December). - * @param date The date as a number between 1 and 31. - * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. - * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. - * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. - * @param ms A number from 0 to 999 that specifies the milliseconds. - */ - UTC(year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; + /** + * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. + * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. + * @param monthIndex The month as a number between 0 and 11 (January to December). + * @param date The date as a number between 1 and 31. + * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. + * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. + * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. + * @param ms A number from 0 to 999 that specifies the milliseconds. + */ + UTC(year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; - /** Returns the number of milliseconds elapsed since midnight, January 1, 1970 Universal Coordinated Time (UTC). */ - now(): number; + /** Returns the number of milliseconds elapsed since midnight, January 1, 1970 Universal Coordinated Time (UTC). */ + now(): number; } declare var Date: DateConstructor; interface RegExpMatchArray extends Array { - /** - * The index of the search at which the result was found. - */ - index?: number; + /** + * The index of the search at which the result was found. + */ + index?: number; - /** - * A copy of the search string. - */ - input?: string; + /** + * A copy of the search string. + */ + input?: string; - /** - * The first match. This will always be present because `null` will be returned if there are no matches. - */ - 0: string; + /** + * The first match. This will always be present because `null` will be returned if there are no matches. + */ + 0: string; } interface RegExpExecArray extends Array { - /** - * The index of the search at which the result was found. - */ - index: number; + /** + * The index of the search at which the result was found. + */ + index: number; - /** - * A copy of the search string. - */ - input: string; + /** + * A copy of the search string. + */ + input: string; - /** - * The first match. This will always be present because `null` will be returned if there are no matches. - */ - 0: string; + /** + * The first match. This will always be present because `null` will be returned if there are no matches. + */ + 0: string; } interface RegExp { - /** - * Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search. - * @param string The String object or string literal on which to perform the search. - */ - exec(string: string): RegExpExecArray | null; + /** + * Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search. + * @param string The String object or string literal on which to perform the search. + */ + exec(string: string): RegExpExecArray | null; - /** - * Returns a Boolean value that indicates whether or not a pattern exists in a searched string. - * @param string String on which to perform the search. - */ - test(string: string): boolean; + /** + * Returns a Boolean value that indicates whether or not a pattern exists in a searched string. + * @param string String on which to perform the search. + */ + test(string: string): boolean; - /** Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. */ - readonly source: string; + /** Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. */ + readonly source: string; - /** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */ - readonly global: boolean; + /** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */ + readonly global: boolean; - /** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */ - readonly ignoreCase: boolean; + /** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */ + readonly ignoreCase: boolean; - /** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */ - readonly multiline: boolean; + /** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */ + readonly multiline: boolean; - lastIndex: number; + lastIndex: number; } interface RegExpConstructor { - new (pattern: RegExp | string): RegExp; + new (pattern: RegExp | string): RegExp; - new (pattern: string, flags?: string): RegExp; + new (pattern: string, flags?: string): RegExp; - (pattern: RegExp | string): RegExp; + (pattern: RegExp | string): RegExp; - (pattern: string, flags?: string): RegExp; + (pattern: string, flags?: string): RegExp; - readonly "prototype": RegExp; + readonly "prototype": RegExp; } declare var RegExp: RegExpConstructor; interface Error { - name: string; + name: string; - message: string; + message: string; - stack?: string; + stack?: string; } interface ErrorConstructor { - new (message?: string): Error; + new (message?: string): Error; - (message?: string): Error; + (message?: string): Error; - readonly prototype: Error; + readonly prototype: Error; } declare var Error: ErrorConstructor; @@ -6663,11 +6663,11 @@ interface EvalError extends Error { } interface EvalErrorConstructor extends ErrorConstructor { - new (message?: string): EvalError; + new (message?: string): EvalError; - (message?: string): EvalError; + (message?: string): EvalError; - readonly prototype: EvalError; + readonly prototype: EvalError; } declare var EvalError: EvalErrorConstructor; @@ -6676,11 +6676,11 @@ interface RangeError extends Error { } interface RangeErrorConstructor extends ErrorConstructor { - new (message?: string): RangeError; + new (message?: string): RangeError; - (message?: string): RangeError; + (message?: string): RangeError; - readonly prototype: RangeError; + readonly prototype: RangeError; } declare var RangeError: RangeErrorConstructor; @@ -6689,11 +6689,11 @@ interface ReferenceError extends Error { } interface ReferenceErrorConstructor extends ErrorConstructor { - new (message?: string): ReferenceError; + new (message?: string): ReferenceError; - (message?: string): ReferenceError; + (message?: string): ReferenceError; - readonly prototype: ReferenceError; + readonly prototype: ReferenceError; } declare var ReferenceError: ReferenceErrorConstructor; @@ -6702,11 +6702,11 @@ interface SyntaxError extends Error { } interface SyntaxErrorConstructor extends ErrorConstructor { - new (message?: string): SyntaxError; + new (message?: string): SyntaxError; - (message?: string): SyntaxError; + (message?: string): SyntaxError; - readonly prototype: SyntaxError; + readonly prototype: SyntaxError; } declare var SyntaxError: SyntaxErrorConstructor; @@ -6715,11 +6715,11 @@ interface TypeError extends Error { } interface TypeErrorConstructor extends ErrorConstructor { - new (message?: string): TypeError; + new (message?: string): TypeError; - (message?: string): TypeError; + (message?: string): TypeError; - readonly prototype: TypeError; + readonly prototype: TypeError; } declare var TypeError: TypeErrorConstructor; @@ -6728,42 +6728,42 @@ interface URIError extends Error { } interface URIErrorConstructor extends ErrorConstructor { - new (message?: string): URIError; + new (message?: string): URIError; - (message?: string): URIError; + (message?: string): URIError; - readonly prototype: URIError; + readonly prototype: URIError; } declare var URIError: URIErrorConstructor; interface JSON { - /** - * Converts a JavaScript Object Notation (JSON) string into an object. - * @param text A valid JSON string. - * @param reviver A function that transforms the results. This function is called for each member of the object. - * If a member contains nested objects, the nested objects are transformed before the parent object is. - * @throws {SyntaxError} If `text` is not valid JSON. - */ - parse(text: string, reviver?: (this: any, key: string, value: any) => any): any; + /** + * Converts a JavaScript Object Notation (JSON) string into an object. + * @param text A valid JSON string. + * @param reviver A function that transforms the results. This function is called for each member of the object. + * If a member contains nested objects, the nested objects are transformed before the parent object is. + * @throws {SyntaxError} If `text` is not valid JSON. + */ + parse(text: string, reviver?: (this: any, key: string, value: any) => any): any; - /** - * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. - * @param value A JavaScript value, usually an object or array, to be converted. - * @param replacer A function that transforms the results. - * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. - * @throws {TypeError} If a circular reference or a BigInt value is found. - */ - stringify(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string; + /** + * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. + * @param value A JavaScript value, usually an object or array, to be converted. + * @param replacer A function that transforms the results. + * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. + * @throws {TypeError} If a circular reference or a BigInt value is found. + */ + stringify(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string; - /** - * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. - * @param value A JavaScript value, usually an object or array, to be converted. - * @param replacer An array of strings and numbers that acts as an approved list for selecting the object properties that will be stringified. - * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. - * @throws {TypeError} If a circular reference or a BigInt value is found. - */ - stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string; + /** + * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. + * @param value A JavaScript value, usually an object or array, to be converted. + * @param replacer An array of strings and numbers that acts as an approved list for selecting the object properties that will be stringified. + * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. + * @throws {TypeError} If a circular reference or a BigInt value is found. + */ + stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string; } /** @@ -6776,444 +6776,444 @@ declare var JSON: JSON; ///////////////////////////// interface ReadonlyArray { - /** - * Gets the length of the array. This is a number one higher than the highest element defined in an array. - */ - readonly length: number; + /** + * Gets the length of the array. This is a number one higher than the highest element defined in an array. + */ + readonly length: number; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** - * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods. - */ - toLocaleString(): string; + /** + * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods. + */ + toLocaleString(): string; - /** - * Combines two or more arrays. - * @param items Additional items to add to the end of array1. - */ - concat(...items: ConcatArray[]): T[]; + /** + * Combines two or more arrays. + * @param items Additional items to add to the end of array1. + */ + concat(...items: ConcatArray[]): T[]; - /** - * Combines two or more arrays. - * @param items Additional items to add to the end of array1. - */ - concat(...items: (T | ConcatArray)[]): T[]; + /** + * Combines two or more arrays. + * @param items Additional items to add to the end of array1. + */ + concat(...items: (T | ConcatArray)[]): T[]; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): T[]; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): T[]; - /** - * Returns the index of the first occurrence of a value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. - */ - indexOf(searchElement: T, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. + */ + indexOf(searchElement: T, fromIndex?: number): number; - /** - * Returns the index of the last occurrence of a specified value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array. - */ - lastIndexOf(searchElement: T, fromIndex?: number): number; + /** + * Returns the index of the last occurrence of a specified value in an array. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array. + */ + lastIndexOf(searchElement: T, fromIndex?: number): number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): this is readonly S[]; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): this is readonly S[]; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: T, index: number, array: readonly T[]) => void, thisArg?: any): void; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: T, index: number, array: readonly T[]) => void, thisArg?: any): void; - /** - * Calls a defined callback function on each element of an array, and returns an array that contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: T, index: number, array: readonly T[]) => U, thisArg?: any): U[]; + /** + * Calls a defined callback function on each element of an array, and returns an array that contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: T, index: number, array: readonly T[]) => U, thisArg?: any): U[]; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): S[]; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): S[]; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): T[]; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): T[]; - /** - * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T; + /** + * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T; - reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T; + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T; - /** - * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U; - /** - * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T; + /** + * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T; - reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T; + reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T; - /** - * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U; - readonly [n: number]: T; + readonly [n: number]: T; } interface ConcatArray { - readonly length: number; + readonly length: number; - readonly [n: number]: T; + readonly [n: number]: T; - join(separator?: string): string; + join(separator?: string): string; - slice(start?: number, end?: number): T[]; + slice(start?: number, end?: number): T[]; } interface Array { - /** - * Gets or sets the length of the array. This is a number one higher than the highest index in the array. - */ - length: number; + /** + * Gets or sets the length of the array. This is a number one higher than the highest index in the array. + */ + length: number; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** - * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods. - */ - toLocaleString(): string; + /** + * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods. + */ + toLocaleString(): string; - /** - * Removes the last element from an array and returns it. - * If the array is empty, undefined is returned and the array is not modified. - */ - pop(): T | undefined; + /** + * Removes the last element from an array and returns it. + * If the array is empty, undefined is returned and the array is not modified. + */ + pop(): T | undefined; - /** - * Appends new elements to the end of an array, and returns the new length of the array. - * @param items New elements to add to the array. - */ - push(...items: T[]): number; + /** + * Appends new elements to the end of an array, and returns the new length of the array. + * @param items New elements to add to the array. + */ + push(...items: T[]): number; - /** - * Combines two or more arrays. - * This method returns a new array without modifying any existing arrays. - * @param items Additional arrays and/or items to add to the end of the array. - */ - concat(...items: ConcatArray[]): T[]; + /** + * Combines two or more arrays. + * This method returns a new array without modifying any existing arrays. + * @param items Additional arrays and/or items to add to the end of the array. + */ + concat(...items: ConcatArray[]): T[]; - /** - * Combines two or more arrays. - * This method returns a new array without modifying any existing arrays. - * @param items Additional arrays and/or items to add to the end of the array. - */ - concat(...items: (T | ConcatArray)[]): T[]; + /** + * Combines two or more arrays. + * This method returns a new array without modifying any existing arrays. + * @param items Additional arrays and/or items to add to the end of the array. + */ + concat(...items: (T | ConcatArray)[]): T[]; - /** - * Adds all the elements of an array into a string, separated by the specified separator string. - * @param separator A string used to separate one element of the array from the next in the resulting string. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Adds all the elements of an array into a string, separated by the specified separator string. + * @param separator A string used to separate one element of the array from the next in the resulting string. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Reverses the elements in an array in place. - * This method mutates the array and returns a reference to the same array. - */ - reverse(): T[]; + /** + * Reverses the elements in an array in place. + * This method mutates the array and returns a reference to the same array. + */ + reverse(): T[]; - /** - * Removes the first element from an array and returns it. - * If the array is empty, undefined is returned and the array is not modified. - */ - shift(): T | undefined; + /** + * Removes the first element from an array and returns it. + * If the array is empty, undefined is returned and the array is not modified. + */ + shift(): T | undefined; - /** - * Returns a copy of a section of an array. - * For both start and end, a negative index can be used to indicate an offset from the end of the array. - * For example, -2 refers to the second to last element of the array. - * @param start The beginning index of the specified portion of the array. - * If start is undefined, then the slice begins at index 0. - * @param end The end index of the specified portion of the array. This is exclusive of the element at the index 'end'. - * If end is undefined, then the slice extends to the end of the array. - */ - slice(start?: number, end?: number): T[]; + /** + * Returns a copy of a section of an array. + * For both start and end, a negative index can be used to indicate an offset from the end of the array. + * For example, -2 refers to the second to last element of the array. + * @param start The beginning index of the specified portion of the array. + * If start is undefined, then the slice begins at index 0. + * @param end The end index of the specified portion of the array. This is exclusive of the element at the index 'end'. + * If end is undefined, then the slice extends to the end of the array. + */ + slice(start?: number, end?: number): T[]; - /** - * Sorts an array in place. - * This method mutates the array and returns a reference to the same array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: T, b: T) => number): this; + /** + * Sorts an array in place. + * This method mutates the array and returns a reference to the same array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: T, b: T) => number): this; - /** - * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. - * @param start The zero-based location in the array from which to start removing elements. - * @param deleteCount The number of elements to remove. Omitting this argument will remove all elements from the start - * paramater location to end of the array. If value of this argument is either a negative number, zero, undefined, or a type - * that cannot be converted to an integer, the function will evaluate the argument as zero and not remove any elements. - * @returns An array containing the elements that were deleted. - */ - splice(start: number, deleteCount?: number): T[]; + /** + * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. + * @param start The zero-based location in the array from which to start removing elements. + * @param deleteCount The number of elements to remove. Omitting this argument will remove all elements from the start + * paramater location to end of the array. If value of this argument is either a negative number, zero, undefined, or a type + * that cannot be converted to an integer, the function will evaluate the argument as zero and not remove any elements. + * @returns An array containing the elements that were deleted. + */ + splice(start: number, deleteCount?: number): T[]; - /** - * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. - * @param start The zero-based location in the array from which to start removing elements. - * @param deleteCount The number of elements to remove. If value of this argument is either a negative number, zero, - * undefined, or a type that cannot be converted to an integer, the function will evaluate the argument as zero and - * not remove any elements. - * @param items Elements to insert into the array in place of the deleted elements. - * @returns An array containing the elements that were deleted. - */ - splice(start: number, deleteCount: number, ...items: T[]): T[]; + /** + * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. + * @param start The zero-based location in the array from which to start removing elements. + * @param deleteCount The number of elements to remove. If value of this argument is either a negative number, zero, + * undefined, or a type that cannot be converted to an integer, the function will evaluate the argument as zero and + * not remove any elements. + * @param items Elements to insert into the array in place of the deleted elements. + * @returns An array containing the elements that were deleted. + */ + splice(start: number, deleteCount: number, ...items: T[]): T[]; - /** - * Inserts new elements at the start of an array, and returns the new length of the array. - * @param items Elements to insert at the start of the array. - */ - unshift(...items: T[]): number; + /** + * Inserts new elements at the start of an array, and returns the new length of the array. + * @param items Elements to insert at the start of the array. + */ + unshift(...items: T[]): number; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. - */ - indexOf(searchElement: T, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. + */ + indexOf(searchElement: T, fromIndex?: number): number; - /** - * Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin searching backward. If fromIndex is omitted, the search starts at the last index in the array. - */ - lastIndexOf(searchElement: T, fromIndex?: number): number; + /** + * Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin searching backward. If fromIndex is omitted, the search starts at the last index in the array. + */ + lastIndexOf(searchElement: T, fromIndex?: number): number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): this is S[]; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): this is S[]; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void; - /** - * Calls a defined callback function on each element of an array, and returns an array that contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[]; + /** + * Calls a defined callback function on each element of an array, and returns an array that contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[]; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T[]; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T[]; - /** - * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; + /** + * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; - reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; - /** - * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; - /** - * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; + /** + * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; - reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; + reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; - /** - * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; - [n: number]: T; + [n: number]: T; } interface ArrayConstructor { - new (arrayLength?: number): any[]; + new (arrayLength?: number): any[]; - new (arrayLength: number): T[]; + new (arrayLength: number): T[]; - new (...items: T[]): T[]; + new (...items: T[]): T[]; - (arrayLength?: number): any[]; + (arrayLength?: number): any[]; - (arrayLength: number): T[]; + (arrayLength: number): T[]; - (...items: T[]): T[]; + (...items: T[]): T[]; - isArray(arg: any): arg is any[]; + isArray(arg: any): arg is any[]; - readonly prototype: any[]; + readonly prototype: any[]; } declare var Array: ArrayConstructor; interface TypedPropertyDescriptor { - enumerable?: boolean; + enumerable?: boolean; - configurable?: boolean; + configurable?: boolean; - writable?: boolean; + writable?: boolean; - value?: T; + value?: T; - get?: () => T; + get?: () => T; - set?: (value: T) => void; + set?: (value: T) => void; } declare type PromiseConstructorLike = new (executor: (resolve: (value: T | PromiseLike) => void, reject: (reason?: any) => void) => void) => PromiseLike; interface PromiseLike { - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): PromiseLike; + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): PromiseLike; } /** * Represents the completion of an asynchronous operation */ interface Promise { - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise; + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise; - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise; + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise; } /** @@ -7229,9 +7229,9 @@ type Awaited = T extends null | undefined ? T : // special case for `null | u // non-object or non-thenable interface ArrayLike { - readonly length: number; + readonly length: number; - readonly [n: number]: T; + readonly [n: number]: T; } /** @@ -7344,7 +7344,7 @@ interface ThisType { * Stores types to be used with WeakSet, WeakMap, WeakRef, and FinalizationRegistry */ interface WeakKeyTypes { - object: object; + object: object; } type WeakKey = WeakKeyTypes[keyof WeakKeyTypes]; @@ -7356,189 +7356,189 @@ type WeakKey = WeakKeyTypes[keyof WeakKeyTypes]; * buffer as needed. */ interface ArrayBuffer { - /** - * Read-only. The length of the ArrayBuffer (in bytes). - */ - readonly byteLength: number; + /** + * Read-only. The length of the ArrayBuffer (in bytes). + */ + readonly byteLength: number; - /** - * Returns a section of an ArrayBuffer. - */ - slice(begin?: number, end?: number): ArrayBuffer; + /** + * Returns a section of an ArrayBuffer. + */ + slice(begin?: number, end?: number): ArrayBuffer; } /** * Allowed ArrayBuffer types for the buffer of an ArrayBufferView and related Typed Arrays. */ interface ArrayBufferTypes { - ArrayBuffer: ArrayBuffer; + ArrayBuffer: ArrayBuffer; } type ArrayBufferLike = ArrayBufferTypes[keyof ArrayBufferTypes]; interface ArrayBufferConstructor { - readonly prototype: ArrayBuffer; + readonly prototype: ArrayBuffer; - new (byteLength: number): ArrayBuffer; + new (byteLength: number): ArrayBuffer; - isView(arg: any): arg is ArrayBufferView; + isView(arg: any): arg is ArrayBufferView; } declare var ArrayBuffer: ArrayBufferConstructor; interface ArrayBufferView { - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; } interface DataView { - readonly buffer: TArrayBuffer; + readonly buffer: TArrayBuffer; - readonly byteLength: number; + readonly byteLength: number; - readonly byteOffset: number; + readonly byteOffset: number; - /** - * Gets the Float32 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getFloat32(byteOffset: number, littleEndian?: boolean): number; + /** + * Gets the Float32 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getFloat32(byteOffset: number, littleEndian?: boolean): number; - /** - * Gets the Float64 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getFloat64(byteOffset: number, littleEndian?: boolean): number; + /** + * Gets the Float64 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getFloat64(byteOffset: number, littleEndian?: boolean): number; - /** - * Gets the Int8 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - */ - getInt8(byteOffset: number): number; + /** + * Gets the Int8 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + */ + getInt8(byteOffset: number): number; - /** - * Gets the Int16 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getInt16(byteOffset: number, littleEndian?: boolean): number; + /** + * Gets the Int16 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getInt16(byteOffset: number, littleEndian?: boolean): number; - /** - * Gets the Int32 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getInt32(byteOffset: number, littleEndian?: boolean): number; + /** + * Gets the Int32 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getInt32(byteOffset: number, littleEndian?: boolean): number; - /** - * Gets the Uint8 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - */ - getUint8(byteOffset: number): number; + /** + * Gets the Uint8 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + */ + getUint8(byteOffset: number): number; - /** - * Gets the Uint16 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getUint16(byteOffset: number, littleEndian?: boolean): number; + /** + * Gets the Uint16 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getUint16(byteOffset: number, littleEndian?: boolean): number; - /** - * Gets the Uint32 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getUint32(byteOffset: number, littleEndian?: boolean): number; + /** + * Gets the Uint32 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getUint32(byteOffset: number, littleEndian?: boolean): number; - /** - * Stores an Float32 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void; + /** + * Stores an Float32 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void; - /** - * Stores an Float64 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void; + /** + * Stores an Float64 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void; - /** - * Stores an Int8 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - */ - setInt8(byteOffset: number, value: number): void; + /** + * Stores an Int8 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + */ + setInt8(byteOffset: number, value: number): void; - /** - * Stores an Int16 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setInt16(byteOffset: number, value: number, littleEndian?: boolean): void; + /** + * Stores an Int16 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setInt16(byteOffset: number, value: number, littleEndian?: boolean): void; - /** - * Stores an Int32 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setInt32(byteOffset: number, value: number, littleEndian?: boolean): void; + /** + * Stores an Int32 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setInt32(byteOffset: number, value: number, littleEndian?: boolean): void; - /** - * Stores an Uint8 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - */ - setUint8(byteOffset: number, value: number): void; + /** + * Stores an Uint8 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + */ + setUint8(byteOffset: number, value: number): void; - /** - * Stores an Uint16 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setUint16(byteOffset: number, value: number, littleEndian?: boolean): void; + /** + * Stores an Uint16 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setUint16(byteOffset: number, value: number, littleEndian?: boolean): void; - /** - * Stores an Uint32 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setUint32(byteOffset: number, value: number, littleEndian?: boolean): void; + /** + * Stores an Uint32 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setUint32(byteOffset: number, value: number, littleEndian?: boolean): void; } interface DataViewConstructor { - readonly prototype: DataView; + readonly prototype: DataView; - new (buffer: TArrayBuffer, byteOffset?: number, byteLength?: number): DataView; + new (buffer: TArrayBuffer, byteOffset?: number, byteLength?: number): DataView; } declare var DataView: DataViewConstructor; @@ -7548,288 +7548,288 @@ declare var DataView: DataViewConstructor; * number of bytes could not be allocated an exception is raised. */ interface Int8Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int8Array; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int8Array; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int8Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int8Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Int8Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Int8Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Int8Array; + /** + * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Int8Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Int8ArrayConstructor { - readonly prototype: Int8Array; + readonly prototype: Int8Array; - new (length: number): Int8Array; + new (length: number): Int8Array; - new (array: ArrayLike): Int8Array; + new (array: ArrayLike): Int8Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int8Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int8Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int8Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int8Array; - new (array: ArrayLike | ArrayBuffer): Int8Array; + new (array: ArrayLike | ArrayBuffer): Int8Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Int8Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Int8Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Int8Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Int8Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } declare var Int8Array: Int8ArrayConstructor; @@ -7839,288 +7839,288 @@ declare var Int8Array: Int8ArrayConstructor; * requested number of bytes could not be allocated an exception is raised. */ interface Uint8Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint8Array; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint8Array; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * The length of the array. + */ + readonly length: number; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint8Array; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint8Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - - /** - * Reverses the elements in an Array. - */ - reverse(): this; - - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Uint8Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Uint8Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Uint8Array; + /** + * Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Uint8Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Uint8ArrayConstructor { - readonly prototype: Uint8Array; + readonly prototype: Uint8Array; - new (length: number): Uint8Array; + new (length: number): Uint8Array; - new (array: ArrayLike): Uint8Array; + new (array: ArrayLike): Uint8Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint8Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint8Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8Array; - new (array: ArrayLike | ArrayBuffer): Uint8Array; + new (array: ArrayLike | ArrayBuffer): Uint8Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Uint8Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Uint8Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Uint8Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Uint8Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } declare var Uint8Array: Uint8ArrayConstructor; @@ -8130,288 +8130,288 @@ declare var Uint8Array: Uint8ArrayConstructor; * If the requested number of bytes could not be allocated an exception is raised. */ interface Uint8ClampedArray { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint8ClampedArray; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint8ClampedArray; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint8ClampedArray; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint8ClampedArray; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Uint8ClampedArray; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Uint8ClampedArray; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Uint8ClampedArray; + /** + * Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Uint8ClampedArray; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Uint8ClampedArrayConstructor { - readonly prototype: Uint8ClampedArray; + readonly prototype: Uint8ClampedArray; - new (length: number): Uint8ClampedArray; + new (length: number): Uint8ClampedArray; - new (array: ArrayLike): Uint8ClampedArray; + new (array: ArrayLike): Uint8ClampedArray; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray; - new (array: ArrayLike | ArrayBuffer): Uint8ClampedArray; + new (array: ArrayLike | ArrayBuffer): Uint8ClampedArray; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Uint8ClampedArray; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Uint8ClampedArray; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Uint8ClampedArray; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Uint8ClampedArray; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } declare var Uint8ClampedArray: Uint8ClampedArrayConstructor; @@ -8421,288 +8421,288 @@ declare var Uint8ClampedArray: Uint8ClampedArrayConstructor; * requested number of bytes could not be allocated an exception is raised. */ interface Int16Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int16Array; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int16Array; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int16Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int16Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Int16Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Int16Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Int16Array; + /** + * Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Int16Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Int16ArrayConstructor { - readonly prototype: Int16Array; + readonly prototype: Int16Array; - new (length: number): Int16Array; + new (length: number): Int16Array; - new (array: ArrayLike): Int16Array; + new (array: ArrayLike): Int16Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int16Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int16Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int16Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int16Array; - new (array: ArrayLike | ArrayBuffer): Int16Array; + new (array: ArrayLike | ArrayBuffer): Int16Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Int16Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Int16Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Int16Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Int16Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } declare var Int16Array: Int16ArrayConstructor; @@ -8712,288 +8712,288 @@ declare var Int16Array: Int16ArrayConstructor; * requested number of bytes could not be allocated an exception is raised. */ interface Uint16Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint16Array; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint16Array; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint16Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint16Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Uint16Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Uint16Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Uint16Array; + /** + * Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Uint16Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Uint16ArrayConstructor { - readonly prototype: Uint16Array; + readonly prototype: Uint16Array; - new (length: number): Uint16Array; + new (length: number): Uint16Array; - new (array: ArrayLike): Uint16Array; + new (array: ArrayLike): Uint16Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint16Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint16Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint16Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint16Array; - new (array: ArrayLike | ArrayBuffer): Uint16Array; + new (array: ArrayLike | ArrayBuffer): Uint16Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Uint16Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Uint16Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Uint16Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Uint16Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } declare var Uint16Array: Uint16ArrayConstructor; @@ -9003,288 +9003,288 @@ declare var Uint16Array: Uint16ArrayConstructor; * requested number of bytes could not be allocated an exception is raised. */ interface Int32Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int32Array; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int32Array; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int32Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int32Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Int32Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Int32Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Int32Array; + /** + * Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Int32Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Int32ArrayConstructor { - readonly prototype: Int32Array; + readonly prototype: Int32Array; - new (length: number): Int32Array; + new (length: number): Int32Array; - new (array: ArrayLike): Int32Array; + new (array: ArrayLike): Int32Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int32Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int32Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int32Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int32Array; - new (array: ArrayLike | ArrayBuffer): Int32Array; + new (array: ArrayLike | ArrayBuffer): Int32Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Int32Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Int32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Int32Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Int32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } declare var Int32Array: Int32ArrayConstructor; @@ -9294,288 +9294,288 @@ declare var Int32Array: Int32ArrayConstructor; * requested number of bytes could not be allocated an exception is raised. */ interface Uint32Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; - - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint32Array; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint32Array; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * The length of the array. - */ - readonly length: number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint32Array; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * The length of the array. + */ + readonly length: number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint32Array; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Uint32Array; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Uint32Array; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Gets a new Uint32Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Uint32Array; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Gets a new Uint32Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Uint32Array; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; + + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Uint32ArrayConstructor { - readonly prototype: Uint32Array; + readonly prototype: Uint32Array; - new (length: number): Uint32Array; + new (length: number): Uint32Array; - new (array: ArrayLike): Uint32Array; + new (array: ArrayLike): Uint32Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint32Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint32Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint32Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint32Array; - new (array: ArrayLike | ArrayBuffer): Uint32Array; + new (array: ArrayLike | ArrayBuffer): Uint32Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Uint32Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Uint32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Uint32Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Uint32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } declare var Uint32Array: Uint32ArrayConstructor; @@ -9585,288 +9585,288 @@ declare var Uint32Array: Uint32ArrayConstructor; * of bytes could not be allocated an exception is raised. */ interface Float32Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float32Array; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float32Array; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float32Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float32Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Float32Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Float32Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Float32Array; + /** + * Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Float32Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Float32ArrayConstructor { - readonly prototype: Float32Array; + readonly prototype: Float32Array; - new (length: number): Float32Array; + new (length: number): Float32Array; - new (array: ArrayLike): Float32Array; + new (array: ArrayLike): Float32Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Float32Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Float32Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float32Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float32Array; - new (array: ArrayLike | ArrayBuffer): Float32Array; + new (array: ArrayLike | ArrayBuffer): Float32Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Float32Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Float32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Float32Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Float32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } declare var Float32Array: Float32ArrayConstructor; @@ -9876,288 +9876,288 @@ declare var Float32Array: Float32ArrayConstructor; * number of bytes could not be allocated an exception is raised. */ interface Float64Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float64Array; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float64Array; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float64Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float64Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Float64Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Float64Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Float64Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Float64Array; + /** + * Gets a new Float64Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Float64Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Float64ArrayConstructor { - readonly prototype: Float64Array; + readonly prototype: Float64Array; - new (length: number): Float64Array; + new (length: number): Float64Array; - new (array: ArrayLike): Float64Array; + new (array: ArrayLike): Float64Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Float64Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Float64Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float64Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float64Array; - new (array: ArrayLike | ArrayBuffer): Float64Array; + new (array: ArrayLike | ArrayBuffer): Float64Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Float64Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Float64Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Float64Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Float64Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } declare var Float64Array: Float64ArrayConstructor; @@ -10167,260 +10167,260 @@ declare var Float64Array: Float64ArrayConstructor; ///////////////////////////// declare namespace Intl { - interface CollatorOptions { - usage?: "sort" | "search" | undefined; +interface CollatorOptions { + usage?: "sort" | "search" | undefined; - localeMatcher?: "lookup" | "best fit" | undefined; + localeMatcher?: "lookup" | "best fit" | undefined; - numeric?: boolean | undefined; + numeric?: boolean | undefined; - caseFirst?: "upper" | "lower" | "false" | undefined; + caseFirst?: "upper" | "lower" | "false" | undefined; - sensitivity?: "base" | "accent" | "case" | "variant" | undefined; + sensitivity?: "base" | "accent" | "case" | "variant" | undefined; - collation?: "big5han" | "compat" | "default" | "dict" | "direct" | "ducet" | "emoji" | "eor" | "gb2312" | "phonebk" | "phonetic" | "pinyin" | "reformed" | "searchjl" | "stroke" | "trad" | "unihan" | "zhuyin" | undefined; + collation?: "big5han" | "compat" | "default" | "dict" | "direct" | "ducet" | "emoji" | "eor" | "gb2312" | "phonebk" | "phonetic" | "pinyin" | "reformed" | "searchjl" | "stroke" | "trad" | "unihan" | "zhuyin" | undefined; - ignorePunctuation?: boolean | undefined; - } + ignorePunctuation?: boolean | undefined; +} - interface ResolvedCollatorOptions { - locale: string; +interface ResolvedCollatorOptions { + locale: string; - usage: string; + usage: string; - sensitivity: string; + sensitivity: string; - ignorePunctuation: boolean; + ignorePunctuation: boolean; - collation: string; + collation: string; - caseFirst: string; + caseFirst: string; - numeric: boolean; - } + numeric: boolean; +} - interface Collator { - compare(x: string, y: string): number; +interface Collator { + compare(x: string, y: string): number; - resolvedOptions(): ResolvedCollatorOptions; - } + resolvedOptions(): ResolvedCollatorOptions; +} - interface CollatorConstructor { - new (locales?: string | string[], options?: CollatorOptions): Collator; +interface CollatorConstructor { + new (locales?: string | string[], options?: CollatorOptions): Collator; - (locales?: string | string[], options?: CollatorOptions): Collator; + (locales?: string | string[], options?: CollatorOptions): Collator; - supportedLocalesOf(locales: string | string[], options?: CollatorOptions): string[]; - } + supportedLocalesOf(locales: string | string[], options?: CollatorOptions): string[]; +} - var Collator: CollatorConstructor; +var Collator: CollatorConstructor; - interface NumberFormatOptionsStyleRegistry { - decimal: never; +interface NumberFormatOptionsStyleRegistry { + decimal: never; - percent: never; + percent: never; - currency: never; - } + currency: never; +} - type NumberFormatOptionsStyle = keyof NumberFormatOptionsStyleRegistry; +type NumberFormatOptionsStyle = keyof NumberFormatOptionsStyleRegistry; - interface NumberFormatOptionsCurrencyDisplayRegistry { - code: never; +interface NumberFormatOptionsCurrencyDisplayRegistry { + code: never; - symbol: never; + symbol: never; - name: never; - } + name: never; +} - type NumberFormatOptionsCurrencyDisplay = keyof NumberFormatOptionsCurrencyDisplayRegistry; +type NumberFormatOptionsCurrencyDisplay = keyof NumberFormatOptionsCurrencyDisplayRegistry; - interface NumberFormatOptionsUseGroupingRegistry { - } +interface NumberFormatOptionsUseGroupingRegistry { +} - type NumberFormatOptionsUseGrouping = {} extends NumberFormatOptionsUseGroupingRegistry ? boolean : keyof NumberFormatOptionsUseGroupingRegistry | "true" | "false" | boolean; +type NumberFormatOptionsUseGrouping = {} extends NumberFormatOptionsUseGroupingRegistry ? boolean : keyof NumberFormatOptionsUseGroupingRegistry | "true" | "false" | boolean; - type ResolvedNumberFormatOptionsUseGrouping = {} extends NumberFormatOptionsUseGroupingRegistry ? boolean : keyof NumberFormatOptionsUseGroupingRegistry | false; +type ResolvedNumberFormatOptionsUseGrouping = {} extends NumberFormatOptionsUseGroupingRegistry ? boolean : keyof NumberFormatOptionsUseGroupingRegistry | false; - interface NumberFormatOptions { - localeMatcher?: "lookup" | "best fit" | undefined; +interface NumberFormatOptions { + localeMatcher?: "lookup" | "best fit" | undefined; - style?: NumberFormatOptionsStyle | undefined; + style?: NumberFormatOptionsStyle | undefined; - currency?: string | undefined; + currency?: string | undefined; - currencyDisplay?: NumberFormatOptionsCurrencyDisplay | undefined; + currencyDisplay?: NumberFormatOptionsCurrencyDisplay | undefined; - useGrouping?: NumberFormatOptionsUseGrouping | undefined; + useGrouping?: NumberFormatOptionsUseGrouping | undefined; - minimumIntegerDigits?: number | undefined; + minimumIntegerDigits?: number | undefined; - minimumFractionDigits?: number | undefined; + minimumFractionDigits?: number | undefined; - maximumFractionDigits?: number | undefined; + maximumFractionDigits?: number | undefined; - minimumSignificantDigits?: number | undefined; + minimumSignificantDigits?: number | undefined; - maximumSignificantDigits?: number | undefined; - } + maximumSignificantDigits?: number | undefined; +} - interface ResolvedNumberFormatOptions { - locale: string; +interface ResolvedNumberFormatOptions { + locale: string; - numberingSystem: string; + numberingSystem: string; - style: NumberFormatOptionsStyle; + style: NumberFormatOptionsStyle; - currency?: string; + currency?: string; - currencyDisplay?: NumberFormatOptionsCurrencyDisplay; + currencyDisplay?: NumberFormatOptionsCurrencyDisplay; - minimumIntegerDigits: number; + minimumIntegerDigits: number; - minimumFractionDigits?: number; + minimumFractionDigits?: number; - maximumFractionDigits?: number; + maximumFractionDigits?: number; - minimumSignificantDigits?: number; + minimumSignificantDigits?: number; - maximumSignificantDigits?: number; + maximumSignificantDigits?: number; - useGrouping: ResolvedNumberFormatOptionsUseGrouping; - } + useGrouping: ResolvedNumberFormatOptionsUseGrouping; +} - interface NumberFormat { - format(value: number): string; +interface NumberFormat { + format(value: number): string; - resolvedOptions(): ResolvedNumberFormatOptions; - } + resolvedOptions(): ResolvedNumberFormatOptions; +} - interface NumberFormatConstructor { - new (locales?: string | string[], options?: NumberFormatOptions): NumberFormat; +interface NumberFormatConstructor { + new (locales?: string | string[], options?: NumberFormatOptions): NumberFormat; - (locales?: string | string[], options?: NumberFormatOptions): NumberFormat; + (locales?: string | string[], options?: NumberFormatOptions): NumberFormat; - supportedLocalesOf(locales: string | string[], options?: NumberFormatOptions): string[]; + supportedLocalesOf(locales: string | string[], options?: NumberFormatOptions): string[]; - readonly prototype: NumberFormat; - } + readonly prototype: NumberFormat; +} - var NumberFormat: NumberFormatConstructor; +var NumberFormat: NumberFormatConstructor; - interface DateTimeFormatOptions { - localeMatcher?: "best fit" | "lookup" | undefined; +interface DateTimeFormatOptions { + localeMatcher?: "best fit" | "lookup" | undefined; - weekday?: "long" | "short" | "narrow" | undefined; + weekday?: "long" | "short" | "narrow" | undefined; - era?: "long" | "short" | "narrow" | undefined; + era?: "long" | "short" | "narrow" | undefined; - year?: "numeric" | "2-digit" | undefined; + year?: "numeric" | "2-digit" | undefined; - month?: "numeric" | "2-digit" | "long" | "short" | "narrow" | undefined; + month?: "numeric" | "2-digit" | "long" | "short" | "narrow" | undefined; - day?: "numeric" | "2-digit" | undefined; + day?: "numeric" | "2-digit" | undefined; - hour?: "numeric" | "2-digit" | undefined; + hour?: "numeric" | "2-digit" | undefined; - minute?: "numeric" | "2-digit" | undefined; + minute?: "numeric" | "2-digit" | undefined; - second?: "numeric" | "2-digit" | undefined; + second?: "numeric" | "2-digit" | undefined; - timeZoneName?: "short" | "long" | "shortOffset" | "longOffset" | "shortGeneric" | "longGeneric" | undefined; + timeZoneName?: "short" | "long" | "shortOffset" | "longOffset" | "shortGeneric" | "longGeneric" | undefined; - formatMatcher?: "best fit" | "basic" | undefined; + formatMatcher?: "best fit" | "basic" | undefined; - hour12?: boolean | undefined; + hour12?: boolean | undefined; - timeZone?: string | undefined; - } + timeZone?: string | undefined; +} - interface ResolvedDateTimeFormatOptions { - locale: string; +interface ResolvedDateTimeFormatOptions { + locale: string; - calendar: string; + calendar: string; - numberingSystem: string; + numberingSystem: string; - timeZone: string; + timeZone: string; - hour12?: boolean; + hour12?: boolean; - weekday?: string; + weekday?: string; - era?: string; + era?: string; - year?: string; + year?: string; - month?: string; + month?: string; - day?: string; + day?: string; - hour?: string; + hour?: string; - minute?: string; + minute?: string; - second?: string; + second?: string; - timeZoneName?: string; - } + timeZoneName?: string; +} - interface DateTimeFormat { - format(date?: Date | number): string; +interface DateTimeFormat { + format(date?: Date | number): string; - resolvedOptions(): ResolvedDateTimeFormatOptions; - } + resolvedOptions(): ResolvedDateTimeFormatOptions; +} - interface DateTimeFormatConstructor { - new (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat; +interface DateTimeFormatConstructor { + new (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat; - (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat; + (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat; - supportedLocalesOf(locales: string | string[], options?: DateTimeFormatOptions): string[]; + supportedLocalesOf(locales: string | string[], options?: DateTimeFormatOptions): string[]; - readonly prototype: DateTimeFormat; - } + readonly prototype: DateTimeFormat; +} - var DateTimeFormat: DateTimeFormatConstructor; +var DateTimeFormat: DateTimeFormatConstructor; } interface String { - /** - * Determines whether two strings are equivalent in the current or specified locale. - * @param that String to compare to target string - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details. - * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details. - */ - localeCompare(that: string, locales?: string | string[], options?: Intl.CollatorOptions): number; + /** + * Determines whether two strings are equivalent in the current or specified locale. + * @param that String to compare to target string + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details. + * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details. + */ + localeCompare(that: string, locales?: string | string[], options?: Intl.CollatorOptions): number; } interface Number { - /** - * Converts a number to a string by using the current or specified locale. - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; + /** + * Converts a number to a string by using the current or specified locale. + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; } interface Date { - /** - * Converts a date and time to a string by using the current or specified locale. - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; + /** + * Converts a date and time to a string by using the current or specified locale. + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; - /** - * Converts a date to a string by using the current or specified locale. - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleDateString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; + /** + * Converts a date to a string by using the current or specified locale. + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleDateString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; - /** - * Converts a time to a string by using the current or specified locale. - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleTimeString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; + /** + * Converts a time to a string by using the current or specified locale. + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleTimeString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; } diff --git a/generated/current/year/2024/index.d.ts b/generated/current/year/2024/index.d.ts index a8e919e..6b0e19c 100644 --- a/generated/current/year/2024/index.d.ts +++ b/generated/current/year/2024/index.d.ts @@ -22,175 +22,175 @@ and limitations under the License. // lib.es2015.collection.d.ts ///////////////////////////// interface Map { - /** - * Removes all elements from the Map. - */ - clear(): void; + /** + * Removes all elements from the Map. + */ + clear(): void; - /** - * @returns true if an element in the Map existed and has been removed, or false if the element does not exist. - */ - delete(key: K): boolean; + /** + * @returns true if an element in the Map existed and has been removed, or false if the element does not exist. + */ + delete(key: K): boolean; - /** - * Executes a provided function once per each key/value pair in the Map, in insertion order. - */ - forEach(callbackfn: (value: V, key: K, map: Map) => void, thisArg?: any): void; + /** + * Executes a provided function once per each key/value pair in the Map, in insertion order. + */ + forEach(callbackfn: (value: V, key: K, map: Map) => void, thisArg?: any): void; - /** - * Returns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map. - * @returns Returns the element associated with the specified key. If no element is associated with the specified key, undefined is returned. - */ - get(key: K): V | undefined; + /** + * Returns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map. + * @returns Returns the element associated with the specified key. If no element is associated with the specified key, undefined is returned. + */ + get(key: K): V | undefined; - /** - * @returns boolean indicating whether an element with the specified key exists or not. - */ - has(key: K): boolean; + /** + * @returns boolean indicating whether an element with the specified key exists or not. + */ + has(key: K): boolean; - /** - * Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated. - */ - set(key: K, value: V): this; + /** + * Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated. + */ + set(key: K, value: V): this; - /** - * @returns the number of elements in the Map. - */ - readonly size: number; + /** + * @returns the number of elements in the Map. + */ + readonly size: number; } interface MapConstructor { - new (): Map; + new (): Map; - new (entries?: readonly (readonly [K, V])[] | null): Map; + new (entries?: readonly (readonly [K, V])[] | null): Map; - readonly prototype: Map; + readonly prototype: Map; } declare var Map: MapConstructor; interface ReadonlyMap { - forEach(callbackfn: (value: V, key: K, map: ReadonlyMap) => void, thisArg?: any): void; + forEach(callbackfn: (value: V, key: K, map: ReadonlyMap) => void, thisArg?: any): void; - get(key: K): V | undefined; + get(key: K): V | undefined; - has(key: K): boolean; + has(key: K): boolean; - readonly size: number; + readonly size: number; } interface WeakMap { - /** - * Removes the specified element from the WeakMap. - * @returns true if the element was successfully removed, or false if it was not present. - */ - delete(key: K): boolean; + /** + * Removes the specified element from the WeakMap. + * @returns true if the element was successfully removed, or false if it was not present. + */ + delete(key: K): boolean; - /** - * @returns a specified element. - */ - get(key: K): V | undefined; + /** + * @returns a specified element. + */ + get(key: K): V | undefined; - /** - * @returns a boolean indicating whether an element with the specified key exists or not. - */ - has(key: K): boolean; + /** + * @returns a boolean indicating whether an element with the specified key exists or not. + */ + has(key: K): boolean; - /** - * Adds a new element with a specified key and value. - * @param key Must be an object or symbol. - */ - set(key: K, value: V): this; + /** + * Adds a new element with a specified key and value. + * @param key Must be an object or symbol. + */ + set(key: K, value: V): this; } interface WeakMapConstructor { - new (entries?: readonly (readonly [K, V])[] | null): WeakMap; + new (entries?: readonly (readonly [K, V])[] | null): WeakMap; - readonly prototype: WeakMap; + readonly prototype: WeakMap; } declare var WeakMap: WeakMapConstructor; interface Set { - /** - * Appends a new element with a specified value to the end of the Set. - */ - add(value: T): this; + /** + * Appends a new element with a specified value to the end of the Set. + */ + add(value: T): this; - /** - * Removes all elements from the Set. - */ - clear(): void; + /** + * Removes all elements from the Set. + */ + clear(): void; - /** - * Removes a specified value from the Set. - * @returns Returns true if an element in the Set existed and has been removed, or false if the element does not exist. - */ - delete(value: T): boolean; + /** + * Removes a specified value from the Set. + * @returns Returns true if an element in the Set existed and has been removed, or false if the element does not exist. + */ + delete(value: T): boolean; - /** - * Executes a provided function once per each value in the Set object, in insertion order. - */ - forEach(callbackfn: (value: T, value2: T, set: Set) => void, thisArg?: any): void; + /** + * Executes a provided function once per each value in the Set object, in insertion order. + */ + forEach(callbackfn: (value: T, value2: T, set: Set) => void, thisArg?: any): void; - /** - * @returns a boolean indicating whether an element with the specified value exists in the Set or not. - */ - has(value: T): boolean; + /** + * @returns a boolean indicating whether an element with the specified value exists in the Set or not. + */ + has(value: T): boolean; - /** - * @returns the number of (unique) elements in the Set. - */ - readonly size: number; + /** + * @returns the number of (unique) elements in the Set. + */ + readonly size: number; } interface SetConstructor { - new (values?: readonly T[] | null): Set; + new (values?: readonly T[] | null): Set; - readonly prototype: Set; + readonly prototype: Set; } declare var Set: SetConstructor; interface ReadonlySet { - /** - * Executes a provided function once per each value in the ReadonlySet object, in insertion order. - */ - forEach(callbackfn: (value: T, value2: T, set: ReadonlySet) => void, thisArg?: any): void; + /** + * Executes a provided function once per each value in the ReadonlySet object, in insertion order. + */ + forEach(callbackfn: (value: T, value2: T, set: ReadonlySet) => void, thisArg?: any): void; - /** - * @returns a boolean indicating whether an element with the specified value exists in the Set or not. - */ - has(value: T): boolean; + /** + * @returns a boolean indicating whether an element with the specified value exists in the Set or not. + */ + has(value: T): boolean; - /** - * @returns the number of (unique) elements in the Set. - */ - readonly size: number; + /** + * @returns the number of (unique) elements in the Set. + */ + readonly size: number; } interface WeakSet { - /** - * Appends a new value to the end of the WeakSet. - */ - add(value: T): this; + /** + * Appends a new value to the end of the WeakSet. + */ + add(value: T): this; - /** - * Removes the specified element from the WeakSet. - * @returns Returns true if the element existed and has been removed, or false if the element does not exist. - */ - delete(value: T): boolean; + /** + * Removes the specified element from the WeakSet. + * @returns Returns true if the element existed and has been removed, or false if the element does not exist. + */ + delete(value: T): boolean; - /** - * @returns a boolean indicating whether a value exists in the WeakSet or not. - */ - has(value: T): boolean; + /** + * @returns a boolean indicating whether a value exists in the WeakSet or not. + */ + has(value: T): boolean; } interface WeakSetConstructor { - new (values?: readonly T[] | null): WeakSet; + new (values?: readonly T[] | null): WeakSet; - readonly prototype: WeakSet; + readonly prototype: WeakSet; } declare var WeakSet: WeakSetConstructor; @@ -199,596 +199,596 @@ declare var WeakSet: WeakSetConstructor; // lib.es2015.core.d.ts ///////////////////////////// interface Array { - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: T, index: number, obj: T[]) => value is S, thisArg?: any): S | undefined; - - find(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): T | undefined; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: T, index: number, obj: T[]) => value is S, thisArg?: any): S | undefined; + + find(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): T | undefined; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: T, start?: number, end?: number): this; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: T, start?: number, end?: number): this; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } interface ArrayConstructor { - /** - * Creates an array from an array-like object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): T[]; + /** + * Creates an array from an array-like object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): T[]; - /** - * Creates an array from an iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; + /** + * Creates an array from an iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: T[]): T[]; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: T[]): T[]; } interface DateConstructor { - new (value: number | string | Date): Date; + new (value: number | string | Date): Date; } interface Function { - /** - * Returns the name of the function. Function names are read-only and can not be changed. - */ - readonly name: string; + /** + * Returns the name of the function. Function names are read-only and can not be changed. + */ + readonly name: string; } interface Math { - /** - * Returns the number of leading zero bits in the 32-bit binary representation of a number. - * @param x A numeric expression. - */ - clz32(x: number): number; + /** + * Returns the number of leading zero bits in the 32-bit binary representation of a number. + * @param x A numeric expression. + */ + clz32(x: number): number; - /** - * Returns the result of 32-bit multiplication of two numbers. - * @param x First number - * @param y Second number - */ - imul(x: number, y: number): number; + /** + * Returns the result of 32-bit multiplication of two numbers. + * @param x First number + * @param y Second number + */ + imul(x: number, y: number): number; - /** - * Returns the sign of x, indicating whether x is positive, negative, or zero. - * @param x The numeric expression to test - */ - sign(x: number): number; + /** + * Returns the sign of x, indicating whether x is positive, negative, or zero. + * @param x The numeric expression to test + */ + sign(x: number): number; - /** - * Returns the base 10 logarithm of a number. - * @param x A numeric expression. - */ - log10(x: number): number; + /** + * Returns the base 10 logarithm of a number. + * @param x A numeric expression. + */ + log10(x: number): number; - /** - * Returns the base 2 logarithm of a number. - * @param x A numeric expression. - */ - log2(x: number): number; + /** + * Returns the base 2 logarithm of a number. + * @param x A numeric expression. + */ + log2(x: number): number; - /** - * Returns the natural logarithm of 1 + x. - * @param x A numeric expression. - */ - log1p(x: number): number; + /** + * Returns the natural logarithm of 1 + x. + * @param x A numeric expression. + */ + log1p(x: number): number; - /** - * Returns the result of (e^x - 1), which is an implementation-dependent approximation to - * subtracting 1 from the exponential function of x (e raised to the power of x, where e - * is the base of the natural logarithms). - * @param x A numeric expression. - */ - expm1(x: number): number; + /** + * Returns the result of (e^x - 1), which is an implementation-dependent approximation to + * subtracting 1 from the exponential function of x (e raised to the power of x, where e + * is the base of the natural logarithms). + * @param x A numeric expression. + */ + expm1(x: number): number; - /** - * Returns the hyperbolic cosine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - cosh(x: number): number; + /** + * Returns the hyperbolic cosine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + cosh(x: number): number; - /** - * Returns the hyperbolic sine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - sinh(x: number): number; + /** + * Returns the hyperbolic sine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + sinh(x: number): number; - /** - * Returns the hyperbolic tangent of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - tanh(x: number): number; + /** + * Returns the hyperbolic tangent of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + tanh(x: number): number; - /** - * Returns the inverse hyperbolic cosine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - acosh(x: number): number; + /** + * Returns the inverse hyperbolic cosine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + acosh(x: number): number; - /** - * Returns the inverse hyperbolic sine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - asinh(x: number): number; + /** + * Returns the inverse hyperbolic sine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + asinh(x: number): number; - /** - * Returns the inverse hyperbolic tangent of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - atanh(x: number): number; + /** + * Returns the inverse hyperbolic tangent of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + atanh(x: number): number; - /** - * Returns the square root of the sum of squares of its arguments. - * @param values Values to compute the square root for. - * If no arguments are passed, the result is +0. - * If there is only one argument, the result is the absolute value. - * If any argument is +Infinity or -Infinity, the result is +Infinity. - * If any argument is NaN, the result is NaN. - * If all arguments are either +0 or −0, the result is +0. - */ - hypot(...values: number[]): number; + /** + * Returns the square root of the sum of squares of its arguments. + * @param values Values to compute the square root for. + * If no arguments are passed, the result is +0. + * If there is only one argument, the result is the absolute value. + * If any argument is +Infinity or -Infinity, the result is +Infinity. + * If any argument is NaN, the result is NaN. + * If all arguments are either +0 or −0, the result is +0. + */ + hypot(...values: number[]): number; - /** - * Returns the integral part of the numeric expression x, removing any fractional digits. - * If x is already an integer, the result is x. - * @param x A numeric expression. - */ - trunc(x: number): number; + /** + * Returns the integral part of the numeric expression x, removing any fractional digits. + * If x is already an integer, the result is x. + * @param x A numeric expression. + */ + trunc(x: number): number; - /** - * Returns the nearest single precision float representation of a number. - * @param x A numeric expression. - */ - fround(x: number): number; + /** + * Returns the nearest single precision float representation of a number. + * @param x A numeric expression. + */ + fround(x: number): number; - /** - * Returns an implementation-dependent approximation to the cube root of number. - * @param x A numeric expression. - */ - cbrt(x: number): number; + /** + * Returns an implementation-dependent approximation to the cube root of number. + * @param x A numeric expression. + */ + cbrt(x: number): number; } interface NumberConstructor { - /** - * The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1 - * that is representable as a Number value, which is approximately: - * 2.2204460492503130808472633361816 x 10‍−‍16. - */ - readonly EPSILON: number; + /** + * The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1 + * that is representable as a Number value, which is approximately: + * 2.2204460492503130808472633361816 x 10‍−‍16. + */ + readonly EPSILON: number; - /** - * Returns true if passed value is finite. - * Unlike the global isFinite, Number.isFinite doesn't forcibly convert the parameter to a - * number. Only finite values of the type number, result in true. - * @param number A numeric value. - */ - isFinite(number: unknown): boolean; + /** + * Returns true if passed value is finite. + * Unlike the global isFinite, Number.isFinite doesn't forcibly convert the parameter to a + * number. Only finite values of the type number, result in true. + * @param number A numeric value. + */ + isFinite(number: unknown): boolean; - /** - * Returns true if the value passed is an integer, false otherwise. - * @param number A numeric value. - */ - isInteger(number: unknown): boolean; + /** + * Returns true if the value passed is an integer, false otherwise. + * @param number A numeric value. + */ + isInteger(number: unknown): boolean; - /** - * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a - * number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter - * to a number. Only values of the type number, that are also NaN, result in true. - * @param number A numeric value. - */ - isNaN(number: unknown): boolean; + /** + * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a + * number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter + * to a number. Only values of the type number, that are also NaN, result in true. + * @param number A numeric value. + */ + isNaN(number: unknown): boolean; - /** - * Returns true if the value passed is a safe integer. - * @param number A numeric value. - */ - isSafeInteger(number: unknown): boolean; + /** + * Returns true if the value passed is a safe integer. + * @param number A numeric value. + */ + isSafeInteger(number: unknown): boolean; - /** - * The value of the largest integer n such that n and n + 1 are both exactly representable as - * a Number value. - * The value of Number.MAX_SAFE_INTEGER is 9007199254740991 2^53 − 1. - */ - readonly MAX_SAFE_INTEGER: number; + /** + * The value of the largest integer n such that n and n + 1 are both exactly representable as + * a Number value. + * The value of Number.MAX_SAFE_INTEGER is 9007199254740991 2^53 − 1. + */ + readonly MAX_SAFE_INTEGER: number; - /** - * The value of the smallest integer n such that n and n − 1 are both exactly representable as - * a Number value. - * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)). - */ - readonly MIN_SAFE_INTEGER: number; + /** + * The value of the smallest integer n such that n and n − 1 are both exactly representable as + * a Number value. + * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)). + */ + readonly MIN_SAFE_INTEGER: number; - /** - * Converts a string to a floating-point number. - * @param string A string that contains a floating-point number. - */ - parseFloat(string: string): number; + /** + * Converts a string to a floating-point number. + * @param string A string that contains a floating-point number. + */ + parseFloat(string: string): number; - /** - * Converts A string to an integer. - * @param string A string to convert into a number. - * @param radix A value between 2 and 36 that specifies the base of the number in `string`. - * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. - * All other strings are considered decimal. - */ - parseInt(string: string, radix?: number): number; + /** + * Converts A string to an integer. + * @param string A string to convert into a number. + * @param radix A value between 2 and 36 that specifies the base of the number in `string`. + * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. + * All other strings are considered decimal. + */ + parseInt(string: string, radix?: number): number; } interface ObjectConstructor { - /** - * Copy the values of all of the enumerable own properties from one or more source objects to a - * target object. Returns the target object. - * @param target The target object to copy to. - * @param source The source object from which to copy properties. - */ - assign(target: T, source: U): T & U; + /** + * Copy the values of all of the enumerable own properties from one or more source objects to a + * target object. Returns the target object. + * @param target The target object to copy to. + * @param source The source object from which to copy properties. + */ + assign(target: T, source: U): T & U; - /** - * Copy the values of all of the enumerable own properties from one or more source objects to a - * target object. Returns the target object. - * @param target The target object to copy to. - * @param source1 The first source object from which to copy properties. - * @param source2 The second source object from which to copy properties. - */ - assign(target: T, source1: U, source2: V): T & U & V; + /** + * Copy the values of all of the enumerable own properties from one or more source objects to a + * target object. Returns the target object. + * @param target The target object to copy to. + * @param source1 The first source object from which to copy properties. + * @param source2 The second source object from which to copy properties. + */ + assign(target: T, source1: U, source2: V): T & U & V; - /** - * Copy the values of all of the enumerable own properties from one or more source objects to a - * target object. Returns the target object. - * @param target The target object to copy to. - * @param source1 The first source object from which to copy properties. - * @param source2 The second source object from which to copy properties. - * @param source3 The third source object from which to copy properties. - */ - assign(target: T, source1: U, source2: V, source3: W): T & U & V & W; + /** + * Copy the values of all of the enumerable own properties from one or more source objects to a + * target object. Returns the target object. + * @param target The target object to copy to. + * @param source1 The first source object from which to copy properties. + * @param source2 The second source object from which to copy properties. + * @param source3 The third source object from which to copy properties. + */ + assign(target: T, source1: U, source2: V, source3: W): T & U & V & W; - /** - * Copy the values of all of the enumerable own properties from one or more source objects to a - * target object. Returns the target object. - * @param target The target object to copy to. - * @param sources One or more source objects from which to copy properties - */ - assign(target: object, ...sources: any[]): any; + /** + * Copy the values of all of the enumerable own properties from one or more source objects to a + * target object. Returns the target object. + * @param target The target object to copy to. + * @param sources One or more source objects from which to copy properties + */ + assign(target: object, ...sources: any[]): any; - /** - * Returns an array of all symbol properties found directly on object o. - * @param o Object to retrieve the symbols from. - */ - getOwnPropertySymbols(o: any): symbol[]; + /** + * Returns an array of all symbol properties found directly on object o. + * @param o Object to retrieve the symbols from. + */ + getOwnPropertySymbols(o: any): symbol[]; - /** - * Returns the names of the enumerable string properties and methods of an object. - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - keys(o: {}): string[]; + /** + * Returns the names of the enumerable string properties and methods of an object. + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + keys(o: {}): string[]; - /** - * Returns true if the values are the same value, false otherwise. - * @param value1 The first value. - * @param value2 The second value. - */ - is(value1: any, value2: any): boolean; + /** + * Returns true if the values are the same value, false otherwise. + * @param value1 The first value. + * @param value2 The second value. + */ + is(value1: any, value2: any): boolean; - /** - * Sets the prototype of a specified object o to object proto or null. Returns the object o. - * @param o The object to change its prototype. - * @param proto The value of the new prototype or null. - */ - setPrototypeOf(o: any, proto: object | null): any; + /** + * Sets the prototype of a specified object o to object proto or null. Returns the object o. + * @param o The object to change its prototype. + * @param proto The value of the new prototype or null. + */ + setPrototypeOf(o: any, proto: object | null): any; } interface ReadonlyArray { - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: T, index: number, obj: readonly T[]) => value is S, thisArg?: any): S | undefined; - - find(predicate: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): T | undefined; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: T, index: number, obj: readonly T[]) => value is S, thisArg?: any): S | undefined; + + find(predicate: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): T | undefined; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): number; - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } interface RegExp { - /** - * Returns a string indicating the flags of the regular expression in question. This field is read-only. - * The characters in this string are sequenced and concatenated in the following order: - * - * - "g" for global - * - "i" for ignoreCase - * - "m" for multiline - * - "u" for unicode - * - "y" for sticky - * - * If no flags are set, the value is the empty string. - */ - readonly flags: string; + /** + * Returns a string indicating the flags of the regular expression in question. This field is read-only. + * The characters in this string are sequenced and concatenated in the following order: + * + * - "g" for global + * - "i" for ignoreCase + * - "m" for multiline + * - "u" for unicode + * - "y" for sticky + * + * If no flags are set, the value is the empty string. + */ + readonly flags: string; - /** - * Returns a Boolean value indicating the state of the sticky flag (y) used with a regular - * expression. Default is false. Read-only. - */ - readonly sticky: boolean; + /** + * Returns a Boolean value indicating the state of the sticky flag (y) used with a regular + * expression. Default is false. Read-only. + */ + readonly sticky: boolean; - /** - * Returns a Boolean value indicating the state of the Unicode flag (u) used with a regular - * expression. Default is false. Read-only. - */ - readonly unicode: boolean; + /** + * Returns a Boolean value indicating the state of the Unicode flag (u) used with a regular + * expression. Default is false. Read-only. + */ + readonly unicode: boolean; } interface RegExpConstructor { - new (pattern: RegExp | string, flags?: string): RegExp; + new (pattern: RegExp | string, flags?: string): RegExp; - (pattern: RegExp | string, flags?: string): RegExp; + (pattern: RegExp | string, flags?: string): RegExp; } interface String { - /** - * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point - * value of the UTF-16 encoded code point starting at the string element at position pos in - * the String resulting from converting this object to a String. - * If there is no element at that position, the result is undefined. - * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos. - */ - codePointAt(pos: number): number | undefined; + /** + * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point + * value of the UTF-16 encoded code point starting at the string element at position pos in + * the String resulting from converting this object to a String. + * If there is no element at that position, the result is undefined. + * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos. + */ + codePointAt(pos: number): number | undefined; - /** - * Returns true if searchString appears as a substring of the result of converting this - * object to a String, at one or more positions that are - * greater than or equal to position; otherwise, returns false. - * @param searchString search string - * @param position If position is undefined, 0 is assumed, so as to search all of the String. - */ - includes(searchString: string, position?: number): boolean; + /** + * Returns true if searchString appears as a substring of the result of converting this + * object to a String, at one or more positions that are + * greater than or equal to position; otherwise, returns false. + * @param searchString search string + * @param position If position is undefined, 0 is assumed, so as to search all of the String. + */ + includes(searchString: string, position?: number): boolean; - /** - * Returns true if the sequence of elements of searchString converted to a String is the - * same as the corresponding elements of this object (converted to a String) starting at - * endPosition – length(this). Otherwise returns false. - */ - endsWith(searchString: string, endPosition?: number): boolean; + /** + * Returns true if the sequence of elements of searchString converted to a String is the + * same as the corresponding elements of this object (converted to a String) starting at + * endPosition – length(this). Otherwise returns false. + */ + endsWith(searchString: string, endPosition?: number): boolean; - /** - * Returns the String value result of normalizing the string into the normalization form - * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms. - * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default - * is "NFC" - */ - normalize(form: "NFC" | "NFD" | "NFKC" | "NFKD"): string; + /** + * Returns the String value result of normalizing the string into the normalization form + * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms. + * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default + * is "NFC" + */ + normalize(form: "NFC" | "NFD" | "NFKC" | "NFKD"): string; - /** - * Returns the String value result of normalizing the string into the normalization form - * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms. - * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default - * is "NFC" - */ - normalize(form?: string): string; + /** + * Returns the String value result of normalizing the string into the normalization form + * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms. + * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default + * is "NFC" + */ + normalize(form?: string): string; - /** - * Returns a String value that is made from count copies appended together. If count is 0, - * the empty string is returned. - * @param count number of copies to append - */ - repeat(count: number): string; + /** + * Returns a String value that is made from count copies appended together. If count is 0, + * the empty string is returned. + * @param count number of copies to append + */ + repeat(count: number): string; - /** - * Returns true if the sequence of elements of searchString converted to a String is the - * same as the corresponding elements of this object (converted to a String) starting at - * position. Otherwise returns false. - */ - startsWith(searchString: string, position?: number): boolean; + /** + * Returns true if the sequence of elements of searchString converted to a String is the + * same as the corresponding elements of this object (converted to a String) starting at + * position. Otherwise returns false. + */ + startsWith(searchString: string, position?: number): boolean; } interface StringConstructor { - /** - * Return the String value whose elements are, in order, the elements in the List elements. - * If length is 0, the empty string is returned. - */ - fromCodePoint(...codePoints: number[]): string; + /** + * Return the String value whose elements are, in order, the elements in the List elements. + * If length is 0, the empty string is returned. + */ + fromCodePoint(...codePoints: number[]): string; - /** - * String.raw is usually used as a tag function of a Tagged Template String. When called as - * such, the first argument will be a well formed template call site object and the rest - * parameter will contain the substitution values. It can also be called directly, for example, - * to interleave strings and values from your own tag function, and in this case the only thing - * it needs from the first argument is the raw property. - * @param template A well-formed template string call site representation. - * @param substitutions A set of substitution values. - */ - raw(template: { raw: readonly string[] | ArrayLike; }, ...substitutions: any[]): string; + /** + * String.raw is usually used as a tag function of a Tagged Template String. When called as + * such, the first argument will be a well formed template call site object and the rest + * parameter will contain the substitution values. It can also be called directly, for example, + * to interleave strings and values from your own tag function, and in this case the only thing + * it needs from the first argument is the raw property. + * @param template A well-formed template string call site representation. + * @param substitutions A set of substitution values. + */ + raw(template: { raw: readonly string[] | ArrayLike; }, ...substitutions: any[]): string; } interface Int8Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Uint8Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Uint8ClampedArray { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Int16Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Uint16Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Int32Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Uint32Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Float32Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } interface Float64Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; } ///////////////////////////// // lib.es2015.generator.d.ts ///////////////////////////// interface Generator extends IteratorObject { - // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. - next(...[value]: [] | [TNext]): IteratorResult; + // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. + next(...[value]: [] | [TNext]): IteratorResult; - return(value: TReturn): IteratorResult; + return(value: TReturn): IteratorResult; - throw(e: any): IteratorResult; + throw(e: any): IteratorResult; - [Symbol.iterator](): Generator; + [Symbol.iterator](): Generator; } interface GeneratorFunction { - /** - * Creates a new Generator object. - * @param args A list of arguments the function accepts. - */ - new (...args: any[]): Generator; + /** + * Creates a new Generator object. + * @param args A list of arguments the function accepts. + */ + new (...args: any[]): Generator; - /** - * Creates a new Generator object. - * @param args A list of arguments the function accepts. - */ - (...args: any[]): Generator; + /** + * Creates a new Generator object. + * @param args A list of arguments the function accepts. + */ + (...args: any[]): Generator; - /** - * The length of the arguments. - */ - readonly length: number; + /** + * The length of the arguments. + */ + readonly length: number; - /** - * Returns the name of the function. - */ - readonly name: string; + /** + * Returns the name of the function. + */ + readonly name: string; - /** - * A reference to the prototype. - */ - readonly prototype: Generator; + /** + * A reference to the prototype. + */ + readonly prototype: Generator; } ///////////////////////////// // lib.es2015.iterable.d.ts ///////////////////////////// interface SymbolConstructor { - /** - * A method that returns the default iterator for an object. Called by the semantics of the - * for-of statement. - */ - readonly iterator: unique symbol; + /** + * A method that returns the default iterator for an object. Called by the semantics of the + * for-of statement. + */ + readonly iterator: unique symbol; } interface IteratorYieldResult { - done?: false; + done?: false; - value: TYield; + value: TYield; } interface IteratorReturnResult { - done: true; + done: true; - value: TReturn; + value: TReturn; } type IteratorResult = IteratorYieldResult | IteratorReturnResult; interface Iterator { - // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. - next(...[value]: [] | [TNext]): IteratorResult; + // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. + next(...[value]: [] | [TNext]): IteratorResult; - return?(value?: TReturn): IteratorResult; + return?(value?: TReturn): IteratorResult; - throw?(e?: any): IteratorResult; + throw?(e?: any): IteratorResult; } interface Iterable { - [Symbol.iterator](): Iterator; + [Symbol.iterator](): Iterator; } /** * Describes a user-defined {@link Iterator} that is also iterable. */ interface IterableIterator extends Iterator { - [Symbol.iterator](): IterableIterator; + [Symbol.iterator](): IterableIterator; } /** * Describes an {@link Iterator} produced by the runtime that inherits from the intrinsic `Iterator.prototype`. */ interface IteratorObject extends Iterator { - [Symbol.iterator](): IteratorObject; + [Symbol.iterator](): IteratorObject; } /** @@ -798,589 +798,589 @@ interface IteratorObject extends Iterator type BuiltinIteratorReturn = intrinsic; interface ArrayIterator extends IteratorObject { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; } interface Array { - /** Iterator */ - [Symbol.iterator](): ArrayIterator; + /** Iterator */ + [Symbol.iterator](): ArrayIterator; - /** - * Returns an iterable of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, T]>; + /** + * Returns an iterable of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, T]>; - /** - * Returns an iterable of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an iterable of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an iterable of values in the array - */ - values(): ArrayIterator; + /** + * Returns an iterable of values in the array + */ + values(): ArrayIterator; } interface ArrayConstructor { - /** - * Creates an array from an iterable object. - * @param iterable An iterable object to convert to an array. - */ - from(iterable: Iterable | ArrayLike): T[]; + /** + * Creates an array from an iterable object. + * @param iterable An iterable object to convert to an array. + */ + from(iterable: Iterable | ArrayLike): T[]; - /** - * Creates an array from an iterable object. - * @param iterable An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; + /** + * Creates an array from an iterable object. + * @param iterable An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } interface ReadonlyArray { - /** Iterator of values in the array. */ - [Symbol.iterator](): ArrayIterator; + /** Iterator of values in the array. */ + [Symbol.iterator](): ArrayIterator; - /** - * Returns an iterable of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, T]>; + /** + * Returns an iterable of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, T]>; - /** - * Returns an iterable of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an iterable of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an iterable of values in the array - */ - values(): ArrayIterator; + /** + * Returns an iterable of values in the array + */ + values(): ArrayIterator; } interface IArguments { - /** Iterator */ - [Symbol.iterator](): ArrayIterator; + /** Iterator */ + [Symbol.iterator](): ArrayIterator; } interface MapIterator extends IteratorObject { - [Symbol.iterator](): MapIterator; + [Symbol.iterator](): MapIterator; } interface Map { - /** Returns an iterable of entries in the map. */ - [Symbol.iterator](): MapIterator<[K, V]>; + /** Returns an iterable of entries in the map. */ + [Symbol.iterator](): MapIterator<[K, V]>; - /** - * Returns an iterable of key, value pairs for every entry in the map. - */ - entries(): MapIterator<[K, V]>; + /** + * Returns an iterable of key, value pairs for every entry in the map. + */ + entries(): MapIterator<[K, V]>; - /** - * Returns an iterable of keys in the map - */ - keys(): MapIterator; + /** + * Returns an iterable of keys in the map + */ + keys(): MapIterator; - /** - * Returns an iterable of values in the map - */ - values(): MapIterator; + /** + * Returns an iterable of values in the map + */ + values(): MapIterator; } interface ReadonlyMap { - /** Returns an iterable of entries in the map. */ - [Symbol.iterator](): MapIterator<[K, V]>; + /** Returns an iterable of entries in the map. */ + [Symbol.iterator](): MapIterator<[K, V]>; - /** - * Returns an iterable of key, value pairs for every entry in the map. - */ - entries(): MapIterator<[K, V]>; + /** + * Returns an iterable of key, value pairs for every entry in the map. + */ + entries(): MapIterator<[K, V]>; - /** - * Returns an iterable of keys in the map - */ - keys(): MapIterator; + /** + * Returns an iterable of keys in the map + */ + keys(): MapIterator; - /** - * Returns an iterable of values in the map - */ - values(): MapIterator; + /** + * Returns an iterable of values in the map + */ + values(): MapIterator; } interface MapConstructor { - new (): Map; + new (): Map; - new (iterable?: Iterable | null): Map; + new (iterable?: Iterable | null): Map; } interface WeakMap { } interface WeakMapConstructor { - new (iterable?: Iterable | null): WeakMap; + new (iterable?: Iterable | null): WeakMap; } interface SetIterator extends IteratorObject { - [Symbol.iterator](): SetIterator; + [Symbol.iterator](): SetIterator; } interface Set { - /** Iterates over values in the set. */ - [Symbol.iterator](): SetIterator; + /** Iterates over values in the set. */ + [Symbol.iterator](): SetIterator; - /** - * Returns an iterable of [v,v] pairs for every value `v` in the set. - */ - entries(): SetIterator<[T, T]>; + /** + * Returns an iterable of [v,v] pairs for every value `v` in the set. + */ + entries(): SetIterator<[T, T]>; - /** - * Despite its name, returns an iterable of the values in the set. - */ - keys(): SetIterator; + /** + * Despite its name, returns an iterable of the values in the set. + */ + keys(): SetIterator; - /** - * Returns an iterable of values in the set. - */ - values(): SetIterator; + /** + * Returns an iterable of values in the set. + */ + values(): SetIterator; } interface ReadonlySet { - /** Iterates over values in the set. */ - [Symbol.iterator](): SetIterator; + /** Iterates over values in the set. */ + [Symbol.iterator](): SetIterator; - /** - * Returns an iterable of [v,v] pairs for every value `v` in the set. - */ - entries(): SetIterator<[T, T]>; + /** + * Returns an iterable of [v,v] pairs for every value `v` in the set. + */ + entries(): SetIterator<[T, T]>; - /** - * Despite its name, returns an iterable of the values in the set. - */ - keys(): SetIterator; + /** + * Despite its name, returns an iterable of the values in the set. + */ + keys(): SetIterator; - /** - * Returns an iterable of values in the set. - */ - values(): SetIterator; + /** + * Returns an iterable of values in the set. + */ + values(): SetIterator; } interface SetConstructor { - new (iterable?: Iterable | null): Set; + new (iterable?: Iterable | null): Set; } interface WeakSet { } interface WeakSetConstructor { - new (iterable: Iterable): WeakSet; + new (iterable: Iterable): WeakSet; } interface PromiseConstructor { - /** - * Creates a Promise that is resolved with an array of results when all of the provided Promises - * resolve, or rejected when any Promise is rejected. - * @param values An iterable of Promises. - * @returns A new Promise. - */ - all(values: Iterable>): Promise[]>; + /** + * Creates a Promise that is resolved with an array of results when all of the provided Promises + * resolve, or rejected when any Promise is rejected. + * @param values An iterable of Promises. + * @returns A new Promise. + */ + all(values: Iterable>): Promise[]>; - /** - * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved - * or rejected. - * @param values An iterable of Promises. - * @returns A new Promise. - */ - race(values: Iterable>): Promise>; + /** + * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved + * or rejected. + * @param values An iterable of Promises. + * @returns A new Promise. + */ + race(values: Iterable>): Promise>; } interface StringIterator extends IteratorObject { - [Symbol.iterator](): StringIterator; + [Symbol.iterator](): StringIterator; } interface String { - /** Iterator */ - [Symbol.iterator](): StringIterator; + /** Iterator */ + [Symbol.iterator](): StringIterator; } interface Int8Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Int8ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Int8Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Int8Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int8Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int8Array; } interface Uint8Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Uint8ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Uint8Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Uint8Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8Array; } interface Uint8ClampedArray { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Uint8ClampedArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Uint8ClampedArray; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Uint8ClampedArray; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } interface Int16Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Int16ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Int16Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Int16Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int16Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int16Array; } interface Uint16Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Uint16ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Uint16Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Uint16Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint16Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint16Array; } interface Int32Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Int32ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Int32Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Int32Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int32Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int32Array; } interface Uint32Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Uint32ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Uint32Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Uint32Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint32Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint32Array; } interface Float32Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Float32ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Float32Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Float32Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Float32Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Float32Array; } interface Float64Array { - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; } interface Float64ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Float64Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Float64Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Float64Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Float64Array; } ///////////////////////////// // lib.es2015.promise.d.ts ///////////////////////////// interface PromiseConstructor { - /** - * A reference to the prototype. - */ - readonly prototype: Promise; + /** + * A reference to the prototype. + */ + readonly prototype: Promise; - /** - * Creates a new Promise. - * @param executor A callback used to initialize the promise. This callback is passed two arguments: - * a resolve callback used to resolve the promise with a value or the result of another promise, - * and a reject callback used to reject the promise with a provided reason or error. - */ - new (executor: (resolve: (value: T | PromiseLike) => void, reject: (reason?: any) => void) => void): Promise; + /** + * Creates a new Promise. + * @param executor A callback used to initialize the promise. This callback is passed two arguments: + * a resolve callback used to resolve the promise with a value or the result of another promise, + * and a reject callback used to reject the promise with a provided reason or error. + */ + new (executor: (resolve: (value: T | PromiseLike) => void, reject: (reason?: any) => void) => void): Promise; - /** - * Creates a Promise that is resolved with an array of results when all of the provided Promises - * resolve, or rejected when any Promise is rejected. - * @param values An array of Promises. - * @returns A new Promise. - */ - all(values: T): Promise<{ -readonly [P in keyof T]: Awaited; }>; + /** + * Creates a Promise that is resolved with an array of results when all of the provided Promises + * resolve, or rejected when any Promise is rejected. + * @param values An array of Promises. + * @returns A new Promise. + */ + all(values: T): Promise<{ -readonly [P in keyof T]: Awaited; }>; - // see: lib.es2015.iterable.d.ts - // all(values: Iterable>): Promise[]>; + // see: lib.es2015.iterable.d.ts + // all(values: Iterable>): Promise[]>; - /** - * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved - * or rejected. - * @param values An array of Promises. - * @returns A new Promise. - */ - race(values: T): Promise>; + /** + * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved + * or rejected. + * @param values An array of Promises. + * @returns A new Promise. + */ + race(values: T): Promise>; - // see: lib.es2015.iterable.d.ts - // race(values: Iterable>): Promise>; + // see: lib.es2015.iterable.d.ts + // race(values: Iterable>): Promise>; - /** - * Creates a new rejected promise for the provided reason. - * @param reason The reason the promise was rejected. - * @returns A new rejected Promise. - */ - reject(reason?: any): Promise; + /** + * Creates a new rejected promise for the provided reason. + * @param reason The reason the promise was rejected. + * @returns A new rejected Promise. + */ + reject(reason?: any): Promise; - /** - * Creates a new resolved promise. - * @returns A resolved promise. - */ - resolve(): Promise; + /** + * Creates a new resolved promise. + * @returns A resolved promise. + */ + resolve(): Promise; - /** - * Creates a new resolved promise for the provided value. - * @param value A promise. - * @returns A promise whose internal state matches the provided promise. - */ - resolve(value: T): Promise>; + /** + * Creates a new resolved promise for the provided value. + * @param value A promise. + * @returns A promise whose internal state matches the provided promise. + */ + resolve(value: T): Promise>; - /** - * Creates a new resolved promise for the provided value. - * @param value A promise. - * @returns A promise whose internal state matches the provided promise. - */ - resolve(value: T | PromiseLike): Promise>; + /** + * Creates a new resolved promise for the provided value. + * @param value A promise. + * @returns A promise whose internal state matches the provided promise. + */ + resolve(value: T | PromiseLike): Promise>; } declare var Promise: PromiseConstructor; @@ -1389,113 +1389,113 @@ declare var Promise: PromiseConstructor; // lib.es2015.proxy.d.ts ///////////////////////////// interface ProxyHandler { - /** - * A trap method for a function call. - * @param target The original callable object which is being proxied. - */ - apply?(target: T, thisArg: any, argArray: any[]): any; + /** + * A trap method for a function call. + * @param target The original callable object which is being proxied. + */ + apply?(target: T, thisArg: any, argArray: any[]): any; - /** - * A trap for the `new` operator. - * @param target The original object which is being proxied. - * @param newTarget The constructor that was originally called. - */ - construct?(target: T, argArray: any[], newTarget: Function): object; + /** + * A trap for the `new` operator. + * @param target The original object which is being proxied. + * @param newTarget The constructor that was originally called. + */ + construct?(target: T, argArray: any[], newTarget: Function): object; - /** - * A trap for `Object.defineProperty()`. - * @param target The original object which is being proxied. - * @returns A `Boolean` indicating whether or not the property has been defined. - */ - defineProperty?(target: T, property: string | symbol, attributes: PropertyDescriptor): boolean; + /** + * A trap for `Object.defineProperty()`. + * @param target The original object which is being proxied. + * @returns A `Boolean` indicating whether or not the property has been defined. + */ + defineProperty?(target: T, property: string | symbol, attributes: PropertyDescriptor): boolean; - /** - * A trap for the `delete` operator. - * @param target The original object which is being proxied. - * @param p The name or `Symbol` of the property to delete. - * @returns A `Boolean` indicating whether or not the property was deleted. - */ - deleteProperty?(target: T, p: string | symbol): boolean; + /** + * A trap for the `delete` operator. + * @param target The original object which is being proxied. + * @param p The name or `Symbol` of the property to delete. + * @returns A `Boolean` indicating whether or not the property was deleted. + */ + deleteProperty?(target: T, p: string | symbol): boolean; - /** - * A trap for getting a property value. - * @param target The original object which is being proxied. - * @param p The name or `Symbol` of the property to get. - * @param receiver The proxy or an object that inherits from the proxy. - */ - get?(target: T, p: string | symbol, receiver: any): any; + /** + * A trap for getting a property value. + * @param target The original object which is being proxied. + * @param p The name or `Symbol` of the property to get. + * @param receiver The proxy or an object that inherits from the proxy. + */ + get?(target: T, p: string | symbol, receiver: any): any; - /** - * A trap for `Object.getOwnPropertyDescriptor()`. - * @param target The original object which is being proxied. - * @param p The name of the property whose description should be retrieved. - */ - getOwnPropertyDescriptor?(target: T, p: string | symbol): PropertyDescriptor | undefined; + /** + * A trap for `Object.getOwnPropertyDescriptor()`. + * @param target The original object which is being proxied. + * @param p The name of the property whose description should be retrieved. + */ + getOwnPropertyDescriptor?(target: T, p: string | symbol): PropertyDescriptor | undefined; - /** - * A trap for the `[[GetPrototypeOf]]` internal method. - * @param target The original object which is being proxied. - */ - getPrototypeOf?(target: T): object | null; + /** + * A trap for the `[[GetPrototypeOf]]` internal method. + * @param target The original object which is being proxied. + */ + getPrototypeOf?(target: T): object | null; - /** - * A trap for the `in` operator. - * @param target The original object which is being proxied. - * @param p The name or `Symbol` of the property to check for existence. - */ - has?(target: T, p: string | symbol): boolean; + /** + * A trap for the `in` operator. + * @param target The original object which is being proxied. + * @param p The name or `Symbol` of the property to check for existence. + */ + has?(target: T, p: string | symbol): boolean; - /** - * A trap for `Object.isExtensible()`. - * @param target The original object which is being proxied. - */ - isExtensible?(target: T): boolean; + /** + * A trap for `Object.isExtensible()`. + * @param target The original object which is being proxied. + */ + isExtensible?(target: T): boolean; - /** - * A trap for `Reflect.ownKeys()`. - * @param target The original object which is being proxied. - */ - ownKeys?(target: T): ArrayLike; + /** + * A trap for `Reflect.ownKeys()`. + * @param target The original object which is being proxied. + */ + ownKeys?(target: T): ArrayLike; - /** - * A trap for `Object.preventExtensions()`. - * @param target The original object which is being proxied. - */ - preventExtensions?(target: T): boolean; + /** + * A trap for `Object.preventExtensions()`. + * @param target The original object which is being proxied. + */ + preventExtensions?(target: T): boolean; - /** - * A trap for setting a property value. - * @param target The original object which is being proxied. - * @param p The name or `Symbol` of the property to set. - * @param receiver The object to which the assignment was originally directed. - * @returns A `Boolean` indicating whether or not the property was set. - */ - set?(target: T, p: string | symbol, newValue: any, receiver: any): boolean; + /** + * A trap for setting a property value. + * @param target The original object which is being proxied. + * @param p The name or `Symbol` of the property to set. + * @param receiver The object to which the assignment was originally directed. + * @returns A `Boolean` indicating whether or not the property was set. + */ + set?(target: T, p: string | symbol, newValue: any, receiver: any): boolean; - /** - * A trap for `Object.setPrototypeOf()`. - * @param target The original object which is being proxied. - * @param newPrototype The object's new prototype or `null`. - */ - setPrototypeOf?(target: T, v: object | null): boolean; + /** + * A trap for `Object.setPrototypeOf()`. + * @param target The original object which is being proxied. + * @param newPrototype The object's new prototype or `null`. + */ + setPrototypeOf?(target: T, v: object | null): boolean; } interface ProxyConstructor { - /** - * Creates a revocable Proxy object. - * @param target A target object to wrap with Proxy. - * @param handler An object whose properties define the behavior of Proxy when an operation is attempted on it. - */ - revocable(target: T, handler: ProxyHandler): { proxy: T; revoke: () => void; }; + /** + * Creates a revocable Proxy object. + * @param target A target object to wrap with Proxy. + * @param handler An object whose properties define the behavior of Proxy when an operation is attempted on it. + */ + revocable(target: T, handler: ProxyHandler): { proxy: T; revoke: () => void; }; - /** - * Creates a Proxy object. The Proxy object allows you to create an object that can be used in place of the - * original object, but which may redefine fundamental Object operations like getting, setting, and defining - * properties. Proxy objects are commonly used to log property accesses, validate, format, or sanitize inputs. - * @param target A target object to wrap with Proxy. - * @param handler An object whose properties define the behavior of Proxy when an operation is attempted on it. - */ - new (target: T, handler: ProxyHandler): T; + /** + * Creates a Proxy object. The Proxy object allows you to create an object that can be used in place of the + * original object, but which may redefine fundamental Object operations like getting, setting, and defining + * properties. Proxy objects are commonly used to log property accesses, validate, format, or sanitize inputs. + * @param target A target object to wrap with Proxy. + * @param handler An object whose properties define the behavior of Proxy when an operation is attempted on it. + */ + new (target: T, handler: ProxyHandler): T; } declare var Proxy: ProxyConstructor; @@ -1504,163 +1504,163 @@ declare var Proxy: ProxyConstructor; // lib.es2015.reflect.d.ts ///////////////////////////// declare namespace Reflect { - /** - * Calls the function with the specified object as the this value - * and the elements of specified array as the arguments. - * @param target The function to call. - * @param thisArgument The object to be used as the this object. - * @param argumentsList An array of argument values to be passed to the function. - */ - function apply( - target: (this: T, ...args: A) => R, - thisArgument: T, - argumentsList: Readonly, - ): R; - - function apply(target: Function, thisArgument: any, argumentsList: ArrayLike): any; - - /** - * Constructs the target with the elements of specified array as the arguments - * and the specified constructor as the `new.target` value. - * @param target The constructor to invoke. - * @param argumentsList An array of argument values to be passed to the constructor. - * @param newTarget The constructor to be used as the `new.target` object. - */ - function construct( - target: new (...args: A) => R, - argumentsList: Readonly, - newTarget?: new (...args: any) => any, - ): R; - - function construct(target: Function, argumentsList: ArrayLike, newTarget?: Function): any; +/** + * Calls the function with the specified object as the this value + * and the elements of specified array as the arguments. + * @param target The function to call. + * @param thisArgument The object to be used as the this object. + * @param argumentsList An array of argument values to be passed to the function. + */ + function apply( + target: (this: T, ...args: A) => R, + thisArgument: T, + argumentsList: Readonly, + ): R; + +function apply(target: Function, thisArgument: any, argumentsList: ArrayLike): any; - /** - * Adds a property to an object, or modifies attributes of an existing property. - * @param target Object on which to add or modify the property. This can be a native JavaScript object - * (that is, a user-defined object or a built in object) or a DOM object. - * @param propertyKey The property name. - * @param attributes Descriptor for the property. It can be for a data property or an accessor property. - */ - function defineProperty(target: object, propertyKey: PropertyKey, attributes: PropertyDescriptor & ThisType): boolean; +/** + * Constructs the target with the elements of specified array as the arguments + * and the specified constructor as the `new.target` value. + * @param target The constructor to invoke. + * @param argumentsList An array of argument values to be passed to the constructor. + * @param newTarget The constructor to be used as the `new.target` object. + */ + function construct( + target: new (...args: A) => R, + argumentsList: Readonly, + newTarget?: new (...args: any) => any, + ): R; + +function construct(target: Function, argumentsList: ArrayLike, newTarget?: Function): any; - /** - * Removes a property from an object, equivalent to `delete target[propertyKey]`, - * except it won't throw if `target[propertyKey]` is non-configurable. - * @param target Object from which to remove the own property. - * @param propertyKey The property name. - */ - function deleteProperty(target: object, propertyKey: PropertyKey): boolean; +/** + * Adds a property to an object, or modifies attributes of an existing property. + * @param target Object on which to add or modify the property. This can be a native JavaScript object + * (that is, a user-defined object or a built in object) or a DOM object. + * @param propertyKey The property name. + * @param attributes Descriptor for the property. It can be for a data property or an accessor property. + */ + function defineProperty(target: object, propertyKey: PropertyKey, attributes: PropertyDescriptor & ThisType): boolean; - /** - * Gets the property of target, equivalent to `target[propertyKey]` when `receiver === target`. - * @param target Object that contains the property on itself or in its prototype chain. - * @param propertyKey The property name. - * @param receiver The reference to use as the `this` value in the getter function, - * if `target[propertyKey]` is an accessor property. - */ - function get( - target: T, - propertyKey: P, - receiver?: unknown, - ): P extends keyof T ? T[P] : any; +/** + * Removes a property from an object, equivalent to `delete target[propertyKey]`, + * except it won't throw if `target[propertyKey]` is non-configurable. + * @param target Object from which to remove the own property. + * @param propertyKey The property name. + */ + function deleteProperty(target: object, propertyKey: PropertyKey): boolean; - /** - * Gets the own property descriptor of the specified object. - * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype. - * @param target Object that contains the property. - * @param propertyKey The property name. - */ - function getOwnPropertyDescriptor( - target: T, - propertyKey: P, - ): TypedPropertyDescriptor

| undefined; +/** + * Gets the property of target, equivalent to `target[propertyKey]` when `receiver === target`. + * @param target Object that contains the property on itself or in its prototype chain. + * @param propertyKey The property name. + * @param receiver The reference to use as the `this` value in the getter function, + * if `target[propertyKey]` is an accessor property. + */ + function get( + target: T, + propertyKey: P, + receiver?: unknown, + ): P extends keyof T ? T[P] : any; - /** - * Returns the prototype of an object. - * @param target The object that references the prototype. - */ - function getPrototypeOf(target: object): object | null; +/** + * Gets the own property descriptor of the specified object. + * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype. + * @param target Object that contains the property. + * @param propertyKey The property name. + */ + function getOwnPropertyDescriptor( + target: T, + propertyKey: P, + ): TypedPropertyDescriptor

| undefined; - /** - * Equivalent to `propertyKey in target`. - * @param target Object that contains the property on itself or in its prototype chain. - * @param propertyKey Name of the property. - */ - function has(target: object, propertyKey: PropertyKey): boolean; +/** + * Returns the prototype of an object. + * @param target The object that references the prototype. + */ + function getPrototypeOf(target: object): object | null; - /** - * Returns a value that indicates whether new properties can be added to an object. - * @param target Object to test. - */ - function isExtensible(target: object): boolean; +/** + * Equivalent to `propertyKey in target`. + * @param target Object that contains the property on itself or in its prototype chain. + * @param propertyKey Name of the property. + */ + function has(target: object, propertyKey: PropertyKey): boolean; - /** - * Returns the string and symbol keys of the own properties of an object. The own properties of an object - * are those that are defined directly on that object, and are not inherited from the object's prototype. - * @param target Object that contains the own properties. - */ - function ownKeys(target: object): (string | symbol)[]; +/** + * Returns a value that indicates whether new properties can be added to an object. + * @param target Object to test. + */ + function isExtensible(target: object): boolean; - /** - * Prevents the addition of new properties to an object. - * @param target Object to make non-extensible. - * @return Whether the object has been made non-extensible. - */ - function preventExtensions(target: object): boolean; +/** + * Returns the string and symbol keys of the own properties of an object. The own properties of an object + * are those that are defined directly on that object, and are not inherited from the object's prototype. + * @param target Object that contains the own properties. + */ + function ownKeys(target: object): (string | symbol)[]; - /** - * Sets the property of target, equivalent to `target[propertyKey] = value` when `receiver === target`. - * @param target Object that contains the property on itself or in its prototype chain. - * @param propertyKey Name of the property. - * @param receiver The reference to use as the `this` value in the setter function, - * if `target[propertyKey]` is an accessor property. - */ - function set( - target: T, - propertyKey: P, - value: P extends keyof T ? T[P] : any, - receiver?: any, - ): boolean; +/** + * Prevents the addition of new properties to an object. + * @param target Object to make non-extensible. + * @return Whether the object has been made non-extensible. + */ + function preventExtensions(target: object): boolean; - function set(target: object, propertyKey: PropertyKey, value: any, receiver?: any): boolean; +/** + * Sets the property of target, equivalent to `target[propertyKey] = value` when `receiver === target`. + * @param target Object that contains the property on itself or in its prototype chain. + * @param propertyKey Name of the property. + * @param receiver The reference to use as the `this` value in the setter function, + * if `target[propertyKey]` is an accessor property. + */ + function set( + target: T, + propertyKey: P, + value: P extends keyof T ? T[P] : any, + receiver?: any, + ): boolean; + +function set(target: object, propertyKey: PropertyKey, value: any, receiver?: any): boolean; - /** - * Sets the prototype of a specified object o to object proto or null. - * @param target The object to change its prototype. - * @param proto The value of the new prototype or null. - * @return Whether setting the prototype was successful. - */ - function setPrototypeOf(target: object, proto: object | null): boolean; +/** + * Sets the prototype of a specified object o to object proto or null. + * @param target The object to change its prototype. + * @param proto The value of the new prototype or null. + * @return Whether setting the prototype was successful. + */ + function setPrototypeOf(target: object, proto: object | null): boolean; } ///////////////////////////// // lib.es2015.symbol.d.ts ///////////////////////////// interface SymbolConstructor { - /** - * A reference to the prototype. - */ - readonly prototype: Symbol; + /** + * A reference to the prototype. + */ + readonly prototype: Symbol; - /** - * Returns a new unique Symbol value. - * @param description Description of the new Symbol object. - */ - (description?: string | number): symbol; + /** + * Returns a new unique Symbol value. + * @param description Description of the new Symbol object. + */ + (description?: string | number): symbol; - /** - * Returns a Symbol object from the global symbol registry matching the given key if found. - * Otherwise, returns a new symbol with this key. - * @param key key to search for. - */ - for(key: string): symbol; + /** + * Returns a Symbol object from the global symbol registry matching the given key if found. + * Otherwise, returns a new symbol with this key. + * @param key key to search for. + */ + for(key: string): symbol; - /** - * Returns a key from the global symbol registry matching the given Symbol if found. - * Otherwise, returns undefined. - * @param sym Symbol to find the key for. - */ - keyFor(sym: symbol): string | undefined; + /** + * Returns a key from the global symbol registry matching the given Symbol if found. + * Otherwise, returns undefined. + * @param sym Symbol to find the key for. + */ + keyFor(sym: symbol): string | undefined; } declare var Symbol: SymbolConstructor; @@ -1669,590 +1669,590 @@ declare var Symbol: SymbolConstructor; // lib.es2015.symbol.wellknown.d.ts ///////////////////////////// interface SymbolConstructor { - /** - * A method that determines if a constructor object recognizes an object as one of the - * constructor’s instances. Called by the semantics of the instanceof operator. - */ - readonly hasInstance: unique symbol; + /** + * A method that determines if a constructor object recognizes an object as one of the + * constructor’s instances. Called by the semantics of the instanceof operator. + */ + readonly hasInstance: unique symbol; - /** - * A Boolean value that if true indicates that an object should flatten to its array elements - * by Array.prototype.concat. - */ - readonly isConcatSpreadable: unique symbol; + /** + * A Boolean value that if true indicates that an object should flatten to its array elements + * by Array.prototype.concat. + */ + readonly isConcatSpreadable: unique symbol; - /** - * A regular expression method that matches the regular expression against a string. Called - * by the String.prototype.match method. - */ - readonly match: unique symbol; + /** + * A regular expression method that matches the regular expression against a string. Called + * by the String.prototype.match method. + */ + readonly match: unique symbol; - /** - * A regular expression method that replaces matched substrings of a string. Called by the - * String.prototype.replace method. - */ - readonly replace: unique symbol; + /** + * A regular expression method that replaces matched substrings of a string. Called by the + * String.prototype.replace method. + */ + readonly replace: unique symbol; - /** - * A regular expression method that returns the index within a string that matches the - * regular expression. Called by the String.prototype.search method. - */ - readonly search: unique symbol; + /** + * A regular expression method that returns the index within a string that matches the + * regular expression. Called by the String.prototype.search method. + */ + readonly search: unique symbol; - /** - * A function valued property that is the constructor function that is used to create - * derived objects. - */ - readonly species: unique symbol; + /** + * A function valued property that is the constructor function that is used to create + * derived objects. + */ + readonly species: unique symbol; - /** - * A regular expression method that splits a string at the indices that match the regular - * expression. Called by the String.prototype.split method. - */ - readonly split: unique symbol; + /** + * A regular expression method that splits a string at the indices that match the regular + * expression. Called by the String.prototype.split method. + */ + readonly split: unique symbol; - /** - * A method that converts an object to a corresponding primitive value. - * Called by the ToPrimitive abstract operation. - */ - readonly toPrimitive: unique symbol; + /** + * A method that converts an object to a corresponding primitive value. + * Called by the ToPrimitive abstract operation. + */ + readonly toPrimitive: unique symbol; - /** - * A String value that is used in the creation of the default string description of an object. - * Called by the built-in method Object.prototype.toString. - */ - readonly toStringTag: unique symbol; + /** + * A String value that is used in the creation of the default string description of an object. + * Called by the built-in method Object.prototype.toString. + */ + readonly toStringTag: unique symbol; - /** - * An Object whose truthy properties are properties that are excluded from the 'with' - * environment bindings of the associated objects. - */ - readonly unscopables: unique symbol; + /** + * An Object whose truthy properties are properties that are excluded from the 'with' + * environment bindings of the associated objects. + */ + readonly unscopables: unique symbol; } interface Symbol { - /** - * Converts a Symbol object to a symbol. - */ - [Symbol.toPrimitive](hint: string): symbol; + /** + * Converts a Symbol object to a symbol. + */ + [Symbol.toPrimitive](hint: string): symbol; } interface Array { - /** - * Is an object whose properties have the value 'true' - * when they will be absent when used in a 'with' statement. - */ - readonly [Symbol.unscopables]: { - [K in keyof any[]]?: boolean; - }; + /** + * Is an object whose properties have the value 'true' + * when they will be absent when used in a 'with' statement. + */ + readonly [Symbol.unscopables]: { + [K in keyof any[]]?: boolean; + }; } interface ReadonlyArray { - /** - * Is an object whose properties have the value 'true' - * when they will be absent when used in a 'with' statement. - */ - readonly [Symbol.unscopables]: { - [K in keyof readonly any[]]?: boolean; - }; + /** + * Is an object whose properties have the value 'true' + * when they will be absent when used in a 'with' statement. + */ + readonly [Symbol.unscopables]: { + [K in keyof readonly any[]]?: boolean; + }; } interface Date { - /** - * Converts a Date object to a string. - */ - [Symbol.toPrimitive](hint: "default"): string; + /** + * Converts a Date object to a string. + */ + [Symbol.toPrimitive](hint: "default"): string; - /** - * Converts a Date object to a string. - */ - [Symbol.toPrimitive](hint: "string"): string; + /** + * Converts a Date object to a string. + */ + [Symbol.toPrimitive](hint: "string"): string; - /** - * Converts a Date object to a number. - */ - [Symbol.toPrimitive](hint: "number"): number; + /** + * Converts a Date object to a number. + */ + [Symbol.toPrimitive](hint: "number"): number; - /** - * Converts a Date object to a string or number. - * - * @param hint The strings "number", "string", or "default" to specify what primitive to return. - * - * @throws {TypeError} If 'hint' was given something other than "number", "string", or "default". - * @returns A number if 'hint' was "number", a string if 'hint' was "string" or "default". - */ - [Symbol.toPrimitive](hint: string): string | number; + /** + * Converts a Date object to a string or number. + * + * @param hint The strings "number", "string", or "default" to specify what primitive to return. + * + * @throws {TypeError} If 'hint' was given something other than "number", "string", or "default". + * @returns A number if 'hint' was "number", a string if 'hint' was "string" or "default". + */ + [Symbol.toPrimitive](hint: string): string | number; } interface Map { - readonly [Symbol.toStringTag]: string; + readonly [Symbol.toStringTag]: string; } interface WeakMap { - readonly [Symbol.toStringTag]: string; + readonly [Symbol.toStringTag]: string; } interface Set { - readonly [Symbol.toStringTag]: string; + readonly [Symbol.toStringTag]: string; } interface WeakSet { - readonly [Symbol.toStringTag]: string; + readonly [Symbol.toStringTag]: string; } interface Function { - /** - * Determines whether the given value inherits from this function if this function was used - * as a constructor function. - * - * A constructor function can control which objects are recognized as its instances by - * 'instanceof' by overriding this method. - */ - [Symbol.hasInstance](value: any): boolean; + /** + * Determines whether the given value inherits from this function if this function was used + * as a constructor function. + * + * A constructor function can control which objects are recognized as its instances by + * 'instanceof' by overriding this method. + */ + [Symbol.hasInstance](value: any): boolean; } interface GeneratorFunction { - readonly [Symbol.toStringTag]: string; + readonly [Symbol.toStringTag]: string; } interface PromiseConstructor { - readonly [Symbol.species]: PromiseConstructor; + readonly [Symbol.species]: PromiseConstructor; } interface RegExp { - /** - * Matches a string with this regular expression, and returns an array containing the results of - * that search. - * @param string A string to search within. - */ - [Symbol.match](string: string): RegExpMatchArray | null; + /** + * Matches a string with this regular expression, and returns an array containing the results of + * that search. + * @param string A string to search within. + */ + [Symbol.match](string: string): RegExpMatchArray | null; - /** - * Replaces text in a string, using this regular expression. - * @param string A String object or string literal whose contents matching against - * this regular expression will be replaced - * @param replaceValue A String object or string literal containing the text to replace for every - * successful match of this regular expression. - */ - [Symbol.replace](string: string, replaceValue: string): string; + /** + * Replaces text in a string, using this regular expression. + * @param string A String object or string literal whose contents matching against + * this regular expression will be replaced + * @param replaceValue A String object or string literal containing the text to replace for every + * successful match of this regular expression. + */ + [Symbol.replace](string: string, replaceValue: string): string; - /** - * Replaces text in a string, using this regular expression. - * @param string A String object or string literal whose contents matching against - * this regular expression will be replaced - * @param replacer A function that returns the replacement text. - */ - [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; + /** + * Replaces text in a string, using this regular expression. + * @param string A String object or string literal whose contents matching against + * this regular expression will be replaced + * @param replacer A function that returns the replacement text. + */ + [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; - /** - * Finds the position beginning first substring match in a regular expression search - * using this regular expression. - * - * @param string The string to search within. - */ - [Symbol.search](string: string): number; + /** + * Finds the position beginning first substring match in a regular expression search + * using this regular expression. + * + * @param string The string to search within. + */ + [Symbol.search](string: string): number; - /** - * Returns an array of substrings that were delimited by strings in the original input that - * match against this regular expression. - * - * If the regular expression contains capturing parentheses, then each time this - * regular expression matches, the results (including any undefined results) of the - * capturing parentheses are spliced. - * - * @param string string value to split - * @param limit if not undefined, the output array is truncated so that it contains no more - * than 'limit' elements. - */ - [Symbol.split](string: string, limit?: number): string[]; + /** + * Returns an array of substrings that were delimited by strings in the original input that + * match against this regular expression. + * + * If the regular expression contains capturing parentheses, then each time this + * regular expression matches, the results (including any undefined results) of the + * capturing parentheses are spliced. + * + * @param string string value to split + * @param limit if not undefined, the output array is truncated so that it contains no more + * than 'limit' elements. + */ + [Symbol.split](string: string, limit?: number): string[]; } interface RegExpConstructor { - readonly [Symbol.species]: RegExpConstructor; + readonly [Symbol.species]: RegExpConstructor; } interface String { - /** - * Matches a string or an object that supports being matched against, and returns an array - * containing the results of that search, or null if no matches are found. - * @param matcher An object that supports being matched against. - */ - match(matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null; + /** + * Matches a string or an object that supports being matched against, and returns an array + * containing the results of that search, or null if no matches are found. + * @param matcher An object that supports being matched against. + */ + match(matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null; - /** - * Passes a string and {@linkcode replaceValue} to the `[Symbol.replace]` method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. - * @param searchValue An object that supports searching for and replacing matches within a string. - * @param replaceValue The replacement text. - */ - replace(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string; + /** + * Passes a string and {@linkcode replaceValue} to the `[Symbol.replace]` method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. + * @param searchValue An object that supports searching for and replacing matches within a string. + * @param replaceValue The replacement text. + */ + replace(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string; - /** - * Replaces text in a string, using an object that supports replacement within a string. - * @param searchValue A object can search for and replace matches within a string. - * @param replacer A function that returns the replacement text. - */ - replace(searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string; + /** + * Replaces text in a string, using an object that supports replacement within a string. + * @param searchValue A object can search for and replace matches within a string. + * @param replacer A function that returns the replacement text. + */ + replace(searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string; - /** - * Finds the first substring match in a regular expression search. - * @param searcher An object which supports searching within a string. - */ - search(searcher: { [Symbol.search](string: string): number; }): number; + /** + * Finds the first substring match in a regular expression search. + * @param searcher An object which supports searching within a string. + */ + search(searcher: { [Symbol.search](string: string): number; }): number; - /** - * Split a string into substrings using the specified separator and return them as an array. - * @param splitter An object that can split a string. - * @param limit A value used to limit the number of elements returned in the array. - */ - split(splitter: { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number): string[]; + /** + * Split a string into substrings using the specified separator and return them as an array. + * @param splitter An object that can split a string. + * @param limit A value used to limit the number of elements returned in the array. + */ + split(splitter: { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number): string[]; } interface ArrayConstructor { - readonly [Symbol.species]: ArrayConstructor; + readonly [Symbol.species]: ArrayConstructor; } interface MapConstructor { - readonly [Symbol.species]: MapConstructor; + readonly [Symbol.species]: MapConstructor; } interface SetConstructor { - readonly [Symbol.species]: SetConstructor; + readonly [Symbol.species]: SetConstructor; } interface ArrayBufferConstructor { - readonly [Symbol.species]: ArrayBufferConstructor; + readonly [Symbol.species]: ArrayBufferConstructor; } ///////////////////////////// // lib.es2016.array.include.d.ts ///////////////////////////// interface Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: T, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: T, fromIndex?: number): boolean; } interface ReadonlyArray { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: T, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: T, fromIndex?: number): boolean; } interface Int8Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Uint8Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Uint8ClampedArray { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Int16Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Uint16Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Int32Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Uint32Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Float32Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } interface Float64Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; } ///////////////////////////// // lib.es2016.intl.d.ts ///////////////////////////// declare namespace Intl { - /** - * The `Intl.getCanonicalLocales()` method returns an array containing - * the canonical locale names. Duplicates will be omitted and elements - * will be validated as structurally valid language tags. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/getCanonicalLocales) - * - * @param locale A list of String values for which to get the canonical locale names - * @returns An array containing the canonical and validated locale names. - */ - function getCanonicalLocales(locale?: string | readonly string[]): string[]; +/** + * The `Intl.getCanonicalLocales()` method returns an array containing + * the canonical locale names. Duplicates will be omitted and elements + * will be validated as structurally valid language tags. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/getCanonicalLocales) + * + * @param locale A list of String values for which to get the canonical locale names + * @returns An array containing the canonical and validated locale names. + */ + function getCanonicalLocales(locale?: string | readonly string[]): string[]; } ///////////////////////////// // lib.es2017.date.d.ts ///////////////////////////// interface DateConstructor { - /** - * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. - * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. - * @param monthIndex The month as a number between 0 and 11 (January to December). - * @param date The date as a number between 1 and 31. - * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. - * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. - * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. - * @param ms A number from 0 to 999 that specifies the milliseconds. - */ - UTC(year: number, monthIndex?: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; + /** + * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. + * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. + * @param monthIndex The month as a number between 0 and 11 (January to December). + * @param date The date as a number between 1 and 31. + * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. + * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. + * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. + * @param ms A number from 0 to 999 that specifies the milliseconds. + */ + UTC(year: number, monthIndex?: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; } ///////////////////////////// // lib.es2017.intl.d.ts ///////////////////////////// declare namespace Intl { - interface DateTimeFormatPartTypesRegistry { - day: any; +interface DateTimeFormatPartTypesRegistry { + day: any; - dayPeriod: any; + dayPeriod: any; - era: any; + era: any; - hour: any; + hour: any; - literal: any; + literal: any; - minute: any; + minute: any; - month: any; + month: any; - second: any; + second: any; - timeZoneName: any; + timeZoneName: any; - weekday: any; + weekday: any; - year: any; - } + year: any; +} - type DateTimeFormatPartTypes = keyof DateTimeFormatPartTypesRegistry; +type DateTimeFormatPartTypes = keyof DateTimeFormatPartTypesRegistry; - interface DateTimeFormatPart { - type: DateTimeFormatPartTypes; +interface DateTimeFormatPart { + type: DateTimeFormatPartTypes; - value: string; - } + value: string; +} - interface DateTimeFormat { - formatToParts(date?: Date | number): DateTimeFormatPart[]; - } +interface DateTimeFormat { + formatToParts(date?: Date | number): DateTimeFormatPart[]; +} } ///////////////////////////// // lib.es2017.object.d.ts ///////////////////////////// interface ObjectConstructor { - /** - * Returns an array of values of the enumerable own properties of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - values(o: { [s: string]: T; } | ArrayLike): T[]; + /** + * Returns an array of values of the enumerable own properties of an object + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + values(o: { [s: string]: T; } | ArrayLike): T[]; - /** - * Returns an array of values of the enumerable own properties of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - values(o: {}): any[]; + /** + * Returns an array of values of the enumerable own properties of an object + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + values(o: {}): any[]; - /** - * Returns an array of key/values of the enumerable own properties of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - entries(o: { [s: string]: T; } | ArrayLike): [string, T][]; + /** + * Returns an array of key/values of the enumerable own properties of an object + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + entries(o: { [s: string]: T; } | ArrayLike): [string, T][]; - /** - * Returns an array of key/values of the enumerable own properties of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - entries(o: {}): [string, any][]; + /** + * Returns an array of key/values of the enumerable own properties of an object + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + entries(o: {}): [string, any][]; - /** - * Returns an object containing all own property descriptors of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - getOwnPropertyDescriptors(o: T): { [P in keyof T]: TypedPropertyDescriptor; } & { [x: string]: PropertyDescriptor; }; + /** + * Returns an object containing all own property descriptors of an object + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + getOwnPropertyDescriptors(o: T): { [P in keyof T]: TypedPropertyDescriptor; } & { [x: string]: PropertyDescriptor; }; } ///////////////////////////// // lib.es2017.sharedmemory.d.ts ///////////////////////////// interface SharedArrayBuffer { - /** - * Read-only. The length of the ArrayBuffer (in bytes). - */ - readonly byteLength: number; + /** + * Read-only. The length of the ArrayBuffer (in bytes). + */ + readonly byteLength: number; - /** - * Returns a section of an SharedArrayBuffer. - */ - slice(begin?: number, end?: number): SharedArrayBuffer; + /** + * Returns a section of an SharedArrayBuffer. + */ + slice(begin?: number, end?: number): SharedArrayBuffer; - readonly [Symbol.toStringTag]: "SharedArrayBuffer"; + readonly [Symbol.toStringTag]: "SharedArrayBuffer"; } interface SharedArrayBufferConstructor { - readonly prototype: SharedArrayBuffer; + readonly prototype: SharedArrayBuffer; - new (byteLength?: number): SharedArrayBuffer; + new (byteLength?: number): SharedArrayBuffer; - readonly [Symbol.species]: SharedArrayBufferConstructor; + readonly [Symbol.species]: SharedArrayBufferConstructor; } declare var SharedArrayBuffer: SharedArrayBufferConstructor; interface ArrayBufferTypes { - SharedArrayBuffer: SharedArrayBuffer; + SharedArrayBuffer: SharedArrayBuffer; } interface Atomics { - /** - * Adds a value to the value at the given position in the array, returning the original value. - * Until this atomic operation completes, any other read or write operation against the array - * will block. - */ - add(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + /** + * Adds a value to the value at the given position in the array, returning the original value. + * Until this atomic operation completes, any other read or write operation against the array + * will block. + */ + add(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - /** - * Stores the bitwise AND of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or - * write operation against the array will block. - */ - and(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + /** + * Stores the bitwise AND of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or + * write operation against the array will block. + */ + and(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - /** - * Replaces the value at the given position in the array if the original value equals the given - * expected value, returning the original value. Until this atomic operation completes, any - * other read or write operation against the array will block. - */ - compareExchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, expectedValue: number, replacementValue: number): number; + /** + * Replaces the value at the given position in the array if the original value equals the given + * expected value, returning the original value. Until this atomic operation completes, any + * other read or write operation against the array will block. + */ + compareExchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, expectedValue: number, replacementValue: number): number; - /** - * Replaces the value at the given position in the array, returning the original value. Until - * this atomic operation completes, any other read or write operation against the array will - * block. - */ - exchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + /** + * Replaces the value at the given position in the array, returning the original value. Until + * this atomic operation completes, any other read or write operation against the array will + * block. + */ + exchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - /** - * Returns a value indicating whether high-performance algorithms can use atomic operations - * (`true`) or must use locks (`false`) for the given number of bytes-per-element of a typed - * array. - */ - isLockFree(size: number): boolean; + /** + * Returns a value indicating whether high-performance algorithms can use atomic operations + * (`true`) or must use locks (`false`) for the given number of bytes-per-element of a typed + * array. + */ + isLockFree(size: number): boolean; - /** - * Returns the value at the given position in the array. Until this atomic operation completes, - * any other read or write operation against the array will block. - */ - load(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number): number; + /** + * Returns the value at the given position in the array. Until this atomic operation completes, + * any other read or write operation against the array will block. + */ + load(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number): number; - /** - * Stores the bitwise OR of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or write - * operation against the array will block. - */ - or(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + /** + * Stores the bitwise OR of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or write + * operation against the array will block. + */ + or(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - /** - * Stores a value at the given position in the array, returning the new value. Until this - * atomic operation completes, any other read or write operation against the array will block. - */ - store(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + /** + * Stores a value at the given position in the array, returning the new value. Until this + * atomic operation completes, any other read or write operation against the array will block. + */ + store(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - /** - * Subtracts a value from the value at the given position in the array, returning the original - * value. Until this atomic operation completes, any other read or write operation against the - * array will block. - */ - sub(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + /** + * Subtracts a value from the value at the given position in the array, returning the original + * value. Until this atomic operation completes, any other read or write operation against the + * array will block. + */ + sub(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - /** - * If the value at the given position in the array is equal to the provided value, the current - * agent is put to sleep causing execution to suspend until the timeout expires (returning - * `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns - * `"not-equal"`. - */ - wait(typedArray: Int32Array, index: number, value: number, timeout?: number): "ok" | "not-equal" | "timed-out"; + /** + * If the value at the given position in the array is equal to the provided value, the current + * agent is put to sleep causing execution to suspend until the timeout expires (returning + * `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns + * `"not-equal"`. + */ + wait(typedArray: Int32Array, index: number, value: number, timeout?: number): "ok" | "not-equal" | "timed-out"; - /** - * Wakes up sleeping agents that are waiting on the given index of the array, returning the - * number of agents that were awoken. - * @param typedArray A shared Int32Array. - * @param index The position in the typedArray to wake up on. - * @param count The number of sleeping agents to notify. Defaults to +Infinity. - */ - notify(typedArray: Int32Array, index: number, count?: number): number; + /** + * Wakes up sleeping agents that are waiting on the given index of the array, returning the + * number of agents that were awoken. + * @param typedArray A shared Int32Array. + * @param index The position in the typedArray to wake up on. + * @param count The number of sleeping agents to notify. Defaults to +Infinity. + */ + notify(typedArray: Int32Array, index: number, count?: number): number; - /** - * Stores the bitwise XOR of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or write - * operation against the array will block. - */ - xor(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + /** + * Stores the bitwise XOR of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or write + * operation against the array will block. + */ + xor(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - readonly [Symbol.toStringTag]: "Atomics"; + readonly [Symbol.toStringTag]: "Atomics"; } declare var Atomics: Atomics; @@ -2261,249 +2261,249 @@ declare var Atomics: Atomics; // lib.es2017.string.d.ts ///////////////////////////// interface String { - /** - * Pads the current string with a given string (repeated and/or truncated, if needed) so that the resulting string has a given length. - * The padding is applied from the start of the current string. - * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart) - * - * @param targetLength The length of the resulting string once the current `str` has been padded. - * If the value is less than or equal to `str.length`, then `str` is returned as-is. - * - * @param padString The string to pad the current `str` with. - * If `padString` is too long to stay within `targetLength`, it will be truncated from the end. - * The default value is the space character (U+0020). - */ - padStart(targetLength: number, padString?: string): string; + /** + * Pads the current string with a given string (repeated and/or truncated, if needed) so that the resulting string has a given length. + * The padding is applied from the start of the current string. + * + * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart) + * + * @param targetLength The length of the resulting string once the current `str` has been padded. + * If the value is less than or equal to `str.length`, then `str` is returned as-is. + * + * @param padString The string to pad the current `str` with. + * If `padString` is too long to stay within `targetLength`, it will be truncated from the end. + * The default value is the space character (U+0020). + */ + padStart(targetLength: number, padString?: string): string; - /** - * Pads the current string with a given string (repeated and/or truncated, if needed) so that the resulting string has a given length. - * The padding is applied from the end of the current string. - * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padEnd) - * - * @param targetLength The length of the resulting string once the current `str` has been padded. - * If the value is less than or equal to `str.length`, then `str` is returned as-is. - * - * @param padString The string to pad the current `str` with. - * If `padString` is too long to stay within `targetLength`, it will be truncated from the end. - * The default value is the space character (U+0020). - */ - padEnd(targetLength: number, padString?: string): string; + /** + * Pads the current string with a given string (repeated and/or truncated, if needed) so that the resulting string has a given length. + * The padding is applied from the end of the current string. + * + * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padEnd) + * + * @param targetLength The length of the resulting string once the current `str` has been padded. + * If the value is less than or equal to `str.length`, then `str` is returned as-is. + * + * @param padString The string to pad the current `str` with. + * If `padString` is too long to stay within `targetLength`, it will be truncated from the end. + * The default value is the space character (U+0020). + */ + padEnd(targetLength: number, padString?: string): string; } ///////////////////////////// // lib.es2017.typedarrays.d.ts ///////////////////////////// interface Int8ArrayConstructor { - new (): Int8Array; + new (): Int8Array; } interface Uint8ArrayConstructor { - new (): Uint8Array; + new (): Uint8Array; } interface Uint8ClampedArrayConstructor { - new (): Uint8ClampedArray; + new (): Uint8ClampedArray; } interface Int16ArrayConstructor { - new (): Int16Array; + new (): Int16Array; } interface Uint16ArrayConstructor { - new (): Uint16Array; + new (): Uint16Array; } interface Int32ArrayConstructor { - new (): Int32Array; + new (): Int32Array; } interface Uint32ArrayConstructor { - new (): Uint32Array; + new (): Uint32Array; } interface Float32ArrayConstructor { - new (): Float32Array; + new (): Float32Array; } interface Float64ArrayConstructor { - new (): Float64Array; + new (): Float64Array; } ///////////////////////////// // lib.es2018.asyncgenerator.d.ts ///////////////////////////// interface AsyncGenerator extends AsyncIteratorObject { - // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. - next(...[value]: [] | [TNext]): Promise>; + // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. + next(...[value]: [] | [TNext]): Promise>; - return(value: TReturn | PromiseLike): Promise>; + return(value: TReturn | PromiseLike): Promise>; - throw(e: any): Promise>; + throw(e: any): Promise>; - [Symbol.asyncIterator](): AsyncGenerator; + [Symbol.asyncIterator](): AsyncGenerator; } interface AsyncGeneratorFunction { - /** - * Creates a new AsyncGenerator object. - * @param args A list of arguments the function accepts. - */ - new (...args: any[]): AsyncGenerator; + /** + * Creates a new AsyncGenerator object. + * @param args A list of arguments the function accepts. + */ + new (...args: any[]): AsyncGenerator; - /** - * Creates a new AsyncGenerator object. - * @param args A list of arguments the function accepts. - */ - (...args: any[]): AsyncGenerator; + /** + * Creates a new AsyncGenerator object. + * @param args A list of arguments the function accepts. + */ + (...args: any[]): AsyncGenerator; - /** - * The length of the arguments. - */ - readonly length: number; + /** + * The length of the arguments. + */ + readonly length: number; - /** - * Returns the name of the function. - */ - readonly name: string; + /** + * Returns the name of the function. + */ + readonly name: string; - /** - * A reference to the prototype. - */ - readonly prototype: AsyncGenerator; + /** + * A reference to the prototype. + */ + readonly prototype: AsyncGenerator; } ///////////////////////////// // lib.es2018.asynciterable.d.ts ///////////////////////////// interface SymbolConstructor { - /** - * A method that returns the default async iterator for an object. Called by the semantics of - * the for-await-of statement. - */ - readonly asyncIterator: unique symbol; + /** + * A method that returns the default async iterator for an object. Called by the semantics of + * the for-await-of statement. + */ + readonly asyncIterator: unique symbol; } interface AsyncIterator { - // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. - next(...[value]: [] | [TNext]): Promise>; + // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. + next(...[value]: [] | [TNext]): Promise>; - return?(value?: TReturn | PromiseLike): Promise>; + return?(value?: TReturn | PromiseLike): Promise>; - throw?(e?: any): Promise>; + throw?(e?: any): Promise>; } interface AsyncIterable { - [Symbol.asyncIterator](): AsyncIterator; + [Symbol.asyncIterator](): AsyncIterator; } /** * Describes a user-defined {@link AsyncIterator} that is also async iterable. */ interface AsyncIterableIterator extends AsyncIterator { - [Symbol.asyncIterator](): AsyncIterableIterator; + [Symbol.asyncIterator](): AsyncIterableIterator; } /** * Describes an {@link AsyncIterator} produced by the runtime that inherits from the intrinsic `AsyncIterator.prototype`. */ interface AsyncIteratorObject extends AsyncIterator { - [Symbol.asyncIterator](): AsyncIteratorObject; + [Symbol.asyncIterator](): AsyncIteratorObject; } ///////////////////////////// // lib.es2018.intl.d.ts ///////////////////////////// declare namespace Intl { - // http://cldr.unicode.org/index/cldr-spec/plural-rules#TOC-Determining-Plural-Categories - type LDMLPluralRule = "zero" | "one" | "two" | "few" | "many" | "other"; +// http://cldr.unicode.org/index/cldr-spec/plural-rules#TOC-Determining-Plural-Categories + type LDMLPluralRule = "zero" | "one" | "two" | "few" | "many" | "other"; - type PluralRuleType = "cardinal" | "ordinal"; +type PluralRuleType = "cardinal" | "ordinal"; - interface PluralRulesOptions { - localeMatcher?: "lookup" | "best fit" | undefined; +interface PluralRulesOptions { + localeMatcher?: "lookup" | "best fit" | undefined; - type?: PluralRuleType | undefined; + type?: PluralRuleType | undefined; - minimumIntegerDigits?: number | undefined; + minimumIntegerDigits?: number | undefined; - minimumFractionDigits?: number | undefined; + minimumFractionDigits?: number | undefined; - maximumFractionDigits?: number | undefined; + maximumFractionDigits?: number | undefined; - minimumSignificantDigits?: number | undefined; + minimumSignificantDigits?: number | undefined; - maximumSignificantDigits?: number | undefined; - } + maximumSignificantDigits?: number | undefined; +} - interface ResolvedPluralRulesOptions { - locale: string; +interface ResolvedPluralRulesOptions { + locale: string; - pluralCategories: LDMLPluralRule[]; + pluralCategories: LDMLPluralRule[]; - type: PluralRuleType; + type: PluralRuleType; - minimumIntegerDigits: number; + minimumIntegerDigits: number; - minimumFractionDigits: number; + minimumFractionDigits: number; - maximumFractionDigits: number; + maximumFractionDigits: number; - minimumSignificantDigits?: number; + minimumSignificantDigits?: number; - maximumSignificantDigits?: number; - } + maximumSignificantDigits?: number; +} - interface PluralRules { - resolvedOptions(): ResolvedPluralRulesOptions; +interface PluralRules { + resolvedOptions(): ResolvedPluralRulesOptions; - select(n: number): LDMLPluralRule; - } + select(n: number): LDMLPluralRule; +} - interface PluralRulesConstructor { - new (locales?: string | readonly string[], options?: PluralRulesOptions): PluralRules; +interface PluralRulesConstructor { + new (locales?: string | readonly string[], options?: PluralRulesOptions): PluralRules; - (locales?: string | readonly string[], options?: PluralRulesOptions): PluralRules; + (locales?: string | readonly string[], options?: PluralRulesOptions): PluralRules; - supportedLocalesOf(locales: string | readonly string[], options?: { localeMatcher?: "lookup" | "best fit"; }): string[]; - } + supportedLocalesOf(locales: string | readonly string[], options?: { localeMatcher?: "lookup" | "best fit"; }): string[]; +} - const PluralRules: PluralRulesConstructor; +const PluralRules: PluralRulesConstructor; - interface NumberFormatPartTypeRegistry { - literal: never; +interface NumberFormatPartTypeRegistry { + literal: never; - nan: never; + nan: never; - infinity: never; + infinity: never; - percent: never; + percent: never; - integer: never; + integer: never; - group: never; + group: never; - decimal: never; + decimal: never; - fraction: never; + fraction: never; - plusSign: never; + plusSign: never; - minusSign: never; + minusSign: never; - percentSign: never; + percentSign: never; - currency: never; - } + currency: never; +} - type NumberFormatPartTypes = keyof NumberFormatPartTypeRegistry; +type NumberFormatPartTypes = keyof NumberFormatPartTypeRegistry; - interface NumberFormatPart { - type: NumberFormatPartTypes; +interface NumberFormatPart { + type: NumberFormatPartTypes; - value: string; - } + value: string; +} } ///////////////////////////// @@ -2513,24 +2513,24 @@ declare namespace Intl { * Represents the completion of an asynchronous operation */ interface Promise { - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): Promise; + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): Promise; } ///////////////////////////// // lib.es2018.regexp.d.ts ///////////////////////////// interface RegExp { - /** - * Returns a Boolean value indicating the state of the dotAll flag (s) used with a regular expression. - * Default is false. Read-only. - */ - readonly dotAll: boolean; + /** + * Returns a Boolean value indicating the state of the dotAll flag (s) used with a regular expression. + * Default is false. Read-only. + */ + readonly dotAll: boolean; } ///////////////////////////// @@ -2543,226 +2543,226 @@ type FlatArray = { }[Depth extends -1 ? "done" : "recur"]; interface ReadonlyArray { - /** - * Calls a defined callback function on each element of an array. Then, flattens the result into - * a new array. - * This is identical to a map followed by flat with depth 1. - * - * @param callback A function that accepts up to three arguments. The flatMap method calls the - * callback function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callback function. If - * thisArg is omitted, undefined is used as the this value. - */ - flatMap( - callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray, - thisArg?: This, - ): U[]; + /** + * Calls a defined callback function on each element of an array. Then, flattens the result into + * a new array. + * This is identical to a map followed by flat with depth 1. + * + * @param callback A function that accepts up to three arguments. The flatMap method calls the + * callback function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callback function. If + * thisArg is omitted, undefined is used as the this value. + */ + flatMap( + callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray, + thisArg?: This, + ): U[]; - /** - * Returns a new array with all sub-array elements concatenated into it recursively up to the - * specified depth. - * - * @param depth The maximum recursion depth - */ - flat( - this: A, - depth?: D, - ): FlatArray[]; + /** + * Returns a new array with all sub-array elements concatenated into it recursively up to the + * specified depth. + * + * @param depth The maximum recursion depth + */ + flat( + this: A, + depth?: D, + ): FlatArray[]; } interface Array { - /** - * Calls a defined callback function on each element of an array. Then, flattens the result into - * a new array. - * This is identical to a map followed by flat with depth 1. - * - * @param callback A function that accepts up to three arguments. The flatMap method calls the - * callback function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callback function. If - * thisArg is omitted, undefined is used as the this value. - */ - flatMap( - callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray, - thisArg?: This, - ): U[]; + /** + * Calls a defined callback function on each element of an array. Then, flattens the result into + * a new array. + * This is identical to a map followed by flat with depth 1. + * + * @param callback A function that accepts up to three arguments. The flatMap method calls the + * callback function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callback function. If + * thisArg is omitted, undefined is used as the this value. + */ + flatMap( + callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray, + thisArg?: This, + ): U[]; - /** - * Returns a new array with all sub-array elements concatenated into it recursively up to the - * specified depth. - * - * @param depth The maximum recursion depth - */ - flat( - this: A, - depth?: D, - ): FlatArray[]; + /** + * Returns a new array with all sub-array elements concatenated into it recursively up to the + * specified depth. + * + * @param depth The maximum recursion depth + */ + flat( + this: A, + depth?: D, + ): FlatArray[]; } ///////////////////////////// // lib.es2019.object.d.ts ///////////////////////////// interface ObjectConstructor { - /** - * Returns an object created by key-value entries for properties and methods - * @param entries An iterable object that contains key-value entries for properties and methods. - */ - fromEntries(entries: Iterable): { [k: string]: T; }; + /** + * Returns an object created by key-value entries for properties and methods + * @param entries An iterable object that contains key-value entries for properties and methods. + */ + fromEntries(entries: Iterable): { [k: string]: T; }; - /** - * Returns an object created by key-value entries for properties and methods - * @param entries An iterable object that contains key-value entries for properties and methods. - */ - fromEntries(entries: Iterable): any; + /** + * Returns an object created by key-value entries for properties and methods + * @param entries An iterable object that contains key-value entries for properties and methods. + */ + fromEntries(entries: Iterable): any; } ///////////////////////////// // lib.es2019.string.d.ts ///////////////////////////// interface String { - /** Removes the trailing white space and line terminator characters from a string. */ - trimEnd(): string; + /** Removes the trailing white space and line terminator characters from a string. */ + trimEnd(): string; - /** Removes the leading white space and line terminator characters from a string. */ - trimStart(): string; + /** Removes the leading white space and line terminator characters from a string. */ + trimStart(): string; } ///////////////////////////// // lib.es2019.symbol.d.ts ///////////////////////////// interface Symbol { - /** - * Expose the [[Description]] internal slot of a symbol directly. - */ - readonly description: string | undefined; + /** + * Expose the [[Description]] internal slot of a symbol directly. + */ + readonly description: string | undefined; } ///////////////////////////// // lib.es2020.bigint.d.ts ///////////////////////////// interface BigIntToLocaleStringOptions { - /** - * The locale matching algorithm to use.The default is "best fit". For information about this option, see the {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation Intl page}. - */ - localeMatcher?: string; + /** + * The locale matching algorithm to use.The default is "best fit". For information about this option, see the {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation Intl page}. + */ + localeMatcher?: string; - /** - * The formatting style to use , the default is "decimal". - */ - style?: string; + /** + * The formatting style to use , the default is "decimal". + */ + style?: string; - numberingSystem?: string; + numberingSystem?: string; - /** - * The unit to use in unit formatting, Possible values are core unit identifiers, defined in UTS #35, Part 2, Section 6. A subset of units from the full list was selected for use in ECMAScript. Pairs of simple units can be concatenated with "-per-" to make a compound unit. There is no default value; if the style is "unit", the unit property must be provided. - */ - unit?: string; + /** + * The unit to use in unit formatting, Possible values are core unit identifiers, defined in UTS #35, Part 2, Section 6. A subset of units from the full list was selected for use in ECMAScript. Pairs of simple units can be concatenated with "-per-" to make a compound unit. There is no default value; if the style is "unit", the unit property must be provided. + */ + unit?: string; - /** - * The unit formatting style to use in unit formatting, the defaults is "short". - */ - unitDisplay?: string; + /** + * The unit formatting style to use in unit formatting, the defaults is "short". + */ + unitDisplay?: string; - /** - * The currency to use in currency formatting. Possible values are the ISO 4217 currency codes, such as "USD" for the US dollar, "EUR" for the euro, or "CNY" for the Chinese RMB — see the Current currency & funds code list. There is no default value; if the style is "currency", the currency property must be provided. It is only used when [[Style]] has the value "currency". - */ - currency?: string; + /** + * The currency to use in currency formatting. Possible values are the ISO 4217 currency codes, such as "USD" for the US dollar, "EUR" for the euro, or "CNY" for the Chinese RMB — see the Current currency & funds code list. There is no default value; if the style is "currency", the currency property must be provided. It is only used when [[Style]] has the value "currency". + */ + currency?: string; - /** - * How to display the currency in currency formatting. It is only used when [[Style]] has the value "currency". The default is "symbol". - * - * "symbol" to use a localized currency symbol such as €, - * - * "code" to use the ISO currency code, - * - * "name" to use a localized currency name such as "dollar" - */ - currencyDisplay?: string; + /** + * How to display the currency in currency formatting. It is only used when [[Style]] has the value "currency". The default is "symbol". + * + * "symbol" to use a localized currency symbol such as €, + * + * "code" to use the ISO currency code, + * + * "name" to use a localized currency name such as "dollar" + */ + currencyDisplay?: string; - /** - * Whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators. The default is true. - */ - useGrouping?: boolean; + /** + * Whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators. The default is true. + */ + useGrouping?: boolean; - /** - * The minimum number of integer digits to use. Possible values are from 1 to 21; the default is 1. - */ - minimumIntegerDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; + /** + * The minimum number of integer digits to use. Possible values are from 1 to 21; the default is 1. + */ + minimumIntegerDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; - /** - * The minimum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number and percent formatting is 0; the default for currency formatting is the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html ISO 4217 currency codes list} (2 if the list doesn't provide that information). - */ - minimumFractionDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20; + /** + * The minimum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number and percent formatting is 0; the default for currency formatting is the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html ISO 4217 currency codes list} (2 if the list doesn't provide that information). + */ + minimumFractionDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20; - /** - * The maximum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number formatting is the larger of minimumFractionDigits and 3; the default for currency formatting is the larger of minimumFractionDigits and the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html ISO 4217 currency codes list} (2 if the list doesn't provide that information); the default for percent formatting is the larger of minimumFractionDigits and 0. - */ - maximumFractionDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20; + /** + * The maximum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number formatting is the larger of minimumFractionDigits and 3; the default for currency formatting is the larger of minimumFractionDigits and the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html ISO 4217 currency codes list} (2 if the list doesn't provide that information); the default for percent formatting is the larger of minimumFractionDigits and 0. + */ + maximumFractionDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20; - /** - * The minimum number of significant digits to use. Possible values are from 1 to 21; the default is 1. - */ - minimumSignificantDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; + /** + * The minimum number of significant digits to use. Possible values are from 1 to 21; the default is 1. + */ + minimumSignificantDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; - /** - * The maximum number of significant digits to use. Possible values are from 1 to 21; the default is 21. - */ - maximumSignificantDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; + /** + * The maximum number of significant digits to use. Possible values are from 1 to 21; the default is 21. + */ + maximumSignificantDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; - /** - * The formatting that should be displayed for the number, the defaults is "standard" - * - * "standard" plain number formatting - * - * "scientific" return the order-of-magnitude for formatted number. - * - * "engineering" return the exponent of ten when divisible by three - * - * "compact" string representing exponent, defaults is using the "short" form - */ - notation?: string; + /** + * The formatting that should be displayed for the number, the defaults is "standard" + * + * "standard" plain number formatting + * + * "scientific" return the order-of-magnitude for formatted number. + * + * "engineering" return the exponent of ten when divisible by three + * + * "compact" string representing exponent, defaults is using the "short" form + */ + notation?: string; - /** - * used only when notation is "compact" - */ - compactDisplay?: string; + /** + * used only when notation is "compact" + */ + compactDisplay?: string; } interface BigInt { - /** - * Returns a string representation of an object. - * @param radix Specifies a radix for converting numeric values to strings. - */ - toString(radix?: number): string; + /** + * Returns a string representation of an object. + * @param radix Specifies a radix for converting numeric values to strings. + */ + toString(radix?: number): string; - /** Returns a string representation appropriate to the host environment's current locale. */ - toLocaleString(locales?: Intl.LocalesArgument, options?: BigIntToLocaleStringOptions): string; + /** Returns a string representation appropriate to the host environment's current locale. */ + toLocaleString(locales?: Intl.LocalesArgument, options?: BigIntToLocaleStringOptions): string; - /** Returns the primitive value of the specified object. */ - valueOf(): bigint; + /** Returns the primitive value of the specified object. */ + valueOf(): bigint; - readonly [Symbol.toStringTag]: "BigInt"; + readonly [Symbol.toStringTag]: "BigInt"; } interface BigIntConstructor { - (value: bigint | boolean | number | string): bigint; + (value: bigint | boolean | number | string): bigint; - readonly prototype: BigInt; + readonly prototype: BigInt; - /** - * Interprets the low bits of a BigInt as a 2's-complement signed integer. - * All higher bits are discarded. - * @param bits The number of low bits to use - * @param int The BigInt whose bits to extract - */ - asIntN(bits: number, int: bigint): bigint; + /** + * Interprets the low bits of a BigInt as a 2's-complement signed integer. + * All higher bits are discarded. + * @param bits The number of low bits to use + * @param int The BigInt whose bits to extract + */ + asIntN(bits: number, int: bigint): bigint; - /** - * Interprets the low bits of a BigInt as an unsigned integer. - * All higher bits are discarded. - * @param bits The number of low bits to use - * @param int The BigInt whose bits to extract - */ - asUintN(bits: number, int: bigint): bigint; + /** + * Interprets the low bits of a BigInt as an unsigned integer. + * All higher bits are discarded. + * @param bits The number of low bits to use + * @param int The BigInt whose bits to extract + */ + asUintN(bits: number, int: bigint): bigint; } declare var BigInt: BigIntConstructor; @@ -2772,295 +2772,295 @@ declare var BigInt: BigIntConstructor; * requested number of bytes could not be allocated, an exception is raised. */ interface BigInt64Array { - /** The size in bytes of each element in the array. */ - readonly BYTES_PER_ELEMENT: number; - - /** The ArrayBuffer instance referenced by the array. */ - readonly buffer: TArrayBuffer; - - /** The length in bytes of the array. */ - readonly byteLength: number; + /** The size in bytes of each element in the array. */ + readonly BYTES_PER_ELEMENT: number; - /** The offset in bytes of the array. */ - readonly byteOffset: number; + /** The ArrayBuffer instance referenced by the array. */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** The length in bytes of the array. */ + readonly byteLength: number; - /** Yields index, value pairs for every entry in the array. */ - entries(): ArrayIterator<[number, bigint]>; + /** The offset in bytes of the array. */ + readonly byteOffset: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns false, - * or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; + + /** Yields index, value pairs for every entry in the array. */ + entries(): ArrayIterator<[number, bigint]>; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: bigint, start?: number, end?: number): this; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns false, + * or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: bigint, index: number, array: BigInt64Array) => any, thisArg?: any): BigInt64Array; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: bigint, start?: number, end?: number): this; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): bigint | undefined; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: bigint, index: number, array: BigInt64Array) => any, thisArg?: any): BigInt64Array; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): number; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): bigint | undefined; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: bigint, index: number, array: BigInt64Array) => void, thisArg?: any): void; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): number; - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: bigint, fromIndex?: number): boolean; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: bigint, index: number, array: BigInt64Array) => void, thisArg?: any): void; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: bigint, fromIndex?: number): number; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: bigint, fromIndex?: number): boolean; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: bigint, fromIndex?: number): number; - /** Yields each index in the array. */ - keys(): ArrayIterator; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: bigint, fromIndex?: number): number; + /** Yields each index in the array. */ + keys(): ArrayIterator; - /** The length of the array. */ - readonly length: number; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: bigint, fromIndex?: number): number; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: bigint, index: number, array: BigInt64Array) => bigint, thisArg?: any): BigInt64Array; + /** The length of the array. */ + readonly length: number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: bigint, index: number, array: BigInt64Array) => bigint, thisArg?: any): BigInt64Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint; - /** Reverses the elements in the array. */ - reverse(): this; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U; + + /** Reverses the elements in the array. */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. - */ - slice(start?: number, end?: number): BigInt64Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. + */ + slice(start?: number, end?: number): BigInt64Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls the - * predicate function for each element in the array until the predicate returns true, or until - * the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls the + * predicate function for each element in the array until the predicate returns true, or until + * the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean; - /** - * Sorts the array. - * @param compareFn The function used to determine the order of the elements. If omitted, the elements are sorted in ascending order. - */ - sort(compareFn?: (a: bigint, b: bigint) => number | bigint): this; + /** + * Sorts the array. + * @param compareFn The function used to determine the order of the elements. If omitted, the elements are sorted in ascending order. + */ + sort(compareFn?: (a: bigint, b: bigint) => number | bigint): this; - /** - * Gets a new BigInt64Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): BigInt64Array; + /** + * Gets a new BigInt64Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): BigInt64Array; - /** Converts the array to a string by using the current locale. */ - toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; + /** Converts the array to a string by using the current locale. */ + toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; - /** Returns a string representation of the array. */ - toString(): string; + /** Returns a string representation of the array. */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): BigInt64Array; + /** Returns the primitive value of the specified object. */ + valueOf(): BigInt64Array; - /** Yields each value in the array. */ - values(): ArrayIterator; + /** Yields each value in the array. */ + values(): ArrayIterator; - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - readonly [Symbol.toStringTag]: "BigInt64Array"; + readonly [Symbol.toStringTag]: "BigInt64Array"; - [index: number]: bigint; + [index: number]: bigint; } interface BigInt64ArrayConstructor { - readonly prototype: BigInt64Array; + readonly prototype: BigInt64Array; - new (length?: number): BigInt64Array; + new (length?: number): BigInt64Array; - new (array: ArrayLike | Iterable): BigInt64Array; + new (array: ArrayLike | Iterable): BigInt64Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): BigInt64Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): BigInt64Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): BigInt64Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): BigInt64Array; - new (array: ArrayLike | ArrayBuffer): BigInt64Array; + new (array: ArrayLike | ArrayBuffer): BigInt64Array; - /** The size in bytes of each element in the array. */ - readonly BYTES_PER_ELEMENT: number; + /** The size in bytes of each element in the array. */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: bigint[]): BigInt64Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: bigint[]): BigInt64Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): BigInt64Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): BigInt64Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigInt64Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigInt64Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): BigInt64Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): BigInt64Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => bigint, thisArg?: any): BigInt64Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => bigint, thisArg?: any): BigInt64Array; } declare var BigInt64Array: BigInt64ArrayConstructor; @@ -3070,1286 +3070,1286 @@ declare var BigInt64Array: BigInt64ArrayConstructor; * requested number of bytes could not be allocated, an exception is raised. */ interface BigUint64Array { - /** The size in bytes of each element in the array. */ - readonly BYTES_PER_ELEMENT: number; + /** The size in bytes of each element in the array. */ + readonly BYTES_PER_ELEMENT: number; - /** The ArrayBuffer instance referenced by the array. */ - readonly buffer: TArrayBuffer; + /** The ArrayBuffer instance referenced by the array. */ + readonly buffer: TArrayBuffer; - /** The length in bytes of the array. */ - readonly byteLength: number; + /** The length in bytes of the array. */ + readonly byteLength: number; - /** The offset in bytes of the array. */ - readonly byteOffset: number; + /** The offset in bytes of the array. */ + readonly byteOffset: number; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; + + /** Yields index, value pairs for every entry in the array. */ + entries(): ArrayIterator<[number, bigint]>; - /** Yields index, value pairs for every entry in the array. */ - entries(): ArrayIterator<[number, bigint]>; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns false, + * or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns false, - * or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: bigint, start?: number, end?: number): this; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: bigint, start?: number, end?: number): this; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: bigint, index: number, array: BigUint64Array) => any, thisArg?: any): BigUint64Array; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: bigint, index: number, array: BigUint64Array) => any, thisArg?: any): BigUint64Array; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): bigint | undefined; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): bigint | undefined; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): number; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): number; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: bigint, index: number, array: BigUint64Array) => void, thisArg?: any): void; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: bigint, index: number, array: BigUint64Array) => void, thisArg?: any): void; + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: bigint, fromIndex?: number): boolean; - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: bigint, fromIndex?: number): boolean; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: bigint, fromIndex?: number): number; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: bigint, fromIndex?: number): number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** Yields each index in the array. */ + keys(): ArrayIterator; - /** Yields each index in the array. */ - keys(): ArrayIterator; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: bigint, fromIndex?: number): number; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: bigint, fromIndex?: number): number; + /** The length of the array. */ + readonly length: number; - /** The length of the array. */ - readonly length: number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: bigint, index: number, array: BigUint64Array) => bigint, thisArg?: any): BigUint64Array; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: bigint, index: number, array: BigUint64Array) => bigint, thisArg?: any): BigUint64Array; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint; - /** Reverses the elements in the array. */ - reverse(): this; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U; + + /** Reverses the elements in the array. */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. - */ - slice(start?: number, end?: number): BigUint64Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. + */ + slice(start?: number, end?: number): BigUint64Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls the - * predicate function for each element in the array until the predicate returns true, or until - * the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls the + * predicate function for each element in the array until the predicate returns true, or until + * the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean; - /** - * Sorts the array. - * @param compareFn The function used to determine the order of the elements. If omitted, the elements are sorted in ascending order. - */ - sort(compareFn?: (a: bigint, b: bigint) => number | bigint): this; + /** + * Sorts the array. + * @param compareFn The function used to determine the order of the elements. If omitted, the elements are sorted in ascending order. + */ + sort(compareFn?: (a: bigint, b: bigint) => number | bigint): this; - /** - * Gets a new BigUint64Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): BigUint64Array; + /** + * Gets a new BigUint64Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): BigUint64Array; - /** Converts the array to a string by using the current locale. */ - toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; + /** Converts the array to a string by using the current locale. */ + toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; - /** Returns a string representation of the array. */ - toString(): string; + /** Returns a string representation of the array. */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): BigUint64Array; + /** Returns the primitive value of the specified object. */ + valueOf(): BigUint64Array; - /** Yields each value in the array. */ - values(): ArrayIterator; + /** Yields each value in the array. */ + values(): ArrayIterator; - [Symbol.iterator](): ArrayIterator; + [Symbol.iterator](): ArrayIterator; - readonly [Symbol.toStringTag]: "BigUint64Array"; + readonly [Symbol.toStringTag]: "BigUint64Array"; - [index: number]: bigint; + [index: number]: bigint; } interface BigUint64ArrayConstructor { - readonly prototype: BigUint64Array; + readonly prototype: BigUint64Array; - new (length?: number): BigUint64Array; + new (length?: number): BigUint64Array; - new (array: ArrayLike | Iterable): BigUint64Array; + new (array: ArrayLike | Iterable): BigUint64Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): BigUint64Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): BigUint64Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): BigUint64Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): BigUint64Array; - new (array: ArrayLike | ArrayBuffer): BigUint64Array; + new (array: ArrayLike | ArrayBuffer): BigUint64Array; - /** The size in bytes of each element in the array. */ - readonly BYTES_PER_ELEMENT: number; + /** The size in bytes of each element in the array. */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: bigint[]): BigUint64Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: bigint[]): BigUint64Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): BigUint64Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): BigUint64Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigUint64Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigUint64Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): BigUint64Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): BigUint64Array; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => bigint, thisArg?: any): BigUint64Array; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => bigint, thisArg?: any): BigUint64Array; } declare var BigUint64Array: BigUint64ArrayConstructor; interface DataView { - /** - * Gets the BigInt64 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getBigInt64(byteOffset: number, littleEndian?: boolean): bigint; + /** + * Gets the BigInt64 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getBigInt64(byteOffset: number, littleEndian?: boolean): bigint; - /** - * Gets the BigUint64 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getBigUint64(byteOffset: number, littleEndian?: boolean): bigint; + /** + * Gets the BigUint64 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getBigUint64(byteOffset: number, littleEndian?: boolean): bigint; - /** - * Stores a BigInt64 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setBigInt64(byteOffset: number, value: bigint, littleEndian?: boolean): void; + /** + * Stores a BigInt64 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setBigInt64(byteOffset: number, value: bigint, littleEndian?: boolean): void; - /** - * Stores a BigUint64 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setBigUint64(byteOffset: number, value: bigint, littleEndian?: boolean): void; + /** + * Stores a BigUint64 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setBigUint64(byteOffset: number, value: bigint, littleEndian?: boolean): void; } ///////////////////////////// // lib.es2020.date.d.ts ///////////////////////////// interface Date { - /** - * Converts a date and time to a string by using the current or specified locale. - * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; + /** + * Converts a date and time to a string by using the current or specified locale. + * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; - /** - * Converts a date to a string by using the current or specified locale. - * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleDateString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; + /** + * Converts a date to a string by using the current or specified locale. + * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleDateString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; - /** - * Converts a time to a string by using the current or specified locale. - * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleTimeString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; + /** + * Converts a time to a string by using the current or specified locale. + * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleTimeString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; } ///////////////////////////// // lib.es2020.intl.d.ts ///////////////////////////// declare namespace Intl { - /** - * A string that is a valid [Unicode BCP 47 Locale Identifier](https://unicode.org/reports/tr35/#Unicode_locale_identifier). +/** + * A string that is a valid [Unicode BCP 47 Locale Identifier](https://unicode.org/reports/tr35/#Unicode_locale_identifier). + * + * For example: "fa", "es-MX", "zh-Hant-TW". + * + * See [MDN - Intl - locales argument](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). + */ + type UnicodeBCP47LocaleIdentifier = string; + +/** + * Unit to use in the relative time internationalized message. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format#Parameters). + */ + type RelativeTimeFormatUnit = + | "year" + | "years" + | "quarter" + | "quarters" + | "month" + | "months" + | "week" + | "weeks" + | "day" + | "days" + | "hour" + | "hours" + | "minute" + | "minutes" + | "second" + | "seconds"; + +/** + * Value of the `unit` property in objects returned by + * `Intl.RelativeTimeFormat.prototype.formatToParts()`. `formatToParts` and + * `format` methods accept either singular or plural unit names as input, + * but `formatToParts` only outputs singular (e.g. "day") not plural (e.g. + * "days"). + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts). + */ + type RelativeTimeFormatUnitSingular = + | "year" + | "quarter" + | "month" + | "week" + | "day" + | "hour" + | "minute" + | "second"; + +/** + * The locale matching algorithm to use. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). + */ + type RelativeTimeFormatLocaleMatcher = "lookup" | "best fit"; + +/** + * The format of output message. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). + */ + type RelativeTimeFormatNumeric = "always" | "auto"; + +/** + * The length of the internationalized message. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). + */ + type RelativeTimeFormatStyle = "long" | "short" | "narrow"; + +/** + * The locale or locales to use + * + * See [MDN - Intl - locales argument](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). + */ + type LocalesArgument = UnicodeBCP47LocaleIdentifier | Locale | readonly (UnicodeBCP47LocaleIdentifier | Locale)[] | undefined; + +/** + * An object with some or all of properties of `options` parameter + * of `Intl.RelativeTimeFormat` constructor. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). + */ + interface RelativeTimeFormatOptions { + /** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */ + localeMatcher?: RelativeTimeFormatLocaleMatcher; + + /** The format of output message. */ + numeric?: RelativeTimeFormatNumeric; +} + +/** + * An object with properties reflecting the locale + * and formatting options computed during initialization + * of the `Intl.RelativeTimeFormat` object + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions#Description). + */ + interface ResolvedRelativeTimeFormatOptions { + numeric: RelativeTimeFormatNumeric; + + numberingSystem: string; +} + +/** + * An object representing the relative time format in parts + * that can be used for custom locale-aware formatting. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts). + */ + type RelativeTimeFormatPart = + | { + type: "literal"; + value: string; + } + | { + type: Exclude; + value: string; + unit: RelativeTimeFormatUnitSingular; + }; + +interface RelativeTimeFormat { + /** + * Formats a value and a unit according to the locale + * and formatting options of the given + * [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) + * object. * - * For example: "fa", "es-MX", "zh-Hant-TW". + * While this method automatically provides the correct plural forms, + * the grammatical form is otherwise as neutral as possible. * - * See [MDN - Intl - locales argument](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). - */ - type UnicodeBCP47LocaleIdentifier = string; - - /** - * Unit to use in the relative time internationalized message. + * It is the caller's responsibility to handle cut-off logic + * such as deciding between displaying "in 7 days" or "in 1 week". + * This API does not support relative dates involving compound units. + * e.g "in 5 days and 4 hours". * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format#Parameters). - */ - type RelativeTimeFormatUnit = - | "year" - | "years" - | "quarter" - | "quarters" - | "month" - | "months" - | "week" - | "weeks" - | "day" - | "days" - | "hour" - | "hours" - | "minute" - | "minutes" - | "second" - | "seconds"; - - /** - * Value of the `unit` property in objects returned by - * `Intl.RelativeTimeFormat.prototype.formatToParts()`. `formatToParts` and - * `format` methods accept either singular or plural unit names as input, - * but `formatToParts` only outputs singular (e.g. "day") not plural (e.g. - * "days"). + * @param value - Numeric value to use in the internationalized relative time message * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts). - */ - type RelativeTimeFormatUnitSingular = - | "year" - | "quarter" - | "month" - | "week" - | "day" - | "hour" - | "minute" - | "second"; - - /** - * The locale matching algorithm to use. + * @param unit - [Unit](https://tc39.es/ecma402/#sec-singularrelativetimeunit) to use in the relative time internationalized message. * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). - */ - type RelativeTimeFormatLocaleMatcher = "lookup" | "best fit"; - - /** - * The format of output message. + * @throws `RangeError` if `unit` was given something other than `unit` possible values * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). - */ - type RelativeTimeFormatNumeric = "always" | "auto"; - - /** - * The length of the internationalized message. + * @returns {string} Internationalized relative time message as string * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format). */ - type RelativeTimeFormatStyle = "long" | "short" | "narrow"; + format(value: number, unit: RelativeTimeFormatUnit): string; - /** - * The locale or locales to use + /** + * Returns an array of objects representing the relative time format in parts that can be used for custom locale-aware formatting. + * + * @param value - Numeric value to use in the internationalized relative time message * - * See [MDN - Intl - locales argument](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). + * @param unit - [Unit](https://tc39.es/ecma402/#sec-singularrelativetimeunit) to use in the relative time internationalized message. + * + * @throws `RangeError` if `unit` was given something other than `unit` possible values + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts). */ - type LocalesArgument = UnicodeBCP47LocaleIdentifier | Locale | readonly (UnicodeBCP47LocaleIdentifier | Locale)[] | undefined; + formatToParts(value: number, unit: RelativeTimeFormatUnit): RelativeTimeFormatPart[]; - /** - * An object with some or all of properties of `options` parameter - * of `Intl.RelativeTimeFormat` constructor. + /** + * Provides access to the locale and options computed during initialization of this `Intl.RelativeTimeFormat` object. * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions). */ - interface RelativeTimeFormatOptions { - /** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */ - localeMatcher?: RelativeTimeFormatLocaleMatcher; - - /** The format of output message. */ - numeric?: RelativeTimeFormatNumeric; - } + resolvedOptions(): ResolvedRelativeTimeFormatOptions; +} - /** - * An object with properties reflecting the locale - * and formatting options computed during initialization - * of the `Intl.RelativeTimeFormat` object +/** + * The [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) + * object is a constructor for objects that enable language-sensitive relative time formatting. + * + * [Compatibility](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat#Browser_compatibility). + */ + const RelativeTimeFormat: { + /** + * Creates [Intl.RelativeTimeFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) objects * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions#Description). + * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. + * For the general form and interpretation of the locales argument, + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters) + * with some or all of options of `RelativeTimeFormatOptions`. + * + * @returns [Intl.RelativeTimeFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat). */ - interface ResolvedRelativeTimeFormatOptions { - numeric: RelativeTimeFormatNumeric; - - numberingSystem: string; - } + new ( + locales?: LocalesArgument, + options?: RelativeTimeFormatOptions, + ): RelativeTimeFormat; - /** - * An object representing the relative time format in parts - * that can be used for custom locale-aware formatting. + /** + * Returns an array containing those of the provided locales + * that are supported in date and time formatting + * without having to fall back to the runtime's default locale. * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts). - */ - type RelativeTimeFormatPart = - | { - type: "literal"; - value: string; - } - | { - type: Exclude; - value: string; - unit: RelativeTimeFormatUnitSingular; - }; - - interface RelativeTimeFormat { - /** - * Formats a value and a unit according to the locale - * and formatting options of the given - * [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) - * object. - * - * While this method automatically provides the correct plural forms, - * the grammatical form is otherwise as neutral as possible. - * - * It is the caller's responsibility to handle cut-off logic - * such as deciding between displaying "in 7 days" or "in 1 week". - * This API does not support relative dates involving compound units. - * e.g "in 5 days and 4 hours". - * - * @param value - Numeric value to use in the internationalized relative time message - * - * @param unit - [Unit](https://tc39.es/ecma402/#sec-singularrelativetimeunit) to use in the relative time internationalized message. - * - * @throws `RangeError` if `unit` was given something other than `unit` possible values - * - * @returns {string} Internationalized relative time message as string - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format). - */ - format(value: number, unit: RelativeTimeFormatUnit): string; - - /** - * Returns an array of objects representing the relative time format in parts that can be used for custom locale-aware formatting. - * - * @param value - Numeric value to use in the internationalized relative time message - * - * @param unit - [Unit](https://tc39.es/ecma402/#sec-singularrelativetimeunit) to use in the relative time internationalized message. - * - * @throws `RangeError` if `unit` was given something other than `unit` possible values - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts). - */ - formatToParts(value: number, unit: RelativeTimeFormatUnit): RelativeTimeFormatPart[]; - - /** - * Provides access to the locale and options computed during initialization of this `Intl.RelativeTimeFormat` object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions). - */ - resolvedOptions(): ResolvedRelativeTimeFormatOptions; - } - - /** - * The [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) - * object is a constructor for objects that enable language-sensitive relative time formatting. + * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. + * For the general form and interpretation of the locales argument, + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). * - * [Compatibility](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat#Browser_compatibility). + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters) + * with some or all of options of the formatting. + * + * @returns An array containing those of the provided locales + * that are supported in date and time formatting + * without having to fall back to the runtime's default locale. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/supportedLocalesOf). */ - const RelativeTimeFormat: { - /** - * Creates [Intl.RelativeTimeFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) objects - * - * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. - * For the general form and interpretation of the locales argument, - * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). - * - * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters) - * with some or all of options of `RelativeTimeFormatOptions`. - * - * @returns [Intl.RelativeTimeFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat). - */ - new ( - locales?: LocalesArgument, - options?: RelativeTimeFormatOptions, - ): RelativeTimeFormat; - - /** - * Returns an array containing those of the provided locales - * that are supported in date and time formatting - * without having to fall back to the runtime's default locale. - * - * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. - * For the general form and interpretation of the locales argument, - * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). - * - * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters) - * with some or all of options of the formatting. - * - * @returns An array containing those of the provided locales - * that are supported in date and time formatting - * without having to fall back to the runtime's default locale. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/supportedLocalesOf). - */ - supportedLocalesOf( - locales?: LocalesArgument, - options?: RelativeTimeFormatOptions, - ): UnicodeBCP47LocaleIdentifier[]; - }; + supportedLocalesOf( + locales?: LocalesArgument, + options?: RelativeTimeFormatOptions, + ): UnicodeBCP47LocaleIdentifier[]; +}; - interface NumberFormatOptionsSignDisplayRegistry { - auto: never; +interface NumberFormatOptionsSignDisplayRegistry { + auto: never; - never: never; + never: never; - always: never; + always: never; - exceptZero: never; - } + exceptZero: never; +} - type NumberFormatOptionsSignDisplay = keyof NumberFormatOptionsSignDisplayRegistry; +type NumberFormatOptionsSignDisplay = keyof NumberFormatOptionsSignDisplayRegistry; - interface NumberFormatOptions { - numberingSystem?: string | undefined; +interface NumberFormatOptions { + numberingSystem?: string | undefined; - compactDisplay?: "short" | "long" | undefined; + compactDisplay?: "short" | "long" | undefined; - notation?: "standard" | "scientific" | "engineering" | "compact" | undefined; + notation?: "standard" | "scientific" | "engineering" | "compact" | undefined; - signDisplay?: NumberFormatOptionsSignDisplay | undefined; + signDisplay?: NumberFormatOptionsSignDisplay | undefined; - unit?: string | undefined; + unit?: string | undefined; - unitDisplay?: "short" | "long" | "narrow" | undefined; + unitDisplay?: "short" | "long" | "narrow" | undefined; - currencySign?: "standard" | "accounting" | undefined; - } + currencySign?: "standard" | "accounting" | undefined; +} - interface ResolvedNumberFormatOptions { - compactDisplay?: "short" | "long"; +interface ResolvedNumberFormatOptions { + compactDisplay?: "short" | "long"; - notation: "standard" | "scientific" | "engineering" | "compact"; + notation: "standard" | "scientific" | "engineering" | "compact"; - signDisplay: NumberFormatOptionsSignDisplay; + signDisplay: NumberFormatOptionsSignDisplay; - unit?: string; + unit?: string; - unitDisplay?: "short" | "long" | "narrow"; + unitDisplay?: "short" | "long" | "narrow"; - currencySign?: "standard" | "accounting"; - } + currencySign?: "standard" | "accounting"; +} - interface DateTimeFormatOptions { - calendar?: string | undefined; +interface DateTimeFormatOptions { + calendar?: string | undefined; - numberingSystem?: string | undefined; + numberingSystem?: string | undefined; - hourCycle?: "h11" | "h12" | "h23" | "h24" | undefined; - } + hourCycle?: "h11" | "h12" | "h23" | "h24" | undefined; +} - type LocaleHourCycleKey = "h12" | "h23" | "h11" | "h24"; +type LocaleHourCycleKey = "h12" | "h23" | "h11" | "h24"; - type LocaleCollationCaseFirst = "upper" | "lower" | "false"; +type LocaleCollationCaseFirst = "upper" | "lower" | "false"; - interface LocaleOptions { - /** The part of the Locale that indicates the locale's calendar era. */ - calendar?: string; +interface LocaleOptions { + /** The part of the Locale that indicates the locale's calendar era. */ + calendar?: string; - /** Flag that defines whether case is taken into account for the locale's collation rules. */ - caseFirst?: LocaleCollationCaseFirst; + /** Flag that defines whether case is taken into account for the locale's collation rules. */ + caseFirst?: LocaleCollationCaseFirst; - /** The collation type used for sorting */ - collation?: string; + /** The collation type used for sorting */ + collation?: string; - /** The time keeping format convention used by the locale. */ - hourCycle?: LocaleHourCycleKey; + /** The time keeping format convention used by the locale. */ + hourCycle?: LocaleHourCycleKey; - /** The numeral system used by the locale. */ - numberingSystem?: string; + /** The numeral system used by the locale. */ + numberingSystem?: string; - /** Flag that defines whether the locale has special collation handling for numeric characters. */ - numeric?: boolean; + /** Flag that defines whether the locale has special collation handling for numeric characters. */ + numeric?: boolean; - /** The region of the world (usually a country) associated with the locale. Possible values are region codes as defined by ISO 3166-1. */ - region?: string; + /** The region of the world (usually a country) associated with the locale. Possible values are region codes as defined by ISO 3166-1. */ + region?: string; - /** The script used for writing the particular language used in the locale. Possible values are script codes as defined by ISO 15924. */ - script?: string; - } + /** The script used for writing the particular language used in the locale. Possible values are script codes as defined by ISO 15924. */ + script?: string; +} - interface Locale extends LocaleOptions { - /** A string containing the language, and the script and region if available. */ - baseName: string; +interface Locale extends LocaleOptions { + /** A string containing the language, and the script and region if available. */ + baseName: string; - /** The primary language subtag associated with the locale. */ - language: string; + /** The primary language subtag associated with the locale. */ + language: string; - /** Gets the most likely values for the language, script, and region of the locale based on existing values. */ - maximize(): Locale; + /** Gets the most likely values for the language, script, and region of the locale based on existing values. */ + maximize(): Locale; - /** Attempts to remove information about the locale that would be added by calling `Locale.maximize()`. */ - minimize(): Locale; + /** Attempts to remove information about the locale that would be added by calling `Locale.maximize()`. */ + minimize(): Locale; - /** Returns the locale's full locale identifier string. */ - toString(): UnicodeBCP47LocaleIdentifier; - } + /** Returns the locale's full locale identifier string. */ + toString(): UnicodeBCP47LocaleIdentifier; +} - /** - * Constructor creates [Intl.Locale](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) - * objects - * - * @param tag - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646). - * For the general form and interpretation of the locales argument, - * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). - * - * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/Locale#Parameters) with some or all of options of the locale. - * - * @returns [Intl.Locale](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale). - */ - const Locale: { - new (tag: UnicodeBCP47LocaleIdentifier | Locale, options?: LocaleOptions): Locale; - }; +/** + * Constructor creates [Intl.Locale](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) + * objects + * + * @param tag - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646). + * For the general form and interpretation of the locales argument, + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/Locale#Parameters) with some or all of options of the locale. + * + * @returns [Intl.Locale](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale). + */ + const Locale: { + new (tag: UnicodeBCP47LocaleIdentifier | Locale, options?: LocaleOptions): Locale; +}; - type DisplayNamesFallback = - | "code" - | "none"; +type DisplayNamesFallback = + | "code" + | "none"; - type DisplayNamesType = - | "language" - | "region" - | "script" - | "calendar" - | "dateTimeField" - | "currency"; +type DisplayNamesType = + | "language" + | "region" + | "script" + | "calendar" + | "dateTimeField" + | "currency"; - type DisplayNamesLanguageDisplay = - | "dialect" - | "standard"; +type DisplayNamesLanguageDisplay = + | "dialect" + | "standard"; - interface DisplayNamesOptions { - localeMatcher?: RelativeTimeFormatLocaleMatcher; +interface DisplayNamesOptions { + localeMatcher?: RelativeTimeFormatLocaleMatcher; - style?: RelativeTimeFormatStyle; + style?: RelativeTimeFormatStyle; - type: DisplayNamesType; + type: DisplayNamesType; - languageDisplay?: DisplayNamesLanguageDisplay; + languageDisplay?: DisplayNamesLanguageDisplay; - fallback?: DisplayNamesFallback; - } + fallback?: DisplayNamesFallback; +} - interface ResolvedDisplayNamesOptions { - locale: UnicodeBCP47LocaleIdentifier; +interface ResolvedDisplayNamesOptions { + locale: UnicodeBCP47LocaleIdentifier; - style: RelativeTimeFormatStyle; + style: RelativeTimeFormatStyle; - type: DisplayNamesType; + type: DisplayNamesType; - fallback: DisplayNamesFallback; + fallback: DisplayNamesFallback; - languageDisplay?: DisplayNamesLanguageDisplay; - } + languageDisplay?: DisplayNamesLanguageDisplay; +} - interface DisplayNames { - /** - * Receives a code and returns a string based on the locale and options provided when instantiating - * [`Intl.DisplayNames()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) - * - * @param code The `code` to provide depends on the `type` passed to display name during creation: - * - If the type is `"region"`, code should be either an [ISO-3166 two letters region code](https://www.iso.org/iso-3166-country-codes.html), - * or a [three digits UN M49 Geographic Regions](https://unstats.un.org/unsd/methodology/m49/). - * - If the type is `"script"`, code should be an [ISO-15924 four letters script code](https://unicode.org/iso15924/iso15924-codes.html). - * - If the type is `"language"`, code should be a `languageCode` ["-" `scriptCode`] ["-" `regionCode` ] *("-" `variant` ) - * subsequence of the unicode_language_id grammar in [UTS 35's Unicode Language and Locale Identifiers grammar](https://unicode.org/reports/tr35/#Unicode_language_identifier). - * `languageCode` is either a two letters ISO 639-1 language code or a three letters ISO 639-2 language code. - * - If the type is `"currency"`, code should be a [3-letter ISO 4217 currency code](https://www.iso.org/iso-4217-currency-codes.html). - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/of). - */ - of(code: string): string | undefined; +interface DisplayNames { + /** + * Receives a code and returns a string based on the locale and options provided when instantiating + * [`Intl.DisplayNames()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) + * + * @param code The `code` to provide depends on the `type` passed to display name during creation: + * - If the type is `"region"`, code should be either an [ISO-3166 two letters region code](https://www.iso.org/iso-3166-country-codes.html), + * or a [three digits UN M49 Geographic Regions](https://unstats.un.org/unsd/methodology/m49/). + * - If the type is `"script"`, code should be an [ISO-15924 four letters script code](https://unicode.org/iso15924/iso15924-codes.html). + * - If the type is `"language"`, code should be a `languageCode` ["-" `scriptCode`] ["-" `regionCode` ] *("-" `variant` ) + * subsequence of the unicode_language_id grammar in [UTS 35's Unicode Language and Locale Identifiers grammar](https://unicode.org/reports/tr35/#Unicode_language_identifier). + * `languageCode` is either a two letters ISO 639-1 language code or a three letters ISO 639-2 language code. + * - If the type is `"currency"`, code should be a [3-letter ISO 4217 currency code](https://www.iso.org/iso-4217-currency-codes.html). + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/of). + */ + of(code: string): string | undefined; - /** - * Returns a new object with properties reflecting the locale and style formatting options computed during the construction of the current - * [`Intl/DisplayNames`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/resolvedOptions). - */ - resolvedOptions(): ResolvedDisplayNamesOptions; - } + /** + * Returns a new object with properties reflecting the locale and style formatting options computed during the construction of the current + * [`Intl/DisplayNames`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/resolvedOptions). + */ + resolvedOptions(): ResolvedDisplayNamesOptions; +} - /** - * The [`Intl.DisplayNames()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) - * object enables the consistent translation of language, region and script display names. +/** + * The [`Intl.DisplayNames()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) + * object enables the consistent translation of language, region and script display names. + * + * [Compatibility](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames#browser_compatibility). + */ + const DisplayNames: { + prototype: DisplayNames; + + /** + * @param locales A string with a BCP 47 language tag, or an array of such strings. + * For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) + * page. + * + * @param options An object for setting up a display name. * - * [Compatibility](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames#browser_compatibility). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/DisplayNames). */ - const DisplayNames: { - prototype: DisplayNames; - - /** - * @param locales A string with a BCP 47 language tag, or an array of such strings. - * For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) - * page. - * - * @param options An object for setting up a display name. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/DisplayNames). - */ - new (locales: LocalesArgument, options: DisplayNamesOptions): DisplayNames; - - /** - * Returns an array containing those of the provided locales that are supported in display names without having to fall back to the runtime's default locale. - * - * @param locales A string with a BCP 47 language tag, or an array of such strings. - * For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) - * page. - * - * @param options An object with a locale matcher. - * - * @returns An array of strings representing a subset of the given locale tags that are supported in display names without having to fall back to the runtime's default locale. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/supportedLocalesOf). - */ - supportedLocalesOf(locales?: LocalesArgument, options?: { localeMatcher?: RelativeTimeFormatLocaleMatcher; }): UnicodeBCP47LocaleIdentifier[]; - }; + new (locales: LocalesArgument, options: DisplayNamesOptions): DisplayNames; + + /** + * Returns an array containing those of the provided locales that are supported in display names without having to fall back to the runtime's default locale. + * + * @param locales A string with a BCP 47 language tag, or an array of such strings. + * For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) + * page. + * + * @param options An object with a locale matcher. + * + * @returns An array of strings representing a subset of the given locale tags that are supported in display names without having to fall back to the runtime's default locale. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/supportedLocalesOf). + */ + supportedLocalesOf(locales?: LocalesArgument, options?: { localeMatcher?: RelativeTimeFormatLocaleMatcher; }): UnicodeBCP47LocaleIdentifier[]; +}; - interface CollatorConstructor { - new (locales?: LocalesArgument, options?: CollatorOptions): Collator; +interface CollatorConstructor { + new (locales?: LocalesArgument, options?: CollatorOptions): Collator; - (locales?: LocalesArgument, options?: CollatorOptions): Collator; + (locales?: LocalesArgument, options?: CollatorOptions): Collator; - supportedLocalesOf(locales: LocalesArgument, options?: CollatorOptions): string[]; - } + supportedLocalesOf(locales: LocalesArgument, options?: CollatorOptions): string[]; +} - interface DateTimeFormatConstructor { - new (locales?: LocalesArgument, options?: DateTimeFormatOptions): DateTimeFormat; +interface DateTimeFormatConstructor { + new (locales?: LocalesArgument, options?: DateTimeFormatOptions): DateTimeFormat; - (locales?: LocalesArgument, options?: DateTimeFormatOptions): DateTimeFormat; + (locales?: LocalesArgument, options?: DateTimeFormatOptions): DateTimeFormat; - supportedLocalesOf(locales: LocalesArgument, options?: DateTimeFormatOptions): string[]; - } + supportedLocalesOf(locales: LocalesArgument, options?: DateTimeFormatOptions): string[]; +} - interface NumberFormatConstructor { - new (locales?: LocalesArgument, options?: NumberFormatOptions): NumberFormat; +interface NumberFormatConstructor { + new (locales?: LocalesArgument, options?: NumberFormatOptions): NumberFormat; - (locales?: LocalesArgument, options?: NumberFormatOptions): NumberFormat; + (locales?: LocalesArgument, options?: NumberFormatOptions): NumberFormat; - supportedLocalesOf(locales: LocalesArgument, options?: NumberFormatOptions): string[]; - } + supportedLocalesOf(locales: LocalesArgument, options?: NumberFormatOptions): string[]; +} - interface PluralRulesConstructor { - new (locales?: LocalesArgument, options?: PluralRulesOptions): PluralRules; +interface PluralRulesConstructor { + new (locales?: LocalesArgument, options?: PluralRulesOptions): PluralRules; - (locales?: LocalesArgument, options?: PluralRulesOptions): PluralRules; + (locales?: LocalesArgument, options?: PluralRulesOptions): PluralRules; - supportedLocalesOf(locales: LocalesArgument, options?: { localeMatcher?: "lookup" | "best fit"; }): string[]; - } + supportedLocalesOf(locales: LocalesArgument, options?: { localeMatcher?: "lookup" | "best fit"; }): string[]; +} } ///////////////////////////// // lib.es2020.number.d.ts ///////////////////////////// interface Number { - /** - * Converts a number to a string by using the current or specified locale. - * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.NumberFormatOptions): string; + /** + * Converts a number to a string by using the current or specified locale. + * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.NumberFormatOptions): string; } ///////////////////////////// // lib.es2020.promise.d.ts ///////////////////////////// interface PromiseFulfilledResult { - status: "fulfilled"; + status: "fulfilled"; - value: T; + value: T; } interface PromiseRejectedResult { - status: "rejected"; + status: "rejected"; - reason: any; + reason: any; } type PromiseSettledResult = PromiseFulfilledResult | PromiseRejectedResult; interface PromiseConstructor { - /** - * Creates a Promise that is resolved with an array of results when all - * of the provided Promises resolve or reject. - * @param values An array of Promises. - * @returns A new Promise. - */ - allSettled(values: T): Promise<{ -readonly [P in keyof T]: PromiseSettledResult>; }>; + /** + * Creates a Promise that is resolved with an array of results when all + * of the provided Promises resolve or reject. + * @param values An array of Promises. + * @returns A new Promise. + */ + allSettled(values: T): Promise<{ -readonly [P in keyof T]: PromiseSettledResult>; }>; - /** - * Creates a Promise that is resolved with an array of results when all - * of the provided Promises resolve or reject. - * @param values An array of Promises. - * @returns A new Promise. - */ - allSettled(values: Iterable>): Promise>[]>; + /** + * Creates a Promise that is resolved with an array of results when all + * of the provided Promises resolve or reject. + * @param values An array of Promises. + * @returns A new Promise. + */ + allSettled(values: Iterable>): Promise>[]>; } ///////////////////////////// // lib.es2020.sharedmemory.d.ts ///////////////////////////// interface Atomics { - /** - * Adds a value to the value at the given position in the array, returning the original value. - * Until this atomic operation completes, any other read or write operation against the array - * will block. - */ - add(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + /** + * Adds a value to the value at the given position in the array, returning the original value. + * Until this atomic operation completes, any other read or write operation against the array + * will block. + */ + add(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - /** - * Stores the bitwise AND of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or - * write operation against the array will block. - */ - and(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + /** + * Stores the bitwise AND of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or + * write operation against the array will block. + */ + and(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - /** - * Replaces the value at the given position in the array if the original value equals the given - * expected value, returning the original value. Until this atomic operation completes, any - * other read or write operation against the array will block. - */ - compareExchange(typedArray: BigInt64Array | BigUint64Array, index: number, expectedValue: bigint, replacementValue: bigint): bigint; + /** + * Replaces the value at the given position in the array if the original value equals the given + * expected value, returning the original value. Until this atomic operation completes, any + * other read or write operation against the array will block. + */ + compareExchange(typedArray: BigInt64Array | BigUint64Array, index: number, expectedValue: bigint, replacementValue: bigint): bigint; - /** - * Replaces the value at the given position in the array, returning the original value. Until - * this atomic operation completes, any other read or write operation against the array will - * block. - */ - exchange(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + /** + * Replaces the value at the given position in the array, returning the original value. Until + * this atomic operation completes, any other read or write operation against the array will + * block. + */ + exchange(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - /** - * Returns the value at the given position in the array. Until this atomic operation completes, - * any other read or write operation against the array will block. - */ - load(typedArray: BigInt64Array | BigUint64Array, index: number): bigint; + /** + * Returns the value at the given position in the array. Until this atomic operation completes, + * any other read or write operation against the array will block. + */ + load(typedArray: BigInt64Array | BigUint64Array, index: number): bigint; - /** - * Stores the bitwise OR of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or write - * operation against the array will block. - */ - or(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + /** + * Stores the bitwise OR of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or write + * operation against the array will block. + */ + or(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - /** - * Stores a value at the given position in the array, returning the new value. Until this - * atomic operation completes, any other read or write operation against the array will block. - */ - store(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + /** + * Stores a value at the given position in the array, returning the new value. Until this + * atomic operation completes, any other read or write operation against the array will block. + */ + store(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - /** - * Subtracts a value from the value at the given position in the array, returning the original - * value. Until this atomic operation completes, any other read or write operation against the - * array will block. - */ - sub(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + /** + * Subtracts a value from the value at the given position in the array, returning the original + * value. Until this atomic operation completes, any other read or write operation against the + * array will block. + */ + sub(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - /** - * If the value at the given position in the array is equal to the provided value, the current - * agent is put to sleep causing execution to suspend until the timeout expires (returning - * `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns - * `"not-equal"`. - */ - wait(typedArray: BigInt64Array, index: number, value: bigint, timeout?: number): "ok" | "not-equal" | "timed-out"; + /** + * If the value at the given position in the array is equal to the provided value, the current + * agent is put to sleep causing execution to suspend until the timeout expires (returning + * `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns + * `"not-equal"`. + */ + wait(typedArray: BigInt64Array, index: number, value: bigint, timeout?: number): "ok" | "not-equal" | "timed-out"; - /** - * Wakes up sleeping agents that are waiting on the given index of the array, returning the - * number of agents that were awoken. - * @param typedArray A shared BigInt64Array. - * @param index The position in the typedArray to wake up on. - * @param count The number of sleeping agents to notify. Defaults to +Infinity. - */ - notify(typedArray: BigInt64Array, index: number, count?: number): number; + /** + * Wakes up sleeping agents that are waiting on the given index of the array, returning the + * number of agents that were awoken. + * @param typedArray A shared BigInt64Array. + * @param index The position in the typedArray to wake up on. + * @param count The number of sleeping agents to notify. Defaults to +Infinity. + */ + notify(typedArray: BigInt64Array, index: number, count?: number): number; - /** - * Stores the bitwise XOR of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or write - * operation against the array will block. - */ - xor(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + /** + * Stores the bitwise XOR of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or write + * operation against the array will block. + */ + xor(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; } ///////////////////////////// // lib.es2020.string.d.ts ///////////////////////////// interface String { - /** - * Matches a string with a regular expression, and returns an iterable of matches - * containing the results of that search. - * @param regexp A regular expression - */ - matchAll(regexp: RegExp): RegExpStringIterator; + /** + * Matches a string with a regular expression, and returns an iterable of matches + * containing the results of that search. + * @param regexp A regular expression + */ + matchAll(regexp: RegExp): RegExpStringIterator; - /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */ - toLocaleLowerCase(locales?: Intl.LocalesArgument): string; + /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */ + toLocaleLowerCase(locales?: Intl.LocalesArgument): string; - /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */ - toLocaleUpperCase(locales?: Intl.LocalesArgument): string; + /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */ + toLocaleUpperCase(locales?: Intl.LocalesArgument): string; - /** - * Determines whether two strings are equivalent in the current or specified locale. - * @param that String to compare to target string - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details. - * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details. - */ - localeCompare(that: string, locales?: Intl.LocalesArgument, options?: Intl.CollatorOptions): number; + /** + * Determines whether two strings are equivalent in the current or specified locale. + * @param that String to compare to target string + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details. + * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details. + */ + localeCompare(that: string, locales?: Intl.LocalesArgument, options?: Intl.CollatorOptions): number; } ///////////////////////////// // lib.es2020.symbol.wellknown.d.ts ///////////////////////////// interface SymbolConstructor { - /** - * A regular expression method that matches the regular expression against a string. Called - * by the String.prototype.matchAll method. - */ - readonly matchAll: unique symbol; + /** + * A regular expression method that matches the regular expression against a string. Called + * by the String.prototype.matchAll method. + */ + readonly matchAll: unique symbol; } interface RegExpStringIterator extends IteratorObject { - [Symbol.iterator](): RegExpStringIterator; + [Symbol.iterator](): RegExpStringIterator; } interface RegExp { - /** - * Matches a string with this regular expression, and returns an iterable of matches - * containing the results of that search. - * @param string A string to search within. - */ - [Symbol.matchAll](str: string): RegExpStringIterator; + /** + * Matches a string with this regular expression, and returns an iterable of matches + * containing the results of that search. + * @param string A string to search within. + */ + [Symbol.matchAll](str: string): RegExpStringIterator; } ///////////////////////////// // lib.es2021.intl.d.ts ///////////////////////////// declare namespace Intl { - interface DateTimeFormatOptions { - dateStyle?: "full" | "long" | "medium" | "short" | undefined; +interface DateTimeFormatOptions { + dateStyle?: "full" | "long" | "medium" | "short" | undefined; - timeStyle?: "full" | "long" | "medium" | "short" | undefined; + timeStyle?: "full" | "long" | "medium" | "short" | undefined; - dayPeriod?: "narrow" | "short" | "long" | undefined; + dayPeriod?: "narrow" | "short" | "long" | undefined; - fractionalSecondDigits?: 1 | 2 | 3 | undefined; - } + fractionalSecondDigits?: 1 | 2 | 3 | undefined; +} - interface DateTimeRangeFormatPart extends DateTimeFormatPart { - source: "startRange" | "endRange" | "shared"; - } +interface DateTimeRangeFormatPart extends DateTimeFormatPart { + source: "startRange" | "endRange" | "shared"; +} - interface DateTimeFormat { - formatRange(startDate: Date | number | bigint, endDate: Date | number | bigint): string; +interface DateTimeFormat { + formatRange(startDate: Date | number | bigint, endDate: Date | number | bigint): string; - formatRangeToParts(startDate: Date | number | bigint, endDate: Date | number | bigint): DateTimeRangeFormatPart[]; - } + formatRangeToParts(startDate: Date | number | bigint, endDate: Date | number | bigint): DateTimeRangeFormatPart[]; +} - interface ResolvedDateTimeFormatOptions { - dateStyle?: "full" | "long" | "medium" | "short"; +interface ResolvedDateTimeFormatOptions { + dateStyle?: "full" | "long" | "medium" | "short"; - timeStyle?: "full" | "long" | "medium" | "short"; + timeStyle?: "full" | "long" | "medium" | "short"; - hourCycle?: "h11" | "h12" | "h23" | "h24"; + hourCycle?: "h11" | "h12" | "h23" | "h24"; - dayPeriod?: "narrow" | "short" | "long"; + dayPeriod?: "narrow" | "short" | "long"; - fractionalSecondDigits?: 1 | 2 | 3; - } + fractionalSecondDigits?: 1 | 2 | 3; +} - /** - * The locale matching algorithm to use. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). - */ - type ListFormatLocaleMatcher = "lookup" | "best fit"; +/** + * The locale matching algorithm to use. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). + */ + type ListFormatLocaleMatcher = "lookup" | "best fit"; - /** - * The format of output message. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). - */ - type ListFormatType = "conjunction" | "disjunction" | "unit"; +/** + * The format of output message. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). + */ + type ListFormatType = "conjunction" | "disjunction" | "unit"; - /** - * The length of the formatted message. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). - */ - type ListFormatStyle = "long" | "short" | "narrow"; +/** + * The length of the formatted message. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). + */ + type ListFormatStyle = "long" | "short" | "narrow"; - /** - * An object with some or all properties of the `Intl.ListFormat` constructor `options` parameter. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). - */ - interface ListFormatOptions { - /** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */ - localeMatcher?: ListFormatLocaleMatcher | undefined; - - /** The format of output message. */ - type?: ListFormatType | undefined; - - /** The length of the internationalized message. */ - style?: ListFormatStyle | undefined; - } - - interface ResolvedListFormatOptions { - locale: string; - - style: ListFormatStyle; - - type: ListFormatType; - } - - interface ListFormat { - /** - * Returns a string with a language-specific representation of the list. - * - * @param list - An iterable object, such as an [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array). - * - * @throws `TypeError` if `list` includes something other than the possible values. - * - * @returns {string} A language-specific formatted string representing the elements of the list. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/format). - */ - format(list: Iterable): string; - - /** - * Returns an Array of objects representing the different components that can be used to format a list of values in a locale-aware fashion. - * - * @param list - An iterable object, such as an [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array), to be formatted according to a locale. - * - * @throws `TypeError` if `list` includes something other than the possible values. - * - * @returns {{ type: "element" | "literal", value: string; }[]} An Array of components which contains the formatted parts from the list. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/formatToParts). - */ - formatToParts(list: Iterable): { type: "element" | "literal"; value: string; }[]; - - /** - * Returns a new object with properties reflecting the locale and style - * formatting options computed during the construction of the current - * `Intl.ListFormat` object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/resolvedOptions). - */ - resolvedOptions(): ResolvedListFormatOptions; - } - - const ListFormat: { - prototype: ListFormat; - - /** - * Creates [Intl.ListFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat) objects that - * enable language-sensitive list formatting. - * - * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. - * For the general form and interpretation of the `locales` argument, - * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). - * - * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters) - * with some or all options of `ListFormatOptions`. - * - * @returns [Intl.ListFormatOptions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat) object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat). - */ - new (locales?: LocalesArgument, options?: ListFormatOptions): ListFormat; - - /** - * Returns an array containing those of the provided locales that are - * supported in list formatting without having to fall back to the runtime's default locale. - * - * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. - * For the general form and interpretation of the `locales` argument, - * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). - * - * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf#parameters). - * with some or all possible options. - * - * @returns An array of strings representing a subset of the given locale tags that are supported in list - * formatting without having to fall back to the runtime's default locale. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf). - */ - supportedLocalesOf(locales: LocalesArgument, options?: Pick): UnicodeBCP47LocaleIdentifier[]; - }; -} +/** + * An object with some or all properties of the `Intl.ListFormat` constructor `options` parameter. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). + */ + interface ListFormatOptions { + /** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */ + localeMatcher?: ListFormatLocaleMatcher | undefined; -///////////////////////////// -// lib.es2021.promise.d.ts -///////////////////////////// -interface AggregateError extends Error { - errors: any[]; + /** The format of output message. */ + type?: ListFormatType | undefined; + + /** The length of the internationalized message. */ + style?: ListFormatStyle | undefined; } -interface AggregateErrorConstructor { - new (errors: Iterable, message?: string): AggregateError; +interface ResolvedListFormatOptions { + locale: string; - (errors: Iterable, message?: string): AggregateError; + style: ListFormatStyle; - readonly prototype: AggregateError; + type: ListFormatType; } -declare var AggregateError: AggregateErrorConstructor; +interface ListFormat { + /** + * Returns a string with a language-specific representation of the list. + * + * @param list - An iterable object, such as an [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array). + * + * @throws `TypeError` if `list` includes something other than the possible values. + * + * @returns {string} A language-specific formatted string representing the elements of the list. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/format). + */ + format(list: Iterable): string; -/** - * Represents the completion of an asynchronous operation - */ -interface PromiseConstructor { /** - * The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm. - * @param values An array or iterable of Promises. - * @returns A new Promise. + * Returns an Array of objects representing the different components that can be used to format a list of values in a locale-aware fashion. + * + * @param list - An iterable object, such as an [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array), to be formatted according to a locale. + * + * @throws `TypeError` if `list` includes something other than the possible values. + * + * @returns {{ type: "element" | "literal", value: string; }[]} An Array of components which contains the formatted parts from the list. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/formatToParts). */ - any(values: T): Promise>; + formatToParts(list: Iterable): { type: "element" | "literal"; value: string; }[]; /** - * The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm. - * @param values An array or iterable of Promises. - * @returns A new Promise. + * Returns a new object with properties reflecting the locale and style + * formatting options computed during the construction of the current + * `Intl.ListFormat` object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/resolvedOptions). */ - any(values: Iterable>): Promise>; + resolvedOptions(): ResolvedListFormatOptions; } -///////////////////////////// -// lib.es2021.string.d.ts -///////////////////////////// -interface String { +const ListFormat: { + prototype: ListFormat; + /** - * Replace all instances of a substring in a string, using a regular expression or search string. - * @param searchValue A string to search for. - * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string. + * Creates [Intl.ListFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat) objects that + * enable language-sensitive list formatting. + * + * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. + * For the general form and interpretation of the `locales` argument, + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters) + * with some or all options of `ListFormatOptions`. + * + * @returns [Intl.ListFormatOptions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat) object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat). */ - replaceAll(searchValue: string | RegExp, replaceValue: string): string; + new (locales?: LocalesArgument, options?: ListFormatOptions): ListFormat; /** - * Replace all instances of a substring in a string, using a regular expression or search string. - * @param searchValue A string to search for. - * @param replacer A function that returns the replacement text. + * Returns an array containing those of the provided locales that are + * supported in list formatting without having to fall back to the runtime's default locale. + * + * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. + * For the general form and interpretation of the `locales` argument, + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf#parameters). + * with some or all possible options. + * + * @returns An array of strings representing a subset of the given locale tags that are supported in list + * formatting without having to fall back to the runtime's default locale. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf). */ - replaceAll(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; + supportedLocalesOf(locales: LocalesArgument, options?: Pick): UnicodeBCP47LocaleIdentifier[]; +}; +} + +///////////////////////////// +// lib.es2021.promise.d.ts +///////////////////////////// +interface AggregateError extends Error { + errors: any[]; +} + +interface AggregateErrorConstructor { + new (errors: Iterable, message?: string): AggregateError; + + (errors: Iterable, message?: string): AggregateError; + + readonly prototype: AggregateError; +} + +declare var AggregateError: AggregateErrorConstructor; + +/** + * Represents the completion of an asynchronous operation + */ +interface PromiseConstructor { + /** + * The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm. + * @param values An array or iterable of Promises. + * @returns A new Promise. + */ + any(values: T): Promise>; + + /** + * The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm. + * @param values An array or iterable of Promises. + * @returns A new Promise. + */ + any(values: Iterable>): Promise>; +} + +///////////////////////////// +// lib.es2021.string.d.ts +///////////////////////////// +interface String { + /** + * Replace all instances of a substring in a string, using a regular expression or search string. + * @param searchValue A string to search for. + * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string. + */ + replaceAll(searchValue: string | RegExp, replaceValue: string): string; + + /** + * Replace all instances of a substring in a string, using a regular expression or search string. + * @param searchValue A string to search for. + * @param replacer A function that returns the replacement text. + */ + replaceAll(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; } ///////////////////////////// // lib.es2021.weakref.d.ts ///////////////////////////// interface WeakRef { - readonly [Symbol.toStringTag]: "WeakRef"; + readonly [Symbol.toStringTag]: "WeakRef"; - /** - * Returns the WeakRef instance's target value, or undefined if the target value has been - * reclaimed. - * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. - */ - deref(): T | undefined; + /** + * Returns the WeakRef instance's target value, or undefined if the target value has been + * reclaimed. + * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. + */ + deref(): T | undefined; } interface WeakRefConstructor { - readonly prototype: WeakRef; + readonly prototype: WeakRef; - /** - * Creates a WeakRef instance for the given target value. - * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. - * @param target The target value for the WeakRef instance. - */ - new (target: T): WeakRef; + /** + * Creates a WeakRef instance for the given target value. + * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. + * @param target The target value for the WeakRef instance. + */ + new (target: T): WeakRef; } declare var WeakRef: WeakRefConstructor; interface FinalizationRegistry { - readonly [Symbol.toStringTag]: "FinalizationRegistry"; + readonly [Symbol.toStringTag]: "FinalizationRegistry"; - /** - * Registers a value with the registry. - * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. - * @param target The target value to register. - * @param heldValue The value to pass to the finalizer for this value. This cannot be the - * target value. - * @param unregisterToken The token to pass to the unregister method to unregister the target - * value. If not provided, the target cannot be unregistered. - */ - register(target: WeakKey, heldValue: T, unregisterToken?: WeakKey): void; + /** + * Registers a value with the registry. + * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. + * @param target The target value to register. + * @param heldValue The value to pass to the finalizer for this value. This cannot be the + * target value. + * @param unregisterToken The token to pass to the unregister method to unregister the target + * value. If not provided, the target cannot be unregistered. + */ + register(target: WeakKey, heldValue: T, unregisterToken?: WeakKey): void; - /** - * Unregisters a value from the registry. - * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. - * @param unregisterToken The token that was used as the unregisterToken argument when calling - * register to register the target value. - */ - unregister(unregisterToken: WeakKey): boolean; + /** + * Unregisters a value from the registry. + * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. + * @param unregisterToken The token that was used as the unregisterToken argument when calling + * register to register the target value. + */ + unregister(unregisterToken: WeakKey): boolean; } interface FinalizationRegistryConstructor { - readonly prototype: FinalizationRegistry; + readonly prototype: FinalizationRegistry; - /** - * Creates a finalization registry with an associated cleanup callback - * @param cleanupCallback The callback to call after a value in the registry has been reclaimed. - */ - new (cleanupCallback: (heldValue: T) => void): FinalizationRegistry; + /** + * Creates a finalization registry with an associated cleanup callback + * @param cleanupCallback The callback to call after a value in the registry has been reclaimed. + */ + new (cleanupCallback: (heldValue: T) => void): FinalizationRegistry; } declare var FinalizationRegistry: FinalizationRegistryConstructor; @@ -4358,1573 +4358,1573 @@ declare var FinalizationRegistry: FinalizationRegistryConstructor; // lib.es2022.array.d.ts ///////////////////////////// interface Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): T | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): T | undefined; } interface ReadonlyArray { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): T | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): T | undefined; } interface Int8Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; } interface Uint8Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; } interface Uint8ClampedArray { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; } interface Int16Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; } interface Uint16Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; } interface Int32Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; } interface Uint32Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; } interface Float32Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; } interface Float64Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; } interface BigInt64Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): bigint | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): bigint | undefined; } interface BigUint64Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): bigint | undefined; + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): bigint | undefined; } ///////////////////////////// // lib.es2022.error.d.ts ///////////////////////////// interface ErrorOptions { - cause?: unknown; + cause?: unknown; } interface Error { - cause?: unknown; + cause?: unknown; } interface ErrorConstructor { - new (message?: string, options?: ErrorOptions): Error; + new (message?: string, options?: ErrorOptions): Error; - (message?: string, options?: ErrorOptions): Error; + (message?: string, options?: ErrorOptions): Error; } interface EvalErrorConstructor { - new (message?: string, options?: ErrorOptions): EvalError; + new (message?: string, options?: ErrorOptions): EvalError; - (message?: string, options?: ErrorOptions): EvalError; + (message?: string, options?: ErrorOptions): EvalError; } interface RangeErrorConstructor { - new (message?: string, options?: ErrorOptions): RangeError; + new (message?: string, options?: ErrorOptions): RangeError; - (message?: string, options?: ErrorOptions): RangeError; + (message?: string, options?: ErrorOptions): RangeError; } interface ReferenceErrorConstructor { - new (message?: string, options?: ErrorOptions): ReferenceError; + new (message?: string, options?: ErrorOptions): ReferenceError; - (message?: string, options?: ErrorOptions): ReferenceError; + (message?: string, options?: ErrorOptions): ReferenceError; } interface SyntaxErrorConstructor { - new (message?: string, options?: ErrorOptions): SyntaxError; + new (message?: string, options?: ErrorOptions): SyntaxError; - (message?: string, options?: ErrorOptions): SyntaxError; + (message?: string, options?: ErrorOptions): SyntaxError; } interface TypeErrorConstructor { - new (message?: string, options?: ErrorOptions): TypeError; + new (message?: string, options?: ErrorOptions): TypeError; - (message?: string, options?: ErrorOptions): TypeError; + (message?: string, options?: ErrorOptions): TypeError; } interface URIErrorConstructor { - new (message?: string, options?: ErrorOptions): URIError; + new (message?: string, options?: ErrorOptions): URIError; - (message?: string, options?: ErrorOptions): URIError; + (message?: string, options?: ErrorOptions): URIError; } interface AggregateErrorConstructor { - new ( - errors: Iterable, - message?: string, - options?: ErrorOptions, - ): AggregateError; + new ( + errors: Iterable, + message?: string, + options?: ErrorOptions, + ): AggregateError; - ( - errors: Iterable, - message?: string, - options?: ErrorOptions, - ): AggregateError; + ( + errors: Iterable, + message?: string, + options?: ErrorOptions, + ): AggregateError; } ///////////////////////////// // lib.es2022.intl.d.ts ///////////////////////////// declare namespace Intl { - /** - * An object with some or all properties of the `Intl.Segmenter` constructor `options` parameter. +/** + * An object with some or all properties of the `Intl.Segmenter` constructor `options` parameter. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/Segmenter#parameters) + */ + interface SegmenterOptions { + /** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */ + localeMatcher?: "best fit" | "lookup" | undefined; + + /** The type of input to be split */ + granularity?: "grapheme" | "word" | "sentence" | undefined; +} + +/** + * The `Intl.Segmenter` object enables locale-sensitive text segmentation, enabling you to get meaningful items (graphemes, words or sentences) from a string. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter) + */ + interface Segmenter { + /** + * Returns `Segments` object containing the segments of the input string, using the segmenter's locale and granularity. * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/Segmenter#parameters) + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/segment) + * + * @param input - The text to be segmented as a `string`. + * + * @returns A new iterable Segments object containing the segments of the input string, using the segmenter's locale and granularity. */ - interface SegmenterOptions { - /** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */ - localeMatcher?: "best fit" | "lookup" | undefined; + segment(input: string): Segments; - /** The type of input to be split */ - granularity?: "grapheme" | "word" | "sentence" | undefined; - } - - /** - * The `Intl.Segmenter` object enables locale-sensitive text segmentation, enabling you to get meaningful items (graphemes, words or sentences) from a string. + /** + * The `resolvedOptions()` method of `Intl.Segmenter` instances returns a new object with properties reflecting the options computed during initialization of this `Segmenter` object. * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter) + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/resolvedOptions) */ - interface Segmenter { - /** - * Returns `Segments` object containing the segments of the input string, using the segmenter's locale and granularity. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/segment) - * - * @param input - The text to be segmented as a `string`. - * - * @returns A new iterable Segments object containing the segments of the input string, using the segmenter's locale and granularity. - */ - segment(input: string): Segments; - - /** - * The `resolvedOptions()` method of `Intl.Segmenter` instances returns a new object with properties reflecting the options computed during initialization of this `Segmenter` object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/resolvedOptions) - */ - resolvedOptions(): ResolvedSegmenterOptions; - } - - interface ResolvedSegmenterOptions { - locale: string; - - granularity: "grapheme" | "word" | "sentence"; - } - - interface SegmentIterator extends IteratorObject { - [Symbol.iterator](): SegmentIterator; - } - - /** - * A `Segments` object is an iterable collection of the segments of a text string. It is returned by a call to the `segment()` method of an `Intl.Segmenter` object. + resolvedOptions(): ResolvedSegmenterOptions; +} + +interface ResolvedSegmenterOptions { + locale: string; + + granularity: "grapheme" | "word" | "sentence"; +} + +interface SegmentIterator extends IteratorObject { + [Symbol.iterator](): SegmentIterator; +} + +/** + * A `Segments` object is an iterable collection of the segments of a text string. It is returned by a call to the `segment()` method of an `Intl.Segmenter` object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/segment/Segments) + */ + interface Segments { + /** + * Returns an object describing the segment in the original string that includes the code unit at a specified index. * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/segment/Segments) + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/segment/Segments/containing) + * + * @param codeUnitIndex - A number specifying the index of the code unit in the original input string. If the value is omitted, it defaults to `0`. + */ + containing(codeUnitIndex?: number): SegmentData | undefined; + + /** Returns an iterator to iterate over the segments. */ + [Symbol.iterator](): SegmentIterator; +} + +interface SegmentData { + /** A string containing the segment extracted from the original input string. */ + segment: string; + + /** The code unit index in the original input string at which the segment begins. */ + index: number; + + /** The complete input string that was segmented. */ + input: string; + + /** + * A boolean value only if granularity is "word"; otherwise, undefined. + * If granularity is "word", then isWordLike is true when the segment is word-like (i.e., consists of letters/numbers/ideographs/etc.); otherwise, false. */ - interface Segments { - /** - * Returns an object describing the segment in the original string that includes the code unit at a specified index. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/segment/Segments/containing) - * - * @param codeUnitIndex - A number specifying the index of the code unit in the original input string. If the value is omitted, it defaults to `0`. - */ - containing(codeUnitIndex?: number): SegmentData | undefined; - - /** Returns an iterator to iterate over the segments. */ - [Symbol.iterator](): SegmentIterator; - } - - interface SegmentData { - /** A string containing the segment extracted from the original input string. */ - segment: string; - - /** The code unit index in the original input string at which the segment begins. */ - index: number; - - /** The complete input string that was segmented. */ - input: string; - - /** - * A boolean value only if granularity is "word"; otherwise, undefined. - * If granularity is "word", then isWordLike is true when the segment is word-like (i.e., consists of letters/numbers/ideographs/etc.); otherwise, false. - */ - isWordLike?: boolean; - } - - /** - * The `Intl.Segmenter` object enables locale-sensitive text segmentation, enabling you to get meaningful items (graphemes, words or sentences) from a string. + isWordLike?: boolean; +} + +/** + * The `Intl.Segmenter` object enables locale-sensitive text segmentation, enabling you to get meaningful items (graphemes, words or sentences) from a string. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter) + */ + const Segmenter: { + prototype: Segmenter; + + /** + * Creates a new `Intl.Segmenter` object. + * + * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. + * For the general form and interpretation of the `locales` argument, + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter) + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/Segmenter#parameters) + * with some or all options of `SegmenterOptions`. + * + * @returns [Intl.Segmenter](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segments) object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter). */ - const Segmenter: { - prototype: Segmenter; - - /** - * Creates a new `Intl.Segmenter` object. - * - * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. - * For the general form and interpretation of the `locales` argument, - * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). - * - * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/Segmenter#parameters) - * with some or all options of `SegmenterOptions`. - * - * @returns [Intl.Segmenter](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segments) object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter). - */ - new (locales?: LocalesArgument, options?: SegmenterOptions): Segmenter; - - /** - * Returns an array containing those of the provided locales that are supported without having to fall back to the runtime's default locale. - * - * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. - * For the general form and interpretation of the `locales` argument, - * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). - * - * @param options An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/supportedLocalesOf#parameters). - * with some or all possible options. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/supportedLocalesOf) - */ - supportedLocalesOf(locales: LocalesArgument, options?: Pick): UnicodeBCP47LocaleIdentifier[]; - }; + new (locales?: LocalesArgument, options?: SegmenterOptions): Segmenter; - /** - * Returns a sorted array of the supported collation, calendar, currency, numbering system, timezones, and units by the implementation. - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf) + /** + * Returns an array containing those of the provided locales that are supported without having to fall back to the runtime's default locale. + * + * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. + * For the general form and interpretation of the `locales` argument, + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * + * @param options An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/supportedLocalesOf#parameters). + * with some or all possible options. * - * @param key A string indicating the category of values to return. - * @returns A sorted array of the supported values. + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/supportedLocalesOf) */ - function supportedValuesOf(key: "calendar" | "collation" | "currency" | "numberingSystem" | "timeZone" | "unit"): string[]; + supportedLocalesOf(locales: LocalesArgument, options?: Pick): UnicodeBCP47LocaleIdentifier[]; +}; + +/** + * Returns a sorted array of the supported collation, calendar, currency, numbering system, timezones, and units by the implementation. + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf) + * + * @param key A string indicating the category of values to return. + * @returns A sorted array of the supported values. + */ + function supportedValuesOf(key: "calendar" | "collation" | "currency" | "numberingSystem" | "timeZone" | "unit"): string[]; } ///////////////////////////// // lib.es2022.object.d.ts ///////////////////////////// interface ObjectConstructor { - /** - * Determines whether an object has a property with the specified name. - * @param o An object. - * @param v A property name. - */ - hasOwn(o: object, v: PropertyKey): boolean; + /** + * Determines whether an object has a property with the specified name. + * @param o An object. + * @param v A property name. + */ + hasOwn(o: object, v: PropertyKey): boolean; } ///////////////////////////// // lib.es2022.regexp.d.ts ///////////////////////////// interface RegExp { - /** - * Returns a Boolean value indicating the state of the hasIndices flag (d) used with a regular expression. - * Default is false. Read-only. - */ - readonly hasIndices: boolean; + /** + * Returns a Boolean value indicating the state of the hasIndices flag (d) used with a regular expression. + * Default is false. Read-only. + */ + readonly hasIndices: boolean; } ///////////////////////////// // lib.es2022.string.d.ts ///////////////////////////// interface String { - /** - * Returns a new String consisting of the single UTF-16 code unit located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): string | undefined; + /** + * Returns a new String consisting of the single UTF-16 code unit located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): string | undefined; } ///////////////////////////// // lib.es2023.array.d.ts ///////////////////////////// interface Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S | undefined; - - findLast(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S | undefined; + + findLast(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): number; - /** - * Returns a copy of an array with its elements reversed. - */ - toReversed(): T[]; + /** + * Returns a copy of an array with its elements reversed. + */ + toReversed(): T[]; - /** - * Returns a copy of an array with its elements sorted. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order. - * ```ts - * [11, 2, 22, 1].toSorted((a, b) => a - b) // [1, 2, 11, 22] - * ``` - */ - toSorted(compareFn?: (a: T, b: T) => number): T[]; + /** + * Returns a copy of an array with its elements sorted. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order. + * ```ts + * [11, 2, 22, 1].toSorted((a, b) => a - b) // [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: T, b: T) => number): T[]; - /** - * Copies an array and removes elements and, if necessary, inserts new elements in their place. Returns the copied array. - * @param start The zero-based location in the array from which to start removing elements. - * @param deleteCount The number of elements to remove. - * @param items Elements to insert into the copied array in place of the deleted elements. - * @returns The copied array. - */ - toSpliced(start: number, deleteCount: number, ...items: T[]): T[]; + /** + * Copies an array and removes elements and, if necessary, inserts new elements in their place. Returns the copied array. + * @param start The zero-based location in the array from which to start removing elements. + * @param deleteCount The number of elements to remove. + * @param items Elements to insert into the copied array in place of the deleted elements. + * @returns The copied array. + */ + toSpliced(start: number, deleteCount: number, ...items: T[]): T[]; - /** - * Copies an array and removes elements while returning the remaining elements. - * @param start The zero-based location in the array from which to start removing elements. - * @param deleteCount The number of elements to remove. - * @returns A copy of the original array with the remaining elements. - */ - toSpliced(start: number, deleteCount?: number): T[]; + /** + * Copies an array and removes elements while returning the remaining elements. + * @param start The zero-based location in the array from which to start removing elements. + * @param deleteCount The number of elements to remove. + * @returns A copy of the original array with the remaining elements. + */ + toSpliced(start: number, deleteCount?: number): T[]; - /** - * Copies an array, then overwrites the value at the provided index with the - * given value. If the index is negative, then it replaces from the end - * of the array. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to write into the copied array. - * @returns The copied array with the updated value. - */ - with(index: number, value: T): T[]; + /** + * Copies an array, then overwrites the value at the provided index with the + * given value. If the index is negative, then it replaces from the end + * of the array. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to write into the copied array. + * @returns The copied array with the updated value. + */ + with(index: number, value: T): T[]; } interface ReadonlyArray { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: (value: T, index: number, array: readonly T[]) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: (value: T, index: number, array: readonly T[]) => unknown, - thisArg?: any, - ): T | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: (value: T, index: number, array: readonly T[]) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: (value: T, index: number, array: readonly T[]) => unknown, + thisArg?: any, + ): T | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: (value: T, index: number, array: readonly T[]) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: (value: T, index: number, array: readonly T[]) => unknown, + thisArg?: any, + ): number; - /** - * Copies the array and returns the copied array with all of its elements reversed. - */ - toReversed(): T[]; + /** + * Copies the array and returns the copied array with all of its elements reversed. + */ + toReversed(): T[]; - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order. - * ```ts - * [11, 2, 22, 1].toSorted((a, b) => a - b) // [1, 2, 11, 22] - * ``` - */ - toSorted(compareFn?: (a: T, b: T) => number): T[]; + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order. + * ```ts + * [11, 2, 22, 1].toSorted((a, b) => a - b) // [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: T, b: T) => number): T[]; - /** - * Copies an array and removes elements while, if necessary, inserting new elements in their place, returning the remaining elements. - * @param start The zero-based location in the array from which to start removing elements. - * @param deleteCount The number of elements to remove. - * @param items Elements to insert into the copied array in place of the deleted elements. - * @returns A copy of the original array with the remaining elements. - */ - toSpliced(start: number, deleteCount: number, ...items: T[]): T[]; + /** + * Copies an array and removes elements while, if necessary, inserting new elements in their place, returning the remaining elements. + * @param start The zero-based location in the array from which to start removing elements. + * @param deleteCount The number of elements to remove. + * @param items Elements to insert into the copied array in place of the deleted elements. + * @returns A copy of the original array with the remaining elements. + */ + toSpliced(start: number, deleteCount: number, ...items: T[]): T[]; - /** - * Copies an array and removes elements while returning the remaining elements. - * @param start The zero-based location in the array from which to start removing elements. - * @param deleteCount The number of elements to remove. - * @returns A copy of the original array with the remaining elements. - */ - toSpliced(start: number, deleteCount?: number): T[]; + /** + * Copies an array and removes elements while returning the remaining elements. + * @param start The zero-based location in the array from which to start removing elements. + * @param deleteCount The number of elements to remove. + * @returns A copy of the original array with the remaining elements. + */ + toSpliced(start: number, deleteCount?: number): T[]; - /** - * Copies an array, then overwrites the value at the provided index with the - * given value. If the index is negative, then it replaces from the end - * of the array - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: T): T[]; + /** + * Copies an array, then overwrites the value at the provided index with the + * given value. If the index is negative, then it replaces from the end + * of the array + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: T): T[]; } interface Int8Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, - ): number | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: (value: number, index: number, array: this) => unknown, + thisArg?: any, + ): number | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: (value: number, index: number, array: this) => unknown, + thisArg?: any, + ): number; - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): Int8Array; + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Int8Array; - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = Int8Array.from([11, 2, 22, 1]); - * myNums.toSorted((a, b) => a - b) // Int8Array(4) [1, 2, 11, 22] - * ``` - */ - toSorted(compareFn?: (a: number, b: number) => number): Int8Array; + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = Int8Array.from([11, 2, 22, 1]); + * myNums.toSorted((a, b) => a - b) // Int8Array(4) [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Int8Array; - /** - * Copies the array and inserts the given number at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: number): Int8Array; + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Int8Array; } interface Uint8Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, - ): number | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: (value: number, index: number, array: this) => unknown, + thisArg?: any, + ): number | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: (value: number, index: number, array: this) => unknown, + thisArg?: any, + ): number; - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): Uint8Array; + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Uint8Array; - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = Uint8Array.from([11, 2, 22, 1]); - * myNums.toSorted((a, b) => a - b) // Uint8Array(4) [1, 2, 11, 22] - * ``` - */ - toSorted(compareFn?: (a: number, b: number) => number): Uint8Array; + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = Uint8Array.from([11, 2, 22, 1]); + * myNums.toSorted((a, b) => a - b) // Uint8Array(4) [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Uint8Array; - /** - * Copies the array and inserts the given number at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: number): Uint8Array; + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Uint8Array; } interface Uint8ClampedArray { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number; - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): Uint8ClampedArray; + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Uint8ClampedArray; - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = Uint8ClampedArray.from([11, 2, 22, 1]); - * myNums.toSorted((a, b) => a - b) // Uint8ClampedArray(4) [1, 2, 11, 22] - * ``` - */ - toSorted(compareFn?: (a: number, b: number) => number): Uint8ClampedArray; + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = Uint8ClampedArray.from([11, 2, 22, 1]); + * myNums.toSorted((a, b) => a - b) // Uint8ClampedArray(4) [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Uint8ClampedArray; - /** - * Copies the array and inserts the given number at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: number): Uint8ClampedArray; + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Uint8ClampedArray; } interface Int16Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, - ): number | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: (value: number, index: number, array: this) => unknown, + thisArg?: any, + ): number | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: (value: number, index: number, array: this) => unknown, + thisArg?: any, + ): number; - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): Int16Array; + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Int16Array; - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = Int16Array.from([11, 2, -22, 1]); - * myNums.toSorted((a, b) => a - b) // Int16Array(4) [-22, 1, 2, 11] - * ``` - */ - toSorted(compareFn?: (a: number, b: number) => number): Int16Array; + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = Int16Array.from([11, 2, -22, 1]); + * myNums.toSorted((a, b) => a - b) // Int16Array(4) [-22, 1, 2, 11] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Int16Array; - /** - * Copies the array and inserts the given number at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: number): Int16Array; + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Int16Array; } interface Uint16Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number; - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): Uint16Array; + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Uint16Array; - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = Uint16Array.from([11, 2, 22, 1]); - * myNums.toSorted((a, b) => a - b) // Uint16Array(4) [1, 2, 11, 22] - * ``` - */ - toSorted(compareFn?: (a: number, b: number) => number): Uint16Array; + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = Uint16Array.from([11, 2, 22, 1]); + * myNums.toSorted((a, b) => a - b) // Uint16Array(4) [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Uint16Array; - /** - * Copies the array and inserts the given number at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: number): Uint16Array; + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Uint16Array; } interface Int32Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, - ): number | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: (value: number, index: number, array: this) => unknown, + thisArg?: any, + ): number | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: (value: number, index: number, array: this) => unknown, + thisArg?: any, + ): number; - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): Int32Array; + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Int32Array; - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = Int32Array.from([11, 2, -22, 1]); - * myNums.toSorted((a, b) => a - b) // Int32Array(4) [-22, 1, 2, 11] - * ``` - */ - toSorted(compareFn?: (a: number, b: number) => number): Int32Array; + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = Int32Array.from([11, 2, -22, 1]); + * myNums.toSorted((a, b) => a - b) // Int32Array(4) [-22, 1, 2, 11] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Int32Array; - /** - * Copies the array and inserts the given number at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: number): Int32Array; + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Int32Array; } interface Uint32Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number; - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): Uint32Array; + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Uint32Array; - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = Uint32Array.from([11, 2, 22, 1]); - * myNums.toSorted((a, b) => a - b) // Uint32Array(4) [1, 2, 11, 22] - * ``` - */ - toSorted(compareFn?: (a: number, b: number) => number): Uint32Array; + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = Uint32Array.from([11, 2, 22, 1]); + * myNums.toSorted((a, b) => a - b) // Uint32Array(4) [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Uint32Array; - /** - * Copies the array and inserts the given number at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: number): Uint32Array; + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Uint32Array; } interface Float32Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number; - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): Float32Array; + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Float32Array; - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = Float32Array.from([11.25, 2, -22.5, 1]); - * myNums.toSorted((a, b) => a - b) // Float32Array(4) [-22.5, 1, 2, 11.5] - * ``` - */ - toSorted(compareFn?: (a: number, b: number) => number): Float32Array; + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = Float32Array.from([11.25, 2, -22.5, 1]); + * myNums.toSorted((a, b) => a - b) // Float32Array(4) [-22.5, 1, 2, 11.5] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Float32Array; - /** - * Copies the array and inserts the given number at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: number): Float32Array; + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Float32Array; } interface Float64Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number; - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): Float64Array; + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Float64Array; - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = Float64Array.from([11.25, 2, -22.5, 1]); - * myNums.toSorted((a, b) => a - b) // Float64Array(4) [-22.5, 1, 2, 11.5] - * ``` - */ - toSorted(compareFn?: (a: number, b: number) => number): Float64Array; + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = Float64Array.from([11.25, 2, -22.5, 1]); + * myNums.toSorted((a, b) => a - b) // Float64Array(4) [-22.5, 1, 2, 11.5] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Float64Array; - /** - * Copies the array and inserts the given number at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: number): Float64Array; + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Float64Array; } interface BigInt64Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: bigint, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: ( - value: bigint, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): bigint | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: bigint, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: ( + value: bigint, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): bigint | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: ( - value: bigint, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: ( + value: bigint, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number; - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): BigInt64Array; + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): BigInt64Array; - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = BigInt64Array.from([11n, 2n, -22n, 1n]); - * myNums.toSorted((a, b) => Number(a - b)) // BigInt64Array(4) [-22n, 1n, 2n, 11n] - * ``` - */ - toSorted(compareFn?: (a: bigint, b: bigint) => number): BigInt64Array; + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = BigInt64Array.from([11n, 2n, -22n, 1n]); + * myNums.toSorted((a, b) => Number(a - b)) // BigInt64Array(4) [-22n, 1n, 2n, 11n] + * ``` + */ + toSorted(compareFn?: (a: bigint, b: bigint) => number): BigInt64Array; - /** - * Copies the array and inserts the given bigint at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: bigint): BigInt64Array; + /** + * Copies the array and inserts the given bigint at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: bigint): BigInt64Array; } interface BigUint64Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: bigint, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: ( - value: bigint, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): bigint | undefined; + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: bigint, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: ( + value: bigint, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): bigint | undefined; - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: ( - value: bigint, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number; + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: ( + value: bigint, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number; - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): BigUint64Array; + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): BigUint64Array; - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = BigUint64Array.from([11n, 2n, 22n, 1n]); - * myNums.toSorted((a, b) => Number(a - b)) // BigUint64Array(4) [1n, 2n, 11n, 22n] - * ``` - */ - toSorted(compareFn?: (a: bigint, b: bigint) => number): BigUint64Array; + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = BigUint64Array.from([11n, 2n, 22n, 1n]); + * myNums.toSorted((a, b) => Number(a - b)) // BigUint64Array(4) [1n, 2n, 11n, 22n] + * ``` + */ + toSorted(compareFn?: (a: bigint, b: bigint) => number): BigUint64Array; - /** - * Copies the array and inserts the given bigint at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: bigint): BigUint64Array; + /** + * Copies the array and inserts the given bigint at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: bigint): BigUint64Array; } ///////////////////////////// // lib.es2023.intl.d.ts ///////////////////////////// declare namespace Intl { - interface NumberFormatRangePartTypeRegistry extends NumberFormatPartTypeRegistry { - approximatelySign: never; - } +interface NumberFormatRangePartTypeRegistry extends NumberFormatPartTypeRegistry { + approximatelySign: never; +} - type NumberFormatRangePartTypes = keyof NumberFormatRangePartTypeRegistry; +type NumberFormatRangePartTypes = keyof NumberFormatRangePartTypeRegistry; - interface NumberFormatOptions { - roundingPriority?: "auto" | "morePrecision" | "lessPrecision" | undefined; +interface NumberFormatOptions { + roundingPriority?: "auto" | "morePrecision" | "lessPrecision" | undefined; - roundingIncrement?: 1 | 2 | 5 | 10 | 20 | 25 | 50 | 100 | 200 | 250 | 500 | 1000 | 2000 | 2500 | 5000 | undefined; + roundingIncrement?: 1 | 2 | 5 | 10 | 20 | 25 | 50 | 100 | 200 | 250 | 500 | 1000 | 2000 | 2500 | 5000 | undefined; - roundingMode?: "ceil" | "floor" | "expand" | "trunc" | "halfCeil" | "halfFloor" | "halfExpand" | "halfTrunc" | "halfEven" | undefined; + roundingMode?: "ceil" | "floor" | "expand" | "trunc" | "halfCeil" | "halfFloor" | "halfExpand" | "halfTrunc" | "halfEven" | undefined; - trailingZeroDisplay?: "auto" | "stripIfInteger" | undefined; - } + trailingZeroDisplay?: "auto" | "stripIfInteger" | undefined; +} - interface ResolvedNumberFormatOptions { - roundingPriority: "auto" | "morePrecision" | "lessPrecision"; +interface ResolvedNumberFormatOptions { + roundingPriority: "auto" | "morePrecision" | "lessPrecision"; - roundingMode: "ceil" | "floor" | "expand" | "trunc" | "halfCeil" | "halfFloor" | "halfExpand" | "halfTrunc" | "halfEven"; + roundingMode: "ceil" | "floor" | "expand" | "trunc" | "halfCeil" | "halfFloor" | "halfExpand" | "halfTrunc" | "halfEven"; - roundingIncrement: 1 | 2 | 5 | 10 | 20 | 25 | 50 | 100 | 200 | 250 | 500 | 1000 | 2000 | 2500 | 5000; + roundingIncrement: 1 | 2 | 5 | 10 | 20 | 25 | 50 | 100 | 200 | 250 | 500 | 1000 | 2000 | 2500 | 5000; - trailingZeroDisplay: "auto" | "stripIfInteger"; - } + trailingZeroDisplay: "auto" | "stripIfInteger"; +} - interface NumberRangeFormatPart { - type: NumberFormatRangePartTypes; +interface NumberRangeFormatPart { + type: NumberFormatRangePartTypes; - value: string; + value: string; - source: "startRange" | "endRange" | "shared"; - } + source: "startRange" | "endRange" | "shared"; +} - type StringNumericLiteral = `${number}` | "Infinity" | "-Infinity" | "+Infinity"; +type StringNumericLiteral = `${number}` | "Infinity" | "-Infinity" | "+Infinity"; - interface NumberFormat { - format(value: number | bigint | StringNumericLiteral): string; +interface NumberFormat { + format(value: number | bigint | StringNumericLiteral): string; - formatToParts(value: number | bigint | StringNumericLiteral): NumberFormatPart[]; + formatToParts(value: number | bigint | StringNumericLiteral): NumberFormatPart[]; - formatRange(start: number | bigint | StringNumericLiteral, end: number | bigint | StringNumericLiteral): string; + formatRange(start: number | bigint | StringNumericLiteral, end: number | bigint | StringNumericLiteral): string; - formatRangeToParts(start: number | bigint | StringNumericLiteral, end: number | bigint | StringNumericLiteral): NumberRangeFormatPart[]; - } + formatRangeToParts(start: number | bigint | StringNumericLiteral, end: number | bigint | StringNumericLiteral): NumberRangeFormatPart[]; +} } ///////////////////////////// // lib.es2024.arraybuffer.d.ts ///////////////////////////// interface ArrayBuffer { - /** - * If this ArrayBuffer is resizable, returns the maximum byte length given during construction; returns the byte length if not. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/maxByteLength) - */ - get maxByteLength(): number; + /** + * If this ArrayBuffer is resizable, returns the maximum byte length given during construction; returns the byte length if not. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/maxByteLength) + */ + get maxByteLength(): number; - /** - * Returns true if this ArrayBuffer can be resized. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/resizable) - */ - get resizable(): boolean; + /** + * Returns true if this ArrayBuffer can be resized. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/resizable) + */ + get resizable(): boolean; - /** - * Resizes the ArrayBuffer to the specified size (in bytes). - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/resize) - */ - resize(newByteLength?: number): void; + /** + * Resizes the ArrayBuffer to the specified size (in bytes). + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/resize) + */ + resize(newByteLength?: number): void; - /** - * Returns a boolean indicating whether or not this buffer has been detached (transferred). - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/detached) - */ - get detached(): boolean; + /** + * Returns a boolean indicating whether or not this buffer has been detached (transferred). + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/detached) + */ + get detached(): boolean; - /** - * Creates a new ArrayBuffer with the same byte content as this buffer, then detaches this buffer. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/transfer) - */ - transfer(newByteLength?: number): ArrayBuffer; + /** + * Creates a new ArrayBuffer with the same byte content as this buffer, then detaches this buffer. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/transfer) + */ + transfer(newByteLength?: number): ArrayBuffer; - /** - * Creates a new non-resizable ArrayBuffer with the same byte content as this buffer, then detaches this buffer. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/transferToFixedLength) - */ - transferToFixedLength(newByteLength?: number): ArrayBuffer; + /** + * Creates a new non-resizable ArrayBuffer with the same byte content as this buffer, then detaches this buffer. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/transferToFixedLength) + */ + transferToFixedLength(newByteLength?: number): ArrayBuffer; } interface ArrayBufferConstructor { - new (byteLength: number, options?: { maxByteLength?: number; }): ArrayBuffer; + new (byteLength: number, options?: { maxByteLength?: number; }): ArrayBuffer; } ///////////////////////////// // lib.es2024.collection.d.ts ///////////////////////////// interface MapConstructor { - /** - * Groups members of an iterable according to the return value of the passed callback. - * @param items An iterable. - * @param keySelector A callback which will be invoked for each item in items. - */ - groupBy( - items: Iterable, - keySelector: (item: T, index: number) => K, - ): Map; + /** + * Groups members of an iterable according to the return value of the passed callback. + * @param items An iterable. + * @param keySelector A callback which will be invoked for each item in items. + */ + groupBy( + items: Iterable, + keySelector: (item: T, index: number) => K, + ): Map; } ///////////////////////////// // lib.es2024.object.d.ts ///////////////////////////// interface ObjectConstructor { - /** - * Groups members of an iterable according to the return value of the passed callback. - * @param items An iterable. - * @param keySelector A callback which will be invoked for each item in items. - */ - groupBy( - items: Iterable, - keySelector: (item: T, index: number) => K, - ): Partial>; + /** + * Groups members of an iterable according to the return value of the passed callback. + * @param items An iterable. + * @param keySelector A callback which will be invoked for each item in items. + */ + groupBy( + items: Iterable, + keySelector: (item: T, index: number) => K, + ): Partial>; } ///////////////////////////// // lib.es2024.promise.d.ts ///////////////////////////// interface PromiseWithResolvers { - promise: Promise; + promise: Promise; - resolve: (value: T | PromiseLike) => void; + resolve: (value: T | PromiseLike) => void; - reject: (reason?: any) => void; + reject: (reason?: any) => void; } interface PromiseConstructor { - /** - * Creates a new Promise and returns it in an object, along with its resolve and reject functions. - * @returns An object with the properties `promise`, `resolve`, and `reject`. - * - * ```ts - * const { promise, resolve, reject } = Promise.withResolvers(); - * ``` - */ - withResolvers(): PromiseWithResolvers; + /** + * Creates a new Promise and returns it in an object, along with its resolve and reject functions. + * @returns An object with the properties `promise`, `resolve`, and `reject`. + * + * ```ts + * const { promise, resolve, reject } = Promise.withResolvers(); + * ``` + */ + withResolvers(): PromiseWithResolvers; } ///////////////////////////// // lib.es2024.regexp.d.ts ///////////////////////////// interface RegExp { - /** - * Returns a Boolean value indicating the state of the unicodeSets flag (v) used with a regular expression. - * Default is false. Read-only. - */ - readonly unicodeSets: boolean; + /** + * Returns a Boolean value indicating the state of the unicodeSets flag (v) used with a regular expression. + * Default is false. Read-only. + */ + readonly unicodeSets: boolean; } ///////////////////////////// // lib.es2024.sharedmemory.d.ts ///////////////////////////// interface SharedArrayBuffer { - /** - * Returns true if this SharedArrayBuffer can be grown. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/growable) - */ - get growable(): boolean; + /** + * Returns true if this SharedArrayBuffer can be grown. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/growable) + */ + get growable(): boolean; - /** - * If this SharedArrayBuffer is growable, returns the maximum byte length given during construction; returns the byte length if not. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/maxByteLength) - */ - get maxByteLength(): number; + /** + * If this SharedArrayBuffer is growable, returns the maximum byte length given during construction; returns the byte length if not. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/maxByteLength) + */ + get maxByteLength(): number; - /** - * Grows the SharedArrayBuffer to the specified size (in bytes). - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/grow) - */ - grow(newByteLength?: number): void; + /** + * Grows the SharedArrayBuffer to the specified size (in bytes). + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/grow) + */ + grow(newByteLength?: number): void; } interface SharedArrayBufferConstructor { - new (byteLength: number, options?: { maxByteLength?: number; }): SharedArrayBuffer; + new (byteLength: number, options?: { maxByteLength?: number; }): SharedArrayBuffer; } ///////////////////////////// // lib.es2024.string.d.ts ///////////////////////////// interface String { - /** - * Returns true if all leading surrogates and trailing surrogates appear paired and in order. - */ - isWellFormed(): boolean; + /** + * Returns true if all leading surrogates and trailing surrogates appear paired and in order. + */ + isWellFormed(): boolean; - /** - * Returns a string where all lone or out-of-order surrogates have been replaced by the Unicode replacement character (U+FFFD). - */ - toWellFormed(): string; + /** + * Returns a string where all lone or out-of-order surrogates have been replaced by the Unicode replacement character (U+FFFD). + */ + toWellFormed(): string; } ///////////////////////////// // lib.es2025.collection.d.ts ///////////////////////////// interface ReadonlySetLike { - /** - * Despite its name, returns an iterator of the values in the set-like. - */ - keys(): Iterator; + /** + * Despite its name, returns an iterator of the values in the set-like. + */ + keys(): Iterator; - /** - * @returns a boolean indicating whether an element with the specified value exists in the set-like or not. - */ - has(value: T): boolean; + /** + * @returns a boolean indicating whether an element with the specified value exists in the set-like or not. + */ + has(value: T): boolean; - /** - * @returns the number of (unique) elements in the set-like. - */ - readonly size: number; + /** + * @returns the number of (unique) elements in the set-like. + */ + readonly size: number; } interface Set { - /** - * @returns a new Set containing all the elements in this Set and also all the elements in the argument. - */ - union(other: ReadonlySetLike): Set; + /** + * @returns a new Set containing all the elements in this Set and also all the elements in the argument. + */ + union(other: ReadonlySetLike): Set; - /** - * @returns a new Set containing all the elements which are both in this Set and in the argument. - */ - intersection(other: ReadonlySetLike): Set; + /** + * @returns a new Set containing all the elements which are both in this Set and in the argument. + */ + intersection(other: ReadonlySetLike): Set; - /** - * @returns a new Set containing all the elements in this Set which are not also in the argument. - */ - difference(other: ReadonlySetLike): Set; + /** + * @returns a new Set containing all the elements in this Set which are not also in the argument. + */ + difference(other: ReadonlySetLike): Set; - /** - * @returns a new Set containing all the elements which are in either this Set or in the argument, but not in both. - */ - symmetricDifference(other: ReadonlySetLike): Set; + /** + * @returns a new Set containing all the elements which are in either this Set or in the argument, but not in both. + */ + symmetricDifference(other: ReadonlySetLike): Set; - /** - * @returns a boolean indicating whether all the elements in this Set are also in the argument. - */ - isSubsetOf(other: ReadonlySetLike): boolean; + /** + * @returns a boolean indicating whether all the elements in this Set are also in the argument. + */ + isSubsetOf(other: ReadonlySetLike): boolean; - /** - * @returns a boolean indicating whether all the elements in the argument are also in this Set. - */ - isSupersetOf(other: ReadonlySetLike): boolean; + /** + * @returns a boolean indicating whether all the elements in the argument are also in this Set. + */ + isSupersetOf(other: ReadonlySetLike): boolean; - /** - * @returns a boolean indicating whether this Set has no elements in common with the argument. - */ - isDisjointFrom(other: ReadonlySetLike): boolean; + /** + * @returns a boolean indicating whether this Set has no elements in common with the argument. + */ + isDisjointFrom(other: ReadonlySetLike): boolean; } interface ReadonlySet { - /** - * @returns a new Set containing all the elements in this Set and also all the elements in the argument. - */ - union(other: ReadonlySetLike): Set; + /** + * @returns a new Set containing all the elements in this Set and also all the elements in the argument. + */ + union(other: ReadonlySetLike): Set; - /** - * @returns a new Set containing all the elements which are both in this Set and in the argument. - */ - intersection(other: ReadonlySetLike): Set; + /** + * @returns a new Set containing all the elements which are both in this Set and in the argument. + */ + intersection(other: ReadonlySetLike): Set; - /** - * @returns a new Set containing all the elements in this Set which are not also in the argument. - */ - difference(other: ReadonlySetLike): Set; + /** + * @returns a new Set containing all the elements in this Set which are not also in the argument. + */ + difference(other: ReadonlySetLike): Set; - /** - * @returns a new Set containing all the elements which are in either this Set or in the argument, but not in both. - */ - symmetricDifference(other: ReadonlySetLike): Set; + /** + * @returns a new Set containing all the elements which are in either this Set or in the argument, but not in both. + */ + symmetricDifference(other: ReadonlySetLike): Set; - /** - * @returns a boolean indicating whether all the elements in this Set are also in the argument. - */ - isSubsetOf(other: ReadonlySetLike): boolean; + /** + * @returns a boolean indicating whether all the elements in this Set are also in the argument. + */ + isSubsetOf(other: ReadonlySetLike): boolean; - /** - * @returns a boolean indicating whether all the elements in the argument are also in this Set. - */ - isSupersetOf(other: ReadonlySetLike): boolean; + /** + * @returns a boolean indicating whether all the elements in the argument are also in this Set. + */ + isSupersetOf(other: ReadonlySetLike): boolean; - /** - * @returns a boolean indicating whether this Set has no elements in common with the argument. - */ - isDisjointFrom(other: ReadonlySetLike): boolean; + /** + * @returns a boolean indicating whether this Set has no elements in common with the argument. + */ + isDisjointFrom(other: ReadonlySetLike): boolean; } ///////////////////////////// @@ -5996,177 +5996,177 @@ declare function encodeURI(uri: string): string; declare function encodeURIComponent(uriComponent: string | number | boolean): string; interface Symbol { - /** Returns a string representation of an object. */ - toString(): string; + /** Returns a string representation of an object. */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): symbol; + /** Returns the primitive value of the specified object. */ + valueOf(): symbol; } declare type PropertyKey = string | number | symbol; interface PropertyDescriptor { - configurable?: boolean; + configurable?: boolean; - enumerable?: boolean; + enumerable?: boolean; - value?: any; + value?: any; - writable?: boolean; + writable?: boolean; - get?(): any; + get?(): any; - set?(v: any): void; + set?(v: any): void; } interface PropertyDescriptorMap { - [key: PropertyKey]: PropertyDescriptor; + [key: PropertyKey]: PropertyDescriptor; } interface Object { - /** The initial value of Object.prototype.constructor is the standard built-in Object constructor. */ - constructor: Function; + /** The initial value of Object.prototype.constructor is the standard built-in Object constructor. */ + constructor: Function; - /** Returns a string representation of an object. */ - toString(): string; + /** Returns a string representation of an object. */ + toString(): string; - /** Returns a date converted to a string using the current locale. */ - toLocaleString(): string; + /** Returns a date converted to a string using the current locale. */ + toLocaleString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): Object; + /** Returns the primitive value of the specified object. */ + valueOf(): Object; - /** - * Determines whether an object has a property with the specified name. - * @param v A property name. - */ - hasOwnProperty(v: PropertyKey): boolean; + /** + * Determines whether an object has a property with the specified name. + * @param v A property name. + */ + hasOwnProperty(v: PropertyKey): boolean; - /** - * Determines whether an object exists in another object's prototype chain. - * @param v Another object whose prototype chain is to be checked. - */ - isPrototypeOf(v: Object): boolean; + /** + * Determines whether an object exists in another object's prototype chain. + * @param v Another object whose prototype chain is to be checked. + */ + isPrototypeOf(v: Object): boolean; - /** - * Determines whether a specified property is enumerable. - * @param v A property name. - */ - propertyIsEnumerable(v: PropertyKey): boolean; + /** + * Determines whether a specified property is enumerable. + * @param v A property name. + */ + propertyIsEnumerable(v: PropertyKey): boolean; } interface ObjectConstructor { - new (value?: any): Object; + new (value?: any): Object; - (): any; + (): any; - (value: any): any; + (value: any): any; - /** A reference to the prototype for a class of objects. */ - readonly prototype: Object; + /** A reference to the prototype for a class of objects. */ + readonly prototype: Object; - /** - * Returns the prototype of an object. - * @param o The object that references the prototype. - */ - getPrototypeOf(o: any): any; + /** + * Returns the prototype of an object. + * @param o The object that references the prototype. + */ + getPrototypeOf(o: any): any; - /** - * Gets the own property descriptor of the specified object. - * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype. - * @param o Object that contains the property. - * @param p Name of the property. - */ - getOwnPropertyDescriptor(o: any, p: PropertyKey): PropertyDescriptor | undefined; + /** + * Gets the own property descriptor of the specified object. + * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype. + * @param o Object that contains the property. + * @param p Name of the property. + */ + getOwnPropertyDescriptor(o: any, p: PropertyKey): PropertyDescriptor | undefined; - /** - * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly - * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions. - * @param o Object that contains the own properties. - */ - getOwnPropertyNames(o: any): string[]; + /** + * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly + * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions. + * @param o Object that contains the own properties. + */ + getOwnPropertyNames(o: any): string[]; - /** - * Creates an object that has the specified prototype or that has null prototype. - * @param o Object to use as a prototype. May be null. - */ - create(o: object | null): any; + /** + * Creates an object that has the specified prototype or that has null prototype. + * @param o Object to use as a prototype. May be null. + */ + create(o: object | null): any; - /** - * Creates an object that has the specified prototype, and that optionally contains specified properties. - * @param o Object to use as a prototype. May be null - * @param properties JavaScript object that contains one or more property descriptors. - */ - create(o: object | null, properties: PropertyDescriptorMap & ThisType): any; + /** + * Creates an object that has the specified prototype, and that optionally contains specified properties. + * @param o Object to use as a prototype. May be null + * @param properties JavaScript object that contains one or more property descriptors. + */ + create(o: object | null, properties: PropertyDescriptorMap & ThisType): any; - /** - * Adds a property to an object, or modifies attributes of an existing property. - * @param o Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object. - * @param p The property name. - * @param attributes Descriptor for the property. It can be for a data property or an accessor property. - */ - defineProperty(o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType): T; + /** + * Adds a property to an object, or modifies attributes of an existing property. + * @param o Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object. + * @param p The property name. + * @param attributes Descriptor for the property. It can be for a data property or an accessor property. + */ + defineProperty(o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType): T; - /** - * Adds one or more properties to an object, and/or modifies attributes of existing properties. - * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object. - * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property. - */ - defineProperties(o: T, properties: PropertyDescriptorMap & ThisType): T; + /** + * Adds one or more properties to an object, and/or modifies attributes of existing properties. + * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object. + * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property. + */ + defineProperties(o: T, properties: PropertyDescriptorMap & ThisType): T; - /** - * Prevents the modification of attributes of existing properties, and prevents the addition of new properties. - * @param o Object on which to lock the attributes. - */ - seal(o: T): T; + /** + * Prevents the modification of attributes of existing properties, and prevents the addition of new properties. + * @param o Object on which to lock the attributes. + */ + seal(o: T): T; - /** - * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. - * @param f Object on which to lock the attributes. - */ - freeze(f: T): T; + /** + * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. + * @param f Object on which to lock the attributes. + */ + freeze(f: T): T; - /** - * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. - * @param o Object on which to lock the attributes. - */ - freeze(o: T): Readonly; + /** + * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. + * @param o Object on which to lock the attributes. + */ + freeze(o: T): Readonly; - /** - * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. - * @param o Object on which to lock the attributes. - */ - freeze(o: T): Readonly; + /** + * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. + * @param o Object on which to lock the attributes. + */ + freeze(o: T): Readonly; - /** - * Prevents the addition of new properties to an object. - * @param o Object to make non-extensible. - */ - preventExtensions(o: T): T; + /** + * Prevents the addition of new properties to an object. + * @param o Object to make non-extensible. + */ + preventExtensions(o: T): T; - /** - * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object. - * @param o Object to test. - */ - isSealed(o: any): boolean; + /** + * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object. + * @param o Object to test. + */ + isSealed(o: any): boolean; - /** - * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object. - * @param o Object to test. - */ - isFrozen(o: any): boolean; + /** + * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object. + * @param o Object to test. + */ + isFrozen(o: any): boolean; - /** - * Returns a value that indicates whether new properties can be added to an object. - * @param o Object to test. - */ - isExtensible(o: any): boolean; + /** + * Returns a value that indicates whether new properties can be added to an object. + * @param o Object to test. + */ + isExtensible(o: any): boolean; - /** - * Returns the names of the enumerable string properties and methods of an object. - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - keys(o: object): string[]; + /** + * Returns the names of the enumerable string properties and methods of an object. + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + keys(o: object): string[]; } /** @@ -6178,46 +6178,46 @@ declare var Object: ObjectConstructor; * Creates a new function. */ interface Function { - /** - * Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function. - * @param thisArg The object to be used as the this object. - * @param argArray A set of arguments to be passed to the function. - */ - apply(this: Function, thisArg: any, argArray?: any): any; + /** + * Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function. + * @param thisArg The object to be used as the this object. + * @param argArray A set of arguments to be passed to the function. + */ + apply(this: Function, thisArg: any, argArray?: any): any; - /** - * Calls a method of an object, substituting another object for the current object. - * @param thisArg The object to be used as the current object. - * @param argArray A list of arguments to be passed to the method. - */ - call(this: Function, thisArg: any, ...argArray: any[]): any; + /** + * Calls a method of an object, substituting another object for the current object. + * @param thisArg The object to be used as the current object. + * @param argArray A list of arguments to be passed to the method. + */ + call(this: Function, thisArg: any, ...argArray: any[]): any; - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg An object to which the this keyword can refer inside the new function. - * @param argArray A list of arguments to be passed to the new function. - */ - bind(this: Function, thisArg: any, ...argArray: any[]): any; + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg An object to which the this keyword can refer inside the new function. + * @param argArray A list of arguments to be passed to the new function. + */ + bind(this: Function, thisArg: any, ...argArray: any[]): any; - /** Returns a string representation of a function. */ - toString(): string; + /** Returns a string representation of a function. */ + toString(): string; - prototype: any; + prototype: any; - readonly length: number; + readonly length: number; } interface FunctionConstructor { - /** - * Creates a new function. - * @param args A list of arguments the function accepts. - */ - new (...args: string[]): Function; + /** + * Creates a new function. + * @param args A list of arguments the function accepts. + */ + new (...args: string[]): Function; - (...args: string[]): Function; + (...args: string[]): Function; - readonly prototype: Function; + readonly prototype: Function; } declare var Function: FunctionConstructor; @@ -6233,208 +6233,208 @@ type ThisParameterType = T extends (this: infer U, ...args: never) => any ? U type OmitThisParameter = unknown extends ThisParameterType ? T : T extends (...args: infer A) => infer R ? (...args: A) => R : T; interface CallableFunction extends Function { - /** - * Calls the function with the specified object as the this value and the elements of specified array as the arguments. - * @param thisArg The object to be used as the this object. - */ - apply(this: (this: T) => R, thisArg: T): R; + /** + * Calls the function with the specified object as the this value and the elements of specified array as the arguments. + * @param thisArg The object to be used as the this object. + */ + apply(this: (this: T) => R, thisArg: T): R; - /** - * Calls the function with the specified object as the this value and the elements of specified array as the arguments. - * @param thisArg The object to be used as the this object. - * @param args An array of argument values to be passed to the function. - */ - apply(this: (this: T, ...args: A) => R, thisArg: T, args: A): R; + /** + * Calls the function with the specified object as the this value and the elements of specified array as the arguments. + * @param thisArg The object to be used as the this object. + * @param args An array of argument values to be passed to the function. + */ + apply(this: (this: T, ...args: A) => R, thisArg: T, args: A): R; - /** - * Calls the function with the specified object as the this value and the specified rest arguments as the arguments. - * @param thisArg The object to be used as the this object. - * @param args Argument values to be passed to the function. - */ - call(this: (this: T, ...args: A) => R, thisArg: T, ...args: A): R; + /** + * Calls the function with the specified object as the this value and the specified rest arguments as the arguments. + * @param thisArg The object to be used as the this object. + * @param args Argument values to be passed to the function. + */ + call(this: (this: T, ...args: A) => R, thisArg: T, ...args: A): R; - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg The object to be used as the this object. - */ - bind(this: T, thisArg: ThisParameterType): OmitThisParameter; + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg The object to be used as the this object. + */ + bind(this: T, thisArg: ThisParameterType): OmitThisParameter; - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg The object to be used as the this object. - * @param args Arguments to bind to the parameters of the function. - */ - bind(this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg The object to be used as the this object. + * @param args Arguments to bind to the parameters of the function. + */ + bind(this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } interface NewableFunction extends Function { - /** - * Calls the function with the specified object as the this value and the elements of specified array as the arguments. - * @param thisArg The object to be used as the this object. - */ - apply(this: new () => T, thisArg: T): void; + /** + * Calls the function with the specified object as the this value and the elements of specified array as the arguments. + * @param thisArg The object to be used as the this object. + */ + apply(this: new () => T, thisArg: T): void; - /** - * Calls the function with the specified object as the this value and the elements of specified array as the arguments. - * @param thisArg The object to be used as the this object. - * @param args An array of argument values to be passed to the function. - */ - apply(this: new (...args: A) => T, thisArg: T, args: A): void; + /** + * Calls the function with the specified object as the this value and the elements of specified array as the arguments. + * @param thisArg The object to be used as the this object. + * @param args An array of argument values to be passed to the function. + */ + apply(this: new (...args: A) => T, thisArg: T, args: A): void; - /** - * Calls the function with the specified object as the this value and the specified rest arguments as the arguments. - * @param thisArg The object to be used as the this object. - * @param args Argument values to be passed to the function. - */ - call(this: new (...args: A) => T, thisArg: T, ...args: A): void; + /** + * Calls the function with the specified object as the this value and the specified rest arguments as the arguments. + * @param thisArg The object to be used as the this object. + * @param args Argument values to be passed to the function. + */ + call(this: new (...args: A) => T, thisArg: T, ...args: A): void; - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg The object to be used as the this object. - */ - bind(this: T, thisArg: any): T; + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg The object to be used as the this object. + */ + bind(this: T, thisArg: any): T; - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg The object to be used as the this object. - * @param args Arguments to bind to the parameters of the function. - */ - bind(this: new (...args: [...A, ...B]) => R, thisArg: any, ...args: A): new (...args: B) => R; + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg The object to be used as the this object. + * @param args Arguments to bind to the parameters of the function. + */ + bind(this: new (...args: [...A, ...B]) => R, thisArg: any, ...args: A): new (...args: B) => R; } interface IArguments { - [index: number]: any; + [index: number]: any; - length: number; + length: number; } interface String { - /** Returns a string representation of a string. */ - toString(): string; + /** Returns a string representation of a string. */ + toString(): string; - /** - * Returns the character at the specified index. - * @param pos The zero-based index of the desired character. - */ - charAt(pos: number): string; + /** + * Returns the character at the specified index. + * @param pos The zero-based index of the desired character. + */ + charAt(pos: number): string; - /** - * Returns the Unicode value of the character at the specified location, or NaN if the index is out of bounds. - * @param index The zero-based index of the desired character. - */ - charCodeAt(index: number): number; + /** + * Returns the Unicode value of the character at the specified location, or NaN if the index is out of bounds. + * @param index The zero-based index of the desired character. + */ + charCodeAt(index: number): number; - /** - * Returns a string that contains the concatenation of two or more strings. - * @param strings The strings to append to the end of the string. - */ - concat(...strings: string[]): string; + /** + * Returns a string that contains the concatenation of two or more strings. + * @param strings The strings to append to the end of the string. + */ + concat(...strings: string[]): string; - /** - * Returns the position of the first occurrence of a substring, or -1 if it is not present. - * @param searchString The substring to search for in the string - * @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string. - */ - indexOf(searchString: string, position?: number): number; + /** + * Returns the position of the first occurrence of a substring, or -1 if it is not present. + * @param searchString The substring to search for in the string + * @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string. + */ + indexOf(searchString: string, position?: number): number; - /** - * Returns the last occurrence of a substring in the string, or -1 if it is not present. - * @param searchString The substring to search for. - * @param position The index at which to begin searching. If omitted, the search begins at the end of the string. - */ - lastIndexOf(searchString: string, position?: number): number; + /** + * Returns the last occurrence of a substring in the string, or -1 if it is not present. + * @param searchString The substring to search for. + * @param position The index at which to begin searching. If omitted, the search begins at the end of the string. + */ + lastIndexOf(searchString: string, position?: number): number; - /** - * Determines whether two strings are equivalent in the current locale. - * @param that String to compare to target string - */ - localeCompare(that: string): number; + /** + * Determines whether two strings are equivalent in the current locale. + * @param that String to compare to target string + */ + localeCompare(that: string): number; - /** - * Matches a string with a regular expression, and returns an array containing the results of that search. - * @param regexp A variable name or string literal containing the regular expression pattern and flags. - */ - match(regexp: string | RegExp): RegExpMatchArray | null; + /** + * Matches a string with a regular expression, and returns an array containing the results of that search. + * @param regexp A variable name or string literal containing the regular expression pattern and flags. + */ + match(regexp: string | RegExp): RegExpMatchArray | null; - /** - * Replaces text in a string, using a regular expression or search string. - * @param searchValue A string or regular expression to search for. - * @param replaceValue A string containing the text to replace. When the {@linkcode searchValue} is a `RegExp`, all matches are replaced if the `g` flag is set (or only those matches at the beginning, if the `y` flag is also present). Otherwise, only the first match of {@linkcode searchValue} is replaced. - */ - replace(searchValue: string | RegExp, replaceValue: string): string; + /** + * Replaces text in a string, using a regular expression or search string. + * @param searchValue A string or regular expression to search for. + * @param replaceValue A string containing the text to replace. When the {@linkcode searchValue} is a `RegExp`, all matches are replaced if the `g` flag is set (or only those matches at the beginning, if the `y` flag is also present). Otherwise, only the first match of {@linkcode searchValue} is replaced. + */ + replace(searchValue: string | RegExp, replaceValue: string): string; - /** - * Replaces text in a string, using a regular expression or search string. - * @param searchValue A string to search for. - * @param replacer A function that returns the replacement text. - */ - replace(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; + /** + * Replaces text in a string, using a regular expression or search string. + * @param searchValue A string to search for. + * @param replacer A function that returns the replacement text. + */ + replace(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; - /** - * Finds the first substring match in a regular expression search. - * @param regexp The regular expression pattern and applicable flags. - */ - search(regexp: string | RegExp): number; + /** + * Finds the first substring match in a regular expression search. + * @param regexp The regular expression pattern and applicable flags. + */ + search(regexp: string | RegExp): number; - /** - * Returns a section of a string. - * @param start The index to the beginning of the specified portion of stringObj. - * @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end. - * If this value is not specified, the substring continues to the end of stringObj. - */ - slice(start?: number, end?: number): string; + /** + * Returns a section of a string. + * @param start The index to the beginning of the specified portion of stringObj. + * @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end. + * If this value is not specified, the substring continues to the end of stringObj. + */ + slice(start?: number, end?: number): string; - /** - * Split a string into substrings using the specified separator and return them as an array. - * @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned. - * @param limit A value used to limit the number of elements returned in the array. - */ - split(separator: string | RegExp, limit?: number): string[]; + /** + * Split a string into substrings using the specified separator and return them as an array. + * @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned. + * @param limit A value used to limit the number of elements returned in the array. + */ + split(separator: string | RegExp, limit?: number): string[]; - /** - * Returns the substring at the specified location within a String object. - * @param start The zero-based index number indicating the beginning of the substring. - * @param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end. - * If end is omitted, the characters from start through the end of the original string are returned. - */ - substring(start: number, end?: number): string; + /** + * Returns the substring at the specified location within a String object. + * @param start The zero-based index number indicating the beginning of the substring. + * @param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end. + * If end is omitted, the characters from start through the end of the original string are returned. + */ + substring(start: number, end?: number): string; - /** Converts all the alphabetic characters in a string to lowercase. */ - toLowerCase(): string; + /** Converts all the alphabetic characters in a string to lowercase. */ + toLowerCase(): string; - /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */ - toLocaleLowerCase(locales?: string | string[]): string; + /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */ + toLocaleLowerCase(locales?: string | string[]): string; - /** Converts all the alphabetic characters in a string to uppercase. */ - toUpperCase(): string; + /** Converts all the alphabetic characters in a string to uppercase. */ + toUpperCase(): string; - /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */ - toLocaleUpperCase(locales?: string | string[]): string; + /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */ + toLocaleUpperCase(locales?: string | string[]): string; - /** Removes the leading and trailing white space and line terminator characters from a string. */ - trim(): string; + /** Removes the leading and trailing white space and line terminator characters from a string. */ + trim(): string; - /** Returns the length of a String object. */ - readonly length: number; + /** Returns the length of a String object. */ + readonly length: number; - /** Returns the primitive value of the specified object. */ - valueOf(): string; + /** Returns the primitive value of the specified object. */ + valueOf(): string; - readonly [index: number]: string; + readonly [index: number]: string; } interface StringConstructor { - new (value?: any): String; + new (value?: any): String; - (value?: any): string; + (value?: any): string; - readonly prototype: String; + readonly prototype: String; - fromCharCode(...codes: number[]): string; + fromCharCode(...codes: number[]): string; } /** @@ -6443,220 +6443,220 @@ interface StringConstructor { declare var String: StringConstructor; interface Boolean { - /** Returns the primitive value of the specified object. */ - valueOf(): boolean; + /** Returns the primitive value of the specified object. */ + valueOf(): boolean; } interface BooleanConstructor { - new (value?: any): Boolean; + new (value?: any): Boolean; - (value?: T): boolean; + (value?: T): boolean; - readonly prototype: Boolean; + readonly prototype: Boolean; } declare var Boolean: BooleanConstructor; interface Number { - /** - * Returns a string representation of an object. - * @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers. - */ - toString(radix?: number): string; + /** + * Returns a string representation of an object. + * @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers. + */ + toString(radix?: number): string; - /** - * Returns a string representing a number in fixed-point notation. - * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 100, inclusive. - */ - toFixed(fractionDigits?: number): string; + /** + * Returns a string representing a number in fixed-point notation. + * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 100, inclusive. + */ + toFixed(fractionDigits?: number): string; - /** - * Returns a string containing a number represented in exponential notation. - * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 100, inclusive. - */ - toExponential(fractionDigits?: number): string; + /** + * Returns a string containing a number represented in exponential notation. + * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 100, inclusive. + */ + toExponential(fractionDigits?: number): string; - /** - * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits. - * @param precision Number of significant digits. Must be in the range 1 - 100, inclusive. - */ - toPrecision(precision?: number): string; + /** + * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits. + * @param precision Number of significant digits. Must be in the range 1 - 100, inclusive. + */ + toPrecision(precision?: number): string; - /** Returns the primitive value of the specified object. */ - valueOf(): number; + /** Returns the primitive value of the specified object. */ + valueOf(): number; } interface NumberConstructor { - new (value?: any): Number; + new (value?: any): Number; - (value?: any): number; + (value?: any): number; - readonly prototype: Number; + readonly prototype: Number; - /** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */ - readonly MAX_VALUE: number; + /** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */ + readonly MAX_VALUE: number; - /** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */ - readonly MIN_VALUE: number; + /** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */ + readonly MIN_VALUE: number; - /** - * A value that is not a number. - * In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function. - */ - readonly NaN: number; + /** + * A value that is not a number. + * In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function. + */ + readonly NaN: number; - /** - * A value that is less than the largest negative number that can be represented in JavaScript. - * JavaScript displays NEGATIVE_INFINITY values as -infinity. - */ - readonly NEGATIVE_INFINITY: number; + /** + * A value that is less than the largest negative number that can be represented in JavaScript. + * JavaScript displays NEGATIVE_INFINITY values as -infinity. + */ + readonly NEGATIVE_INFINITY: number; - /** - * A value greater than the largest number that can be represented in JavaScript. - * JavaScript displays POSITIVE_INFINITY values as infinity. - */ - readonly POSITIVE_INFINITY: number; + /** + * A value greater than the largest number that can be represented in JavaScript. + * JavaScript displays POSITIVE_INFINITY values as infinity. + */ + readonly POSITIVE_INFINITY: number; } /** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */ declare var Number: NumberConstructor; interface TemplateStringsArray extends ReadonlyArray { - readonly raw: readonly string[]; + readonly raw: readonly string[]; } interface Math { - /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */ - readonly E: number; + /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */ + readonly E: number; - /** The natural logarithm of 10. */ - readonly LN10: number; + /** The natural logarithm of 10. */ + readonly LN10: number; - /** The natural logarithm of 2. */ - readonly LN2: number; + /** The natural logarithm of 2. */ + readonly LN2: number; - /** The base-2 logarithm of e. */ - readonly LOG2E: number; + /** The base-2 logarithm of e. */ + readonly LOG2E: number; - /** The base-10 logarithm of e. */ - readonly LOG10E: number; + /** The base-10 logarithm of e. */ + readonly LOG10E: number; - /** Pi. This is the ratio of the circumference of a circle to its diameter. */ - readonly PI: number; + /** Pi. This is the ratio of the circumference of a circle to its diameter. */ + readonly PI: number; - /** The square root of 0.5, or, equivalently, one divided by the square root of 2. */ - readonly SQRT1_2: number; + /** The square root of 0.5, or, equivalently, one divided by the square root of 2. */ + readonly SQRT1_2: number; - /** The square root of 2. */ - readonly SQRT2: number; + /** The square root of 2. */ + readonly SQRT2: number; - /** - * Returns the absolute value of a number (the value without regard to whether it is positive or negative). - * For example, the absolute value of -5 is the same as the absolute value of 5. - * @param x A numeric expression for which the absolute value is needed. - */ - abs(x: number): number; + /** + * Returns the absolute value of a number (the value without regard to whether it is positive or negative). + * For example, the absolute value of -5 is the same as the absolute value of 5. + * @param x A numeric expression for which the absolute value is needed. + */ + abs(x: number): number; - /** - * Returns the arc cosine (or inverse cosine) of a number. - * @param x A numeric expression. - */ - acos(x: number): number; + /** + * Returns the arc cosine (or inverse cosine) of a number. + * @param x A numeric expression. + */ + acos(x: number): number; - /** - * Returns the arcsine of a number. - * @param x A numeric expression. - */ - asin(x: number): number; + /** + * Returns the arcsine of a number. + * @param x A numeric expression. + */ + asin(x: number): number; - /** - * Returns the arctangent of a number. - * @param x A numeric expression for which the arctangent is needed. - */ - atan(x: number): number; + /** + * Returns the arctangent of a number. + * @param x A numeric expression for which the arctangent is needed. + */ + atan(x: number): number; - /** - * Returns the angle (in radians) between the X axis and the line going through both the origin and the given point. - * @param y A numeric expression representing the cartesian y-coordinate. - * @param x A numeric expression representing the cartesian x-coordinate. - */ - atan2(y: number, x: number): number; + /** + * Returns the angle (in radians) between the X axis and the line going through both the origin and the given point. + * @param y A numeric expression representing the cartesian y-coordinate. + * @param x A numeric expression representing the cartesian x-coordinate. + */ + atan2(y: number, x: number): number; - /** - * Returns the smallest integer greater than or equal to its numeric argument. - * @param x A numeric expression. - */ - ceil(x: number): number; + /** + * Returns the smallest integer greater than or equal to its numeric argument. + * @param x A numeric expression. + */ + ceil(x: number): number; - /** - * Returns the cosine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - cos(x: number): number; + /** + * Returns the cosine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + cos(x: number): number; - /** - * Returns e (the base of natural logarithms) raised to a power. - * @param x A numeric expression representing the power of e. - */ - exp(x: number): number; + /** + * Returns e (the base of natural logarithms) raised to a power. + * @param x A numeric expression representing the power of e. + */ + exp(x: number): number; - /** - * Returns the greatest integer less than or equal to its numeric argument. - * @param x A numeric expression. - */ - floor(x: number): number; + /** + * Returns the greatest integer less than or equal to its numeric argument. + * @param x A numeric expression. + */ + floor(x: number): number; - /** - * Returns the natural logarithm (base e) of a number. - * @param x A numeric expression. - */ - log(x: number): number; + /** + * Returns the natural logarithm (base e) of a number. + * @param x A numeric expression. + */ + log(x: number): number; - /** - * Returns the larger of a set of supplied numeric expressions. - * @param values Numeric expressions to be evaluated. - */ - max(...values: number[]): number; + /** + * Returns the larger of a set of supplied numeric expressions. + * @param values Numeric expressions to be evaluated. + */ + max(...values: number[]): number; - /** - * Returns the smaller of a set of supplied numeric expressions. - * @param values Numeric expressions to be evaluated. - */ - min(...values: number[]): number; + /** + * Returns the smaller of a set of supplied numeric expressions. + * @param values Numeric expressions to be evaluated. + */ + min(...values: number[]): number; - /** - * Returns the value of a base expression taken to a specified power. - * @param x The base value of the expression. - * @param y The exponent value of the expression. - */ - pow(x: number, y: number): number; + /** + * Returns the value of a base expression taken to a specified power. + * @param x The base value of the expression. + * @param y The exponent value of the expression. + */ + pow(x: number, y: number): number; - /** Returns a pseudorandom number between 0 and 1. */ - random(): number; + /** Returns a pseudorandom number between 0 and 1. */ + random(): number; - /** - * Returns a supplied numeric expression rounded to the nearest integer. - * @param x The value to be rounded to the nearest integer. - */ - round(x: number): number; + /** + * Returns a supplied numeric expression rounded to the nearest integer. + * @param x The value to be rounded to the nearest integer. + */ + round(x: number): number; - /** - * Returns the sine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - sin(x: number): number; + /** + * Returns the sine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + sin(x: number): number; - /** - * Returns the square root of a number. - * @param x A numeric expression. - */ - sqrt(x: number): number; + /** + * Returns the square root of a number. + * @param x A numeric expression. + */ + sqrt(x: number): number; - /** - * Returns the tangent of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - tan(x: number): number; + /** + * Returns the tangent of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + tan(x: number): number; } /** An intrinsic object that provides basic mathematics functionality and constants. */ @@ -6664,334 +6664,334 @@ declare var Math: Math; /** Enables basic storage and retrieval of dates and times. */ interface Date { - /** Returns a string representation of a date. The format of the string depends on the locale. */ - toString(): string; + /** Returns a string representation of a date. The format of the string depends on the locale. */ + toString(): string; - /** Returns a date as a string value. */ - toDateString(): string; + /** Returns a date as a string value. */ + toDateString(): string; - /** Returns a time as a string value. */ - toTimeString(): string; + /** Returns a time as a string value. */ + toTimeString(): string; - /** Returns a value as a string value appropriate to the host environment's current locale. */ - toLocaleString(): string; + /** Returns a value as a string value appropriate to the host environment's current locale. */ + toLocaleString(): string; - /** Returns a date as a string value appropriate to the host environment's current locale. */ - toLocaleDateString(): string; + /** Returns a date as a string value appropriate to the host environment's current locale. */ + toLocaleDateString(): string; - /** Returns a time as a string value appropriate to the host environment's current locale. */ - toLocaleTimeString(): string; + /** Returns a time as a string value appropriate to the host environment's current locale. */ + toLocaleTimeString(): string; - /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */ - valueOf(): number; + /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */ + valueOf(): number; - /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */ - getTime(): number; + /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */ + getTime(): number; - /** Gets the year, using local time. */ - getFullYear(): number; + /** Gets the year, using local time. */ + getFullYear(): number; - /** Gets the year using Universal Coordinated Time (UTC). */ - getUTCFullYear(): number; + /** Gets the year using Universal Coordinated Time (UTC). */ + getUTCFullYear(): number; - /** Gets the month, using local time. */ - getMonth(): number; + /** Gets the month, using local time. */ + getMonth(): number; - /** Gets the month of a Date object using Universal Coordinated Time (UTC). */ - getUTCMonth(): number; + /** Gets the month of a Date object using Universal Coordinated Time (UTC). */ + getUTCMonth(): number; - /** Gets the day-of-the-month, using local time. */ - getDate(): number; + /** Gets the day-of-the-month, using local time. */ + getDate(): number; - /** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */ - getUTCDate(): number; + /** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */ + getUTCDate(): number; - /** Gets the day of the week, using local time. */ - getDay(): number; + /** Gets the day of the week, using local time. */ + getDay(): number; - /** Gets the day of the week using Universal Coordinated Time (UTC). */ - getUTCDay(): number; + /** Gets the day of the week using Universal Coordinated Time (UTC). */ + getUTCDay(): number; - /** Gets the hours in a date, using local time. */ - getHours(): number; + /** Gets the hours in a date, using local time. */ + getHours(): number; - /** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */ - getUTCHours(): number; + /** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */ + getUTCHours(): number; - /** Gets the minutes of a Date object, using local time. */ - getMinutes(): number; + /** Gets the minutes of a Date object, using local time. */ + getMinutes(): number; - /** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */ - getUTCMinutes(): number; + /** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */ + getUTCMinutes(): number; - /** Gets the seconds of a Date object, using local time. */ - getSeconds(): number; + /** Gets the seconds of a Date object, using local time. */ + getSeconds(): number; - /** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */ - getUTCSeconds(): number; + /** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */ + getUTCSeconds(): number; - /** Gets the milliseconds of a Date, using local time. */ - getMilliseconds(): number; + /** Gets the milliseconds of a Date, using local time. */ + getMilliseconds(): number; - /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */ - getUTCMilliseconds(): number; + /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */ + getUTCMilliseconds(): number; - /** Gets the difference in minutes between Universal Coordinated Time (UTC) and the time on the local computer. */ - getTimezoneOffset(): number; + /** Gets the difference in minutes between Universal Coordinated Time (UTC) and the time on the local computer. */ + getTimezoneOffset(): number; - /** - * Sets the date and time value in the Date object. - * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT. - */ - setTime(time: number): number; + /** + * Sets the date and time value in the Date object. + * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT. + */ + setTime(time: number): number; - /** - * Sets the milliseconds value in the Date object using local time. - * @param ms A numeric value equal to the millisecond value. - */ - setMilliseconds(ms: number): number; + /** + * Sets the milliseconds value in the Date object using local time. + * @param ms A numeric value equal to the millisecond value. + */ + setMilliseconds(ms: number): number; - /** - * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC). - * @param ms A numeric value equal to the millisecond value. - */ - setUTCMilliseconds(ms: number): number; + /** + * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC). + * @param ms A numeric value equal to the millisecond value. + */ + setUTCMilliseconds(ms: number): number; - /** - * Sets the seconds value in the Date object using local time. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setSeconds(sec: number, ms?: number): number; + /** + * Sets the seconds value in the Date object using local time. + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setSeconds(sec: number, ms?: number): number; - /** - * Sets the seconds value in the Date object using Universal Coordinated Time (UTC). - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setUTCSeconds(sec: number, ms?: number): number; + /** + * Sets the seconds value in the Date object using Universal Coordinated Time (UTC). + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setUTCSeconds(sec: number, ms?: number): number; - /** - * Sets the minutes value in the Date object using local time. - * @param min A numeric value equal to the minutes value. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setMinutes(min: number, sec?: number, ms?: number): number; + /** + * Sets the minutes value in the Date object using local time. + * @param min A numeric value equal to the minutes value. + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setMinutes(min: number, sec?: number, ms?: number): number; - /** - * Sets the minutes value in the Date object using Universal Coordinated Time (UTC). - * @param min A numeric value equal to the minutes value. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setUTCMinutes(min: number, sec?: number, ms?: number): number; + /** + * Sets the minutes value in the Date object using Universal Coordinated Time (UTC). + * @param min A numeric value equal to the minutes value. + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setUTCMinutes(min: number, sec?: number, ms?: number): number; - /** - * Sets the hour value in the Date object using local time. - * @param hours A numeric value equal to the hours value. - * @param min A numeric value equal to the minutes value. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setHours(hours: number, min?: number, sec?: number, ms?: number): number; + /** + * Sets the hour value in the Date object using local time. + * @param hours A numeric value equal to the hours value. + * @param min A numeric value equal to the minutes value. + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setHours(hours: number, min?: number, sec?: number, ms?: number): number; - /** - * Sets the hours value in the Date object using Universal Coordinated Time (UTC). - * @param hours A numeric value equal to the hours value. - * @param min A numeric value equal to the minutes value. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number; + /** + * Sets the hours value in the Date object using Universal Coordinated Time (UTC). + * @param hours A numeric value equal to the hours value. + * @param min A numeric value equal to the minutes value. + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number; - /** - * Sets the numeric day-of-the-month value of the Date object using local time. - * @param date A numeric value equal to the day of the month. - */ - setDate(date: number): number; + /** + * Sets the numeric day-of-the-month value of the Date object using local time. + * @param date A numeric value equal to the day of the month. + */ + setDate(date: number): number; - /** - * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC). - * @param date A numeric value equal to the day of the month. - */ - setUTCDate(date: number): number; + /** + * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC). + * @param date A numeric value equal to the day of the month. + */ + setUTCDate(date: number): number; - /** - * Sets the month value in the Date object using local time. - * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. - * @param date A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used. - */ - setMonth(month: number, date?: number): number; + /** + * Sets the month value in the Date object using local time. + * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. + * @param date A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used. + */ + setMonth(month: number, date?: number): number; - /** - * Sets the month value in the Date object using Universal Coordinated Time (UTC). - * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. - * @param date A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used. - */ - setUTCMonth(month: number, date?: number): number; + /** + * Sets the month value in the Date object using Universal Coordinated Time (UTC). + * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. + * @param date A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used. + */ + setUTCMonth(month: number, date?: number): number; - /** - * Sets the year of the Date object using local time. - * @param year A numeric value for the year. - * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified. - * @param date A numeric value equal for the day of the month. - */ - setFullYear(year: number, month?: number, date?: number): number; + /** + * Sets the year of the Date object using local time. + * @param year A numeric value for the year. + * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified. + * @param date A numeric value equal for the day of the month. + */ + setFullYear(year: number, month?: number, date?: number): number; - /** - * Sets the year value in the Date object using Universal Coordinated Time (UTC). - * @param year A numeric value equal to the year. - * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied. - * @param date A numeric value equal to the day of the month. - */ - setUTCFullYear(year: number, month?: number, date?: number): number; + /** + * Sets the year value in the Date object using Universal Coordinated Time (UTC). + * @param year A numeric value equal to the year. + * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied. + * @param date A numeric value equal to the day of the month. + */ + setUTCFullYear(year: number, month?: number, date?: number): number; - /** Returns a date converted to a string using Universal Coordinated Time (UTC). */ - toUTCString(): string; + /** Returns a date converted to a string using Universal Coordinated Time (UTC). */ + toUTCString(): string; - /** Returns a date as a string value in ISO format. */ - toISOString(): string; + /** Returns a date as a string value in ISO format. */ + toISOString(): string; - /** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */ - toJSON(key?: any): string; + /** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */ + toJSON(key?: any): string; } interface DateConstructor { - new (): Date; + new (): Date; - new (value: number | string): Date; + new (value: number | string): Date; - /** - * Creates a new Date. - * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. - * @param monthIndex The month as a number between 0 and 11 (January to December). - * @param date The date as a number between 1 and 31. - * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. - * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. - * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. - * @param ms A number from 0 to 999 that specifies the milliseconds. - */ - new (year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; + /** + * Creates a new Date. + * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. + * @param monthIndex The month as a number between 0 and 11 (January to December). + * @param date The date as a number between 1 and 31. + * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. + * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. + * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. + * @param ms A number from 0 to 999 that specifies the milliseconds. + */ + new (year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; - (): string; + (): string; - readonly prototype: Date; + readonly prototype: Date; - /** - * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970. - * @param s A date string - */ - parse(s: string): number; + /** + * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970. + * @param s A date string + */ + parse(s: string): number; - /** - * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. - * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. - * @param monthIndex The month as a number between 0 and 11 (January to December). - * @param date The date as a number between 1 and 31. - * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. - * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. - * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. - * @param ms A number from 0 to 999 that specifies the milliseconds. - */ - UTC(year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; + /** + * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. + * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. + * @param monthIndex The month as a number between 0 and 11 (January to December). + * @param date The date as a number between 1 and 31. + * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. + * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. + * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. + * @param ms A number from 0 to 999 that specifies the milliseconds. + */ + UTC(year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; - /** Returns the number of milliseconds elapsed since midnight, January 1, 1970 Universal Coordinated Time (UTC). */ - now(): number; + /** Returns the number of milliseconds elapsed since midnight, January 1, 1970 Universal Coordinated Time (UTC). */ + now(): number; } declare var Date: DateConstructor; interface RegExpMatchArray extends Array { - /** - * The index of the search at which the result was found. - */ - index?: number; + /** + * The index of the search at which the result was found. + */ + index?: number; - /** - * A copy of the search string. - */ - input?: string; + /** + * A copy of the search string. + */ + input?: string; - /** - * The first match. This will always be present because `null` will be returned if there are no matches. - */ - 0: string; + /** + * The first match. This will always be present because `null` will be returned if there are no matches. + */ + 0: string; } interface RegExpExecArray extends Array { - /** - * The index of the search at which the result was found. - */ - index: number; + /** + * The index of the search at which the result was found. + */ + index: number; - /** - * A copy of the search string. - */ - input: string; + /** + * A copy of the search string. + */ + input: string; - /** - * The first match. This will always be present because `null` will be returned if there are no matches. - */ - 0: string; + /** + * The first match. This will always be present because `null` will be returned if there are no matches. + */ + 0: string; } interface RegExp { - /** - * Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search. - * @param string The String object or string literal on which to perform the search. - */ - exec(string: string): RegExpExecArray | null; + /** + * Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search. + * @param string The String object or string literal on which to perform the search. + */ + exec(string: string): RegExpExecArray | null; - /** - * Returns a Boolean value that indicates whether or not a pattern exists in a searched string. - * @param string String on which to perform the search. - */ - test(string: string): boolean; + /** + * Returns a Boolean value that indicates whether or not a pattern exists in a searched string. + * @param string String on which to perform the search. + */ + test(string: string): boolean; - /** Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. */ - readonly source: string; + /** Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. */ + readonly source: string; - /** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */ - readonly global: boolean; + /** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */ + readonly global: boolean; - /** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */ - readonly ignoreCase: boolean; + /** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */ + readonly ignoreCase: boolean; - /** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */ - readonly multiline: boolean; + /** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */ + readonly multiline: boolean; - lastIndex: number; + lastIndex: number; } interface RegExpConstructor { - new (pattern: RegExp | string): RegExp; + new (pattern: RegExp | string): RegExp; - new (pattern: string, flags?: string): RegExp; + new (pattern: string, flags?: string): RegExp; - (pattern: RegExp | string): RegExp; + (pattern: RegExp | string): RegExp; - (pattern: string, flags?: string): RegExp; + (pattern: string, flags?: string): RegExp; - readonly "prototype": RegExp; + readonly "prototype": RegExp; } declare var RegExp: RegExpConstructor; interface Error { - name: string; + name: string; - message: string; + message: string; - stack?: string; + stack?: string; } interface ErrorConstructor { - new (message?: string): Error; + new (message?: string): Error; - (message?: string): Error; + (message?: string): Error; - readonly prototype: Error; + readonly prototype: Error; } declare var Error: ErrorConstructor; @@ -7000,11 +7000,11 @@ interface EvalError extends Error { } interface EvalErrorConstructor extends ErrorConstructor { - new (message?: string): EvalError; + new (message?: string): EvalError; - (message?: string): EvalError; + (message?: string): EvalError; - readonly prototype: EvalError; + readonly prototype: EvalError; } declare var EvalError: EvalErrorConstructor; @@ -7013,11 +7013,11 @@ interface RangeError extends Error { } interface RangeErrorConstructor extends ErrorConstructor { - new (message?: string): RangeError; + new (message?: string): RangeError; - (message?: string): RangeError; + (message?: string): RangeError; - readonly prototype: RangeError; + readonly prototype: RangeError; } declare var RangeError: RangeErrorConstructor; @@ -7026,11 +7026,11 @@ interface ReferenceError extends Error { } interface ReferenceErrorConstructor extends ErrorConstructor { - new (message?: string): ReferenceError; + new (message?: string): ReferenceError; - (message?: string): ReferenceError; + (message?: string): ReferenceError; - readonly prototype: ReferenceError; + readonly prototype: ReferenceError; } declare var ReferenceError: ReferenceErrorConstructor; @@ -7039,11 +7039,11 @@ interface SyntaxError extends Error { } interface SyntaxErrorConstructor extends ErrorConstructor { - new (message?: string): SyntaxError; + new (message?: string): SyntaxError; - (message?: string): SyntaxError; + (message?: string): SyntaxError; - readonly prototype: SyntaxError; + readonly prototype: SyntaxError; } declare var SyntaxError: SyntaxErrorConstructor; @@ -7052,11 +7052,11 @@ interface TypeError extends Error { } interface TypeErrorConstructor extends ErrorConstructor { - new (message?: string): TypeError; + new (message?: string): TypeError; - (message?: string): TypeError; + (message?: string): TypeError; - readonly prototype: TypeError; + readonly prototype: TypeError; } declare var TypeError: TypeErrorConstructor; @@ -7065,42 +7065,42 @@ interface URIError extends Error { } interface URIErrorConstructor extends ErrorConstructor { - new (message?: string): URIError; + new (message?: string): URIError; - (message?: string): URIError; + (message?: string): URIError; - readonly prototype: URIError; + readonly prototype: URIError; } declare var URIError: URIErrorConstructor; interface JSON { - /** - * Converts a JavaScript Object Notation (JSON) string into an object. - * @param text A valid JSON string. - * @param reviver A function that transforms the results. This function is called for each member of the object. - * If a member contains nested objects, the nested objects are transformed before the parent object is. - * @throws {SyntaxError} If `text` is not valid JSON. - */ - parse(text: string, reviver?: (this: any, key: string, value: any) => any): any; + /** + * Converts a JavaScript Object Notation (JSON) string into an object. + * @param text A valid JSON string. + * @param reviver A function that transforms the results. This function is called for each member of the object. + * If a member contains nested objects, the nested objects are transformed before the parent object is. + * @throws {SyntaxError} If `text` is not valid JSON. + */ + parse(text: string, reviver?: (this: any, key: string, value: any) => any): any; - /** - * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. - * @param value A JavaScript value, usually an object or array, to be converted. - * @param replacer A function that transforms the results. - * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. - * @throws {TypeError} If a circular reference or a BigInt value is found. - */ - stringify(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string; + /** + * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. + * @param value A JavaScript value, usually an object or array, to be converted. + * @param replacer A function that transforms the results. + * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. + * @throws {TypeError} If a circular reference or a BigInt value is found. + */ + stringify(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string; - /** - * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. - * @param value A JavaScript value, usually an object or array, to be converted. - * @param replacer An array of strings and numbers that acts as an approved list for selecting the object properties that will be stringified. - * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. - * @throws {TypeError} If a circular reference or a BigInt value is found. - */ - stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string; + /** + * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. + * @param value A JavaScript value, usually an object or array, to be converted. + * @param replacer An array of strings and numbers that acts as an approved list for selecting the object properties that will be stringified. + * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. + * @throws {TypeError} If a circular reference or a BigInt value is found. + */ + stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string; } /** @@ -7113,444 +7113,444 @@ declare var JSON: JSON; ///////////////////////////// interface ReadonlyArray { - /** - * Gets the length of the array. This is a number one higher than the highest element defined in an array. - */ - readonly length: number; + /** + * Gets the length of the array. This is a number one higher than the highest element defined in an array. + */ + readonly length: number; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** - * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods. - */ - toLocaleString(): string; + /** + * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods. + */ + toLocaleString(): string; - /** - * Combines two or more arrays. - * @param items Additional items to add to the end of array1. - */ - concat(...items: ConcatArray[]): T[]; + /** + * Combines two or more arrays. + * @param items Additional items to add to the end of array1. + */ + concat(...items: ConcatArray[]): T[]; - /** - * Combines two or more arrays. - * @param items Additional items to add to the end of array1. - */ - concat(...items: (T | ConcatArray)[]): T[]; + /** + * Combines two or more arrays. + * @param items Additional items to add to the end of array1. + */ + concat(...items: (T | ConcatArray)[]): T[]; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): T[]; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): T[]; - /** - * Returns the index of the first occurrence of a value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. - */ - indexOf(searchElement: T, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. + */ + indexOf(searchElement: T, fromIndex?: number): number; - /** - * Returns the index of the last occurrence of a specified value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array. - */ - lastIndexOf(searchElement: T, fromIndex?: number): number; + /** + * Returns the index of the last occurrence of a specified value in an array. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array. + */ + lastIndexOf(searchElement: T, fromIndex?: number): number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): this is readonly S[]; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): this is readonly S[]; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: T, index: number, array: readonly T[]) => void, thisArg?: any): void; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: T, index: number, array: readonly T[]) => void, thisArg?: any): void; - /** - * Calls a defined callback function on each element of an array, and returns an array that contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: T, index: number, array: readonly T[]) => U, thisArg?: any): U[]; + /** + * Calls a defined callback function on each element of an array, and returns an array that contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: T, index: number, array: readonly T[]) => U, thisArg?: any): U[]; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): S[]; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): S[]; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): T[]; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): T[]; - /** - * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T; + /** + * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T; - reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T; + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T; - /** - * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U; - /** - * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T; + /** + * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T; - reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T; + reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T; - /** - * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U; - readonly [n: number]: T; + readonly [n: number]: T; } interface ConcatArray { - readonly length: number; + readonly length: number; - readonly [n: number]: T; + readonly [n: number]: T; - join(separator?: string): string; + join(separator?: string): string; - slice(start?: number, end?: number): T[]; + slice(start?: number, end?: number): T[]; } interface Array { - /** - * Gets or sets the length of the array. This is a number one higher than the highest index in the array. - */ - length: number; + /** + * Gets or sets the length of the array. This is a number one higher than the highest index in the array. + */ + length: number; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** - * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods. - */ - toLocaleString(): string; + /** + * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods. + */ + toLocaleString(): string; - /** - * Removes the last element from an array and returns it. - * If the array is empty, undefined is returned and the array is not modified. - */ - pop(): T | undefined; + /** + * Removes the last element from an array and returns it. + * If the array is empty, undefined is returned and the array is not modified. + */ + pop(): T | undefined; - /** - * Appends new elements to the end of an array, and returns the new length of the array. - * @param items New elements to add to the array. - */ - push(...items: T[]): number; + /** + * Appends new elements to the end of an array, and returns the new length of the array. + * @param items New elements to add to the array. + */ + push(...items: T[]): number; - /** - * Combines two or more arrays. - * This method returns a new array without modifying any existing arrays. - * @param items Additional arrays and/or items to add to the end of the array. - */ - concat(...items: ConcatArray[]): T[]; + /** + * Combines two or more arrays. + * This method returns a new array without modifying any existing arrays. + * @param items Additional arrays and/or items to add to the end of the array. + */ + concat(...items: ConcatArray[]): T[]; - /** - * Combines two or more arrays. - * This method returns a new array without modifying any existing arrays. - * @param items Additional arrays and/or items to add to the end of the array. - */ - concat(...items: (T | ConcatArray)[]): T[]; + /** + * Combines two or more arrays. + * This method returns a new array without modifying any existing arrays. + * @param items Additional arrays and/or items to add to the end of the array. + */ + concat(...items: (T | ConcatArray)[]): T[]; - /** - * Adds all the elements of an array into a string, separated by the specified separator string. - * @param separator A string used to separate one element of the array from the next in the resulting string. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Adds all the elements of an array into a string, separated by the specified separator string. + * @param separator A string used to separate one element of the array from the next in the resulting string. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Reverses the elements in an array in place. - * This method mutates the array and returns a reference to the same array. - */ - reverse(): T[]; + /** + * Reverses the elements in an array in place. + * This method mutates the array and returns a reference to the same array. + */ + reverse(): T[]; - /** - * Removes the first element from an array and returns it. - * If the array is empty, undefined is returned and the array is not modified. - */ - shift(): T | undefined; + /** + * Removes the first element from an array and returns it. + * If the array is empty, undefined is returned and the array is not modified. + */ + shift(): T | undefined; - /** - * Returns a copy of a section of an array. - * For both start and end, a negative index can be used to indicate an offset from the end of the array. - * For example, -2 refers to the second to last element of the array. - * @param start The beginning index of the specified portion of the array. - * If start is undefined, then the slice begins at index 0. - * @param end The end index of the specified portion of the array. This is exclusive of the element at the index 'end'. - * If end is undefined, then the slice extends to the end of the array. - */ - slice(start?: number, end?: number): T[]; + /** + * Returns a copy of a section of an array. + * For both start and end, a negative index can be used to indicate an offset from the end of the array. + * For example, -2 refers to the second to last element of the array. + * @param start The beginning index of the specified portion of the array. + * If start is undefined, then the slice begins at index 0. + * @param end The end index of the specified portion of the array. This is exclusive of the element at the index 'end'. + * If end is undefined, then the slice extends to the end of the array. + */ + slice(start?: number, end?: number): T[]; - /** - * Sorts an array in place. - * This method mutates the array and returns a reference to the same array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: T, b: T) => number): this; + /** + * Sorts an array in place. + * This method mutates the array and returns a reference to the same array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: T, b: T) => number): this; - /** - * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. - * @param start The zero-based location in the array from which to start removing elements. - * @param deleteCount The number of elements to remove. Omitting this argument will remove all elements from the start - * paramater location to end of the array. If value of this argument is either a negative number, zero, undefined, or a type - * that cannot be converted to an integer, the function will evaluate the argument as zero and not remove any elements. - * @returns An array containing the elements that were deleted. - */ - splice(start: number, deleteCount?: number): T[]; + /** + * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. + * @param start The zero-based location in the array from which to start removing elements. + * @param deleteCount The number of elements to remove. Omitting this argument will remove all elements from the start + * paramater location to end of the array. If value of this argument is either a negative number, zero, undefined, or a type + * that cannot be converted to an integer, the function will evaluate the argument as zero and not remove any elements. + * @returns An array containing the elements that were deleted. + */ + splice(start: number, deleteCount?: number): T[]; - /** - * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. - * @param start The zero-based location in the array from which to start removing elements. - * @param deleteCount The number of elements to remove. If value of this argument is either a negative number, zero, - * undefined, or a type that cannot be converted to an integer, the function will evaluate the argument as zero and - * not remove any elements. - * @param items Elements to insert into the array in place of the deleted elements. - * @returns An array containing the elements that were deleted. - */ - splice(start: number, deleteCount: number, ...items: T[]): T[]; + /** + * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. + * @param start The zero-based location in the array from which to start removing elements. + * @param deleteCount The number of elements to remove. If value of this argument is either a negative number, zero, + * undefined, or a type that cannot be converted to an integer, the function will evaluate the argument as zero and + * not remove any elements. + * @param items Elements to insert into the array in place of the deleted elements. + * @returns An array containing the elements that were deleted. + */ + splice(start: number, deleteCount: number, ...items: T[]): T[]; - /** - * Inserts new elements at the start of an array, and returns the new length of the array. - * @param items Elements to insert at the start of the array. - */ - unshift(...items: T[]): number; + /** + * Inserts new elements at the start of an array, and returns the new length of the array. + * @param items Elements to insert at the start of the array. + */ + unshift(...items: T[]): number; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. - */ - indexOf(searchElement: T, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. + */ + indexOf(searchElement: T, fromIndex?: number): number; - /** - * Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin searching backward. If fromIndex is omitted, the search starts at the last index in the array. - */ - lastIndexOf(searchElement: T, fromIndex?: number): number; + /** + * Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin searching backward. If fromIndex is omitted, the search starts at the last index in the array. + */ + lastIndexOf(searchElement: T, fromIndex?: number): number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): this is S[]; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): this is S[]; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void; - /** - * Calls a defined callback function on each element of an array, and returns an array that contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[]; + /** + * Calls a defined callback function on each element of an array, and returns an array that contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[]; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T[]; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T[]; - /** - * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; + /** + * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; - reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; - /** - * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; - /** - * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; + /** + * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; - reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; + reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; - /** - * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; - [n: number]: T; + [n: number]: T; } interface ArrayConstructor { - new (arrayLength?: number): any[]; + new (arrayLength?: number): any[]; - new (arrayLength: number): T[]; + new (arrayLength: number): T[]; - new (...items: T[]): T[]; + new (...items: T[]): T[]; - (arrayLength?: number): any[]; + (arrayLength?: number): any[]; - (arrayLength: number): T[]; + (arrayLength: number): T[]; - (...items: T[]): T[]; + (...items: T[]): T[]; - isArray(arg: any): arg is any[]; + isArray(arg: any): arg is any[]; - readonly prototype: any[]; + readonly prototype: any[]; } declare var Array: ArrayConstructor; interface TypedPropertyDescriptor { - enumerable?: boolean; + enumerable?: boolean; - configurable?: boolean; + configurable?: boolean; - writable?: boolean; + writable?: boolean; - value?: T; + value?: T; - get?: () => T; + get?: () => T; - set?: (value: T) => void; + set?: (value: T) => void; } declare type PromiseConstructorLike = new (executor: (resolve: (value: T | PromiseLike) => void, reject: (reason?: any) => void) => void) => PromiseLike; interface PromiseLike { - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): PromiseLike; + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): PromiseLike; } /** * Represents the completion of an asynchronous operation */ interface Promise { - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise; + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise; - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise; + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise; } /** @@ -7566,9 +7566,9 @@ type Awaited = T extends null | undefined ? T : // special case for `null | u // non-object or non-thenable interface ArrayLike { - readonly length: number; + readonly length: number; - readonly [n: number]: T; + readonly [n: number]: T; } /** @@ -7681,7 +7681,7 @@ interface ThisType { * Stores types to be used with WeakSet, WeakMap, WeakRef, and FinalizationRegistry */ interface WeakKeyTypes { - object: object; + object: object; } type WeakKey = WeakKeyTypes[keyof WeakKeyTypes]; @@ -7693,189 +7693,189 @@ type WeakKey = WeakKeyTypes[keyof WeakKeyTypes]; * buffer as needed. */ interface ArrayBuffer { - /** - * Read-only. The length of the ArrayBuffer (in bytes). - */ - readonly byteLength: number; + /** + * Read-only. The length of the ArrayBuffer (in bytes). + */ + readonly byteLength: number; - /** - * Returns a section of an ArrayBuffer. - */ - slice(begin?: number, end?: number): ArrayBuffer; + /** + * Returns a section of an ArrayBuffer. + */ + slice(begin?: number, end?: number): ArrayBuffer; } /** * Allowed ArrayBuffer types for the buffer of an ArrayBufferView and related Typed Arrays. */ interface ArrayBufferTypes { - ArrayBuffer: ArrayBuffer; + ArrayBuffer: ArrayBuffer; } type ArrayBufferLike = ArrayBufferTypes[keyof ArrayBufferTypes]; interface ArrayBufferConstructor { - readonly prototype: ArrayBuffer; + readonly prototype: ArrayBuffer; - new (byteLength: number): ArrayBuffer; + new (byteLength: number): ArrayBuffer; - isView(arg: any): arg is ArrayBufferView; + isView(arg: any): arg is ArrayBufferView; } declare var ArrayBuffer: ArrayBufferConstructor; interface ArrayBufferView { - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; } interface DataView { - readonly buffer: TArrayBuffer; + readonly buffer: TArrayBuffer; - readonly byteLength: number; + readonly byteLength: number; - readonly byteOffset: number; + readonly byteOffset: number; - /** - * Gets the Float32 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getFloat32(byteOffset: number, littleEndian?: boolean): number; + /** + * Gets the Float32 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getFloat32(byteOffset: number, littleEndian?: boolean): number; - /** - * Gets the Float64 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getFloat64(byteOffset: number, littleEndian?: boolean): number; + /** + * Gets the Float64 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getFloat64(byteOffset: number, littleEndian?: boolean): number; - /** - * Gets the Int8 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - */ - getInt8(byteOffset: number): number; + /** + * Gets the Int8 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + */ + getInt8(byteOffset: number): number; - /** - * Gets the Int16 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getInt16(byteOffset: number, littleEndian?: boolean): number; + /** + * Gets the Int16 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getInt16(byteOffset: number, littleEndian?: boolean): number; - /** - * Gets the Int32 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getInt32(byteOffset: number, littleEndian?: boolean): number; + /** + * Gets the Int32 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getInt32(byteOffset: number, littleEndian?: boolean): number; - /** - * Gets the Uint8 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - */ - getUint8(byteOffset: number): number; + /** + * Gets the Uint8 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + */ + getUint8(byteOffset: number): number; - /** - * Gets the Uint16 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getUint16(byteOffset: number, littleEndian?: boolean): number; + /** + * Gets the Uint16 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getUint16(byteOffset: number, littleEndian?: boolean): number; - /** - * Gets the Uint32 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getUint32(byteOffset: number, littleEndian?: boolean): number; + /** + * Gets the Uint32 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getUint32(byteOffset: number, littleEndian?: boolean): number; - /** - * Stores an Float32 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void; + /** + * Stores an Float32 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void; - /** - * Stores an Float64 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void; + /** + * Stores an Float64 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void; - /** - * Stores an Int8 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - */ - setInt8(byteOffset: number, value: number): void; + /** + * Stores an Int8 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + */ + setInt8(byteOffset: number, value: number): void; - /** - * Stores an Int16 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setInt16(byteOffset: number, value: number, littleEndian?: boolean): void; + /** + * Stores an Int16 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setInt16(byteOffset: number, value: number, littleEndian?: boolean): void; - /** - * Stores an Int32 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setInt32(byteOffset: number, value: number, littleEndian?: boolean): void; + /** + * Stores an Int32 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setInt32(byteOffset: number, value: number, littleEndian?: boolean): void; - /** - * Stores an Uint8 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - */ - setUint8(byteOffset: number, value: number): void; + /** + * Stores an Uint8 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + */ + setUint8(byteOffset: number, value: number): void; - /** - * Stores an Uint16 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setUint16(byteOffset: number, value: number, littleEndian?: boolean): void; + /** + * Stores an Uint16 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setUint16(byteOffset: number, value: number, littleEndian?: boolean): void; - /** - * Stores an Uint32 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setUint32(byteOffset: number, value: number, littleEndian?: boolean): void; + /** + * Stores an Uint32 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setUint32(byteOffset: number, value: number, littleEndian?: boolean): void; } interface DataViewConstructor { - readonly prototype: DataView; + readonly prototype: DataView; - new (buffer: TArrayBuffer, byteOffset?: number, byteLength?: number): DataView; + new (buffer: TArrayBuffer, byteOffset?: number, byteLength?: number): DataView; } declare var DataView: DataViewConstructor; @@ -7885,288 +7885,288 @@ declare var DataView: DataViewConstructor; * number of bytes could not be allocated an exception is raised. */ interface Int8Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; - - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int8Array; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int8Array; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int8Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int8Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Int8Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Int8Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Int8Array; + /** + * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Int8Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Int8ArrayConstructor { - readonly prototype: Int8Array; + readonly prototype: Int8Array; - new (length: number): Int8Array; + new (length: number): Int8Array; - new (array: ArrayLike): Int8Array; + new (array: ArrayLike): Int8Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int8Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int8Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int8Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int8Array; - new (array: ArrayLike | ArrayBuffer): Int8Array; + new (array: ArrayLike | ArrayBuffer): Int8Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Int8Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Int8Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Int8Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Int8Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } declare var Int8Array: Int8ArrayConstructor; @@ -8176,288 +8176,288 @@ declare var Int8Array: Int8ArrayConstructor; * requested number of bytes could not be allocated an exception is raised. */ interface Uint8Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint8Array; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint8Array; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint8Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint8Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Uint8Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Uint8Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Uint8Array; + /** + * Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Uint8Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Uint8ArrayConstructor { - readonly prototype: Uint8Array; + readonly prototype: Uint8Array; - new (length: number): Uint8Array; + new (length: number): Uint8Array; - new (array: ArrayLike): Uint8Array; + new (array: ArrayLike): Uint8Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint8Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint8Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8Array; - new (array: ArrayLike | ArrayBuffer): Uint8Array; + new (array: ArrayLike | ArrayBuffer): Uint8Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Uint8Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Uint8Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Uint8Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Uint8Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } declare var Uint8Array: Uint8ArrayConstructor; @@ -8467,288 +8467,288 @@ declare var Uint8Array: Uint8ArrayConstructor; * If the requested number of bytes could not be allocated an exception is raised. */ interface Uint8ClampedArray { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint8ClampedArray; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint8ClampedArray; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint8ClampedArray; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint8ClampedArray; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Uint8ClampedArray; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Uint8ClampedArray; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Uint8ClampedArray; + /** + * Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Uint8ClampedArray; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Uint8ClampedArrayConstructor { - readonly prototype: Uint8ClampedArray; + readonly prototype: Uint8ClampedArray; - new (length: number): Uint8ClampedArray; + new (length: number): Uint8ClampedArray; - new (array: ArrayLike): Uint8ClampedArray; + new (array: ArrayLike): Uint8ClampedArray; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray; - new (array: ArrayLike | ArrayBuffer): Uint8ClampedArray; + new (array: ArrayLike | ArrayBuffer): Uint8ClampedArray; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Uint8ClampedArray; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Uint8ClampedArray; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Uint8ClampedArray; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Uint8ClampedArray; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } declare var Uint8ClampedArray: Uint8ClampedArrayConstructor; @@ -8758,288 +8758,288 @@ declare var Uint8ClampedArray: Uint8ClampedArrayConstructor; * requested number of bytes could not be allocated an exception is raised. */ interface Int16Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int16Array; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int16Array; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int16Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int16Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Int16Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Int16Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Int16Array; + /** + * Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Int16Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Int16ArrayConstructor { - readonly prototype: Int16Array; + readonly prototype: Int16Array; - new (length: number): Int16Array; + new (length: number): Int16Array; - new (array: ArrayLike): Int16Array; + new (array: ArrayLike): Int16Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int16Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int16Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int16Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int16Array; - new (array: ArrayLike | ArrayBuffer): Int16Array; + new (array: ArrayLike | ArrayBuffer): Int16Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Int16Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Int16Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Int16Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Int16Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } declare var Int16Array: Int16ArrayConstructor; @@ -9049,288 +9049,288 @@ declare var Int16Array: Int16ArrayConstructor; * requested number of bytes could not be allocated an exception is raised. */ interface Uint16Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; - - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint16Array; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint16Array; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * The length of the array. - */ - readonly length: number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint16Array; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * The length of the array. + */ + readonly length: number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint16Array; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Uint16Array; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Uint16Array; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Uint16Array; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Uint16Array; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** + * Returns a string representation of an array. + */ + toString(): string; + + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Uint16ArrayConstructor { - readonly prototype: Uint16Array; + readonly prototype: Uint16Array; - new (length: number): Uint16Array; + new (length: number): Uint16Array; - new (array: ArrayLike): Uint16Array; + new (array: ArrayLike): Uint16Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint16Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint16Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint16Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint16Array; - new (array: ArrayLike | ArrayBuffer): Uint16Array; + new (array: ArrayLike | ArrayBuffer): Uint16Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Uint16Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Uint16Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Uint16Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Uint16Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } declare var Uint16Array: Uint16ArrayConstructor; @@ -9340,288 +9340,288 @@ declare var Uint16Array: Uint16ArrayConstructor; * requested number of bytes could not be allocated an exception is raised. */ interface Int32Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int32Array; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int32Array; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int32Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int32Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Int32Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Int32Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Int32Array; + /** + * Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Int32Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Int32ArrayConstructor { - readonly prototype: Int32Array; + readonly prototype: Int32Array; - new (length: number): Int32Array; + new (length: number): Int32Array; - new (array: ArrayLike): Int32Array; + new (array: ArrayLike): Int32Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int32Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int32Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int32Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int32Array; - new (array: ArrayLike | ArrayBuffer): Int32Array; + new (array: ArrayLike | ArrayBuffer): Int32Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Int32Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Int32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Int32Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Int32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } declare var Int32Array: Int32ArrayConstructor; @@ -9631,288 +9631,288 @@ declare var Int32Array: Int32ArrayConstructor; * requested number of bytes could not be allocated an exception is raised. */ interface Uint32Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint32Array; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint32Array; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint32Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint32Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Uint32Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Uint32Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Uint32Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Uint32Array; + /** + * Gets a new Uint32Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Uint32Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Uint32ArrayConstructor { - readonly prototype: Uint32Array; + readonly prototype: Uint32Array; - new (length: number): Uint32Array; + new (length: number): Uint32Array; - new (array: ArrayLike): Uint32Array; + new (array: ArrayLike): Uint32Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint32Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint32Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint32Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint32Array; - new (array: ArrayLike | ArrayBuffer): Uint32Array; + new (array: ArrayLike | ArrayBuffer): Uint32Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Uint32Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Uint32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Uint32Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Uint32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } declare var Uint32Array: Uint32ArrayConstructor; @@ -9922,288 +9922,288 @@ declare var Uint32Array: Uint32ArrayConstructor; * of bytes could not be allocated an exception is raised. */ interface Float32Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float32Array; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float32Array; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float32Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float32Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Float32Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Float32Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Float32Array; + /** + * Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Float32Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Float32ArrayConstructor { - readonly prototype: Float32Array; + readonly prototype: Float32Array; - new (length: number): Float32Array; + new (length: number): Float32Array; - new (array: ArrayLike): Float32Array; + new (array: ArrayLike): Float32Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Float32Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Float32Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float32Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float32Array; - new (array: ArrayLike | ArrayBuffer): Float32Array; + new (array: ArrayLike | ArrayBuffer): Float32Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Float32Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Float32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Float32Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Float32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } declare var Float32Array: Float32ArrayConstructor; @@ -10213,288 +10213,288 @@ declare var Float32Array: Float32ArrayConstructor; * number of bytes could not be allocated an exception is raised. */ interface Float64Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float64Array; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float64Array; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The length of the array. - */ - readonly length: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float64Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * The length of the array. + */ + readonly length: number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float64Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Float64Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Float64Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * Gets a new Float64Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Float64Array; + /** + * Gets a new Float64Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Float64Array; - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** - * Returns a string representation of an array. - */ - toString(): string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): this; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - [index: number]: number; + [index: number]: number; } interface Float64ArrayConstructor { - readonly prototype: Float64Array; + readonly prototype: Float64Array; - new (length: number): Float64Array; + new (length: number): Float64Array; - new (array: ArrayLike): Float64Array; + new (array: ArrayLike): Float64Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Float64Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Float64Array; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float64Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float64Array; - new (array: ArrayLike | ArrayBuffer): Float64Array; + new (array: ArrayLike | ArrayBuffer): Float64Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Float64Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Float64Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Float64Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Float64Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } declare var Float64Array: Float64ArrayConstructor; @@ -10504,281 +10504,281 @@ declare var Float64Array: Float64ArrayConstructor; ///////////////////////////// declare namespace Intl { - interface CollatorOptions { - usage?: "sort" | "search" | undefined; +interface CollatorOptions { + usage?: "sort" | "search" | undefined; - localeMatcher?: "lookup" | "best fit" | undefined; + localeMatcher?: "lookup" | "best fit" | undefined; - numeric?: boolean | undefined; + numeric?: boolean | undefined; - caseFirst?: "upper" | "lower" | "false" | undefined; + caseFirst?: "upper" | "lower" | "false" | undefined; - sensitivity?: "base" | "accent" | "case" | "variant" | undefined; + sensitivity?: "base" | "accent" | "case" | "variant" | undefined; - collation?: "big5han" | "compat" | "default" | "dict" | "direct" | "ducet" | "emoji" | "eor" | "gb2312" | "phonebk" | "phonetic" | "pinyin" | "reformed" | "searchjl" | "stroke" | "trad" | "unihan" | "zhuyin" | undefined; + collation?: "big5han" | "compat" | "default" | "dict" | "direct" | "ducet" | "emoji" | "eor" | "gb2312" | "phonebk" | "phonetic" | "pinyin" | "reformed" | "searchjl" | "stroke" | "trad" | "unihan" | "zhuyin" | undefined; - ignorePunctuation?: boolean | undefined; - } + ignorePunctuation?: boolean | undefined; +} - interface ResolvedCollatorOptions { - locale: string; +interface ResolvedCollatorOptions { + locale: string; - usage: string; + usage: string; - sensitivity: string; + sensitivity: string; - ignorePunctuation: boolean; + ignorePunctuation: boolean; - collation: string; + collation: string; - caseFirst: string; + caseFirst: string; - numeric: boolean; - } + numeric: boolean; +} - interface Collator { - compare(x: string, y: string): number; +interface Collator { + compare(x: string, y: string): number; - resolvedOptions(): ResolvedCollatorOptions; - } + resolvedOptions(): ResolvedCollatorOptions; +} - interface CollatorConstructor { - new (locales?: string | string[], options?: CollatorOptions): Collator; +interface CollatorConstructor { + new (locales?: string | string[], options?: CollatorOptions): Collator; - (locales?: string | string[], options?: CollatorOptions): Collator; + (locales?: string | string[], options?: CollatorOptions): Collator; - supportedLocalesOf(locales: string | string[], options?: CollatorOptions): string[]; - } + supportedLocalesOf(locales: string | string[], options?: CollatorOptions): string[]; +} - var Collator: CollatorConstructor; +var Collator: CollatorConstructor; - interface NumberFormatOptionsStyleRegistry { - decimal: never; +interface NumberFormatOptionsStyleRegistry { + decimal: never; - percent: never; + percent: never; - currency: never; - } + currency: never; +} - type NumberFormatOptionsStyle = keyof NumberFormatOptionsStyleRegistry; +type NumberFormatOptionsStyle = keyof NumberFormatOptionsStyleRegistry; - interface NumberFormatOptionsCurrencyDisplayRegistry { - code: never; +interface NumberFormatOptionsCurrencyDisplayRegistry { + code: never; - symbol: never; + symbol: never; - name: never; - } + name: never; +} - type NumberFormatOptionsCurrencyDisplay = keyof NumberFormatOptionsCurrencyDisplayRegistry; +type NumberFormatOptionsCurrencyDisplay = keyof NumberFormatOptionsCurrencyDisplayRegistry; - interface NumberFormatOptionsUseGroupingRegistry { - } +interface NumberFormatOptionsUseGroupingRegistry { +} - type NumberFormatOptionsUseGrouping = {} extends NumberFormatOptionsUseGroupingRegistry ? boolean : keyof NumberFormatOptionsUseGroupingRegistry | "true" | "false" | boolean; +type NumberFormatOptionsUseGrouping = {} extends NumberFormatOptionsUseGroupingRegistry ? boolean : keyof NumberFormatOptionsUseGroupingRegistry | "true" | "false" | boolean; - type ResolvedNumberFormatOptionsUseGrouping = {} extends NumberFormatOptionsUseGroupingRegistry ? boolean : keyof NumberFormatOptionsUseGroupingRegistry | false; +type ResolvedNumberFormatOptionsUseGrouping = {} extends NumberFormatOptionsUseGroupingRegistry ? boolean : keyof NumberFormatOptionsUseGroupingRegistry | false; - interface NumberFormatOptions { - localeMatcher?: "lookup" | "best fit" | undefined; +interface NumberFormatOptions { + localeMatcher?: "lookup" | "best fit" | undefined; - style?: NumberFormatOptionsStyle | undefined; + style?: NumberFormatOptionsStyle | undefined; - currency?: string | undefined; + currency?: string | undefined; - currencyDisplay?: NumberFormatOptionsCurrencyDisplay | undefined; + currencyDisplay?: NumberFormatOptionsCurrencyDisplay | undefined; - useGrouping?: NumberFormatOptionsUseGrouping | undefined; + useGrouping?: NumberFormatOptionsUseGrouping | undefined; - minimumIntegerDigits?: number | undefined; + minimumIntegerDigits?: number | undefined; - minimumFractionDigits?: number | undefined; + minimumFractionDigits?: number | undefined; - maximumFractionDigits?: number | undefined; + maximumFractionDigits?: number | undefined; - minimumSignificantDigits?: number | undefined; + minimumSignificantDigits?: number | undefined; - maximumSignificantDigits?: number | undefined; - } + maximumSignificantDigits?: number | undefined; +} - interface ResolvedNumberFormatOptions { - locale: string; +interface ResolvedNumberFormatOptions { + locale: string; - numberingSystem: string; + numberingSystem: string; - style: NumberFormatOptionsStyle; + style: NumberFormatOptionsStyle; - currency?: string; + currency?: string; - currencyDisplay?: NumberFormatOptionsCurrencyDisplay; + currencyDisplay?: NumberFormatOptionsCurrencyDisplay; - minimumIntegerDigits: number; + minimumIntegerDigits: number; - minimumFractionDigits?: number; + minimumFractionDigits?: number; - maximumFractionDigits?: number; + maximumFractionDigits?: number; - minimumSignificantDigits?: number; + minimumSignificantDigits?: number; - maximumSignificantDigits?: number; + maximumSignificantDigits?: number; - useGrouping: ResolvedNumberFormatOptionsUseGrouping; - } + useGrouping: ResolvedNumberFormatOptionsUseGrouping; +} - interface NumberFormat { - format(value: number): string; +interface NumberFormat { + format(value: number): string; - resolvedOptions(): ResolvedNumberFormatOptions; - } + resolvedOptions(): ResolvedNumberFormatOptions; +} - interface NumberFormatConstructor { - new (locales?: string | string[], options?: NumberFormatOptions): NumberFormat; +interface NumberFormatConstructor { + new (locales?: string | string[], options?: NumberFormatOptions): NumberFormat; - (locales?: string | string[], options?: NumberFormatOptions): NumberFormat; + (locales?: string | string[], options?: NumberFormatOptions): NumberFormat; - supportedLocalesOf(locales: string | string[], options?: NumberFormatOptions): string[]; + supportedLocalesOf(locales: string | string[], options?: NumberFormatOptions): string[]; - readonly prototype: NumberFormat; - } + readonly prototype: NumberFormat; +} - var NumberFormat: NumberFormatConstructor; +var NumberFormat: NumberFormatConstructor; - interface DateTimeFormatOptions { - localeMatcher?: "best fit" | "lookup" | undefined; +interface DateTimeFormatOptions { + localeMatcher?: "best fit" | "lookup" | undefined; - weekday?: "long" | "short" | "narrow" | undefined; + weekday?: "long" | "short" | "narrow" | undefined; - era?: "long" | "short" | "narrow" | undefined; + era?: "long" | "short" | "narrow" | undefined; - year?: "numeric" | "2-digit" | undefined; + year?: "numeric" | "2-digit" | undefined; - month?: "numeric" | "2-digit" | "long" | "short" | "narrow" | undefined; + month?: "numeric" | "2-digit" | "long" | "short" | "narrow" | undefined; - day?: "numeric" | "2-digit" | undefined; + day?: "numeric" | "2-digit" | undefined; - hour?: "numeric" | "2-digit" | undefined; + hour?: "numeric" | "2-digit" | undefined; - minute?: "numeric" | "2-digit" | undefined; + minute?: "numeric" | "2-digit" | undefined; - second?: "numeric" | "2-digit" | undefined; + second?: "numeric" | "2-digit" | undefined; - timeZoneName?: "short" | "long" | "shortOffset" | "longOffset" | "shortGeneric" | "longGeneric" | undefined; + timeZoneName?: "short" | "long" | "shortOffset" | "longOffset" | "shortGeneric" | "longGeneric" | undefined; - formatMatcher?: "best fit" | "basic" | undefined; + formatMatcher?: "best fit" | "basic" | undefined; - hour12?: boolean | undefined; + hour12?: boolean | undefined; - timeZone?: string | undefined; - } + timeZone?: string | undefined; +} - interface ResolvedDateTimeFormatOptions { - locale: string; +interface ResolvedDateTimeFormatOptions { + locale: string; - calendar: string; + calendar: string; - numberingSystem: string; + numberingSystem: string; - timeZone: string; + timeZone: string; - hour12?: boolean; + hour12?: boolean; - weekday?: string; + weekday?: string; - era?: string; + era?: string; - year?: string; + year?: string; - month?: string; + month?: string; - day?: string; + day?: string; - hour?: string; + hour?: string; - minute?: string; + minute?: string; - second?: string; + second?: string; - timeZoneName?: string; - } + timeZoneName?: string; +} - interface DateTimeFormat { - format(date?: Date | number): string; +interface DateTimeFormat { + format(date?: Date | number): string; - resolvedOptions(): ResolvedDateTimeFormatOptions; - } + resolvedOptions(): ResolvedDateTimeFormatOptions; +} - interface DateTimeFormatConstructor { - new (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat; +interface DateTimeFormatConstructor { + new (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat; - (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat; + (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat; - supportedLocalesOf(locales: string | string[], options?: DateTimeFormatOptions): string[]; + supportedLocalesOf(locales: string | string[], options?: DateTimeFormatOptions): string[]; - readonly prototype: DateTimeFormat; - } + readonly prototype: DateTimeFormat; +} - var DateTimeFormat: DateTimeFormatConstructor; +var DateTimeFormat: DateTimeFormatConstructor; } interface String { - /** - * Determines whether two strings are equivalent in the current or specified locale. - * @param that String to compare to target string - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details. - * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details. - */ - localeCompare(that: string, locales?: string | string[], options?: Intl.CollatorOptions): number; + /** + * Determines whether two strings are equivalent in the current or specified locale. + * @param that String to compare to target string + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details. + * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details. + */ + localeCompare(that: string, locales?: string | string[], options?: Intl.CollatorOptions): number; } interface Number { - /** - * Converts a number to a string by using the current or specified locale. - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; + /** + * Converts a number to a string by using the current or specified locale. + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; } interface Date { - /** - * Converts a date and time to a string by using the current or specified locale. - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; + /** + * Converts a date and time to a string by using the current or specified locale. + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; - /** - * Converts a date to a string by using the current or specified locale. - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleDateString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; + /** + * Converts a date to a string by using the current or specified locale. + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleDateString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; - /** - * Converts a time to a string by using the current or specified locale. - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleTimeString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; + /** + * Converts a time to a string by using the current or specified locale. + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleTimeString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; } ///////////////////////////// // lib.esnext.array.d.ts ///////////////////////////// interface ArrayConstructor { - /** - * Creates an array from an async iterator or iterable object. - * @param iterableOrArrayLike An async iterator or array-like object to convert to an array. - */ - fromAsync(iterableOrArrayLike: AsyncIterable | Iterable> | ArrayLike>): Promise; + /** + * Creates an array from an async iterator or iterable object. + * @param iterableOrArrayLike An async iterator or array-like object to convert to an array. + */ + fromAsync(iterableOrArrayLike: AsyncIterable | Iterable> | ArrayLike>): Promise; - /** - * Creates an array from an async iterator or iterable object. - * - * @param iterableOrArrayLike An async iterator or array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of itarableOrArrayLike. - * Each return value is awaited before being added to result array. - * @param thisArg Value of 'this' used when executing mapfn. - */ - fromAsync(iterableOrArrayLike: AsyncIterable | Iterable | ArrayLike, mapFn: (value: Awaited, index: number) => U, thisArg?: any): Promise[]>; + /** + * Creates an array from an async iterator or iterable object. + * + * @param iterableOrArrayLike An async iterator or array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of itarableOrArrayLike. + * Each return value is awaited before being added to result array. + * @param thisArg Value of 'this' used when executing mapfn. + */ + fromAsync(iterableOrArrayLike: AsyncIterable | Iterable | ArrayLike, mapFn: (value: Awaited, index: number) => U, thisArg?: any): Promise[]>; } diff --git a/generated/current/year/2025/index.d.ts b/generated/current/year/2025/index.d.ts index 91454a8..d8e2284 100644 --- a/generated/current/year/2025/index.d.ts +++ b/generated/current/year/2025/index.d.ts @@ -21,11596 +21,11596 @@ and limitations under the License. export {}; declare global { - ///////////////////////////// - // lib.es2015.collection.d.ts - ///////////////////////////// - interface Map { - /** - * Removes all elements from the Map. - */ - clear(): void; - - /** - * @returns true if an element in the Map existed and has been removed, or false if the element does not exist. - */ - delete(key: K): boolean; - - /** - * Executes a provided function once per each key/value pair in the Map, in insertion order. - */ - forEach(callbackfn: (value: V, key: K, map: Map) => void, thisArg?: any): void; - - /** - * Returns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map. - * @returns Returns the element associated with the specified key. If no element is associated with the specified key, undefined is returned. - */ - get(key: K): V | undefined; - - /** - * @returns boolean indicating whether an element with the specified key exists or not. - */ - has(key: K): boolean; - - /** - * Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated. - */ - set(key: K, value: V): this; - - /** - * @returns the number of elements in the Map. - */ - readonly size: number; - } +///////////////////////////// +// lib.es2015.collection.d.ts +///////////////////////////// +interface Map { + /** + * Removes all elements from the Map. + */ + clear(): void; + + /** + * @returns true if an element in the Map existed and has been removed, or false if the element does not exist. + */ + delete(key: K): boolean; + + /** + * Executes a provided function once per each key/value pair in the Map, in insertion order. + */ + forEach(callbackfn: (value: V, key: K, map: Map) => void, thisArg?: any): void; + + /** + * Returns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map. + * @returns Returns the element associated with the specified key. If no element is associated with the specified key, undefined is returned. + */ + get(key: K): V | undefined; + + /** + * @returns boolean indicating whether an element with the specified key exists or not. + */ + has(key: K): boolean; + + /** + * Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated. + */ + set(key: K, value: V): this; + + /** + * @returns the number of elements in the Map. + */ + readonly size: number; +} + +interface MapConstructor { + new (): Map; + + new (entries?: readonly (readonly [K, V])[] | null): Map; + + readonly prototype: Map; +} + +var Map: MapConstructor; + +interface ReadonlyMap { + forEach(callbackfn: (value: V, key: K, map: ReadonlyMap) => void, thisArg?: any): void; + + get(key: K): V | undefined; + + has(key: K): boolean; + + readonly size: number; +} + +interface WeakMap { + /** + * Removes the specified element from the WeakMap. + * @returns true if the element was successfully removed, or false if it was not present. + */ + delete(key: K): boolean; + + /** + * @returns a specified element. + */ + get(key: K): V | undefined; + + /** + * @returns a boolean indicating whether an element with the specified key exists or not. + */ + has(key: K): boolean; + + /** + * Adds a new element with a specified key and value. + * @param key Must be an object or symbol. + */ + set(key: K, value: V): this; +} + +interface WeakMapConstructor { + new (entries?: readonly (readonly [K, V])[] | null): WeakMap; + + readonly prototype: WeakMap; +} + +var WeakMap: WeakMapConstructor; + +interface Set { + /** + * Appends a new element with a specified value to the end of the Set. + */ + add(value: T): this; + + /** + * Removes all elements from the Set. + */ + clear(): void; + + /** + * Removes a specified value from the Set. + * @returns Returns true if an element in the Set existed and has been removed, or false if the element does not exist. + */ + delete(value: T): boolean; + + /** + * Executes a provided function once per each value in the Set object, in insertion order. + */ + forEach(callbackfn: (value: T, value2: T, set: Set) => void, thisArg?: any): void; + + /** + * @returns a boolean indicating whether an element with the specified value exists in the Set or not. + */ + has(value: T): boolean; + + /** + * @returns the number of (unique) elements in the Set. + */ + readonly size: number; +} + +interface SetConstructor { + new (values?: readonly T[] | null): Set; + + readonly prototype: Set; +} + +var Set: SetConstructor; + +interface ReadonlySet { + /** + * Executes a provided function once per each value in the ReadonlySet object, in insertion order. + */ + forEach(callbackfn: (value: T, value2: T, set: ReadonlySet) => void, thisArg?: any): void; + + /** + * @returns a boolean indicating whether an element with the specified value exists in the Set or not. + */ + has(value: T): boolean; + + /** + * @returns the number of (unique) elements in the Set. + */ + readonly size: number; +} + +interface WeakSet { + /** + * Appends a new value to the end of the WeakSet. + */ + add(value: T): this; + + /** + * Removes the specified element from the WeakSet. + * @returns Returns true if the element existed and has been removed, or false if the element does not exist. + */ + delete(value: T): boolean; + + /** + * @returns a boolean indicating whether a value exists in the WeakSet or not. + */ + has(value: T): boolean; +} + +interface WeakSetConstructor { + new (values?: readonly T[] | null): WeakSet; + + readonly prototype: WeakSet; +} + +var WeakSet: WeakSetConstructor; + +///////////////////////////// +// lib.es2015.core.d.ts +///////////////////////////// +interface Array { + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: T, index: number, obj: T[]) => value is S, thisArg?: any): S | undefined; + + find(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): T | undefined; + + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): number; + + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: T, start?: number, end?: number): this; + + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; + + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; +} + +interface ArrayConstructor { + /** + * Creates an array from an array-like object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): T[]; + + /** + * Creates an array from an iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; + + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: T[]): T[]; +} + +interface DateConstructor { + new (value: number | string | Date): Date; +} + +interface Function { + /** + * Returns the name of the function. Function names are read-only and can not be changed. + */ + readonly name: string; +} + +interface Math { + /** + * Returns the number of leading zero bits in the 32-bit binary representation of a number. + * @param x A numeric expression. + */ + clz32(x: number): number; + + /** + * Returns the result of 32-bit multiplication of two numbers. + * @param x First number + * @param y Second number + */ + imul(x: number, y: number): number; + + /** + * Returns the sign of x, indicating whether x is positive, negative, or zero. + * @param x The numeric expression to test + */ + sign(x: number): number; + + /** + * Returns the base 10 logarithm of a number. + * @param x A numeric expression. + */ + log10(x: number): number; + + /** + * Returns the base 2 logarithm of a number. + * @param x A numeric expression. + */ + log2(x: number): number; + + /** + * Returns the natural logarithm of 1 + x. + * @param x A numeric expression. + */ + log1p(x: number): number; + + /** + * Returns the result of (e^x - 1), which is an implementation-dependent approximation to + * subtracting 1 from the exponential function of x (e raised to the power of x, where e + * is the base of the natural logarithms). + * @param x A numeric expression. + */ + expm1(x: number): number; + + /** + * Returns the hyperbolic cosine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + cosh(x: number): number; + + /** + * Returns the hyperbolic sine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + sinh(x: number): number; + + /** + * Returns the hyperbolic tangent of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + tanh(x: number): number; + + /** + * Returns the inverse hyperbolic cosine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + acosh(x: number): number; + + /** + * Returns the inverse hyperbolic sine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + asinh(x: number): number; + + /** + * Returns the inverse hyperbolic tangent of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + atanh(x: number): number; + + /** + * Returns the square root of the sum of squares of its arguments. + * @param values Values to compute the square root for. + * If no arguments are passed, the result is +0. + * If there is only one argument, the result is the absolute value. + * If any argument is +Infinity or -Infinity, the result is +Infinity. + * If any argument is NaN, the result is NaN. + * If all arguments are either +0 or −0, the result is +0. + */ + hypot(...values: number[]): number; + + /** + * Returns the integral part of the numeric expression x, removing any fractional digits. + * If x is already an integer, the result is x. + * @param x A numeric expression. + */ + trunc(x: number): number; + + /** + * Returns the nearest single precision float representation of a number. + * @param x A numeric expression. + */ + fround(x: number): number; + + /** + * Returns an implementation-dependent approximation to the cube root of number. + * @param x A numeric expression. + */ + cbrt(x: number): number; +} + +interface NumberConstructor { + /** + * The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1 + * that is representable as a Number value, which is approximately: + * 2.2204460492503130808472633361816 x 10‍−‍16. + */ + readonly EPSILON: number; + + /** + * Returns true if passed value is finite. + * Unlike the global isFinite, Number.isFinite doesn't forcibly convert the parameter to a + * number. Only finite values of the type number, result in true. + * @param number A numeric value. + */ + isFinite(number: unknown): boolean; + + /** + * Returns true if the value passed is an integer, false otherwise. + * @param number A numeric value. + */ + isInteger(number: unknown): boolean; + + /** + * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a + * number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter + * to a number. Only values of the type number, that are also NaN, result in true. + * @param number A numeric value. + */ + isNaN(number: unknown): boolean; + + /** + * Returns true if the value passed is a safe integer. + * @param number A numeric value. + */ + isSafeInteger(number: unknown): boolean; + + /** + * The value of the largest integer n such that n and n + 1 are both exactly representable as + * a Number value. + * The value of Number.MAX_SAFE_INTEGER is 9007199254740991 2^53 − 1. + */ + readonly MAX_SAFE_INTEGER: number; + + /** + * The value of the smallest integer n such that n and n − 1 are both exactly representable as + * a Number value. + * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)). + */ + readonly MIN_SAFE_INTEGER: number; + + /** + * Converts a string to a floating-point number. + * @param string A string that contains a floating-point number. + */ + parseFloat(string: string): number; + + /** + * Converts A string to an integer. + * @param string A string to convert into a number. + * @param radix A value between 2 and 36 that specifies the base of the number in `string`. + * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. + * All other strings are considered decimal. + */ + parseInt(string: string, radix?: number): number; +} + +interface ObjectConstructor { + /** + * Copy the values of all of the enumerable own properties from one or more source objects to a + * target object. Returns the target object. + * @param target The target object to copy to. + * @param source The source object from which to copy properties. + */ + assign(target: T, source: U): T & U; + + /** + * Copy the values of all of the enumerable own properties from one or more source objects to a + * target object. Returns the target object. + * @param target The target object to copy to. + * @param source1 The first source object from which to copy properties. + * @param source2 The second source object from which to copy properties. + */ + assign(target: T, source1: U, source2: V): T & U & V; + + /** + * Copy the values of all of the enumerable own properties from one or more source objects to a + * target object. Returns the target object. + * @param target The target object to copy to. + * @param source1 The first source object from which to copy properties. + * @param source2 The second source object from which to copy properties. + * @param source3 The third source object from which to copy properties. + */ + assign(target: T, source1: U, source2: V, source3: W): T & U & V & W; + + /** + * Copy the values of all of the enumerable own properties from one or more source objects to a + * target object. Returns the target object. + * @param target The target object to copy to. + * @param sources One or more source objects from which to copy properties + */ + assign(target: object, ...sources: any[]): any; + + /** + * Returns an array of all symbol properties found directly on object o. + * @param o Object to retrieve the symbols from. + */ + getOwnPropertySymbols(o: any): symbol[]; + + /** + * Returns the names of the enumerable string properties and methods of an object. + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + keys(o: {}): string[]; + + /** + * Returns true if the values are the same value, false otherwise. + * @param value1 The first value. + * @param value2 The second value. + */ + is(value1: any, value2: any): boolean; + + /** + * Sets the prototype of a specified object o to object proto or null. Returns the object o. + * @param o The object to change its prototype. + * @param proto The value of the new prototype or null. + */ + setPrototypeOf(o: any, proto: object | null): any; +} + +interface ReadonlyArray { + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: T, index: number, obj: readonly T[]) => value is S, thisArg?: any): S | undefined; + + find(predicate: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): T | undefined; + + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): number; + + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; +} + +interface RegExp { + /** + * Returns a string indicating the flags of the regular expression in question. This field is read-only. + * The characters in this string are sequenced and concatenated in the following order: + * + * - "g" for global + * - "i" for ignoreCase + * - "m" for multiline + * - "u" for unicode + * - "y" for sticky + * + * If no flags are set, the value is the empty string. + */ + readonly flags: string; + + /** + * Returns a Boolean value indicating the state of the sticky flag (y) used with a regular + * expression. Default is false. Read-only. + */ + readonly sticky: boolean; + + /** + * Returns a Boolean value indicating the state of the Unicode flag (u) used with a regular + * expression. Default is false. Read-only. + */ + readonly unicode: boolean; +} + +interface RegExpConstructor { + new (pattern: RegExp | string, flags?: string): RegExp; + + (pattern: RegExp | string, flags?: string): RegExp; +} + +interface String { + /** + * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point + * value of the UTF-16 encoded code point starting at the string element at position pos in + * the String resulting from converting this object to a String. + * If there is no element at that position, the result is undefined. + * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos. + */ + codePointAt(pos: number): number | undefined; + + /** + * Returns true if searchString appears as a substring of the result of converting this + * object to a String, at one or more positions that are + * greater than or equal to position; otherwise, returns false. + * @param searchString search string + * @param position If position is undefined, 0 is assumed, so as to search all of the String. + */ + includes(searchString: string, position?: number): boolean; + + /** + * Returns true if the sequence of elements of searchString converted to a String is the + * same as the corresponding elements of this object (converted to a String) starting at + * endPosition – length(this). Otherwise returns false. + */ + endsWith(searchString: string, endPosition?: number): boolean; + + /** + * Returns the String value result of normalizing the string into the normalization form + * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms. + * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default + * is "NFC" + */ + normalize(form: "NFC" | "NFD" | "NFKC" | "NFKD"): string; + + /** + * Returns the String value result of normalizing the string into the normalization form + * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms. + * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default + * is "NFC" + */ + normalize(form?: string): string; + + /** + * Returns a String value that is made from count copies appended together. If count is 0, + * the empty string is returned. + * @param count number of copies to append + */ + repeat(count: number): string; + + /** + * Returns true if the sequence of elements of searchString converted to a String is the + * same as the corresponding elements of this object (converted to a String) starting at + * position. Otherwise returns false. + */ + startsWith(searchString: string, position?: number): boolean; +} + +interface StringConstructor { + /** + * Return the String value whose elements are, in order, the elements in the List elements. + * If length is 0, the empty string is returned. + */ + fromCodePoint(...codePoints: number[]): string; + + /** + * String.raw is usually used as a tag function of a Tagged Template String. When called as + * such, the first argument will be a well formed template call site object and the rest + * parameter will contain the substitution values. It can also be called directly, for example, + * to interleave strings and values from your own tag function, and in this case the only thing + * it needs from the first argument is the raw property. + * @param template A well-formed template string call site representation. + * @param substitutions A set of substitution values. + */ + raw(template: { raw: readonly string[] | ArrayLike; }, ...substitutions: any[]): string; +} + +interface Int8Array { + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; +} + +interface Uint8Array { + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; +} + +interface Uint8ClampedArray { + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; +} + +interface Int16Array { + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; +} + +interface Uint16Array { + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; +} + +interface Int32Array { + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; +} + +interface Uint32Array { + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; +} + +interface Float32Array { + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; +} + +interface Float64Array { + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; +} + +///////////////////////////// +// lib.es2015.generator.d.ts +///////////////////////////// +interface Generator extends IteratorObject { + // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. + next(...[value]: [] | [TNext]): IteratorResult; + + return(value: TReturn): IteratorResult; + + throw(e: any): IteratorResult; + + [Symbol.iterator](): Generator; +} + +interface GeneratorFunction { + /** + * Creates a new Generator object. + * @param args A list of arguments the function accepts. + */ + new (...args: any[]): Generator; + + /** + * Creates a new Generator object. + * @param args A list of arguments the function accepts. + */ + (...args: any[]): Generator; + + /** + * The length of the arguments. + */ + readonly length: number; + + /** + * Returns the name of the function. + */ + readonly name: string; + + /** + * A reference to the prototype. + */ + readonly prototype: Generator; +} + +///////////////////////////// +// lib.es2015.iterable.d.ts +///////////////////////////// +interface SymbolConstructor { + /** + * A method that returns the default iterator for an object. Called by the semantics of the + * for-of statement. + */ + readonly iterator: unique symbol; +} + +interface IteratorYieldResult { + done?: false; + + value: TYield; +} + +interface IteratorReturnResult { + done: true; + + value: TReturn; +} + +type IteratorResult = IteratorYieldResult | IteratorReturnResult; + +interface Iterator { + // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. + next(...[value]: [] | [TNext]): IteratorResult; + + return?(value?: TReturn): IteratorResult; + + throw?(e?: any): IteratorResult; +} + +interface Iterable { + [Symbol.iterator](): Iterator; +} + +/** + * Describes a user-defined {@link Iterator} that is also iterable. + */ +interface IterableIterator extends Iterator { + [Symbol.iterator](): IterableIterator; +} + +/** + * Describes an {@link Iterator} produced by the runtime that inherits from the intrinsic `Iterator.prototype`. + */ +interface IteratorObject extends Iterator { + [Symbol.iterator](): IteratorObject; +} + +/** + * Defines the `TReturn` type used for built-in iterators produced by `Array`, `Map`, `Set`, and others. + * This is `undefined` when `strictBuiltInIteratorReturn` is `true`; otherwise, this is `any`. + */ +type BuiltinIteratorReturn = intrinsic; + +interface ArrayIterator extends IteratorObject { + [Symbol.iterator](): ArrayIterator; +} + +interface Array { + /** Iterator */ + [Symbol.iterator](): ArrayIterator; + + /** + * Returns an iterable of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, T]>; + + /** + * Returns an iterable of keys in the array + */ + keys(): ArrayIterator; + + /** + * Returns an iterable of values in the array + */ + values(): ArrayIterator; +} + +interface ArrayConstructor { + /** + * Creates an array from an iterable object. + * @param iterable An iterable object to convert to an array. + */ + from(iterable: Iterable | ArrayLike): T[]; + + /** + * Creates an array from an iterable object. + * @param iterable An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; +} + +interface ReadonlyArray { + /** Iterator of values in the array. */ + [Symbol.iterator](): ArrayIterator; + + /** + * Returns an iterable of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, T]>; + + /** + * Returns an iterable of keys in the array + */ + keys(): ArrayIterator; + + /** + * Returns an iterable of values in the array + */ + values(): ArrayIterator; +} + +interface IArguments { + /** Iterator */ + [Symbol.iterator](): ArrayIterator; +} + +interface MapIterator extends IteratorObject { + [Symbol.iterator](): MapIterator; +} + +interface Map { + /** Returns an iterable of entries in the map. */ + [Symbol.iterator](): MapIterator<[K, V]>; + + /** + * Returns an iterable of key, value pairs for every entry in the map. + */ + entries(): MapIterator<[K, V]>; + + /** + * Returns an iterable of keys in the map + */ + keys(): MapIterator; + + /** + * Returns an iterable of values in the map + */ + values(): MapIterator; +} + +interface ReadonlyMap { + /** Returns an iterable of entries in the map. */ + [Symbol.iterator](): MapIterator<[K, V]>; + + /** + * Returns an iterable of key, value pairs for every entry in the map. + */ + entries(): MapIterator<[K, V]>; + + /** + * Returns an iterable of keys in the map + */ + keys(): MapIterator; + + /** + * Returns an iterable of values in the map + */ + values(): MapIterator; +} + +interface MapConstructor { + new (): Map; + + new (iterable?: Iterable | null): Map; +} + +interface WeakMap { +} + +interface WeakMapConstructor { + new (iterable?: Iterable | null): WeakMap; +} + +interface SetIterator extends IteratorObject { + [Symbol.iterator](): SetIterator; +} + +interface Set { + /** Iterates over values in the set. */ + [Symbol.iterator](): SetIterator; + + /** + * Returns an iterable of [v,v] pairs for every value `v` in the set. + */ + entries(): SetIterator<[T, T]>; + + /** + * Despite its name, returns an iterable of the values in the set. + */ + keys(): SetIterator; + + /** + * Returns an iterable of values in the set. + */ + values(): SetIterator; +} + +interface ReadonlySet { + /** Iterates over values in the set. */ + [Symbol.iterator](): SetIterator; + + /** + * Returns an iterable of [v,v] pairs for every value `v` in the set. + */ + entries(): SetIterator<[T, T]>; + + /** + * Despite its name, returns an iterable of the values in the set. + */ + keys(): SetIterator; + + /** + * Returns an iterable of values in the set. + */ + values(): SetIterator; +} + +interface SetConstructor { + new (iterable?: Iterable | null): Set; +} + +interface WeakSet { +} + +interface WeakSetConstructor { + new (iterable: Iterable): WeakSet; +} + +interface PromiseConstructor { + /** + * Creates a Promise that is resolved with an array of results when all of the provided Promises + * resolve, or rejected when any Promise is rejected. + * @param values An iterable of Promises. + * @returns A new Promise. + */ + all(values: Iterable>): Promise[]>; + + /** + * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved + * or rejected. + * @param values An iterable of Promises. + * @returns A new Promise. + */ + race(values: Iterable>): Promise>; +} + +interface StringIterator extends IteratorObject { + [Symbol.iterator](): StringIterator; +} + +interface String { + /** Iterator */ + [Symbol.iterator](): StringIterator; +} + +interface Int8Array { + [Symbol.iterator](): ArrayIterator; + + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; + + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; + + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; +} + +interface Int8ArrayConstructor { + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Int8Array; + + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int8Array; +} + +interface Uint8Array { + [Symbol.iterator](): ArrayIterator; + + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; + + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; + + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; +} + +interface Uint8ArrayConstructor { + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Uint8Array; + + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8Array; +} + +interface Uint8ClampedArray { + [Symbol.iterator](): ArrayIterator; + + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; + + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; + + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; +} + +interface Uint8ClampedArrayConstructor { + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Uint8ClampedArray; + + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; +} + +interface Int16Array { + [Symbol.iterator](): ArrayIterator; + + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; + + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; + + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; +} + +interface Int16ArrayConstructor { + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Int16Array; + + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int16Array; +} + +interface Uint16Array { + [Symbol.iterator](): ArrayIterator; + + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; + + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; + + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; +} + +interface Uint16ArrayConstructor { + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Uint16Array; + + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint16Array; +} + +interface Int32Array { + [Symbol.iterator](): ArrayIterator; + + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; + + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; + + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; +} + +interface Int32ArrayConstructor { + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Int32Array; + + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int32Array; +} + +interface Uint32Array { + [Symbol.iterator](): ArrayIterator; + + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; + + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; + + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; +} + +interface Uint32ArrayConstructor { + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Uint32Array; + + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint32Array; +} + +interface Float32Array { + [Symbol.iterator](): ArrayIterator; + + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; + + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; + + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; +} + +interface Float32ArrayConstructor { + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Float32Array; + + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Float32Array; +} + +interface Float64Array { + [Symbol.iterator](): ArrayIterator; + + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; + + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; + + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; +} + +interface Float64ArrayConstructor { + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Float64Array; + + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Float64Array; +} + +///////////////////////////// +// lib.es2015.promise.d.ts +///////////////////////////// +interface PromiseConstructor { + /** + * A reference to the prototype. + */ + readonly prototype: Promise; + + /** + * Creates a new Promise. + * @param executor A callback used to initialize the promise. This callback is passed two arguments: + * a resolve callback used to resolve the promise with a value or the result of another promise, + * and a reject callback used to reject the promise with a provided reason or error. + */ + new (executor: (resolve: (value: T | PromiseLike) => void, reject: (reason?: any) => void) => void): Promise; + + /** + * Creates a Promise that is resolved with an array of results when all of the provided Promises + * resolve, or rejected when any Promise is rejected. + * @param values An array of Promises. + * @returns A new Promise. + */ + all(values: T): Promise<{ -readonly [P in keyof T]: Awaited; }>; + + // see: lib.es2015.iterable.d.ts + // all(values: Iterable>): Promise[]>; + + /** + * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved + * or rejected. + * @param values An array of Promises. + * @returns A new Promise. + */ + race(values: T): Promise>; + + // see: lib.es2015.iterable.d.ts + // race(values: Iterable>): Promise>; + + /** + * Creates a new rejected promise for the provided reason. + * @param reason The reason the promise was rejected. + * @returns A new rejected Promise. + */ + reject(reason?: any): Promise; + + /** + * Creates a new resolved promise. + * @returns A resolved promise. + */ + resolve(): Promise; + + /** + * Creates a new resolved promise for the provided value. + * @param value A promise. + * @returns A promise whose internal state matches the provided promise. + */ + resolve(value: T): Promise>; + + /** + * Creates a new resolved promise for the provided value. + * @param value A promise. + * @returns A promise whose internal state matches the provided promise. + */ + resolve(value: T | PromiseLike): Promise>; +} + +var Promise: PromiseConstructor; + +///////////////////////////// +// lib.es2015.proxy.d.ts +///////////////////////////// +interface ProxyHandler { + /** + * A trap method for a function call. + * @param target The original callable object which is being proxied. + */ + apply?(target: T, thisArg: any, argArray: any[]): any; + + /** + * A trap for the `new` operator. + * @param target The original object which is being proxied. + * @param newTarget The constructor that was originally called. + */ + construct?(target: T, argArray: any[], newTarget: Function): object; + + /** + * A trap for `Object.defineProperty()`. + * @param target The original object which is being proxied. + * @returns A `Boolean` indicating whether or not the property has been defined. + */ + defineProperty?(target: T, property: string | symbol, attributes: PropertyDescriptor): boolean; + + /** + * A trap for the `delete` operator. + * @param target The original object which is being proxied. + * @param p The name or `Symbol` of the property to delete. + * @returns A `Boolean` indicating whether or not the property was deleted. + */ + deleteProperty?(target: T, p: string | symbol): boolean; + + /** + * A trap for getting a property value. + * @param target The original object which is being proxied. + * @param p The name or `Symbol` of the property to get. + * @param receiver The proxy or an object that inherits from the proxy. + */ + get?(target: T, p: string | symbol, receiver: any): any; + + /** + * A trap for `Object.getOwnPropertyDescriptor()`. + * @param target The original object which is being proxied. + * @param p The name of the property whose description should be retrieved. + */ + getOwnPropertyDescriptor?(target: T, p: string | symbol): PropertyDescriptor | undefined; + + /** + * A trap for the `[[GetPrototypeOf]]` internal method. + * @param target The original object which is being proxied. + */ + getPrototypeOf?(target: T): object | null; + + /** + * A trap for the `in` operator. + * @param target The original object which is being proxied. + * @param p The name or `Symbol` of the property to check for existence. + */ + has?(target: T, p: string | symbol): boolean; + + /** + * A trap for `Object.isExtensible()`. + * @param target The original object which is being proxied. + */ + isExtensible?(target: T): boolean; + + /** + * A trap for `Reflect.ownKeys()`. + * @param target The original object which is being proxied. + */ + ownKeys?(target: T): ArrayLike; + + /** + * A trap for `Object.preventExtensions()`. + * @param target The original object which is being proxied. + */ + preventExtensions?(target: T): boolean; + + /** + * A trap for setting a property value. + * @param target The original object which is being proxied. + * @param p The name or `Symbol` of the property to set. + * @param receiver The object to which the assignment was originally directed. + * @returns A `Boolean` indicating whether or not the property was set. + */ + set?(target: T, p: string | symbol, newValue: any, receiver: any): boolean; + + /** + * A trap for `Object.setPrototypeOf()`. + * @param target The original object which is being proxied. + * @param newPrototype The object's new prototype or `null`. + */ + setPrototypeOf?(target: T, v: object | null): boolean; +} + +interface ProxyConstructor { + /** + * Creates a revocable Proxy object. + * @param target A target object to wrap with Proxy. + * @param handler An object whose properties define the behavior of Proxy when an operation is attempted on it. + */ + revocable(target: T, handler: ProxyHandler): { proxy: T; revoke: () => void; }; + + /** + * Creates a Proxy object. The Proxy object allows you to create an object that can be used in place of the + * original object, but which may redefine fundamental Object operations like getting, setting, and defining + * properties. Proxy objects are commonly used to log property accesses, validate, format, or sanitize inputs. + * @param target A target object to wrap with Proxy. + * @param handler An object whose properties define the behavior of Proxy when an operation is attempted on it. + */ + new (target: T, handler: ProxyHandler): T; +} + +var Proxy: ProxyConstructor; + +///////////////////////////// +// lib.es2015.reflect.d.ts +///////////////////////////// +namespace Reflect { +/** + * Calls the function with the specified object as the this value + * and the elements of specified array as the arguments. + * @param target The function to call. + * @param thisArgument The object to be used as the this object. + * @param argumentsList An array of argument values to be passed to the function. + */ + function apply( + target: (this: T, ...args: A) => R, + thisArgument: T, + argumentsList: Readonly, + ): R; + +function apply(target: Function, thisArgument: any, argumentsList: ArrayLike): any; + +/** + * Constructs the target with the elements of specified array as the arguments + * and the specified constructor as the `new.target` value. + * @param target The constructor to invoke. + * @param argumentsList An array of argument values to be passed to the constructor. + * @param newTarget The constructor to be used as the `new.target` object. + */ + function construct( + target: new (...args: A) => R, + argumentsList: Readonly, + newTarget?: new (...args: any) => any, + ): R; + +function construct(target: Function, argumentsList: ArrayLike, newTarget?: Function): any; + +/** + * Adds a property to an object, or modifies attributes of an existing property. + * @param target Object on which to add or modify the property. This can be a native JavaScript object + * (that is, a user-defined object or a built in object) or a DOM object. + * @param propertyKey The property name. + * @param attributes Descriptor for the property. It can be for a data property or an accessor property. + */ + function defineProperty(target: object, propertyKey: PropertyKey, attributes: PropertyDescriptor & ThisType): boolean; + +/** + * Removes a property from an object, equivalent to `delete target[propertyKey]`, + * except it won't throw if `target[propertyKey]` is non-configurable. + * @param target Object from which to remove the own property. + * @param propertyKey The property name. + */ + function deleteProperty(target: object, propertyKey: PropertyKey): boolean; + +/** + * Gets the property of target, equivalent to `target[propertyKey]` when `receiver === target`. + * @param target Object that contains the property on itself or in its prototype chain. + * @param propertyKey The property name. + * @param receiver The reference to use as the `this` value in the getter function, + * if `target[propertyKey]` is an accessor property. + */ + function get( + target: T, + propertyKey: P, + receiver?: unknown, + ): P extends keyof T ? T[P] : any; + +/** + * Gets the own property descriptor of the specified object. + * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype. + * @param target Object that contains the property. + * @param propertyKey The property name. + */ + function getOwnPropertyDescriptor( + target: T, + propertyKey: P, + ): TypedPropertyDescriptor

| undefined; + +/** + * Returns the prototype of an object. + * @param target The object that references the prototype. + */ + function getPrototypeOf(target: object): object | null; + +/** + * Equivalent to `propertyKey in target`. + * @param target Object that contains the property on itself or in its prototype chain. + * @param propertyKey Name of the property. + */ + function has(target: object, propertyKey: PropertyKey): boolean; + +/** + * Returns a value that indicates whether new properties can be added to an object. + * @param target Object to test. + */ + function isExtensible(target: object): boolean; + +/** + * Returns the string and symbol keys of the own properties of an object. The own properties of an object + * are those that are defined directly on that object, and are not inherited from the object's prototype. + * @param target Object that contains the own properties. + */ + function ownKeys(target: object): (string | symbol)[]; + +/** + * Prevents the addition of new properties to an object. + * @param target Object to make non-extensible. + * @return Whether the object has been made non-extensible. + */ + function preventExtensions(target: object): boolean; + +/** + * Sets the property of target, equivalent to `target[propertyKey] = value` when `receiver === target`. + * @param target Object that contains the property on itself or in its prototype chain. + * @param propertyKey Name of the property. + * @param receiver The reference to use as the `this` value in the setter function, + * if `target[propertyKey]` is an accessor property. + */ + function set( + target: T, + propertyKey: P, + value: P extends keyof T ? T[P] : any, + receiver?: any, + ): boolean; + +function set(target: object, propertyKey: PropertyKey, value: any, receiver?: any): boolean; + +/** + * Sets the prototype of a specified object o to object proto or null. + * @param target The object to change its prototype. + * @param proto The value of the new prototype or null. + * @return Whether setting the prototype was successful. + */ + function setPrototypeOf(target: object, proto: object | null): boolean; +} + +///////////////////////////// +// lib.es2015.symbol.d.ts +///////////////////////////// +interface SymbolConstructor { + /** + * A reference to the prototype. + */ + readonly prototype: Symbol; + + /** + * Returns a new unique Symbol value. + * @param description Description of the new Symbol object. + */ + (description?: string | number): symbol; + + /** + * Returns a Symbol object from the global symbol registry matching the given key if found. + * Otherwise, returns a new symbol with this key. + * @param key key to search for. + */ + for(key: string): symbol; + + /** + * Returns a key from the global symbol registry matching the given Symbol if found. + * Otherwise, returns undefined. + * @param sym Symbol to find the key for. + */ + keyFor(sym: symbol): string | undefined; +} + +var Symbol: SymbolConstructor; + +///////////////////////////// +// lib.es2015.symbol.wellknown.d.ts +///////////////////////////// +interface SymbolConstructor { + /** + * A method that determines if a constructor object recognizes an object as one of the + * constructor’s instances. Called by the semantics of the instanceof operator. + */ + readonly hasInstance: unique symbol; + + /** + * A Boolean value that if true indicates that an object should flatten to its array elements + * by Array.prototype.concat. + */ + readonly isConcatSpreadable: unique symbol; + + /** + * A regular expression method that matches the regular expression against a string. Called + * by the String.prototype.match method. + */ + readonly match: unique symbol; + + /** + * A regular expression method that replaces matched substrings of a string. Called by the + * String.prototype.replace method. + */ + readonly replace: unique symbol; + + /** + * A regular expression method that returns the index within a string that matches the + * regular expression. Called by the String.prototype.search method. + */ + readonly search: unique symbol; + + /** + * A function valued property that is the constructor function that is used to create + * derived objects. + */ + readonly species: unique symbol; + + /** + * A regular expression method that splits a string at the indices that match the regular + * expression. Called by the String.prototype.split method. + */ + readonly split: unique symbol; + + /** + * A method that converts an object to a corresponding primitive value. + * Called by the ToPrimitive abstract operation. + */ + readonly toPrimitive: unique symbol; + + /** + * A String value that is used in the creation of the default string description of an object. + * Called by the built-in method Object.prototype.toString. + */ + readonly toStringTag: unique symbol; + + /** + * An Object whose truthy properties are properties that are excluded from the 'with' + * environment bindings of the associated objects. + */ + readonly unscopables: unique symbol; +} + +interface Symbol { + /** + * Converts a Symbol object to a symbol. + */ + [Symbol.toPrimitive](hint: string): symbol; +} + +interface Array { + /** + * Is an object whose properties have the value 'true' + * when they will be absent when used in a 'with' statement. + */ + readonly [Symbol.unscopables]: { + [K in keyof any[]]?: boolean; + }; +} + +interface ReadonlyArray { + /** + * Is an object whose properties have the value 'true' + * when they will be absent when used in a 'with' statement. + */ + readonly [Symbol.unscopables]: { + [K in keyof readonly any[]]?: boolean; + }; +} + +interface Date { + /** + * Converts a Date object to a string. + */ + [Symbol.toPrimitive](hint: "default"): string; + + /** + * Converts a Date object to a string. + */ + [Symbol.toPrimitive](hint: "string"): string; + + /** + * Converts a Date object to a number. + */ + [Symbol.toPrimitive](hint: "number"): number; + + /** + * Converts a Date object to a string or number. + * + * @param hint The strings "number", "string", or "default" to specify what primitive to return. + * + * @throws {TypeError} If 'hint' was given something other than "number", "string", or "default". + * @returns A number if 'hint' was "number", a string if 'hint' was "string" or "default". + */ + [Symbol.toPrimitive](hint: string): string | number; +} + +interface Map { + readonly [Symbol.toStringTag]: string; +} + +interface WeakMap { + readonly [Symbol.toStringTag]: string; +} + +interface Set { + readonly [Symbol.toStringTag]: string; +} + +interface WeakSet { + readonly [Symbol.toStringTag]: string; +} + +interface Function { + /** + * Determines whether the given value inherits from this function if this function was used + * as a constructor function. + * + * A constructor function can control which objects are recognized as its instances by + * 'instanceof' by overriding this method. + */ + [Symbol.hasInstance](value: any): boolean; +} + +interface GeneratorFunction { + readonly [Symbol.toStringTag]: string; +} + +interface PromiseConstructor { + readonly [Symbol.species]: PromiseConstructor; +} + +interface RegExp { + /** + * Matches a string with this regular expression, and returns an array containing the results of + * that search. + * @param string A string to search within. + */ + [Symbol.match](string: string): RegExpMatchArray | null; + + /** + * Replaces text in a string, using this regular expression. + * @param string A String object or string literal whose contents matching against + * this regular expression will be replaced + * @param replaceValue A String object or string literal containing the text to replace for every + * successful match of this regular expression. + */ + [Symbol.replace](string: string, replaceValue: string): string; + + /** + * Replaces text in a string, using this regular expression. + * @param string A String object or string literal whose contents matching against + * this regular expression will be replaced + * @param replacer A function that returns the replacement text. + */ + [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; + + /** + * Finds the position beginning first substring match in a regular expression search + * using this regular expression. + * + * @param string The string to search within. + */ + [Symbol.search](string: string): number; + + /** + * Returns an array of substrings that were delimited by strings in the original input that + * match against this regular expression. + * + * If the regular expression contains capturing parentheses, then each time this + * regular expression matches, the results (including any undefined results) of the + * capturing parentheses are spliced. + * + * @param string string value to split + * @param limit if not undefined, the output array is truncated so that it contains no more + * than 'limit' elements. + */ + [Symbol.split](string: string, limit?: number): string[]; +} + +interface RegExpConstructor { + readonly [Symbol.species]: RegExpConstructor; +} + +interface String { + /** + * Matches a string or an object that supports being matched against, and returns an array + * containing the results of that search, or null if no matches are found. + * @param matcher An object that supports being matched against. + */ + match(matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null; + + /** + * Passes a string and {@linkcode replaceValue} to the `[Symbol.replace]` method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. + * @param searchValue An object that supports searching for and replacing matches within a string. + * @param replaceValue The replacement text. + */ + replace(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string; + + /** + * Replaces text in a string, using an object that supports replacement within a string. + * @param searchValue A object can search for and replace matches within a string. + * @param replacer A function that returns the replacement text. + */ + replace(searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string; + + /** + * Finds the first substring match in a regular expression search. + * @param searcher An object which supports searching within a string. + */ + search(searcher: { [Symbol.search](string: string): number; }): number; + + /** + * Split a string into substrings using the specified separator and return them as an array. + * @param splitter An object that can split a string. + * @param limit A value used to limit the number of elements returned in the array. + */ + split(splitter: { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number): string[]; +} + +interface ArrayConstructor { + readonly [Symbol.species]: ArrayConstructor; +} + +interface MapConstructor { + readonly [Symbol.species]: MapConstructor; +} + +interface SetConstructor { + readonly [Symbol.species]: SetConstructor; +} + +interface ArrayBufferConstructor { + readonly [Symbol.species]: ArrayBufferConstructor; +} + +///////////////////////////// +// lib.es2016.array.include.d.ts +///////////////////////////// +interface Array { + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: T, fromIndex?: number): boolean; +} + +interface ReadonlyArray { + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: T, fromIndex?: number): boolean; +} + +interface Int8Array { + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; +} + +interface Uint8Array { + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; +} + +interface Uint8ClampedArray { + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; +} + +interface Int16Array { + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; +} + +interface Uint16Array { + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; +} + +interface Int32Array { + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; +} + +interface Uint32Array { + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; +} + +interface Float32Array { + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; +} + +interface Float64Array { + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; +} + +///////////////////////////// +// lib.es2016.intl.d.ts +///////////////////////////// +namespace Intl { +/** + * The `Intl.getCanonicalLocales()` method returns an array containing + * the canonical locale names. Duplicates will be omitted and elements + * will be validated as structurally valid language tags. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/getCanonicalLocales) + * + * @param locale A list of String values for which to get the canonical locale names + * @returns An array containing the canonical and validated locale names. + */ + function getCanonicalLocales(locale?: string | readonly string[]): string[]; +} + +///////////////////////////// +// lib.es2017.date.d.ts +///////////////////////////// +interface DateConstructor { + /** + * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. + * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. + * @param monthIndex The month as a number between 0 and 11 (January to December). + * @param date The date as a number between 1 and 31. + * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. + * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. + * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. + * @param ms A number from 0 to 999 that specifies the milliseconds. + */ + UTC(year: number, monthIndex?: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; +} + +///////////////////////////// +// lib.es2017.intl.d.ts +///////////////////////////// +namespace Intl { +interface DateTimeFormatPartTypesRegistry { + day: any; + + dayPeriod: any; + + era: any; + + hour: any; + + literal: any; + + minute: any; + + month: any; + + second: any; + + timeZoneName: any; + + weekday: any; + + year: any; +} + +type DateTimeFormatPartTypes = keyof DateTimeFormatPartTypesRegistry; + +interface DateTimeFormatPart { + type: DateTimeFormatPartTypes; + + value: string; +} + +interface DateTimeFormat { + formatToParts(date?: Date | number): DateTimeFormatPart[]; +} +} + +///////////////////////////// +// lib.es2017.object.d.ts +///////////////////////////// +interface ObjectConstructor { + /** + * Returns an array of values of the enumerable own properties of an object + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + values(o: { [s: string]: T; } | ArrayLike): T[]; + + /** + * Returns an array of values of the enumerable own properties of an object + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + values(o: {}): any[]; + + /** + * Returns an array of key/values of the enumerable own properties of an object + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + entries(o: { [s: string]: T; } | ArrayLike): [string, T][]; + + /** + * Returns an array of key/values of the enumerable own properties of an object + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + entries(o: {}): [string, any][]; + + /** + * Returns an object containing all own property descriptors of an object + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + getOwnPropertyDescriptors(o: T): { [P in keyof T]: TypedPropertyDescriptor; } & { [x: string]: PropertyDescriptor; }; +} + +///////////////////////////// +// lib.es2017.sharedmemory.d.ts +///////////////////////////// +interface SharedArrayBuffer { + /** + * Read-only. The length of the ArrayBuffer (in bytes). + */ + readonly byteLength: number; + + /** + * Returns a section of an SharedArrayBuffer. + */ + slice(begin?: number, end?: number): SharedArrayBuffer; + + readonly [Symbol.toStringTag]: "SharedArrayBuffer"; +} + +interface SharedArrayBufferConstructor { + readonly prototype: SharedArrayBuffer; + + new (byteLength?: number): SharedArrayBuffer; + + readonly [Symbol.species]: SharedArrayBufferConstructor; +} + +var SharedArrayBuffer: SharedArrayBufferConstructor; + +interface ArrayBufferTypes { + SharedArrayBuffer: SharedArrayBuffer; +} + +interface Atomics { + /** + * Adds a value to the value at the given position in the array, returning the original value. + * Until this atomic operation completes, any other read or write operation against the array + * will block. + */ + add(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + + /** + * Stores the bitwise AND of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or + * write operation against the array will block. + */ + and(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + + /** + * Replaces the value at the given position in the array if the original value equals the given + * expected value, returning the original value. Until this atomic operation completes, any + * other read or write operation against the array will block. + */ + compareExchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, expectedValue: number, replacementValue: number): number; + + /** + * Replaces the value at the given position in the array, returning the original value. Until + * this atomic operation completes, any other read or write operation against the array will + * block. + */ + exchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + + /** + * Returns a value indicating whether high-performance algorithms can use atomic operations + * (`true`) or must use locks (`false`) for the given number of bytes-per-element of a typed + * array. + */ + isLockFree(size: number): boolean; + + /** + * Returns the value at the given position in the array. Until this atomic operation completes, + * any other read or write operation against the array will block. + */ + load(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number): number; + + /** + * Stores the bitwise OR of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or write + * operation against the array will block. + */ + or(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + + /** + * Stores a value at the given position in the array, returning the new value. Until this + * atomic operation completes, any other read or write operation against the array will block. + */ + store(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + + /** + * Subtracts a value from the value at the given position in the array, returning the original + * value. Until this atomic operation completes, any other read or write operation against the + * array will block. + */ + sub(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + + /** + * If the value at the given position in the array is equal to the provided value, the current + * agent is put to sleep causing execution to suspend until the timeout expires (returning + * `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns + * `"not-equal"`. + */ + wait(typedArray: Int32Array, index: number, value: number, timeout?: number): "ok" | "not-equal" | "timed-out"; + + /** + * Wakes up sleeping agents that are waiting on the given index of the array, returning the + * number of agents that were awoken. + * @param typedArray A shared Int32Array. + * @param index The position in the typedArray to wake up on. + * @param count The number of sleeping agents to notify. Defaults to +Infinity. + */ + notify(typedArray: Int32Array, index: number, count?: number): number; + + /** + * Stores the bitwise XOR of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or write + * operation against the array will block. + */ + xor(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; + + readonly [Symbol.toStringTag]: "Atomics"; +} + +var Atomics: Atomics; + +///////////////////////////// +// lib.es2017.string.d.ts +///////////////////////////// +interface String { + /** + * Pads the current string with a given string (repeated and/or truncated, if needed) so that the resulting string has a given length. + * The padding is applied from the start of the current string. + * + * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart) + * + * @param targetLength The length of the resulting string once the current `str` has been padded. + * If the value is less than or equal to `str.length`, then `str` is returned as-is. + * + * @param padString The string to pad the current `str` with. + * If `padString` is too long to stay within `targetLength`, it will be truncated from the end. + * The default value is the space character (U+0020). + */ + padStart(targetLength: number, padString?: string): string; + + /** + * Pads the current string with a given string (repeated and/or truncated, if needed) so that the resulting string has a given length. + * The padding is applied from the end of the current string. + * + * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padEnd) + * + * @param targetLength The length of the resulting string once the current `str` has been padded. + * If the value is less than or equal to `str.length`, then `str` is returned as-is. + * + * @param padString The string to pad the current `str` with. + * If `padString` is too long to stay within `targetLength`, it will be truncated from the end. + * The default value is the space character (U+0020). + */ + padEnd(targetLength: number, padString?: string): string; +} + +///////////////////////////// +// lib.es2017.typedarrays.d.ts +///////////////////////////// +interface Int8ArrayConstructor { + new (): Int8Array; +} + +interface Uint8ArrayConstructor { + new (): Uint8Array; +} + +interface Uint8ClampedArrayConstructor { + new (): Uint8ClampedArray; +} + +interface Int16ArrayConstructor { + new (): Int16Array; +} + +interface Uint16ArrayConstructor { + new (): Uint16Array; +} + +interface Int32ArrayConstructor { + new (): Int32Array; +} + +interface Uint32ArrayConstructor { + new (): Uint32Array; +} + +interface Float32ArrayConstructor { + new (): Float32Array; +} + +interface Float64ArrayConstructor { + new (): Float64Array; +} + +///////////////////////////// +// lib.es2018.asyncgenerator.d.ts +///////////////////////////// +interface AsyncGenerator extends AsyncIteratorObject { + // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. + next(...[value]: [] | [TNext]): Promise>; + + return(value: TReturn | PromiseLike): Promise>; + + throw(e: any): Promise>; + + [Symbol.asyncIterator](): AsyncGenerator; +} + +interface AsyncGeneratorFunction { + /** + * Creates a new AsyncGenerator object. + * @param args A list of arguments the function accepts. + */ + new (...args: any[]): AsyncGenerator; + + /** + * Creates a new AsyncGenerator object. + * @param args A list of arguments the function accepts. + */ + (...args: any[]): AsyncGenerator; + + /** + * The length of the arguments. + */ + readonly length: number; + + /** + * Returns the name of the function. + */ + readonly name: string; + + /** + * A reference to the prototype. + */ + readonly prototype: AsyncGenerator; +} + +///////////////////////////// +// lib.es2018.asynciterable.d.ts +///////////////////////////// +interface SymbolConstructor { + /** + * A method that returns the default async iterator for an object. Called by the semantics of + * the for-await-of statement. + */ + readonly asyncIterator: unique symbol; +} + +interface AsyncIterator { + // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. + next(...[value]: [] | [TNext]): Promise>; + + return?(value?: TReturn | PromiseLike): Promise>; + + throw?(e?: any): Promise>; +} + +interface AsyncIterable { + [Symbol.asyncIterator](): AsyncIterator; +} + +/** + * Describes a user-defined {@link AsyncIterator} that is also async iterable. + */ +interface AsyncIterableIterator extends AsyncIterator { + [Symbol.asyncIterator](): AsyncIterableIterator; +} + +/** + * Describes an {@link AsyncIterator} produced by the runtime that inherits from the intrinsic `AsyncIterator.prototype`. + */ +interface AsyncIteratorObject extends AsyncIterator { + [Symbol.asyncIterator](): AsyncIteratorObject; +} + +///////////////////////////// +// lib.es2018.intl.d.ts +///////////////////////////// +namespace Intl { +// http://cldr.unicode.org/index/cldr-spec/plural-rules#TOC-Determining-Plural-Categories + type LDMLPluralRule = "zero" | "one" | "two" | "few" | "many" | "other"; + +type PluralRuleType = "cardinal" | "ordinal"; + +interface PluralRulesOptions { + localeMatcher?: "lookup" | "best fit" | undefined; + + type?: PluralRuleType | undefined; + + minimumIntegerDigits?: number | undefined; + + minimumFractionDigits?: number | undefined; + + maximumFractionDigits?: number | undefined; + + minimumSignificantDigits?: number | undefined; + + maximumSignificantDigits?: number | undefined; +} + +interface ResolvedPluralRulesOptions { + locale: string; + + pluralCategories: LDMLPluralRule[]; + + type: PluralRuleType; + + minimumIntegerDigits: number; + + minimumFractionDigits: number; + + maximumFractionDigits: number; + + minimumSignificantDigits?: number; + + maximumSignificantDigits?: number; +} + +interface PluralRules { + resolvedOptions(): ResolvedPluralRulesOptions; + + select(n: number): LDMLPluralRule; +} + +interface PluralRulesConstructor { + new (locales?: string | readonly string[], options?: PluralRulesOptions): PluralRules; + + (locales?: string | readonly string[], options?: PluralRulesOptions): PluralRules; + + supportedLocalesOf(locales: string | readonly string[], options?: { localeMatcher?: "lookup" | "best fit"; }): string[]; +} + +const PluralRules: PluralRulesConstructor; + +interface NumberFormatPartTypeRegistry { + literal: never; + + nan: never; + + infinity: never; + + percent: never; + + integer: never; + + group: never; + + decimal: never; + + fraction: never; + + plusSign: never; + + minusSign: never; + + percentSign: never; + + currency: never; +} + +type NumberFormatPartTypes = keyof NumberFormatPartTypeRegistry; + +interface NumberFormatPart { + type: NumberFormatPartTypes; + + value: string; +} +} + +///////////////////////////// +// lib.es2018.promise.d.ts +///////////////////////////// +/** + * Represents the completion of an asynchronous operation + */ +interface Promise { + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): Promise; +} + +///////////////////////////// +// lib.es2018.regexp.d.ts +///////////////////////////// +interface RegExp { + /** + * Returns a Boolean value indicating the state of the dotAll flag (s) used with a regular expression. + * Default is false. Read-only. + */ + readonly dotAll: boolean; +} + +///////////////////////////// +// lib.es2019.array.d.ts +///////////////////////////// +type FlatArray = { + done: Arr; + recur: Arr extends ReadonlyArray ? FlatArray + : Arr; +}[Depth extends -1 ? "done" : "recur"]; + +interface ReadonlyArray { + /** + * Calls a defined callback function on each element of an array. Then, flattens the result into + * a new array. + * This is identical to a map followed by flat with depth 1. + * + * @param callback A function that accepts up to three arguments. The flatMap method calls the + * callback function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callback function. If + * thisArg is omitted, undefined is used as the this value. + */ + flatMap( + callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray, + thisArg?: This, + ): U[]; + + /** + * Returns a new array with all sub-array elements concatenated into it recursively up to the + * specified depth. + * + * @param depth The maximum recursion depth + */ + flat( + this: A, + depth?: D, + ): FlatArray[]; +} + +interface Array { + /** + * Calls a defined callback function on each element of an array. Then, flattens the result into + * a new array. + * This is identical to a map followed by flat with depth 1. + * + * @param callback A function that accepts up to three arguments. The flatMap method calls the + * callback function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callback function. If + * thisArg is omitted, undefined is used as the this value. + */ + flatMap( + callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray, + thisArg?: This, + ): U[]; + + /** + * Returns a new array with all sub-array elements concatenated into it recursively up to the + * specified depth. + * + * @param depth The maximum recursion depth + */ + flat( + this: A, + depth?: D, + ): FlatArray[]; +} + +///////////////////////////// +// lib.es2019.object.d.ts +///////////////////////////// +interface ObjectConstructor { + /** + * Returns an object created by key-value entries for properties and methods + * @param entries An iterable object that contains key-value entries for properties and methods. + */ + fromEntries(entries: Iterable): { [k: string]: T; }; + + /** + * Returns an object created by key-value entries for properties and methods + * @param entries An iterable object that contains key-value entries for properties and methods. + */ + fromEntries(entries: Iterable): any; +} + +///////////////////////////// +// lib.es2019.string.d.ts +///////////////////////////// +interface String { + /** Removes the trailing white space and line terminator characters from a string. */ + trimEnd(): string; + + /** Removes the leading white space and line terminator characters from a string. */ + trimStart(): string; +} + +///////////////////////////// +// lib.es2019.symbol.d.ts +///////////////////////////// +interface Symbol { + /** + * Expose the [[Description]] internal slot of a symbol directly. + */ + readonly description: string | undefined; +} + +///////////////////////////// +// lib.es2020.bigint.d.ts +///////////////////////////// +interface BigIntToLocaleStringOptions { + /** + * The locale matching algorithm to use.The default is "best fit". For information about this option, see the {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation Intl page}. + */ + localeMatcher?: string; + + /** + * The formatting style to use , the default is "decimal". + */ + style?: string; + + numberingSystem?: string; + + /** + * The unit to use in unit formatting, Possible values are core unit identifiers, defined in UTS #35, Part 2, Section 6. A subset of units from the full list was selected for use in ECMAScript. Pairs of simple units can be concatenated with "-per-" to make a compound unit. There is no default value; if the style is "unit", the unit property must be provided. + */ + unit?: string; + + /** + * The unit formatting style to use in unit formatting, the defaults is "short". + */ + unitDisplay?: string; + + /** + * The currency to use in currency formatting. Possible values are the ISO 4217 currency codes, such as "USD" for the US dollar, "EUR" for the euro, or "CNY" for the Chinese RMB — see the Current currency & funds code list. There is no default value; if the style is "currency", the currency property must be provided. It is only used when [[Style]] has the value "currency". + */ + currency?: string; + + /** + * How to display the currency in currency formatting. It is only used when [[Style]] has the value "currency". The default is "symbol". + * + * "symbol" to use a localized currency symbol such as €, + * + * "code" to use the ISO currency code, + * + * "name" to use a localized currency name such as "dollar" + */ + currencyDisplay?: string; + + /** + * Whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators. The default is true. + */ + useGrouping?: boolean; + + /** + * The minimum number of integer digits to use. Possible values are from 1 to 21; the default is 1. + */ + minimumIntegerDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; + + /** + * The minimum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number and percent formatting is 0; the default for currency formatting is the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html ISO 4217 currency codes list} (2 if the list doesn't provide that information). + */ + minimumFractionDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20; + + /** + * The maximum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number formatting is the larger of minimumFractionDigits and 3; the default for currency formatting is the larger of minimumFractionDigits and the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html ISO 4217 currency codes list} (2 if the list doesn't provide that information); the default for percent formatting is the larger of minimumFractionDigits and 0. + */ + maximumFractionDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20; + + /** + * The minimum number of significant digits to use. Possible values are from 1 to 21; the default is 1. + */ + minimumSignificantDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; + + /** + * The maximum number of significant digits to use. Possible values are from 1 to 21; the default is 21. + */ + maximumSignificantDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; + + /** + * The formatting that should be displayed for the number, the defaults is "standard" + * + * "standard" plain number formatting + * + * "scientific" return the order-of-magnitude for formatted number. + * + * "engineering" return the exponent of ten when divisible by three + * + * "compact" string representing exponent, defaults is using the "short" form + */ + notation?: string; + + /** + * used only when notation is "compact" + */ + compactDisplay?: string; +} + +interface BigInt { + /** + * Returns a string representation of an object. + * @param radix Specifies a radix for converting numeric values to strings. + */ + toString(radix?: number): string; + + /** Returns a string representation appropriate to the host environment's current locale. */ + toLocaleString(locales?: Intl.LocalesArgument, options?: BigIntToLocaleStringOptions): string; + + /** Returns the primitive value of the specified object. */ + valueOf(): bigint; + + readonly [Symbol.toStringTag]: "BigInt"; +} + +interface BigIntConstructor { + (value: bigint | boolean | number | string): bigint; + + readonly prototype: BigInt; + + /** + * Interprets the low bits of a BigInt as a 2's-complement signed integer. + * All higher bits are discarded. + * @param bits The number of low bits to use + * @param int The BigInt whose bits to extract + */ + asIntN(bits: number, int: bigint): bigint; + + /** + * Interprets the low bits of a BigInt as an unsigned integer. + * All higher bits are discarded. + * @param bits The number of low bits to use + * @param int The BigInt whose bits to extract + */ + asUintN(bits: number, int: bigint): bigint; +} + +var BigInt: BigIntConstructor; + +/** + * A typed array of 64-bit signed integer values. The contents are initialized to 0. If the + * requested number of bytes could not be allocated, an exception is raised. + */ +interface BigInt64Array { + /** The size in bytes of each element in the array. */ + readonly BYTES_PER_ELEMENT: number; + + /** The ArrayBuffer instance referenced by the array. */ + readonly buffer: TArrayBuffer; + + /** The length in bytes of the array. */ + readonly byteLength: number; + + /** The offset in bytes of the array. */ + readonly byteOffset: number; + + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; + + /** Yields index, value pairs for every entry in the array. */ + entries(): ArrayIterator<[number, bigint]>; + + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns false, + * or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean; + + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: bigint, start?: number, end?: number): this; + + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: bigint, index: number, array: BigInt64Array) => any, thisArg?: any): BigInt64Array; + + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): bigint | undefined; + + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): number; + + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: bigint, index: number, array: BigInt64Array) => void, thisArg?: any): void; + + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: bigint, fromIndex?: number): boolean; + + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: bigint, fromIndex?: number): number; + + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; + + /** Yields each index in the array. */ + keys(): ArrayIterator; + + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: bigint, fromIndex?: number): number; + + /** The length of the array. */ + readonly length: number; + + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: bigint, index: number, array: BigInt64Array) => bigint, thisArg?: any): BigInt64Array; + + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint; + + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U; + + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint; + + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U; + + /** Reverses the elements in the array. */ + reverse(): this; + + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; + + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. + */ + slice(start?: number, end?: number): BigInt64Array; + + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls the + * predicate function for each element in the array until the predicate returns true, or until + * the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean; + + /** + * Sorts the array. + * @param compareFn The function used to determine the order of the elements. If omitted, the elements are sorted in ascending order. + */ + sort(compareFn?: (a: bigint, b: bigint) => number | bigint): this; + + /** + * Gets a new BigInt64Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): BigInt64Array; + + /** Converts the array to a string by using the current locale. */ + toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; + + /** Returns a string representation of the array. */ + toString(): string; + + /** Returns the primitive value of the specified object. */ + valueOf(): BigInt64Array; + + /** Yields each value in the array. */ + values(): ArrayIterator; + + [Symbol.iterator](): ArrayIterator; + + readonly [Symbol.toStringTag]: "BigInt64Array"; + + [index: number]: bigint; +} + +interface BigInt64ArrayConstructor { + readonly prototype: BigInt64Array; + + new (length?: number): BigInt64Array; + + new (array: ArrayLike | Iterable): BigInt64Array; + + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): BigInt64Array; + + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): BigInt64Array; + + new (array: ArrayLike | ArrayBuffer): BigInt64Array; + + /** The size in bytes of each element in the array. */ + readonly BYTES_PER_ELEMENT: number; + + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: bigint[]): BigInt64Array; + + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): BigInt64Array; + + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigInt64Array; + + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): BigInt64Array; + + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => bigint, thisArg?: any): BigInt64Array; +} + +var BigInt64Array: BigInt64ArrayConstructor; + +/** + * A typed array of 64-bit unsigned integer values. The contents are initialized to 0. If the + * requested number of bytes could not be allocated, an exception is raised. + */ +interface BigUint64Array { + /** The size in bytes of each element in the array. */ + readonly BYTES_PER_ELEMENT: number; + + /** The ArrayBuffer instance referenced by the array. */ + readonly buffer: TArrayBuffer; + + /** The length in bytes of the array. */ + readonly byteLength: number; + + /** The offset in bytes of the array. */ + readonly byteOffset: number; + + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; + + /** Yields index, value pairs for every entry in the array. */ + entries(): ArrayIterator<[number, bigint]>; + + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns false, + * or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean; + + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: bigint, start?: number, end?: number): this; + + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: bigint, index: number, array: BigUint64Array) => any, thisArg?: any): BigUint64Array; + + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): bigint | undefined; + + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): number; + + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: bigint, index: number, array: BigUint64Array) => void, thisArg?: any): void; + + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: bigint, fromIndex?: number): boolean; + + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: bigint, fromIndex?: number): number; + + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; + + /** Yields each index in the array. */ + keys(): ArrayIterator; + + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: bigint, fromIndex?: number): number; + + /** The length of the array. */ + readonly length: number; + + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: bigint, index: number, array: BigUint64Array) => bigint, thisArg?: any): BigUint64Array; + + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint; + + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U; + + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint; + + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U; + + /** Reverses the elements in the array. */ + reverse(): this; + + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; + + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. + */ + slice(start?: number, end?: number): BigUint64Array; + + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls the + * predicate function for each element in the array until the predicate returns true, or until + * the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean; + + /** + * Sorts the array. + * @param compareFn The function used to determine the order of the elements. If omitted, the elements are sorted in ascending order. + */ + sort(compareFn?: (a: bigint, b: bigint) => number | bigint): this; + + /** + * Gets a new BigUint64Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): BigUint64Array; + + /** Converts the array to a string by using the current locale. */ + toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; + + /** Returns a string representation of the array. */ + toString(): string; + + /** Returns the primitive value of the specified object. */ + valueOf(): BigUint64Array; + + /** Yields each value in the array. */ + values(): ArrayIterator; + + [Symbol.iterator](): ArrayIterator; + + readonly [Symbol.toStringTag]: "BigUint64Array"; + + [index: number]: bigint; +} + +interface BigUint64ArrayConstructor { + readonly prototype: BigUint64Array; + + new (length?: number): BigUint64Array; + + new (array: ArrayLike | Iterable): BigUint64Array; + + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): BigUint64Array; + + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): BigUint64Array; + + new (array: ArrayLike | ArrayBuffer): BigUint64Array; + + /** The size in bytes of each element in the array. */ + readonly BYTES_PER_ELEMENT: number; + + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: bigint[]): BigUint64Array; + + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): BigUint64Array; + + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigUint64Array; + + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): BigUint64Array; + + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => bigint, thisArg?: any): BigUint64Array; +} + +var BigUint64Array: BigUint64ArrayConstructor; + +interface DataView { + /** + * Gets the BigInt64 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getBigInt64(byteOffset: number, littleEndian?: boolean): bigint; + + /** + * Gets the BigUint64 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getBigUint64(byteOffset: number, littleEndian?: boolean): bigint; + + /** + * Stores a BigInt64 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setBigInt64(byteOffset: number, value: bigint, littleEndian?: boolean): void; + + /** + * Stores a BigUint64 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setBigUint64(byteOffset: number, value: bigint, littleEndian?: boolean): void; +} + +///////////////////////////// +// lib.es2020.date.d.ts +///////////////////////////// +interface Date { + /** + * Converts a date and time to a string by using the current or specified locale. + * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; + + /** + * Converts a date to a string by using the current or specified locale. + * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleDateString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; + + /** + * Converts a time to a string by using the current or specified locale. + * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleTimeString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; +} + +///////////////////////////// +// lib.es2020.intl.d.ts +///////////////////////////// +namespace Intl { +/** + * A string that is a valid [Unicode BCP 47 Locale Identifier](https://unicode.org/reports/tr35/#Unicode_locale_identifier). + * + * For example: "fa", "es-MX", "zh-Hant-TW". + * + * See [MDN - Intl - locales argument](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). + */ + type UnicodeBCP47LocaleIdentifier = string; + +/** + * Unit to use in the relative time internationalized message. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format#Parameters). + */ + type RelativeTimeFormatUnit = + | "year" + | "years" + | "quarter" + | "quarters" + | "month" + | "months" + | "week" + | "weeks" + | "day" + | "days" + | "hour" + | "hours" + | "minute" + | "minutes" + | "second" + | "seconds"; + +/** + * Value of the `unit` property in objects returned by + * `Intl.RelativeTimeFormat.prototype.formatToParts()`. `formatToParts` and + * `format` methods accept either singular or plural unit names as input, + * but `formatToParts` only outputs singular (e.g. "day") not plural (e.g. + * "days"). + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts). + */ + type RelativeTimeFormatUnitSingular = + | "year" + | "quarter" + | "month" + | "week" + | "day" + | "hour" + | "minute" + | "second"; + +/** + * The locale matching algorithm to use. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). + */ + type RelativeTimeFormatLocaleMatcher = "lookup" | "best fit"; + +/** + * The format of output message. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). + */ + type RelativeTimeFormatNumeric = "always" | "auto"; + +/** + * The length of the internationalized message. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). + */ + type RelativeTimeFormatStyle = "long" | "short" | "narrow"; + +/** + * The locale or locales to use + * + * See [MDN - Intl - locales argument](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). + */ + type LocalesArgument = UnicodeBCP47LocaleIdentifier | Locale | readonly (UnicodeBCP47LocaleIdentifier | Locale)[] | undefined; + +/** + * An object with some or all of properties of `options` parameter + * of `Intl.RelativeTimeFormat` constructor. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). + */ + interface RelativeTimeFormatOptions { + /** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */ + localeMatcher?: RelativeTimeFormatLocaleMatcher; + + /** The format of output message. */ + numeric?: RelativeTimeFormatNumeric; +} + +/** + * An object with properties reflecting the locale + * and formatting options computed during initialization + * of the `Intl.RelativeTimeFormat` object + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions#Description). + */ + interface ResolvedRelativeTimeFormatOptions { + numeric: RelativeTimeFormatNumeric; + + numberingSystem: string; +} + +/** + * An object representing the relative time format in parts + * that can be used for custom locale-aware formatting. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts). + */ + type RelativeTimeFormatPart = + | { + type: "literal"; + value: string; + } + | { + type: Exclude; + value: string; + unit: RelativeTimeFormatUnitSingular; + }; + +interface RelativeTimeFormat { + /** + * Formats a value and a unit according to the locale + * and formatting options of the given + * [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) + * object. + * + * While this method automatically provides the correct plural forms, + * the grammatical form is otherwise as neutral as possible. + * + * It is the caller's responsibility to handle cut-off logic + * such as deciding between displaying "in 7 days" or "in 1 week". + * This API does not support relative dates involving compound units. + * e.g "in 5 days and 4 hours". + * + * @param value - Numeric value to use in the internationalized relative time message + * + * @param unit - [Unit](https://tc39.es/ecma402/#sec-singularrelativetimeunit) to use in the relative time internationalized message. + * + * @throws `RangeError` if `unit` was given something other than `unit` possible values + * + * @returns {string} Internationalized relative time message as string + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format). + */ + format(value: number, unit: RelativeTimeFormatUnit): string; + + /** + * Returns an array of objects representing the relative time format in parts that can be used for custom locale-aware formatting. + * + * @param value - Numeric value to use in the internationalized relative time message + * + * @param unit - [Unit](https://tc39.es/ecma402/#sec-singularrelativetimeunit) to use in the relative time internationalized message. + * + * @throws `RangeError` if `unit` was given something other than `unit` possible values + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts). + */ + formatToParts(value: number, unit: RelativeTimeFormatUnit): RelativeTimeFormatPart[]; + + /** + * Provides access to the locale and options computed during initialization of this `Intl.RelativeTimeFormat` object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions). + */ + resolvedOptions(): ResolvedRelativeTimeFormatOptions; +} + +/** + * The [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) + * object is a constructor for objects that enable language-sensitive relative time formatting. + * + * [Compatibility](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat#Browser_compatibility). + */ + const RelativeTimeFormat: { + /** + * Creates [Intl.RelativeTimeFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) objects + * + * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. + * For the general form and interpretation of the locales argument, + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters) + * with some or all of options of `RelativeTimeFormatOptions`. + * + * @returns [Intl.RelativeTimeFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat). + */ + new ( + locales?: LocalesArgument, + options?: RelativeTimeFormatOptions, + ): RelativeTimeFormat; + + /** + * Returns an array containing those of the provided locales + * that are supported in date and time formatting + * without having to fall back to the runtime's default locale. + * + * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. + * For the general form and interpretation of the locales argument, + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters) + * with some or all of options of the formatting. + * + * @returns An array containing those of the provided locales + * that are supported in date and time formatting + * without having to fall back to the runtime's default locale. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/supportedLocalesOf). + */ + supportedLocalesOf( + locales?: LocalesArgument, + options?: RelativeTimeFormatOptions, + ): UnicodeBCP47LocaleIdentifier[]; +}; + +interface NumberFormatOptionsSignDisplayRegistry { + auto: never; + + never: never; + + always: never; + + exceptZero: never; +} + +type NumberFormatOptionsSignDisplay = keyof NumberFormatOptionsSignDisplayRegistry; + +interface NumberFormatOptions { + numberingSystem?: string | undefined; + + compactDisplay?: "short" | "long" | undefined; + + notation?: "standard" | "scientific" | "engineering" | "compact" | undefined; + + signDisplay?: NumberFormatOptionsSignDisplay | undefined; + + unit?: string | undefined; + + unitDisplay?: "short" | "long" | "narrow" | undefined; + + currencySign?: "standard" | "accounting" | undefined; +} + +interface ResolvedNumberFormatOptions { + compactDisplay?: "short" | "long"; + + notation: "standard" | "scientific" | "engineering" | "compact"; + + signDisplay: NumberFormatOptionsSignDisplay; + + unit?: string; + + unitDisplay?: "short" | "long" | "narrow"; + + currencySign?: "standard" | "accounting"; +} + +interface DateTimeFormatOptions { + calendar?: string | undefined; + + numberingSystem?: string | undefined; + + hourCycle?: "h11" | "h12" | "h23" | "h24" | undefined; +} + +type LocaleHourCycleKey = "h12" | "h23" | "h11" | "h24"; + +type LocaleCollationCaseFirst = "upper" | "lower" | "false"; + +interface LocaleOptions { + /** The part of the Locale that indicates the locale's calendar era. */ + calendar?: string; + + /** Flag that defines whether case is taken into account for the locale's collation rules. */ + caseFirst?: LocaleCollationCaseFirst; + + /** The collation type used for sorting */ + collation?: string; + + /** The time keeping format convention used by the locale. */ + hourCycle?: LocaleHourCycleKey; + + /** The numeral system used by the locale. */ + numberingSystem?: string; + + /** Flag that defines whether the locale has special collation handling for numeric characters. */ + numeric?: boolean; + + /** The region of the world (usually a country) associated with the locale. Possible values are region codes as defined by ISO 3166-1. */ + region?: string; + + /** The script used for writing the particular language used in the locale. Possible values are script codes as defined by ISO 15924. */ + script?: string; +} + +interface Locale extends LocaleOptions { + /** A string containing the language, and the script and region if available. */ + baseName: string; + + /** The primary language subtag associated with the locale. */ + language: string; + + /** Gets the most likely values for the language, script, and region of the locale based on existing values. */ + maximize(): Locale; + + /** Attempts to remove information about the locale that would be added by calling `Locale.maximize()`. */ + minimize(): Locale; + + /** Returns the locale's full locale identifier string. */ + toString(): UnicodeBCP47LocaleIdentifier; +} + +/** + * Constructor creates [Intl.Locale](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) + * objects + * + * @param tag - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646). + * For the general form and interpretation of the locales argument, + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/Locale#Parameters) with some or all of options of the locale. + * + * @returns [Intl.Locale](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale). + */ + const Locale: { + new (tag: UnicodeBCP47LocaleIdentifier | Locale, options?: LocaleOptions): Locale; +}; + +type DisplayNamesFallback = + | "code" + | "none"; + +type DisplayNamesType = + | "language" + | "region" + | "script" + | "calendar" + | "dateTimeField" + | "currency"; + +type DisplayNamesLanguageDisplay = + | "dialect" + | "standard"; + +interface DisplayNamesOptions { + localeMatcher?: RelativeTimeFormatLocaleMatcher; + + style?: RelativeTimeFormatStyle; + + type: DisplayNamesType; + + languageDisplay?: DisplayNamesLanguageDisplay; + + fallback?: DisplayNamesFallback; +} + +interface ResolvedDisplayNamesOptions { + locale: UnicodeBCP47LocaleIdentifier; + + style: RelativeTimeFormatStyle; + + type: DisplayNamesType; + + fallback: DisplayNamesFallback; + + languageDisplay?: DisplayNamesLanguageDisplay; +} + +interface DisplayNames { + /** + * Receives a code and returns a string based on the locale and options provided when instantiating + * [`Intl.DisplayNames()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) + * + * @param code The `code` to provide depends on the `type` passed to display name during creation: + * - If the type is `"region"`, code should be either an [ISO-3166 two letters region code](https://www.iso.org/iso-3166-country-codes.html), + * or a [three digits UN M49 Geographic Regions](https://unstats.un.org/unsd/methodology/m49/). + * - If the type is `"script"`, code should be an [ISO-15924 four letters script code](https://unicode.org/iso15924/iso15924-codes.html). + * - If the type is `"language"`, code should be a `languageCode` ["-" `scriptCode`] ["-" `regionCode` ] *("-" `variant` ) + * subsequence of the unicode_language_id grammar in [UTS 35's Unicode Language and Locale Identifiers grammar](https://unicode.org/reports/tr35/#Unicode_language_identifier). + * `languageCode` is either a two letters ISO 639-1 language code or a three letters ISO 639-2 language code. + * - If the type is `"currency"`, code should be a [3-letter ISO 4217 currency code](https://www.iso.org/iso-4217-currency-codes.html). + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/of). + */ + of(code: string): string | undefined; + + /** + * Returns a new object with properties reflecting the locale and style formatting options computed during the construction of the current + * [`Intl/DisplayNames`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/resolvedOptions). + */ + resolvedOptions(): ResolvedDisplayNamesOptions; +} + +/** + * The [`Intl.DisplayNames()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) + * object enables the consistent translation of language, region and script display names. + * + * [Compatibility](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames#browser_compatibility). + */ + const DisplayNames: { + prototype: DisplayNames; + + /** + * @param locales A string with a BCP 47 language tag, or an array of such strings. + * For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) + * page. + * + * @param options An object for setting up a display name. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/DisplayNames). + */ + new (locales: LocalesArgument, options: DisplayNamesOptions): DisplayNames; + + /** + * Returns an array containing those of the provided locales that are supported in display names without having to fall back to the runtime's default locale. + * + * @param locales A string with a BCP 47 language tag, or an array of such strings. + * For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) + * page. + * + * @param options An object with a locale matcher. + * + * @returns An array of strings representing a subset of the given locale tags that are supported in display names without having to fall back to the runtime's default locale. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/supportedLocalesOf). + */ + supportedLocalesOf(locales?: LocalesArgument, options?: { localeMatcher?: RelativeTimeFormatLocaleMatcher; }): UnicodeBCP47LocaleIdentifier[]; +}; + +interface CollatorConstructor { + new (locales?: LocalesArgument, options?: CollatorOptions): Collator; + + (locales?: LocalesArgument, options?: CollatorOptions): Collator; + + supportedLocalesOf(locales: LocalesArgument, options?: CollatorOptions): string[]; +} + +interface DateTimeFormatConstructor { + new (locales?: LocalesArgument, options?: DateTimeFormatOptions): DateTimeFormat; + + (locales?: LocalesArgument, options?: DateTimeFormatOptions): DateTimeFormat; + + supportedLocalesOf(locales: LocalesArgument, options?: DateTimeFormatOptions): string[]; +} + +interface NumberFormatConstructor { + new (locales?: LocalesArgument, options?: NumberFormatOptions): NumberFormat; + + (locales?: LocalesArgument, options?: NumberFormatOptions): NumberFormat; + + supportedLocalesOf(locales: LocalesArgument, options?: NumberFormatOptions): string[]; +} + +interface PluralRulesConstructor { + new (locales?: LocalesArgument, options?: PluralRulesOptions): PluralRules; + + (locales?: LocalesArgument, options?: PluralRulesOptions): PluralRules; + + supportedLocalesOf(locales: LocalesArgument, options?: { localeMatcher?: "lookup" | "best fit"; }): string[]; +} +} + +///////////////////////////// +// lib.es2020.number.d.ts +///////////////////////////// +interface Number { + /** + * Converts a number to a string by using the current or specified locale. + * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.NumberFormatOptions): string; +} + +///////////////////////////// +// lib.es2020.promise.d.ts +///////////////////////////// +interface PromiseFulfilledResult { + status: "fulfilled"; + + value: T; +} + +interface PromiseRejectedResult { + status: "rejected"; + + reason: any; +} + +type PromiseSettledResult = PromiseFulfilledResult | PromiseRejectedResult; + +interface PromiseConstructor { + /** + * Creates a Promise that is resolved with an array of results when all + * of the provided Promises resolve or reject. + * @param values An array of Promises. + * @returns A new Promise. + */ + allSettled(values: T): Promise<{ -readonly [P in keyof T]: PromiseSettledResult>; }>; + + /** + * Creates a Promise that is resolved with an array of results when all + * of the provided Promises resolve or reject. + * @param values An array of Promises. + * @returns A new Promise. + */ + allSettled(values: Iterable>): Promise>[]>; +} + +///////////////////////////// +// lib.es2020.sharedmemory.d.ts +///////////////////////////// +interface Atomics { + /** + * Adds a value to the value at the given position in the array, returning the original value. + * Until this atomic operation completes, any other read or write operation against the array + * will block. + */ + add(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + + /** + * Stores the bitwise AND of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or + * write operation against the array will block. + */ + and(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + + /** + * Replaces the value at the given position in the array if the original value equals the given + * expected value, returning the original value. Until this atomic operation completes, any + * other read or write operation against the array will block. + */ + compareExchange(typedArray: BigInt64Array | BigUint64Array, index: number, expectedValue: bigint, replacementValue: bigint): bigint; + + /** + * Replaces the value at the given position in the array, returning the original value. Until + * this atomic operation completes, any other read or write operation against the array will + * block. + */ + exchange(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + + /** + * Returns the value at the given position in the array. Until this atomic operation completes, + * any other read or write operation against the array will block. + */ + load(typedArray: BigInt64Array | BigUint64Array, index: number): bigint; + + /** + * Stores the bitwise OR of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or write + * operation against the array will block. + */ + or(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + + /** + * Stores a value at the given position in the array, returning the new value. Until this + * atomic operation completes, any other read or write operation against the array will block. + */ + store(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + + /** + * Subtracts a value from the value at the given position in the array, returning the original + * value. Until this atomic operation completes, any other read or write operation against the + * array will block. + */ + sub(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + + /** + * If the value at the given position in the array is equal to the provided value, the current + * agent is put to sleep causing execution to suspend until the timeout expires (returning + * `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns + * `"not-equal"`. + */ + wait(typedArray: BigInt64Array, index: number, value: bigint, timeout?: number): "ok" | "not-equal" | "timed-out"; + + /** + * Wakes up sleeping agents that are waiting on the given index of the array, returning the + * number of agents that were awoken. + * @param typedArray A shared BigInt64Array. + * @param index The position in the typedArray to wake up on. + * @param count The number of sleeping agents to notify. Defaults to +Infinity. + */ + notify(typedArray: BigInt64Array, index: number, count?: number): number; + + /** + * Stores the bitwise XOR of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or write + * operation against the array will block. + */ + xor(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; +} + +///////////////////////////// +// lib.es2020.string.d.ts +///////////////////////////// +interface String { + /** + * Matches a string with a regular expression, and returns an iterable of matches + * containing the results of that search. + * @param regexp A regular expression + */ + matchAll(regexp: RegExp): RegExpStringIterator; + + /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */ + toLocaleLowerCase(locales?: Intl.LocalesArgument): string; + + /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */ + toLocaleUpperCase(locales?: Intl.LocalesArgument): string; + + /** + * Determines whether two strings are equivalent in the current or specified locale. + * @param that String to compare to target string + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details. + * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details. + */ + localeCompare(that: string, locales?: Intl.LocalesArgument, options?: Intl.CollatorOptions): number; +} + +///////////////////////////// +// lib.es2020.symbol.wellknown.d.ts +///////////////////////////// +interface SymbolConstructor { + /** + * A regular expression method that matches the regular expression against a string. Called + * by the String.prototype.matchAll method. + */ + readonly matchAll: unique symbol; +} + +interface RegExpStringIterator extends IteratorObject { + [Symbol.iterator](): RegExpStringIterator; +} + +interface RegExp { + /** + * Matches a string with this regular expression, and returns an iterable of matches + * containing the results of that search. + * @param string A string to search within. + */ + [Symbol.matchAll](str: string): RegExpStringIterator; +} + +///////////////////////////// +// lib.es2021.intl.d.ts +///////////////////////////// +namespace Intl { +interface DateTimeFormatOptions { + dateStyle?: "full" | "long" | "medium" | "short" | undefined; + + timeStyle?: "full" | "long" | "medium" | "short" | undefined; + + dayPeriod?: "narrow" | "short" | "long" | undefined; + + fractionalSecondDigits?: 1 | 2 | 3 | undefined; +} + +interface DateTimeRangeFormatPart extends DateTimeFormatPart { + source: "startRange" | "endRange" | "shared"; +} + +interface DateTimeFormat { + formatRange(startDate: Date | number | bigint, endDate: Date | number | bigint): string; + + formatRangeToParts(startDate: Date | number | bigint, endDate: Date | number | bigint): DateTimeRangeFormatPart[]; +} + +interface ResolvedDateTimeFormatOptions { + dateStyle?: "full" | "long" | "medium" | "short"; + + timeStyle?: "full" | "long" | "medium" | "short"; + + hourCycle?: "h11" | "h12" | "h23" | "h24"; + + dayPeriod?: "narrow" | "short" | "long"; + + fractionalSecondDigits?: 1 | 2 | 3; +} + +/** + * The locale matching algorithm to use. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). + */ + type ListFormatLocaleMatcher = "lookup" | "best fit"; + +/** + * The format of output message. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). + */ + type ListFormatType = "conjunction" | "disjunction" | "unit"; + +/** + * The length of the formatted message. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). + */ + type ListFormatStyle = "long" | "short" | "narrow"; + +/** + * An object with some or all properties of the `Intl.ListFormat` constructor `options` parameter. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). + */ + interface ListFormatOptions { + /** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */ + localeMatcher?: ListFormatLocaleMatcher | undefined; + + /** The format of output message. */ + type?: ListFormatType | undefined; + + /** The length of the internationalized message. */ + style?: ListFormatStyle | undefined; +} + +interface ResolvedListFormatOptions { + locale: string; + + style: ListFormatStyle; + + type: ListFormatType; +} + +interface ListFormat { + /** + * Returns a string with a language-specific representation of the list. + * + * @param list - An iterable object, such as an [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array). + * + * @throws `TypeError` if `list` includes something other than the possible values. + * + * @returns {string} A language-specific formatted string representing the elements of the list. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/format). + */ + format(list: Iterable): string; + + /** + * Returns an Array of objects representing the different components that can be used to format a list of values in a locale-aware fashion. + * + * @param list - An iterable object, such as an [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array), to be formatted according to a locale. + * + * @throws `TypeError` if `list` includes something other than the possible values. + * + * @returns {{ type: "element" | "literal", value: string; }[]} An Array of components which contains the formatted parts from the list. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/formatToParts). + */ + formatToParts(list: Iterable): { type: "element" | "literal"; value: string; }[]; + + /** + * Returns a new object with properties reflecting the locale and style + * formatting options computed during the construction of the current + * `Intl.ListFormat` object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/resolvedOptions). + */ + resolvedOptions(): ResolvedListFormatOptions; +} + +const ListFormat: { + prototype: ListFormat; + + /** + * Creates [Intl.ListFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat) objects that + * enable language-sensitive list formatting. + * + * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. + * For the general form and interpretation of the `locales` argument, + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters) + * with some or all options of `ListFormatOptions`. + * + * @returns [Intl.ListFormatOptions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat) object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat). + */ + new (locales?: LocalesArgument, options?: ListFormatOptions): ListFormat; + + /** + * Returns an array containing those of the provided locales that are + * supported in list formatting without having to fall back to the runtime's default locale. + * + * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. + * For the general form and interpretation of the `locales` argument, + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf#parameters). + * with some or all possible options. + * + * @returns An array of strings representing a subset of the given locale tags that are supported in list + * formatting without having to fall back to the runtime's default locale. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf). + */ + supportedLocalesOf(locales: LocalesArgument, options?: Pick): UnicodeBCP47LocaleIdentifier[]; +}; +} + +///////////////////////////// +// lib.es2021.promise.d.ts +///////////////////////////// +interface AggregateError extends Error { + errors: any[]; +} + +interface AggregateErrorConstructor { + new (errors: Iterable, message?: string): AggregateError; + + (errors: Iterable, message?: string): AggregateError; + + readonly prototype: AggregateError; +} + +var AggregateError: AggregateErrorConstructor; + +/** + * Represents the completion of an asynchronous operation + */ +interface PromiseConstructor { + /** + * The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm. + * @param values An array or iterable of Promises. + * @returns A new Promise. + */ + any(values: T): Promise>; + + /** + * The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm. + * @param values An array or iterable of Promises. + * @returns A new Promise. + */ + any(values: Iterable>): Promise>; +} + +///////////////////////////// +// lib.es2021.string.d.ts +///////////////////////////// +interface String { + /** + * Replace all instances of a substring in a string, using a regular expression or search string. + * @param searchValue A string to search for. + * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string. + */ + replaceAll(searchValue: string | RegExp, replaceValue: string): string; + + /** + * Replace all instances of a substring in a string, using a regular expression or search string. + * @param searchValue A string to search for. + * @param replacer A function that returns the replacement text. + */ + replaceAll(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; +} + +///////////////////////////// +// lib.es2021.weakref.d.ts +///////////////////////////// +interface WeakRef { + readonly [Symbol.toStringTag]: "WeakRef"; + + /** + * Returns the WeakRef instance's target value, or undefined if the target value has been + * reclaimed. + * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. + */ + deref(): T | undefined; +} + +interface WeakRefConstructor { + readonly prototype: WeakRef; + + /** + * Creates a WeakRef instance for the given target value. + * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. + * @param target The target value for the WeakRef instance. + */ + new (target: T): WeakRef; +} + +var WeakRef: WeakRefConstructor; + +interface FinalizationRegistry { + readonly [Symbol.toStringTag]: "FinalizationRegistry"; + + /** + * Registers a value with the registry. + * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. + * @param target The target value to register. + * @param heldValue The value to pass to the finalizer for this value. This cannot be the + * target value. + * @param unregisterToken The token to pass to the unregister method to unregister the target + * value. If not provided, the target cannot be unregistered. + */ + register(target: WeakKey, heldValue: T, unregisterToken?: WeakKey): void; + + /** + * Unregisters a value from the registry. + * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. + * @param unregisterToken The token that was used as the unregisterToken argument when calling + * register to register the target value. + */ + unregister(unregisterToken: WeakKey): boolean; +} + +interface FinalizationRegistryConstructor { + readonly prototype: FinalizationRegistry; + + /** + * Creates a finalization registry with an associated cleanup callback + * @param cleanupCallback The callback to call after a value in the registry has been reclaimed. + */ + new (cleanupCallback: (heldValue: T) => void): FinalizationRegistry; +} + +var FinalizationRegistry: FinalizationRegistryConstructor; + +///////////////////////////// +// lib.es2022.array.d.ts +///////////////////////////// +interface Array { + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): T | undefined; +} + +interface ReadonlyArray { + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): T | undefined; +} + +interface Int8Array { + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; +} + +interface Uint8Array { + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; +} + +interface Uint8ClampedArray { + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; +} + +interface Int16Array { + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; +} + +interface Uint16Array { + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; +} + +interface Int32Array { + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; +} + +interface Uint32Array { + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; +} + +interface Float32Array { + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; +} + +interface Float64Array { + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; +} + +interface BigInt64Array { + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): bigint | undefined; +} + +interface BigUint64Array { + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): bigint | undefined; +} + +///////////////////////////// +// lib.es2022.error.d.ts +///////////////////////////// +interface ErrorOptions { + cause?: unknown; +} + +interface Error { + cause?: unknown; +} + +interface ErrorConstructor { + new (message?: string, options?: ErrorOptions): Error; + + (message?: string, options?: ErrorOptions): Error; +} + +interface EvalErrorConstructor { + new (message?: string, options?: ErrorOptions): EvalError; + + (message?: string, options?: ErrorOptions): EvalError; +} + +interface RangeErrorConstructor { + new (message?: string, options?: ErrorOptions): RangeError; + + (message?: string, options?: ErrorOptions): RangeError; +} + +interface ReferenceErrorConstructor { + new (message?: string, options?: ErrorOptions): ReferenceError; + + (message?: string, options?: ErrorOptions): ReferenceError; +} + +interface SyntaxErrorConstructor { + new (message?: string, options?: ErrorOptions): SyntaxError; + + (message?: string, options?: ErrorOptions): SyntaxError; +} + +interface TypeErrorConstructor { + new (message?: string, options?: ErrorOptions): TypeError; + + (message?: string, options?: ErrorOptions): TypeError; +} + +interface URIErrorConstructor { + new (message?: string, options?: ErrorOptions): URIError; + + (message?: string, options?: ErrorOptions): URIError; +} + +interface AggregateErrorConstructor { + new ( + errors: Iterable, + message?: string, + options?: ErrorOptions, + ): AggregateError; + + ( + errors: Iterable, + message?: string, + options?: ErrorOptions, + ): AggregateError; +} + +///////////////////////////// +// lib.es2022.intl.d.ts +///////////////////////////// +namespace Intl { +/** + * An object with some or all properties of the `Intl.Segmenter` constructor `options` parameter. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/Segmenter#parameters) + */ + interface SegmenterOptions { + /** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */ + localeMatcher?: "best fit" | "lookup" | undefined; + + /** The type of input to be split */ + granularity?: "grapheme" | "word" | "sentence" | undefined; +} + +/** + * The `Intl.Segmenter` object enables locale-sensitive text segmentation, enabling you to get meaningful items (graphemes, words or sentences) from a string. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter) + */ + interface Segmenter { + /** + * Returns `Segments` object containing the segments of the input string, using the segmenter's locale and granularity. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/segment) + * + * @param input - The text to be segmented as a `string`. + * + * @returns A new iterable Segments object containing the segments of the input string, using the segmenter's locale and granularity. + */ + segment(input: string): Segments; + + /** + * The `resolvedOptions()` method of `Intl.Segmenter` instances returns a new object with properties reflecting the options computed during initialization of this `Segmenter` object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/resolvedOptions) + */ + resolvedOptions(): ResolvedSegmenterOptions; +} + +interface ResolvedSegmenterOptions { + locale: string; + + granularity: "grapheme" | "word" | "sentence"; +} + +interface SegmentIterator extends IteratorObject { + [Symbol.iterator](): SegmentIterator; +} + +/** + * A `Segments` object is an iterable collection of the segments of a text string. It is returned by a call to the `segment()` method of an `Intl.Segmenter` object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/segment/Segments) + */ + interface Segments { + /** + * Returns an object describing the segment in the original string that includes the code unit at a specified index. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/segment/Segments/containing) + * + * @param codeUnitIndex - A number specifying the index of the code unit in the original input string. If the value is omitted, it defaults to `0`. + */ + containing(codeUnitIndex?: number): SegmentData | undefined; + + /** Returns an iterator to iterate over the segments. */ + [Symbol.iterator](): SegmentIterator; +} + +interface SegmentData { + /** A string containing the segment extracted from the original input string. */ + segment: string; + + /** The code unit index in the original input string at which the segment begins. */ + index: number; + + /** The complete input string that was segmented. */ + input: string; + + /** + * A boolean value only if granularity is "word"; otherwise, undefined. + * If granularity is "word", then isWordLike is true when the segment is word-like (i.e., consists of letters/numbers/ideographs/etc.); otherwise, false. + */ + isWordLike?: boolean; +} + +/** + * The `Intl.Segmenter` object enables locale-sensitive text segmentation, enabling you to get meaningful items (graphemes, words or sentences) from a string. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter) + */ + const Segmenter: { + prototype: Segmenter; + + /** + * Creates a new `Intl.Segmenter` object. + * + * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. + * For the general form and interpretation of the `locales` argument, + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/Segmenter#parameters) + * with some or all options of `SegmenterOptions`. + * + * @returns [Intl.Segmenter](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segments) object. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter). + */ + new (locales?: LocalesArgument, options?: SegmenterOptions): Segmenter; + + /** + * Returns an array containing those of the provided locales that are supported without having to fall back to the runtime's default locale. + * + * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. + * For the general form and interpretation of the `locales` argument, + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * + * @param options An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/supportedLocalesOf#parameters). + * with some or all possible options. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/supportedLocalesOf) + */ + supportedLocalesOf(locales: LocalesArgument, options?: Pick): UnicodeBCP47LocaleIdentifier[]; +}; + +/** + * Returns a sorted array of the supported collation, calendar, currency, numbering system, timezones, and units by the implementation. + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf) + * + * @param key A string indicating the category of values to return. + * @returns A sorted array of the supported values. + */ + function supportedValuesOf(key: "calendar" | "collation" | "currency" | "numberingSystem" | "timeZone" | "unit"): string[]; +} + +///////////////////////////// +// lib.es2022.object.d.ts +///////////////////////////// +interface ObjectConstructor { + /** + * Determines whether an object has a property with the specified name. + * @param o An object. + * @param v A property name. + */ + hasOwn(o: object, v: PropertyKey): boolean; +} + +///////////////////////////// +// lib.es2022.regexp.d.ts +///////////////////////////// +interface RegExp { + /** + * Returns a Boolean value indicating the state of the hasIndices flag (d) used with a regular expression. + * Default is false. Read-only. + */ + readonly hasIndices: boolean; +} + +///////////////////////////// +// lib.es2022.string.d.ts +///////////////////////////// +interface String { + /** + * Returns a new String consisting of the single UTF-16 code unit located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): string | undefined; +} + +///////////////////////////// +// lib.es2023.array.d.ts +///////////////////////////// +interface Array { + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S | undefined; + + findLast(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T | undefined; + + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): number; + + /** + * Returns a copy of an array with its elements reversed. + */ + toReversed(): T[]; + + /** + * Returns a copy of an array with its elements sorted. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order. + * ```ts + * [11, 2, 22, 1].toSorted((a, b) => a - b) // [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: T, b: T) => number): T[]; + + /** + * Copies an array and removes elements and, if necessary, inserts new elements in their place. Returns the copied array. + * @param start The zero-based location in the array from which to start removing elements. + * @param deleteCount The number of elements to remove. + * @param items Elements to insert into the copied array in place of the deleted elements. + * @returns The copied array. + */ + toSpliced(start: number, deleteCount: number, ...items: T[]): T[]; + + /** + * Copies an array and removes elements while returning the remaining elements. + * @param start The zero-based location in the array from which to start removing elements. + * @param deleteCount The number of elements to remove. + * @returns A copy of the original array with the remaining elements. + */ + toSpliced(start: number, deleteCount?: number): T[]; + + /** + * Copies an array, then overwrites the value at the provided index with the + * given value. If the index is negative, then it replaces from the end + * of the array. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to write into the copied array. + * @returns The copied array with the updated value. + */ + with(index: number, value: T): T[]; +} + +interface ReadonlyArray { + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: (value: T, index: number, array: readonly T[]) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: (value: T, index: number, array: readonly T[]) => unknown, + thisArg?: any, + ): T | undefined; + + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: (value: T, index: number, array: readonly T[]) => unknown, + thisArg?: any, + ): number; + + /** + * Copies the array and returns the copied array with all of its elements reversed. + */ + toReversed(): T[]; + + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order. + * ```ts + * [11, 2, 22, 1].toSorted((a, b) => a - b) // [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: T, b: T) => number): T[]; + + /** + * Copies an array and removes elements while, if necessary, inserting new elements in their place, returning the remaining elements. + * @param start The zero-based location in the array from which to start removing elements. + * @param deleteCount The number of elements to remove. + * @param items Elements to insert into the copied array in place of the deleted elements. + * @returns A copy of the original array with the remaining elements. + */ + toSpliced(start: number, deleteCount: number, ...items: T[]): T[]; + + /** + * Copies an array and removes elements while returning the remaining elements. + * @param start The zero-based location in the array from which to start removing elements. + * @param deleteCount The number of elements to remove. + * @returns A copy of the original array with the remaining elements. + */ + toSpliced(start: number, deleteCount?: number): T[]; + + /** + * Copies an array, then overwrites the value at the provided index with the + * given value. If the index is negative, then it replaces from the end + * of the array + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: T): T[]; +} + +interface Int8Array { + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: (value: number, index: number, array: this) => unknown, + thisArg?: any, + ): number | undefined; + + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: (value: number, index: number, array: this) => unknown, + thisArg?: any, + ): number; + + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Int8Array; + + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = Int8Array.from([11, 2, 22, 1]); + * myNums.toSorted((a, b) => a - b) // Int8Array(4) [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Int8Array; + + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Int8Array; +} + +interface Uint8Array { + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: (value: number, index: number, array: this) => unknown, + thisArg?: any, + ): number | undefined; + + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: (value: number, index: number, array: this) => unknown, + thisArg?: any, + ): number; + + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Uint8Array; + + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = Uint8Array.from([11, 2, 22, 1]); + * myNums.toSorted((a, b) => a - b) // Uint8Array(4) [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Uint8Array; + + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Uint8Array; +} + +interface Uint8ClampedArray { + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number | undefined; + + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number; + + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Uint8ClampedArray; + + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = Uint8ClampedArray.from([11, 2, 22, 1]); + * myNums.toSorted((a, b) => a - b) // Uint8ClampedArray(4) [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Uint8ClampedArray; + + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Uint8ClampedArray; +} + +interface Int16Array { + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: (value: number, index: number, array: this) => unknown, + thisArg?: any, + ): number | undefined; + + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: (value: number, index: number, array: this) => unknown, + thisArg?: any, + ): number; + + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Int16Array; + + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = Int16Array.from([11, 2, -22, 1]); + * myNums.toSorted((a, b) => a - b) // Int16Array(4) [-22, 1, 2, 11] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Int16Array; + + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Int16Array; +} + +interface Uint16Array { + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number | undefined; + + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number; + + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Uint16Array; + + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = Uint16Array.from([11, 2, 22, 1]); + * myNums.toSorted((a, b) => a - b) // Uint16Array(4) [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Uint16Array; + + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Uint16Array; +} + +interface Int32Array { + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: (value: number, index: number, array: this) => unknown, + thisArg?: any, + ): number | undefined; + + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: (value: number, index: number, array: this) => unknown, + thisArg?: any, + ): number; + + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Int32Array; + + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = Int32Array.from([11, 2, -22, 1]); + * myNums.toSorted((a, b) => a - b) // Int32Array(4) [-22, 1, 2, 11] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Int32Array; + + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Int32Array; +} + +interface Uint32Array { + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number | undefined; + + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number; + + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Uint32Array; + + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = Uint32Array.from([11, 2, 22, 1]); + * myNums.toSorted((a, b) => a - b) // Uint32Array(4) [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Uint32Array; + + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Uint32Array; +} + +interface Float32Array { + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number | undefined; + + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number; + + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Float32Array; + + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = Float32Array.from([11.25, 2, -22.5, 1]); + * myNums.toSorted((a, b) => a - b) // Float32Array(4) [-22.5, 1, 2, 11.5] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Float32Array; + + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Float32Array; +} + +interface Float64Array { + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number | undefined; + + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number; + + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Float64Array; + + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = Float64Array.from([11.25, 2, -22.5, 1]); + * myNums.toSorted((a, b) => a - b) // Float64Array(4) [-22.5, 1, 2, 11.5] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Float64Array; + + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Float64Array; +} + +interface BigInt64Array { + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: bigint, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: ( + value: bigint, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): bigint | undefined; + + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: ( + value: bigint, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number; + + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): BigInt64Array; + + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = BigInt64Array.from([11n, 2n, -22n, 1n]); + * myNums.toSorted((a, b) => Number(a - b)) // BigInt64Array(4) [-22n, 1n, 2n, 11n] + * ``` + */ + toSorted(compareFn?: (a: bigint, b: bigint) => number): BigInt64Array; + + /** + * Copies the array and inserts the given bigint at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: bigint): BigInt64Array; +} + +interface BigUint64Array { + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: bigint, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: ( + value: bigint, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): bigint | undefined; + + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: ( + value: bigint, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number; + + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): BigUint64Array; + + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = BigUint64Array.from([11n, 2n, 22n, 1n]); + * myNums.toSorted((a, b) => Number(a - b)) // BigUint64Array(4) [1n, 2n, 11n, 22n] + * ``` + */ + toSorted(compareFn?: (a: bigint, b: bigint) => number): BigUint64Array; + + /** + * Copies the array and inserts the given bigint at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: bigint): BigUint64Array; +} + +///////////////////////////// +// lib.es2023.collection.d.ts +///////////////////////////// +interface WeakKeyTypes { + symbol: symbol; +} + +///////////////////////////// +// lib.es2023.intl.d.ts +///////////////////////////// +namespace Intl { +interface NumberFormatRangePartTypeRegistry extends NumberFormatPartTypeRegistry { + approximatelySign: never; +} + +type NumberFormatRangePartTypes = keyof NumberFormatRangePartTypeRegistry; + +interface NumberFormatOptions { + roundingPriority?: "auto" | "morePrecision" | "lessPrecision" | undefined; + + roundingIncrement?: 1 | 2 | 5 | 10 | 20 | 25 | 50 | 100 | 200 | 250 | 500 | 1000 | 2000 | 2500 | 5000 | undefined; + + roundingMode?: "ceil" | "floor" | "expand" | "trunc" | "halfCeil" | "halfFloor" | "halfExpand" | "halfTrunc" | "halfEven" | undefined; + + trailingZeroDisplay?: "auto" | "stripIfInteger" | undefined; +} + +interface ResolvedNumberFormatOptions { + roundingPriority: "auto" | "morePrecision" | "lessPrecision"; + + roundingMode: "ceil" | "floor" | "expand" | "trunc" | "halfCeil" | "halfFloor" | "halfExpand" | "halfTrunc" | "halfEven"; + + roundingIncrement: 1 | 2 | 5 | 10 | 20 | 25 | 50 | 100 | 200 | 250 | 500 | 1000 | 2000 | 2500 | 5000; + + trailingZeroDisplay: "auto" | "stripIfInteger"; +} + +interface NumberRangeFormatPart { + type: NumberFormatRangePartTypes; + + value: string; + + source: "startRange" | "endRange" | "shared"; +} + +type StringNumericLiteral = `${number}` | "Infinity" | "-Infinity" | "+Infinity"; + +interface NumberFormat { + format(value: number | bigint | StringNumericLiteral): string; + + formatToParts(value: number | bigint | StringNumericLiteral): NumberFormatPart[]; + + formatRange(start: number | bigint | StringNumericLiteral, end: number | bigint | StringNumericLiteral): string; + + formatRangeToParts(start: number | bigint | StringNumericLiteral, end: number | bigint | StringNumericLiteral): NumberRangeFormatPart[]; +} +} + +///////////////////////////// +// lib.es2024.arraybuffer.d.ts +///////////////////////////// +interface ArrayBuffer { + /** + * If this ArrayBuffer is resizable, returns the maximum byte length given during construction; returns the byte length if not. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/maxByteLength) + */ + get maxByteLength(): number; + + /** + * Returns true if this ArrayBuffer can be resized. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/resizable) + */ + get resizable(): boolean; + + /** + * Resizes the ArrayBuffer to the specified size (in bytes). + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/resize) + */ + resize(newByteLength?: number): void; + + /** + * Returns a boolean indicating whether or not this buffer has been detached (transferred). + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/detached) + */ + get detached(): boolean; + + /** + * Creates a new ArrayBuffer with the same byte content as this buffer, then detaches this buffer. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/transfer) + */ + transfer(newByteLength?: number): ArrayBuffer; - interface MapConstructor { - new (): Map; + /** + * Creates a new non-resizable ArrayBuffer with the same byte content as this buffer, then detaches this buffer. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/transferToFixedLength) + */ + transferToFixedLength(newByteLength?: number): ArrayBuffer; +} - new (entries?: readonly (readonly [K, V])[] | null): Map; +interface ArrayBufferConstructor { + new (byteLength: number, options?: { maxByteLength?: number; }): ArrayBuffer; +} - readonly prototype: Map; - } +///////////////////////////// +// lib.es2024.collection.d.ts +///////////////////////////// +interface MapConstructor { + /** + * Groups members of an iterable according to the return value of the passed callback. + * @param items An iterable. + * @param keySelector A callback which will be invoked for each item in items. + */ + groupBy( + items: Iterable, + keySelector: (item: T, index: number) => K, + ): Map; +} + +///////////////////////////// +// lib.es2024.object.d.ts +///////////////////////////// +interface ObjectConstructor { + /** + * Groups members of an iterable according to the return value of the passed callback. + * @param items An iterable. + * @param keySelector A callback which will be invoked for each item in items. + */ + groupBy( + items: Iterable, + keySelector: (item: T, index: number) => K, + ): Partial>; +} - var Map: MapConstructor; +///////////////////////////// +// lib.es2024.promise.d.ts +///////////////////////////// +interface PromiseWithResolvers { + promise: Promise; - interface ReadonlyMap { - forEach(callbackfn: (value: V, key: K, map: ReadonlyMap) => void, thisArg?: any): void; + resolve: (value: T | PromiseLike) => void; - get(key: K): V | undefined; + reject: (reason?: any) => void; +} - has(key: K): boolean; +interface PromiseConstructor { + /** + * Creates a new Promise and returns it in an object, along with its resolve and reject functions. + * @returns An object with the properties `promise`, `resolve`, and `reject`. + * + * ```ts + * const { promise, resolve, reject } = Promise.withResolvers(); + * ``` + */ + withResolvers(): PromiseWithResolvers; +} - readonly size: number; - } +///////////////////////////// +// lib.es2024.regexp.d.ts +///////////////////////////// +interface RegExp { + /** + * Returns a Boolean value indicating the state of the unicodeSets flag (v) used with a regular expression. + * Default is false. Read-only. + */ + readonly unicodeSets: boolean; +} - interface WeakMap { - /** - * Removes the specified element from the WeakMap. - * @returns true if the element was successfully removed, or false if it was not present. - */ - delete(key: K): boolean; - - /** - * @returns a specified element. - */ - get(key: K): V | undefined; - - /** - * @returns a boolean indicating whether an element with the specified key exists or not. - */ - has(key: K): boolean; - - /** - * Adds a new element with a specified key and value. - * @param key Must be an object or symbol. - */ - set(key: K, value: V): this; - } +///////////////////////////// +// lib.es2024.sharedmemory.d.ts +///////////////////////////// +interface Atomics { + /** + * A non-blocking, asynchronous version of wait which is usable on the main thread. + * Waits asynchronously on a shared memory location and returns a Promise + * @param typedArray A shared Int32Array or BigInt64Array. + * @param index The position in the typedArray to wait on. + * @param value The expected value to test. + * @param [timeout] The expected value to test. + */ + waitAsync(typedArray: Int32Array, index: number, value: number, timeout?: number): { async: false; value: "not-equal" | "timed-out"; } | { async: true; value: Promise<"ok" | "timed-out">; }; - interface WeakMapConstructor { - new (entries?: readonly (readonly [K, V])[] | null): WeakMap; + /** + * A non-blocking, asynchronous version of wait which is usable on the main thread. + * Waits asynchronously on a shared memory location and returns a Promise + * @param typedArray A shared Int32Array or BigInt64Array. + * @param index The position in the typedArray to wait on. + * @param value The expected value to test. + * @param [timeout] The expected value to test. + */ + waitAsync(typedArray: BigInt64Array, index: number, value: bigint, timeout?: number): { async: false; value: "not-equal" | "timed-out"; } | { async: true; value: Promise<"ok" | "timed-out">; }; +} - readonly prototype: WeakMap; - } +interface SharedArrayBuffer { + /** + * Returns true if this SharedArrayBuffer can be grown. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/growable) + */ + get growable(): boolean; - var WeakMap: WeakMapConstructor; - - interface Set { - /** - * Appends a new element with a specified value to the end of the Set. - */ - add(value: T): this; - - /** - * Removes all elements from the Set. - */ - clear(): void; - - /** - * Removes a specified value from the Set. - * @returns Returns true if an element in the Set existed and has been removed, or false if the element does not exist. - */ - delete(value: T): boolean; - - /** - * Executes a provided function once per each value in the Set object, in insertion order. - */ - forEach(callbackfn: (value: T, value2: T, set: Set) => void, thisArg?: any): void; - - /** - * @returns a boolean indicating whether an element with the specified value exists in the Set or not. - */ - has(value: T): boolean; - - /** - * @returns the number of (unique) elements in the Set. - */ - readonly size: number; - } + /** + * If this SharedArrayBuffer is growable, returns the maximum byte length given during construction; returns the byte length if not. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/maxByteLength) + */ + get maxByteLength(): number; + + /** + * Grows the SharedArrayBuffer to the specified size (in bytes). + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/grow) + */ + grow(newByteLength?: number): void; +} + +interface SharedArrayBufferConstructor { + new (byteLength: number, options?: { maxByteLength?: number; }): SharedArrayBuffer; +} + +///////////////////////////// +// lib.es2024.string.d.ts +///////////////////////////// +interface String { + /** + * Returns true if all leading surrogates and trailing surrogates appear paired and in order. + */ + isWellFormed(): boolean; + + /** + * Returns a string where all lone or out-of-order surrogates have been replaced by the Unicode replacement character (U+FFFD). + */ + toWellFormed(): string; +} + +///////////////////////////// +// lib.es2025.collection.d.ts +///////////////////////////// +interface ReadonlySetLike { + /** + * Despite its name, returns an iterator of the values in the set-like. + */ + keys(): Iterator; + + /** + * @returns a boolean indicating whether an element with the specified value exists in the set-like or not. + */ + has(value: T): boolean; + + /** + * @returns the number of (unique) elements in the set-like. + */ + readonly size: number; +} + +interface Set { + /** + * @returns a new Set containing all the elements in this Set and also all the elements in the argument. + */ + union(other: ReadonlySetLike): Set; + + /** + * @returns a new Set containing all the elements which are both in this Set and in the argument. + */ + intersection(other: ReadonlySetLike): Set; + + /** + * @returns a new Set containing all the elements in this Set which are not also in the argument. + */ + difference(other: ReadonlySetLike): Set; + + /** + * @returns a new Set containing all the elements which are in either this Set or in the argument, but not in both. + */ + symmetricDifference(other: ReadonlySetLike): Set; + + /** + * @returns a boolean indicating whether all the elements in this Set are also in the argument. + */ + isSubsetOf(other: ReadonlySetLike): boolean; + + /** + * @returns a boolean indicating whether all the elements in the argument are also in this Set. + */ + isSupersetOf(other: ReadonlySetLike): boolean; + + /** + * @returns a boolean indicating whether this Set has no elements in common with the argument. + */ + isDisjointFrom(other: ReadonlySetLike): boolean; +} + +interface ReadonlySet { + /** + * @returns a new Set containing all the elements in this Set and also all the elements in the argument. + */ + union(other: ReadonlySetLike): Set; + + /** + * @returns a new Set containing all the elements which are both in this Set and in the argument. + */ + intersection(other: ReadonlySetLike): Set; + + /** + * @returns a new Set containing all the elements in this Set which are not also in the argument. + */ + difference(other: ReadonlySetLike): Set; + + /** + * @returns a new Set containing all the elements which are in either this Set or in the argument, but not in both. + */ + symmetricDifference(other: ReadonlySetLike): Set; + + /** + * @returns a boolean indicating whether all the elements in this Set are also in the argument. + */ + isSubsetOf(other: ReadonlySetLike): boolean; + + /** + * @returns a boolean indicating whether all the elements in the argument are also in this Set. + */ + isSupersetOf(other: ReadonlySetLike): boolean; + + /** + * @returns a boolean indicating whether this Set has no elements in common with the argument. + */ + isDisjointFrom(other: ReadonlySetLike): boolean; +} + +///////////////////////////// +// lib.es2025.float16.d.ts +///////////////////////////// +/** + * A typed array of 16-bit float values. The contents are initialized to 0. If the requested number + * of bytes could not be allocated an exception is raised. + */ +interface Float16Array { + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; + + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; + + /** + * The length in bytes of the array. + */ + readonly byteLength: number; + + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; + + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; + + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; + + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; + + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float16Array; + + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number | undefined; + + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number; + + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; + + /** + * Returns the index of the first occurrence of a value in an array. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; + + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; + + /** + * Returns the index of the last occurrence of a value in an array. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; + + /** + * The length of the array. + */ + readonly length: number; + + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float16Array; + + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + + /** + * Reverses the elements in an Array. + */ + reverse(): this; + + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; + + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Float16Array; + + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; + + /** + * Gets a new Float16Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Float16Array; + + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; + + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Float16Array; + + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = Float16Array.from([11.25, 2, -22.5, 1]); + * myNums.toSorted((a, b) => a - b) // Float16Array(4) [-22.5, 1, 2, 11.5] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Float16Array; + + /** + * Returns a string representation of an array. + */ + toString(): string; + + /** Returns the primitive value of the specified object. */ + valueOf(): this; + + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Float16Array; + + [index: number]: number; + + [Symbol.iterator](): ArrayIterator; + + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; + + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; + + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; + + readonly [Symbol.toStringTag]: "Float16Array"; +} + +interface Float16ArrayConstructor { + readonly prototype: Float16Array; + + new (length?: number): Float16Array; + + new (array: ArrayLike | Iterable): Float16Array; + + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Float16Array; + + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float16Array; + + new (array: ArrayLike | ArrayBuffer): Float16Array; + + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; + + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Float16Array; + + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Float16Array; + + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float16Array; + + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Float16Array; - interface SetConstructor { - new (values?: readonly T[] | null): Set; + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Float16Array; +} - readonly prototype: Set; - } +var Float16Array: Float16ArrayConstructor; - var Set: SetConstructor; +interface Math { + /** + * Returns the nearest half precision float representation of a number. + * @param x A numeric expression. + */ + f16round(x: number): number; +} - interface ReadonlySet { - /** - * Executes a provided function once per each value in the ReadonlySet object, in insertion order. - */ - forEach(callbackfn: (value: T, value2: T, set: ReadonlySet) => void, thisArg?: any): void; +interface DataView { + /** + * Gets the Float16 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getFloat16(byteOffset: number, littleEndian?: boolean): number; - /** - * @returns a boolean indicating whether an element with the specified value exists in the Set or not. - */ - has(value: T): boolean; + /** + * Stores an Float16 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setFloat16(byteOffset: number, value: number, littleEndian?: boolean): void; +} - /** - * @returns the number of (unique) elements in the Set. - */ - readonly size: number; - } +///////////////////////////// +// lib.es2025.intl.d.ts +///////////////////////////// +namespace Intl { +/** + * The locale matching algorithm to use. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). + */ + type DurationFormatLocaleMatcher = "lookup" | "best fit"; - interface WeakSet { - /** - * Appends a new value to the end of the WeakSet. - */ - add(value: T): this; - - /** - * Removes the specified element from the WeakSet. - * @returns Returns true if the element existed and has been removed, or false if the element does not exist. - */ - delete(value: T): boolean; - - /** - * @returns a boolean indicating whether a value exists in the WeakSet or not. - */ - has(value: T): boolean; - } +/** + * The style of the formatted duration. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/DurationFormat#style). + */ + type DurationFormatStyle = "long" | "short" | "narrow" | "digital"; - interface WeakSetConstructor { - new (values?: readonly T[] | null): WeakSet; +/** + * Whether to always display a unit, or only if it is non-zero. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/DurationFormat#display). + */ + type DurationFormatDisplayOption = "always" | "auto"; - readonly prototype: WeakSet; - } +/** + * Value of the `unit` property in duration objects + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/format#duration). + */ + type DurationFormatUnit = + | "years" + | "months" + | "weeks" + | "days" + | "hours" + | "minutes" + | "seconds" + | "milliseconds" + | "microseconds" + | "nanoseconds"; + +type DurationFormatUnitSingular = + | "year" + | "month" + | "week" + | "day" + | "hour" + | "minute" + | "second" + | "millisecond" + | "microsecond" + | "nanosecond"; + +/** + * An object representing the relative time format in parts + * that can be used for custom locale-aware formatting. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/formatToParts). + */ + type DurationFormatPart = + | { + type: "literal"; + value: string; + unit?: DurationFormatUnitSingular; + } + | { + type: Exclude; + value: string; + unit: DurationFormatUnitSingular; + }; - var WeakSet: WeakSetConstructor; - - ///////////////////////////// - // lib.es2015.core.d.ts - ///////////////////////////// - interface Array { - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: T, index: number, obj: T[]) => value is S, thisArg?: any): S | undefined; - - find(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): T | undefined; - - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): number; - - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: T, start?: number, end?: number): this; - - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; - - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; - } +/** + * An object with some or all properties of the `Intl.DurationFormat` constructor `options` parameter. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/DurationFormat#parameters) + */ + interface DurationFormatOptions { + localeMatcher?: DurationFormatLocaleMatcher | undefined; - interface ArrayConstructor { - /** - * Creates an array from an array-like object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): T[]; - - /** - * Creates an array from an iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; - - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: T[]): T[]; - } + numberingSystem?: string | undefined; - interface DateConstructor { - new (value: number | string | Date): Date; - } + style?: DurationFormatStyle | undefined; - interface Function { - /** - * Returns the name of the function. Function names are read-only and can not be changed. - */ - readonly name: string; - } + years?: "long" | "short" | "narrow" | undefined; - interface Math { - /** - * Returns the number of leading zero bits in the 32-bit binary representation of a number. - * @param x A numeric expression. - */ - clz32(x: number): number; - - /** - * Returns the result of 32-bit multiplication of two numbers. - * @param x First number - * @param y Second number - */ - imul(x: number, y: number): number; - - /** - * Returns the sign of x, indicating whether x is positive, negative, or zero. - * @param x The numeric expression to test - */ - sign(x: number): number; - - /** - * Returns the base 10 logarithm of a number. - * @param x A numeric expression. - */ - log10(x: number): number; - - /** - * Returns the base 2 logarithm of a number. - * @param x A numeric expression. - */ - log2(x: number): number; - - /** - * Returns the natural logarithm of 1 + x. - * @param x A numeric expression. - */ - log1p(x: number): number; - - /** - * Returns the result of (e^x - 1), which is an implementation-dependent approximation to - * subtracting 1 from the exponential function of x (e raised to the power of x, where e - * is the base of the natural logarithms). - * @param x A numeric expression. - */ - expm1(x: number): number; - - /** - * Returns the hyperbolic cosine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - cosh(x: number): number; - - /** - * Returns the hyperbolic sine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - sinh(x: number): number; - - /** - * Returns the hyperbolic tangent of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - tanh(x: number): number; - - /** - * Returns the inverse hyperbolic cosine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - acosh(x: number): number; - - /** - * Returns the inverse hyperbolic sine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - asinh(x: number): number; - - /** - * Returns the inverse hyperbolic tangent of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - atanh(x: number): number; - - /** - * Returns the square root of the sum of squares of its arguments. - * @param values Values to compute the square root for. - * If no arguments are passed, the result is +0. - * If there is only one argument, the result is the absolute value. - * If any argument is +Infinity or -Infinity, the result is +Infinity. - * If any argument is NaN, the result is NaN. - * If all arguments are either +0 or −0, the result is +0. - */ - hypot(...values: number[]): number; - - /** - * Returns the integral part of the numeric expression x, removing any fractional digits. - * If x is already an integer, the result is x. - * @param x A numeric expression. - */ - trunc(x: number): number; - - /** - * Returns the nearest single precision float representation of a number. - * @param x A numeric expression. - */ - fround(x: number): number; - - /** - * Returns an implementation-dependent approximation to the cube root of number. - * @param x A numeric expression. - */ - cbrt(x: number): number; - } + yearsDisplay?: DurationFormatDisplayOption | undefined; - interface NumberConstructor { - /** - * The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1 - * that is representable as a Number value, which is approximately: - * 2.2204460492503130808472633361816 x 10‍−‍16. - */ - readonly EPSILON: number; - - /** - * Returns true if passed value is finite. - * Unlike the global isFinite, Number.isFinite doesn't forcibly convert the parameter to a - * number. Only finite values of the type number, result in true. - * @param number A numeric value. - */ - isFinite(number: unknown): boolean; - - /** - * Returns true if the value passed is an integer, false otherwise. - * @param number A numeric value. - */ - isInteger(number: unknown): boolean; - - /** - * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a - * number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter - * to a number. Only values of the type number, that are also NaN, result in true. - * @param number A numeric value. - */ - isNaN(number: unknown): boolean; - - /** - * Returns true if the value passed is a safe integer. - * @param number A numeric value. - */ - isSafeInteger(number: unknown): boolean; - - /** - * The value of the largest integer n such that n and n + 1 are both exactly representable as - * a Number value. - * The value of Number.MAX_SAFE_INTEGER is 9007199254740991 2^53 − 1. - */ - readonly MAX_SAFE_INTEGER: number; - - /** - * The value of the smallest integer n such that n and n − 1 are both exactly representable as - * a Number value. - * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)). - */ - readonly MIN_SAFE_INTEGER: number; - - /** - * Converts a string to a floating-point number. - * @param string A string that contains a floating-point number. - */ - parseFloat(string: string): number; - - /** - * Converts A string to an integer. - * @param string A string to convert into a number. - * @param radix A value between 2 and 36 that specifies the base of the number in `string`. - * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. - * All other strings are considered decimal. - */ - parseInt(string: string, radix?: number): number; - } + months?: "long" | "short" | "narrow" | undefined; - interface ObjectConstructor { - /** - * Copy the values of all of the enumerable own properties from one or more source objects to a - * target object. Returns the target object. - * @param target The target object to copy to. - * @param source The source object from which to copy properties. - */ - assign(target: T, source: U): T & U; - - /** - * Copy the values of all of the enumerable own properties from one or more source objects to a - * target object. Returns the target object. - * @param target The target object to copy to. - * @param source1 The first source object from which to copy properties. - * @param source2 The second source object from which to copy properties. - */ - assign(target: T, source1: U, source2: V): T & U & V; - - /** - * Copy the values of all of the enumerable own properties from one or more source objects to a - * target object. Returns the target object. - * @param target The target object to copy to. - * @param source1 The first source object from which to copy properties. - * @param source2 The second source object from which to copy properties. - * @param source3 The third source object from which to copy properties. - */ - assign(target: T, source1: U, source2: V, source3: W): T & U & V & W; - - /** - * Copy the values of all of the enumerable own properties from one or more source objects to a - * target object. Returns the target object. - * @param target The target object to copy to. - * @param sources One or more source objects from which to copy properties - */ - assign(target: object, ...sources: any[]): any; - - /** - * Returns an array of all symbol properties found directly on object o. - * @param o Object to retrieve the symbols from. - */ - getOwnPropertySymbols(o: any): symbol[]; - - /** - * Returns the names of the enumerable string properties and methods of an object. - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - keys(o: {}): string[]; - - /** - * Returns true if the values are the same value, false otherwise. - * @param value1 The first value. - * @param value2 The second value. - */ - is(value1: any, value2: any): boolean; - - /** - * Sets the prototype of a specified object o to object proto or null. Returns the object o. - * @param o The object to change its prototype. - * @param proto The value of the new prototype or null. - */ - setPrototypeOf(o: any, proto: object | null): any; - } + monthsDisplay?: DurationFormatDisplayOption | undefined; - interface ReadonlyArray { - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: T, index: number, obj: readonly T[]) => value is S, thisArg?: any): S | undefined; - - find(predicate: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): T | undefined; - - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): number; - - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; - } + weeks?: "long" | "short" | "narrow" | undefined; - interface RegExp { - /** - * Returns a string indicating the flags of the regular expression in question. This field is read-only. - * The characters in this string are sequenced and concatenated in the following order: - * - * - "g" for global - * - "i" for ignoreCase - * - "m" for multiline - * - "u" for unicode - * - "y" for sticky - * - * If no flags are set, the value is the empty string. - */ - readonly flags: string; - - /** - * Returns a Boolean value indicating the state of the sticky flag (y) used with a regular - * expression. Default is false. Read-only. - */ - readonly sticky: boolean; - - /** - * Returns a Boolean value indicating the state of the Unicode flag (u) used with a regular - * expression. Default is false. Read-only. - */ - readonly unicode: boolean; - } + weeksDisplay?: DurationFormatDisplayOption | undefined; - interface RegExpConstructor { - new (pattern: RegExp | string, flags?: string): RegExp; + days?: "long" | "short" | "narrow" | undefined; - (pattern: RegExp | string, flags?: string): RegExp; - } + daysDisplay?: DurationFormatDisplayOption | undefined; - interface String { - /** - * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point - * value of the UTF-16 encoded code point starting at the string element at position pos in - * the String resulting from converting this object to a String. - * If there is no element at that position, the result is undefined. - * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos. - */ - codePointAt(pos: number): number | undefined; - - /** - * Returns true if searchString appears as a substring of the result of converting this - * object to a String, at one or more positions that are - * greater than or equal to position; otherwise, returns false. - * @param searchString search string - * @param position If position is undefined, 0 is assumed, so as to search all of the String. - */ - includes(searchString: string, position?: number): boolean; - - /** - * Returns true if the sequence of elements of searchString converted to a String is the - * same as the corresponding elements of this object (converted to a String) starting at - * endPosition – length(this). Otherwise returns false. - */ - endsWith(searchString: string, endPosition?: number): boolean; - - /** - * Returns the String value result of normalizing the string into the normalization form - * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms. - * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default - * is "NFC" - */ - normalize(form: "NFC" | "NFD" | "NFKC" | "NFKD"): string; - - /** - * Returns the String value result of normalizing the string into the normalization form - * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms. - * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default - * is "NFC" - */ - normalize(form?: string): string; - - /** - * Returns a String value that is made from count copies appended together. If count is 0, - * the empty string is returned. - * @param count number of copies to append - */ - repeat(count: number): string; - - /** - * Returns true if the sequence of elements of searchString converted to a String is the - * same as the corresponding elements of this object (converted to a String) starting at - * position. Otherwise returns false. - */ - startsWith(searchString: string, position?: number): boolean; - } + hours?: "long" | "short" | "narrow" | "numeric" | "2-digit" | undefined; - interface StringConstructor { - /** - * Return the String value whose elements are, in order, the elements in the List elements. - * If length is 0, the empty string is returned. - */ - fromCodePoint(...codePoints: number[]): string; - - /** - * String.raw is usually used as a tag function of a Tagged Template String. When called as - * such, the first argument will be a well formed template call site object and the rest - * parameter will contain the substitution values. It can also be called directly, for example, - * to interleave strings and values from your own tag function, and in this case the only thing - * it needs from the first argument is the raw property. - * @param template A well-formed template string call site representation. - * @param substitutions A set of substitution values. - */ - raw(template: { raw: readonly string[] | ArrayLike; }, ...substitutions: any[]): string; - } + hoursDisplay?: DurationFormatDisplayOption | undefined; - interface Int8Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; - } + minutes?: "long" | "short" | "narrow" | "numeric" | "2-digit" | undefined; - interface Uint8Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; - } + minutesDisplay?: DurationFormatDisplayOption | undefined; - interface Uint8ClampedArray { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; - } + seconds?: "long" | "short" | "narrow" | "numeric" | "2-digit" | undefined; - interface Int16Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; - } + secondsDisplay?: DurationFormatDisplayOption | undefined; - interface Uint16Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; - } + milliseconds?: "long" | "short" | "narrow" | "numeric" | undefined; - interface Int32Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; - } + millisecondsDisplay?: DurationFormatDisplayOption | undefined; - interface Uint32Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; - } + microseconds?: "long" | "short" | "narrow" | "numeric" | undefined; - interface Float32Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; - } + microsecondsDisplay?: DurationFormatDisplayOption | undefined; - interface Float64Array { - toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; - } + nanoseconds?: "long" | "short" | "narrow" | "numeric" | undefined; - ///////////////////////////// - // lib.es2015.generator.d.ts - ///////////////////////////// - interface Generator extends IteratorObject { - // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. - next(...[value]: [] | [TNext]): IteratorResult; + nanosecondsDisplay?: DurationFormatDisplayOption | undefined; - return(value: TReturn): IteratorResult; + fractionalDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined; +} - throw(e: any): IteratorResult; +/** + * The Intl.DurationFormat object enables language-sensitive duration formatting. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat) + */ + interface DurationFormat { + /** + * @param duration The duration object to be formatted. It should include some or all of the following properties: months, weeks, days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/format). + */ + format(duration: Partial>): string; - [Symbol.iterator](): Generator; - } + /** + * @param duration The duration object to be formatted. It should include some or all of the following properties: months, weeks, days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/formatToParts). + */ + formatToParts(duration: Partial>): DurationFormatPart[]; - interface GeneratorFunction { - /** - * Creates a new Generator object. - * @param args A list of arguments the function accepts. - */ - new (...args: any[]): Generator; - - /** - * Creates a new Generator object. - * @param args A list of arguments the function accepts. - */ - (...args: any[]): Generator; - - /** - * The length of the arguments. - */ - readonly length: number; - - /** - * Returns the name of the function. - */ - readonly name: string; - - /** - * A reference to the prototype. - */ - readonly prototype: Generator; - } + /** + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/resolvedOptions). + */ + resolvedOptions(): ResolvedDurationFormatOptions; +} - ///////////////////////////// - // lib.es2015.iterable.d.ts - ///////////////////////////// - interface SymbolConstructor { - /** - * A method that returns the default iterator for an object. Called by the semantics of the - * for-of statement. - */ - readonly iterator: unique symbol; - } +interface ResolvedDurationFormatOptions { + locale: UnicodeBCP47LocaleIdentifier; - interface IteratorYieldResult { - done?: false; + numberingSystem: string; - value: TYield; - } + style: DurationFormatStyle; - interface IteratorReturnResult { - done: true; + years: "long" | "short" | "narrow"; - value: TReturn; - } + yearsDisplay: DurationFormatDisplayOption; - type IteratorResult = IteratorYieldResult | IteratorReturnResult; + months: "long" | "short" | "narrow"; - interface Iterator { - // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. - next(...[value]: [] | [TNext]): IteratorResult; + monthsDisplay: DurationFormatDisplayOption; - return?(value?: TReturn): IteratorResult; + weeks: "long" | "short" | "narrow"; - throw?(e?: any): IteratorResult; - } + weeksDisplay: DurationFormatDisplayOption; - interface Iterable { - [Symbol.iterator](): Iterator; - } + days: "long" | "short" | "narrow"; - /** - * Describes a user-defined {@link Iterator} that is also iterable. - */ - interface IterableIterator extends Iterator { - [Symbol.iterator](): IterableIterator; - } + daysDisplay: DurationFormatDisplayOption; - /** - * Describes an {@link Iterator} produced by the runtime that inherits from the intrinsic `Iterator.prototype`. - */ - interface IteratorObject extends Iterator { - [Symbol.iterator](): IteratorObject; - } + hours: "long" | "short" | "narrow" | "numeric" | "2-digit"; - /** - * Defines the `TReturn` type used for built-in iterators produced by `Array`, `Map`, `Set`, and others. - * This is `undefined` when `strictBuiltInIteratorReturn` is `true`; otherwise, this is `any`. - */ - type BuiltinIteratorReturn = intrinsic; + hoursDisplay: DurationFormatDisplayOption; - interface ArrayIterator extends IteratorObject { - [Symbol.iterator](): ArrayIterator; - } + minutes: "long" | "short" | "narrow" | "numeric" | "2-digit"; - interface Array { - /** Iterator */ - [Symbol.iterator](): ArrayIterator; + minutesDisplay: DurationFormatDisplayOption; - /** - * Returns an iterable of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, T]>; + seconds: "long" | "short" | "narrow" | "numeric" | "2-digit"; - /** - * Returns an iterable of keys in the array - */ - keys(): ArrayIterator; + secondsDisplay: DurationFormatDisplayOption; - /** - * Returns an iterable of values in the array - */ - values(): ArrayIterator; - } + milliseconds: "long" | "short" | "narrow" | "numeric"; - interface ArrayConstructor { - /** - * Creates an array from an iterable object. - * @param iterable An iterable object to convert to an array. - */ - from(iterable: Iterable | ArrayLike): T[]; - - /** - * Creates an array from an iterable object. - * @param iterable An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; - } + millisecondsDisplay: DurationFormatDisplayOption; - interface ReadonlyArray { - /** Iterator of values in the array. */ - [Symbol.iterator](): ArrayIterator; + microseconds: "long" | "short" | "narrow" | "numeric"; - /** - * Returns an iterable of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, T]>; + microsecondsDisplay: DurationFormatDisplayOption; - /** - * Returns an iterable of keys in the array - */ - keys(): ArrayIterator; + nanoseconds: "long" | "short" | "narrow" | "numeric"; - /** - * Returns an iterable of values in the array - */ - values(): ArrayIterator; - } + nanosecondsDisplay: DurationFormatDisplayOption; - interface IArguments { - /** Iterator */ - [Symbol.iterator](): ArrayIterator; - } + fractionalDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9; +} - interface MapIterator extends IteratorObject { - [Symbol.iterator](): MapIterator; - } +const DurationFormat: { + prototype: DurationFormat; - interface Map { - /** Returns an iterable of entries in the map. */ - [Symbol.iterator](): MapIterator<[K, V]>; + /** + * @param locales A string with a BCP 47 language tag, or an array of such strings. + * For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) + * page. + * + * @param options An object for setting up a duration format. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/DurationFormat). + */ + new (locales?: LocalesArgument, options?: DurationFormatOptions): DurationFormat; - /** - * Returns an iterable of key, value pairs for every entry in the map. - */ - entries(): MapIterator<[K, V]>; + /** + * Returns an array containing those of the provided locales that are supported in display names without having to fall back to the runtime's default locale. + * + * @param locales A string with a BCP 47 language tag, or an array of such strings. + * For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) + * page. + * + * @param options An object with a locale matcher. + * + * @returns An array of strings representing a subset of the given locale tags that are supported in display names without having to fall back to the runtime's default locale. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/supportedLocalesOf). + */ + supportedLocalesOf(locales?: LocalesArgument, options?: { localeMatcher?: DurationFormatLocaleMatcher; }): UnicodeBCP47LocaleIdentifier[]; +}; +} - /** - * Returns an iterable of keys in the map - */ - keys(): MapIterator; +///////////////////////////// +// lib.es2025.promise.d.ts +///////////////////////////// +interface PromiseConstructor { + /** + * Takes a callback of any kind (returns or throws, synchronously or asynchronously) and wraps its result + * in a Promise. + * + * @param callbackFn A function that is called synchronously. It can do anything: either return + * a value, throw an error, or return a promise. + * @param args Additional arguments, that will be passed to the callback. + * + * @returns A Promise that is: + * - Already fulfilled, if the callback synchronously returns a value. + * - Already rejected, if the callback synchronously throws an error. + * - Asynchronously fulfilled or rejected, if the callback returns a promise. + */ + try(callbackFn: (...args: U) => T | PromiseLike, ...args: U): Promise>; +} - /** - * Returns an iterable of values in the map - */ - values(): MapIterator; - } +///////////////////////////// +// lib.es2025.regexp.d.ts +///////////////////////////// +interface RegExpConstructor { + /** + * Escapes any RegExp syntax characters in the input string, returning a + * new string that can be safely interpolated into a RegExp as a literal + * string to match. + * @example + * ```ts + * const regExp = new RegExp(RegExp.escape("foo.bar")); + * regExp.test("foo.bar"); // true + * regExp.test("foo!bar"); // false + * ``` + */ + escape(string: string): string; +} - interface ReadonlyMap { - /** Returns an iterable of entries in the map. */ - [Symbol.iterator](): MapIterator<[K, V]>; +///////////////////////////// +// lib.es5.d.ts +///////////////////////////// +///////////////////////////// +/// ECMAScript APIs +///////////////////////////// - /** - * Returns an iterable of key, value pairs for every entry in the map. - */ - entries(): MapIterator<[K, V]>; +var NaN: number; + +var Infinity: number; + +/** + * Evaluates JavaScript code and executes it. + * @param x A String value that contains valid JavaScript code. + */ +function eval(x: string): any; + +/** + * Converts a string to an integer. + * @param string A string to convert into a number. + * @param radix A value between 2 and 36 that specifies the base of the number in `string`. + * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. + * All other strings are considered decimal. + */ +function parseInt(string: string, radix?: number): number; + +/** + * Converts a string to a floating-point number. + * @param string A string that contains a floating-point number. + */ +function parseFloat(string: string): number; + +/** + * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a number). + * @param number A numeric value. + */ +function isNaN(number: number): boolean; + +/** + * Determines whether a supplied number is finite. + * @param number Any numeric value. + */ +function isFinite(number: number): boolean; + +/** + * Gets the unencoded version of an encoded Uniform Resource Identifier (URI). + * @param encodedURI A value representing an encoded URI. + */ +function decodeURI(encodedURI: string): string; + +/** + * Gets the unencoded version of an encoded component of a Uniform Resource Identifier (URI). + * @param encodedURIComponent A value representing an encoded URI component. + */ +function decodeURIComponent(encodedURIComponent: string): string; + +/** + * Encodes a text string as a valid Uniform Resource Identifier (URI) + * @param uri A value representing an unencoded URI. + */ +function encodeURI(uri: string): string; + +/** + * Encodes a text string as a valid component of a Uniform Resource Identifier (URI). + * @param uriComponent A value representing an unencoded URI component. + */ +function encodeURIComponent(uriComponent: string | number | boolean): string; + +interface Symbol { + /** Returns a string representation of an object. */ + toString(): string; + + /** Returns the primitive value of the specified object. */ + valueOf(): symbol; +} - /** - * Returns an iterable of keys in the map - */ - keys(): MapIterator; +type PropertyKey = string | number | symbol; - /** - * Returns an iterable of values in the map - */ - values(): MapIterator; - } +interface PropertyDescriptor { + configurable?: boolean; - interface MapConstructor { - new (): Map; + enumerable?: boolean; - new (iterable?: Iterable | null): Map; - } + value?: any; - interface WeakMap { - } + writable?: boolean; - interface WeakMapConstructor { - new (iterable?: Iterable | null): WeakMap; - } + get?(): any; - interface SetIterator extends IteratorObject { - [Symbol.iterator](): SetIterator; - } + set?(v: any): void; +} - interface Set { - /** Iterates over values in the set. */ - [Symbol.iterator](): SetIterator; +interface PropertyDescriptorMap { + [key: PropertyKey]: PropertyDescriptor; +} - /** - * Returns an iterable of [v,v] pairs for every value `v` in the set. - */ - entries(): SetIterator<[T, T]>; +interface Object { + /** The initial value of Object.prototype.constructor is the standard built-in Object constructor. */ + constructor: Function; - /** - * Despite its name, returns an iterable of the values in the set. - */ - keys(): SetIterator; + /** Returns a string representation of an object. */ + toString(): string; - /** - * Returns an iterable of values in the set. - */ - values(): SetIterator; - } + /** Returns a date converted to a string using the current locale. */ + toLocaleString(): string; - interface ReadonlySet { - /** Iterates over values in the set. */ - [Symbol.iterator](): SetIterator; + /** Returns the primitive value of the specified object. */ + valueOf(): Object; - /** - * Returns an iterable of [v,v] pairs for every value `v` in the set. - */ - entries(): SetIterator<[T, T]>; + /** + * Determines whether an object has a property with the specified name. + * @param v A property name. + */ + hasOwnProperty(v: PropertyKey): boolean; - /** - * Despite its name, returns an iterable of the values in the set. - */ - keys(): SetIterator; + /** + * Determines whether an object exists in another object's prototype chain. + * @param v Another object whose prototype chain is to be checked. + */ + isPrototypeOf(v: Object): boolean; - /** - * Returns an iterable of values in the set. - */ - values(): SetIterator; - } + /** + * Determines whether a specified property is enumerable. + * @param v A property name. + */ + propertyIsEnumerable(v: PropertyKey): boolean; +} - interface SetConstructor { - new (iterable?: Iterable | null): Set; - } +interface ObjectConstructor { + new (value?: any): Object; - interface WeakSet { - } + (): any; - interface WeakSetConstructor { - new (iterable: Iterable): WeakSet; - } + (value: any): any; - interface PromiseConstructor { - /** - * Creates a Promise that is resolved with an array of results when all of the provided Promises - * resolve, or rejected when any Promise is rejected. - * @param values An iterable of Promises. - * @returns A new Promise. - */ - all(values: Iterable>): Promise[]>; - - /** - * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved - * or rejected. - * @param values An iterable of Promises. - * @returns A new Promise. - */ - race(values: Iterable>): Promise>; - } + /** A reference to the prototype for a class of objects. */ + readonly prototype: Object; - interface StringIterator extends IteratorObject { - [Symbol.iterator](): StringIterator; - } + /** + * Returns the prototype of an object. + * @param o The object that references the prototype. + */ + getPrototypeOf(o: any): any; - interface String { - /** Iterator */ - [Symbol.iterator](): StringIterator; - } + /** + * Gets the own property descriptor of the specified object. + * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype. + * @param o Object that contains the property. + * @param p Name of the property. + */ + getOwnPropertyDescriptor(o: any, p: PropertyKey): PropertyDescriptor | undefined; - interface Int8Array { - [Symbol.iterator](): ArrayIterator; + /** + * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly + * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions. + * @param o Object that contains the own properties. + */ + getOwnPropertyNames(o: any): string[]; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Creates an object that has the specified prototype or that has null prototype. + * @param o Object to use as a prototype. May be null. + */ + create(o: object | null): any; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Creates an object that has the specified prototype, and that optionally contains specified properties. + * @param o Object to use as a prototype. May be null + * @param properties JavaScript object that contains one or more property descriptors. + */ + create(o: object | null, properties: PropertyDescriptorMap & ThisType): any; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; - } + /** + * Adds a property to an object, or modifies attributes of an existing property. + * @param o Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object. + * @param p The property name. + * @param attributes Descriptor for the property. It can be for a data property or an accessor property. + */ + defineProperty(o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType): T; - interface Int8ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Int8Array; - - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int8Array; - } + /** + * Adds one or more properties to an object, and/or modifies attributes of existing properties. + * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object. + * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property. + */ + defineProperties(o: T, properties: PropertyDescriptorMap & ThisType): T; - interface Uint8Array { - [Symbol.iterator](): ArrayIterator; + /** + * Prevents the modification of attributes of existing properties, and prevents the addition of new properties. + * @param o Object on which to lock the attributes. + */ + seal(o: T): T; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. + * @param f Object on which to lock the attributes. + */ + freeze(f: T): T; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. + * @param o Object on which to lock the attributes. + */ + freeze(o: T): Readonly; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; - } + /** + * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. + * @param o Object on which to lock the attributes. + */ + freeze(o: T): Readonly; - interface Uint8ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Uint8Array; - - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8Array; - } + /** + * Prevents the addition of new properties to an object. + * @param o Object to make non-extensible. + */ + preventExtensions(o: T): T; - interface Uint8ClampedArray { - [Symbol.iterator](): ArrayIterator; + /** + * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object. + * @param o Object to test. + */ + isSealed(o: any): boolean; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object. + * @param o Object to test. + */ + isFrozen(o: any): boolean; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns a value that indicates whether new properties can be added to an object. + * @param o Object to test. + */ + isExtensible(o: any): boolean; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; - } + /** + * Returns the names of the enumerable string properties and methods of an object. + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ + keys(o: object): string[]; +} - interface Uint8ClampedArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Uint8ClampedArray; - - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; - } +/** + * Provides functionality common to all JavaScript objects. + */ +var Object: ObjectConstructor; - interface Int16Array { - [Symbol.iterator](): ArrayIterator; +/** + * Creates a new function. + */ +interface Function { + /** + * Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function. + * @param thisArg The object to be used as the this object. + * @param argArray A set of arguments to be passed to the function. + */ + apply(this: Function, thisArg: any, argArray?: any): any; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Calls a method of an object, substituting another object for the current object. + * @param thisArg The object to be used as the current object. + * @param argArray A list of arguments to be passed to the method. + */ + call(this: Function, thisArg: any, ...argArray: any[]): any; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg An object to which the this keyword can refer inside the new function. + * @param argArray A list of arguments to be passed to the new function. + */ + bind(this: Function, thisArg: any, ...argArray: any[]): any; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; - } + /** Returns a string representation of a function. */ + toString(): string; - interface Int16ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Int16Array; - - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int16Array; - } + prototype: any; - interface Uint16Array { - [Symbol.iterator](): ArrayIterator; + readonly length: number; +} - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; +interface FunctionConstructor { + /** + * Creates a new function. + * @param args A list of arguments the function accepts. + */ + new (...args: string[]): Function; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + (...args: string[]): Function; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; - } + readonly prototype: Function; +} - interface Uint16ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Uint16Array; - - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint16Array; - } +var Function: FunctionConstructor; - interface Int32Array { - [Symbol.iterator](): ArrayIterator; +/** + * Extracts the type of the 'this' parameter of a function type, or 'unknown' if the function type has no 'this' parameter. + */ +type ThisParameterType = T extends (this: infer U, ...args: never) => any ? U : unknown; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; +/** + * Removes the 'this' parameter from a function type. + */ +type OmitThisParameter = unknown extends ThisParameterType ? T : T extends (...args: infer A) => infer R ? (...args: A) => R : T; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; +interface CallableFunction extends Function { + /** + * Calls the function with the specified object as the this value and the elements of specified array as the arguments. + * @param thisArg The object to be used as the this object. + */ + apply(this: (this: T) => R, thisArg: T): R; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; - } + /** + * Calls the function with the specified object as the this value and the elements of specified array as the arguments. + * @param thisArg The object to be used as the this object. + * @param args An array of argument values to be passed to the function. + */ + apply(this: (this: T, ...args: A) => R, thisArg: T, args: A): R; - interface Int32ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Int32Array; - - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int32Array; - } + /** + * Calls the function with the specified object as the this value and the specified rest arguments as the arguments. + * @param thisArg The object to be used as the this object. + * @param args Argument values to be passed to the function. + */ + call(this: (this: T, ...args: A) => R, thisArg: T, ...args: A): R; - interface Uint32Array { - [Symbol.iterator](): ArrayIterator; + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg The object to be used as the this object. + */ + bind(this: T, thisArg: ThisParameterType): OmitThisParameter; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg The object to be used as the this object. + * @param args Arguments to bind to the parameters of the function. + */ + bind(this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; +} - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; +interface NewableFunction extends Function { + /** + * Calls the function with the specified object as the this value and the elements of specified array as the arguments. + * @param thisArg The object to be used as the this object. + */ + apply(this: new () => T, thisArg: T): void; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; - } + /** + * Calls the function with the specified object as the this value and the elements of specified array as the arguments. + * @param thisArg The object to be used as the this object. + * @param args An array of argument values to be passed to the function. + */ + apply(this: new (...args: A) => T, thisArg: T, args: A): void; - interface Uint32ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Uint32Array; - - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint32Array; - } + /** + * Calls the function with the specified object as the this value and the specified rest arguments as the arguments. + * @param thisArg The object to be used as the this object. + * @param args Argument values to be passed to the function. + */ + call(this: new (...args: A) => T, thisArg: T, ...args: A): void; - interface Float32Array { - [Symbol.iterator](): ArrayIterator; + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg The object to be used as the this object. + */ + bind(this: T, thisArg: any): T; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg The object to be used as the this object. + * @param args Arguments to bind to the parameters of the function. + */ + bind(this: new (...args: [...A, ...B]) => R, thisArg: any, ...args: A): new (...args: B) => R; +} - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; +interface IArguments { + [index: number]: any; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; - } + length: number; +} - interface Float32ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Float32Array; - - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Float32Array; - } +interface String { + /** Returns a string representation of a string. */ + toString(): string; - interface Float64Array { - [Symbol.iterator](): ArrayIterator; + /** + * Returns the character at the specified index. + * @param pos The zero-based index of the desired character. + */ + charAt(pos: number): string; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; + /** + * Returns the Unicode value of the character at the specified location, or NaN if the index is out of bounds. + * @param index The zero-based index of the desired character. + */ + charCodeAt(index: number): number; - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; + /** + * Returns a string that contains the concatenation of two or more strings. + * @param strings The strings to append to the end of the string. + */ + concat(...strings: string[]): string; - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; - } + /** + * Returns the position of the first occurrence of a substring, or -1 if it is not present. + * @param searchString The substring to search for in the string + * @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string. + */ + indexOf(searchString: string, position?: number): number; - interface Float64ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Float64Array; - - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Float64Array; - } + /** + * Returns the last occurrence of a substring in the string, or -1 if it is not present. + * @param searchString The substring to search for. + * @param position The index at which to begin searching. If omitted, the search begins at the end of the string. + */ + lastIndexOf(searchString: string, position?: number): number; - ///////////////////////////// - // lib.es2015.promise.d.ts - ///////////////////////////// - interface PromiseConstructor { - /** - * A reference to the prototype. - */ - readonly prototype: Promise; - - /** - * Creates a new Promise. - * @param executor A callback used to initialize the promise. This callback is passed two arguments: - * a resolve callback used to resolve the promise with a value or the result of another promise, - * and a reject callback used to reject the promise with a provided reason or error. - */ - new (executor: (resolve: (value: T | PromiseLike) => void, reject: (reason?: any) => void) => void): Promise; - - /** - * Creates a Promise that is resolved with an array of results when all of the provided Promises - * resolve, or rejected when any Promise is rejected. - * @param values An array of Promises. - * @returns A new Promise. - */ - all(values: T): Promise<{ -readonly [P in keyof T]: Awaited; }>; - - // see: lib.es2015.iterable.d.ts - // all(values: Iterable>): Promise[]>; - - /** - * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved - * or rejected. - * @param values An array of Promises. - * @returns A new Promise. - */ - race(values: T): Promise>; - - // see: lib.es2015.iterable.d.ts - // race(values: Iterable>): Promise>; - - /** - * Creates a new rejected promise for the provided reason. - * @param reason The reason the promise was rejected. - * @returns A new rejected Promise. - */ - reject(reason?: any): Promise; - - /** - * Creates a new resolved promise. - * @returns A resolved promise. - */ - resolve(): Promise; - - /** - * Creates a new resolved promise for the provided value. - * @param value A promise. - * @returns A promise whose internal state matches the provided promise. - */ - resolve(value: T): Promise>; - - /** - * Creates a new resolved promise for the provided value. - * @param value A promise. - * @returns A promise whose internal state matches the provided promise. - */ - resolve(value: T | PromiseLike): Promise>; - } + /** + * Determines whether two strings are equivalent in the current locale. + * @param that String to compare to target string + */ + localeCompare(that: string): number; - var Promise: PromiseConstructor; - - ///////////////////////////// - // lib.es2015.proxy.d.ts - ///////////////////////////// - interface ProxyHandler { - /** - * A trap method for a function call. - * @param target The original callable object which is being proxied. - */ - apply?(target: T, thisArg: any, argArray: any[]): any; - - /** - * A trap for the `new` operator. - * @param target The original object which is being proxied. - * @param newTarget The constructor that was originally called. - */ - construct?(target: T, argArray: any[], newTarget: Function): object; - - /** - * A trap for `Object.defineProperty()`. - * @param target The original object which is being proxied. - * @returns A `Boolean` indicating whether or not the property has been defined. - */ - defineProperty?(target: T, property: string | symbol, attributes: PropertyDescriptor): boolean; - - /** - * A trap for the `delete` operator. - * @param target The original object which is being proxied. - * @param p The name or `Symbol` of the property to delete. - * @returns A `Boolean` indicating whether or not the property was deleted. - */ - deleteProperty?(target: T, p: string | symbol): boolean; - - /** - * A trap for getting a property value. - * @param target The original object which is being proxied. - * @param p The name or `Symbol` of the property to get. - * @param receiver The proxy or an object that inherits from the proxy. - */ - get?(target: T, p: string | symbol, receiver: any): any; - - /** - * A trap for `Object.getOwnPropertyDescriptor()`. - * @param target The original object which is being proxied. - * @param p The name of the property whose description should be retrieved. - */ - getOwnPropertyDescriptor?(target: T, p: string | symbol): PropertyDescriptor | undefined; - - /** - * A trap for the `[[GetPrototypeOf]]` internal method. - * @param target The original object which is being proxied. - */ - getPrototypeOf?(target: T): object | null; - - /** - * A trap for the `in` operator. - * @param target The original object which is being proxied. - * @param p The name or `Symbol` of the property to check for existence. - */ - has?(target: T, p: string | symbol): boolean; - - /** - * A trap for `Object.isExtensible()`. - * @param target The original object which is being proxied. - */ - isExtensible?(target: T): boolean; - - /** - * A trap for `Reflect.ownKeys()`. - * @param target The original object which is being proxied. - */ - ownKeys?(target: T): ArrayLike; - - /** - * A trap for `Object.preventExtensions()`. - * @param target The original object which is being proxied. - */ - preventExtensions?(target: T): boolean; - - /** - * A trap for setting a property value. - * @param target The original object which is being proxied. - * @param p The name or `Symbol` of the property to set. - * @param receiver The object to which the assignment was originally directed. - * @returns A `Boolean` indicating whether or not the property was set. - */ - set?(target: T, p: string | symbol, newValue: any, receiver: any): boolean; - - /** - * A trap for `Object.setPrototypeOf()`. - * @param target The original object which is being proxied. - * @param newPrototype The object's new prototype or `null`. - */ - setPrototypeOf?(target: T, v: object | null): boolean; - } + /** + * Matches a string with a regular expression, and returns an array containing the results of that search. + * @param regexp A variable name or string literal containing the regular expression pattern and flags. + */ + match(regexp: string | RegExp): RegExpMatchArray | null; - interface ProxyConstructor { - /** - * Creates a revocable Proxy object. - * @param target A target object to wrap with Proxy. - * @param handler An object whose properties define the behavior of Proxy when an operation is attempted on it. - */ - revocable(target: T, handler: ProxyHandler): { proxy: T; revoke: () => void; }; - - /** - * Creates a Proxy object. The Proxy object allows you to create an object that can be used in place of the - * original object, but which may redefine fundamental Object operations like getting, setting, and defining - * properties. Proxy objects are commonly used to log property accesses, validate, format, or sanitize inputs. - * @param target A target object to wrap with Proxy. - * @param handler An object whose properties define the behavior of Proxy when an operation is attempted on it. - */ - new (target: T, handler: ProxyHandler): T; - } + /** + * Replaces text in a string, using a regular expression or search string. + * @param searchValue A string or regular expression to search for. + * @param replaceValue A string containing the text to replace. When the {@linkcode searchValue} is a `RegExp`, all matches are replaced if the `g` flag is set (or only those matches at the beginning, if the `y` flag is also present). Otherwise, only the first match of {@linkcode searchValue} is replaced. + */ + replace(searchValue: string | RegExp, replaceValue: string): string; - var Proxy: ProxyConstructor; + /** + * Replaces text in a string, using a regular expression or search string. + * @param searchValue A string to search for. + * @param replacer A function that returns the replacement text. + */ + replace(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; - ///////////////////////////// - // lib.es2015.reflect.d.ts - ///////////////////////////// - namespace Reflect { - /** - * Calls the function with the specified object as the this value - * and the elements of specified array as the arguments. - * @param target The function to call. - * @param thisArgument The object to be used as the this object. - * @param argumentsList An array of argument values to be passed to the function. - */ - function apply( - target: (this: T, ...args: A) => R, - thisArgument: T, - argumentsList: Readonly, - ): R; - - function apply(target: Function, thisArgument: any, argumentsList: ArrayLike): any; + /** + * Finds the first substring match in a regular expression search. + * @param regexp The regular expression pattern and applicable flags. + */ + search(regexp: string | RegExp): number; - /** - * Constructs the target with the elements of specified array as the arguments - * and the specified constructor as the `new.target` value. - * @param target The constructor to invoke. - * @param argumentsList An array of argument values to be passed to the constructor. - * @param newTarget The constructor to be used as the `new.target` object. - */ - function construct( - target: new (...args: A) => R, - argumentsList: Readonly, - newTarget?: new (...args: any) => any, - ): R; - - function construct(target: Function, argumentsList: ArrayLike, newTarget?: Function): any; + /** + * Returns a section of a string. + * @param start The index to the beginning of the specified portion of stringObj. + * @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end. + * If this value is not specified, the substring continues to the end of stringObj. + */ + slice(start?: number, end?: number): string; - /** - * Adds a property to an object, or modifies attributes of an existing property. - * @param target Object on which to add or modify the property. This can be a native JavaScript object - * (that is, a user-defined object or a built in object) or a DOM object. - * @param propertyKey The property name. - * @param attributes Descriptor for the property. It can be for a data property or an accessor property. - */ - function defineProperty(target: object, propertyKey: PropertyKey, attributes: PropertyDescriptor & ThisType): boolean; + /** + * Split a string into substrings using the specified separator and return them as an array. + * @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned. + * @param limit A value used to limit the number of elements returned in the array. + */ + split(separator: string | RegExp, limit?: number): string[]; - /** - * Removes a property from an object, equivalent to `delete target[propertyKey]`, - * except it won't throw if `target[propertyKey]` is non-configurable. - * @param target Object from which to remove the own property. - * @param propertyKey The property name. - */ - function deleteProperty(target: object, propertyKey: PropertyKey): boolean; + /** + * Returns the substring at the specified location within a String object. + * @param start The zero-based index number indicating the beginning of the substring. + * @param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end. + * If end is omitted, the characters from start through the end of the original string are returned. + */ + substring(start: number, end?: number): string; - /** - * Gets the property of target, equivalent to `target[propertyKey]` when `receiver === target`. - * @param target Object that contains the property on itself or in its prototype chain. - * @param propertyKey The property name. - * @param receiver The reference to use as the `this` value in the getter function, - * if `target[propertyKey]` is an accessor property. - */ - function get( - target: T, - propertyKey: P, - receiver?: unknown, - ): P extends keyof T ? T[P] : any; + /** Converts all the alphabetic characters in a string to lowercase. */ + toLowerCase(): string; - /** - * Gets the own property descriptor of the specified object. - * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype. - * @param target Object that contains the property. - * @param propertyKey The property name. - */ - function getOwnPropertyDescriptor( - target: T, - propertyKey: P, - ): TypedPropertyDescriptor

| undefined; + /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */ + toLocaleLowerCase(locales?: string | string[]): string; - /** - * Returns the prototype of an object. - * @param target The object that references the prototype. - */ - function getPrototypeOf(target: object): object | null; + /** Converts all the alphabetic characters in a string to uppercase. */ + toUpperCase(): string; - /** - * Equivalent to `propertyKey in target`. - * @param target Object that contains the property on itself or in its prototype chain. - * @param propertyKey Name of the property. - */ - function has(target: object, propertyKey: PropertyKey): boolean; + /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */ + toLocaleUpperCase(locales?: string | string[]): string; - /** - * Returns a value that indicates whether new properties can be added to an object. - * @param target Object to test. - */ - function isExtensible(target: object): boolean; + /** Removes the leading and trailing white space and line terminator characters from a string. */ + trim(): string; - /** - * Returns the string and symbol keys of the own properties of an object. The own properties of an object - * are those that are defined directly on that object, and are not inherited from the object's prototype. - * @param target Object that contains the own properties. - */ - function ownKeys(target: object): (string | symbol)[]; + /** Returns the length of a String object. */ + readonly length: number; - /** - * Prevents the addition of new properties to an object. - * @param target Object to make non-extensible. - * @return Whether the object has been made non-extensible. - */ - function preventExtensions(target: object): boolean; + /** Returns the primitive value of the specified object. */ + valueOf(): string; - /** - * Sets the property of target, equivalent to `target[propertyKey] = value` when `receiver === target`. - * @param target Object that contains the property on itself or in its prototype chain. - * @param propertyKey Name of the property. - * @param receiver The reference to use as the `this` value in the setter function, - * if `target[propertyKey]` is an accessor property. - */ - function set( - target: T, - propertyKey: P, - value: P extends keyof T ? T[P] : any, - receiver?: any, - ): boolean; - - function set(target: object, propertyKey: PropertyKey, value: any, receiver?: any): boolean; + readonly [index: number]: string; +} - /** - * Sets the prototype of a specified object o to object proto or null. - * @param target The object to change its prototype. - * @param proto The value of the new prototype or null. - * @return Whether setting the prototype was successful. - */ - function setPrototypeOf(target: object, proto: object | null): boolean; - } +interface StringConstructor { + new (value?: any): String; - ///////////////////////////// - // lib.es2015.symbol.d.ts - ///////////////////////////// - interface SymbolConstructor { - /** - * A reference to the prototype. - */ - readonly prototype: Symbol; - - /** - * Returns a new unique Symbol value. - * @param description Description of the new Symbol object. - */ - (description?: string | number): symbol; - - /** - * Returns a Symbol object from the global symbol registry matching the given key if found. - * Otherwise, returns a new symbol with this key. - * @param key key to search for. - */ - for(key: string): symbol; - - /** - * Returns a key from the global symbol registry matching the given Symbol if found. - * Otherwise, returns undefined. - * @param sym Symbol to find the key for. - */ - keyFor(sym: symbol): string | undefined; - } + (value?: any): string; - var Symbol: SymbolConstructor; - - ///////////////////////////// - // lib.es2015.symbol.wellknown.d.ts - ///////////////////////////// - interface SymbolConstructor { - /** - * A method that determines if a constructor object recognizes an object as one of the - * constructor’s instances. Called by the semantics of the instanceof operator. - */ - readonly hasInstance: unique symbol; - - /** - * A Boolean value that if true indicates that an object should flatten to its array elements - * by Array.prototype.concat. - */ - readonly isConcatSpreadable: unique symbol; - - /** - * A regular expression method that matches the regular expression against a string. Called - * by the String.prototype.match method. - */ - readonly match: unique symbol; - - /** - * A regular expression method that replaces matched substrings of a string. Called by the - * String.prototype.replace method. - */ - readonly replace: unique symbol; - - /** - * A regular expression method that returns the index within a string that matches the - * regular expression. Called by the String.prototype.search method. - */ - readonly search: unique symbol; - - /** - * A function valued property that is the constructor function that is used to create - * derived objects. - */ - readonly species: unique symbol; - - /** - * A regular expression method that splits a string at the indices that match the regular - * expression. Called by the String.prototype.split method. - */ - readonly split: unique symbol; - - /** - * A method that converts an object to a corresponding primitive value. - * Called by the ToPrimitive abstract operation. - */ - readonly toPrimitive: unique symbol; - - /** - * A String value that is used in the creation of the default string description of an object. - * Called by the built-in method Object.prototype.toString. - */ - readonly toStringTag: unique symbol; - - /** - * An Object whose truthy properties are properties that are excluded from the 'with' - * environment bindings of the associated objects. - */ - readonly unscopables: unique symbol; - } + readonly prototype: String; - interface Symbol { - /** - * Converts a Symbol object to a symbol. - */ - [Symbol.toPrimitive](hint: string): symbol; - } + fromCharCode(...codes: number[]): string; +} - interface Array { - /** - * Is an object whose properties have the value 'true' - * when they will be absent when used in a 'with' statement. - */ - readonly [Symbol.unscopables]: { - [K in keyof any[]]?: boolean; - }; - } +/** + * Allows manipulation and formatting of text strings and determination and location of substrings within strings. + */ +var String: StringConstructor; - interface ReadonlyArray { - /** - * Is an object whose properties have the value 'true' - * when they will be absent when used in a 'with' statement. - */ - readonly [Symbol.unscopables]: { - [K in keyof readonly any[]]?: boolean; - }; - } +interface Boolean { + /** Returns the primitive value of the specified object. */ + valueOf(): boolean; +} - interface Date { - /** - * Converts a Date object to a string. - */ - [Symbol.toPrimitive](hint: "default"): string; - - /** - * Converts a Date object to a string. - */ - [Symbol.toPrimitive](hint: "string"): string; - - /** - * Converts a Date object to a number. - */ - [Symbol.toPrimitive](hint: "number"): number; - - /** - * Converts a Date object to a string or number. - * - * @param hint The strings "number", "string", or "default" to specify what primitive to return. - * - * @throws {TypeError} If 'hint' was given something other than "number", "string", or "default". - * @returns A number if 'hint' was "number", a string if 'hint' was "string" or "default". - */ - [Symbol.toPrimitive](hint: string): string | number; - } +interface BooleanConstructor { + new (value?: any): Boolean; - interface Map { - readonly [Symbol.toStringTag]: string; - } + (value?: T): boolean; - interface WeakMap { - readonly [Symbol.toStringTag]: string; - } + readonly prototype: Boolean; +} - interface Set { - readonly [Symbol.toStringTag]: string; - } +var Boolean: BooleanConstructor; - interface WeakSet { - readonly [Symbol.toStringTag]: string; - } +interface Number { + /** + * Returns a string representation of an object. + * @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers. + */ + toString(radix?: number): string; - interface Function { - /** - * Determines whether the given value inherits from this function if this function was used - * as a constructor function. - * - * A constructor function can control which objects are recognized as its instances by - * 'instanceof' by overriding this method. - */ - [Symbol.hasInstance](value: any): boolean; - } + /** + * Returns a string representing a number in fixed-point notation. + * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 100, inclusive. + */ + toFixed(fractionDigits?: number): string; - interface GeneratorFunction { - readonly [Symbol.toStringTag]: string; - } + /** + * Returns a string containing a number represented in exponential notation. + * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 100, inclusive. + */ + toExponential(fractionDigits?: number): string; - interface PromiseConstructor { - readonly [Symbol.species]: PromiseConstructor; - } + /** + * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits. + * @param precision Number of significant digits. Must be in the range 1 - 100, inclusive. + */ + toPrecision(precision?: number): string; - interface RegExp { - /** - * Matches a string with this regular expression, and returns an array containing the results of - * that search. - * @param string A string to search within. - */ - [Symbol.match](string: string): RegExpMatchArray | null; - - /** - * Replaces text in a string, using this regular expression. - * @param string A String object or string literal whose contents matching against - * this regular expression will be replaced - * @param replaceValue A String object or string literal containing the text to replace for every - * successful match of this regular expression. - */ - [Symbol.replace](string: string, replaceValue: string): string; - - /** - * Replaces text in a string, using this regular expression. - * @param string A String object or string literal whose contents matching against - * this regular expression will be replaced - * @param replacer A function that returns the replacement text. - */ - [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; - - /** - * Finds the position beginning first substring match in a regular expression search - * using this regular expression. - * - * @param string The string to search within. - */ - [Symbol.search](string: string): number; - - /** - * Returns an array of substrings that were delimited by strings in the original input that - * match against this regular expression. - * - * If the regular expression contains capturing parentheses, then each time this - * regular expression matches, the results (including any undefined results) of the - * capturing parentheses are spliced. - * - * @param string string value to split - * @param limit if not undefined, the output array is truncated so that it contains no more - * than 'limit' elements. - */ - [Symbol.split](string: string, limit?: number): string[]; - } + /** Returns the primitive value of the specified object. */ + valueOf(): number; +} - interface RegExpConstructor { - readonly [Symbol.species]: RegExpConstructor; - } +interface NumberConstructor { + new (value?: any): Number; - interface String { - /** - * Matches a string or an object that supports being matched against, and returns an array - * containing the results of that search, or null if no matches are found. - * @param matcher An object that supports being matched against. - */ - match(matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null; - - /** - * Passes a string and {@linkcode replaceValue} to the `[Symbol.replace]` method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. - * @param searchValue An object that supports searching for and replacing matches within a string. - * @param replaceValue The replacement text. - */ - replace(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string; - - /** - * Replaces text in a string, using an object that supports replacement within a string. - * @param searchValue A object can search for and replace matches within a string. - * @param replacer A function that returns the replacement text. - */ - replace(searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string; - - /** - * Finds the first substring match in a regular expression search. - * @param searcher An object which supports searching within a string. - */ - search(searcher: { [Symbol.search](string: string): number; }): number; - - /** - * Split a string into substrings using the specified separator and return them as an array. - * @param splitter An object that can split a string. - * @param limit A value used to limit the number of elements returned in the array. - */ - split(splitter: { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number): string[]; - } + (value?: any): number; - interface ArrayConstructor { - readonly [Symbol.species]: ArrayConstructor; - } + readonly prototype: Number; - interface MapConstructor { - readonly [Symbol.species]: MapConstructor; - } + /** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */ + readonly MAX_VALUE: number; - interface SetConstructor { - readonly [Symbol.species]: SetConstructor; - } + /** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */ + readonly MIN_VALUE: number; - interface ArrayBufferConstructor { - readonly [Symbol.species]: ArrayBufferConstructor; - } + /** + * A value that is not a number. + * In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function. + */ + readonly NaN: number; - ///////////////////////////// - // lib.es2016.array.include.d.ts - ///////////////////////////// - interface Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: T, fromIndex?: number): boolean; - } + /** + * A value that is less than the largest negative number that can be represented in JavaScript. + * JavaScript displays NEGATIVE_INFINITY values as -infinity. + */ + readonly NEGATIVE_INFINITY: number; - interface ReadonlyArray { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: T, fromIndex?: number): boolean; - } + /** + * A value greater than the largest number that can be represented in JavaScript. + * JavaScript displays POSITIVE_INFINITY values as infinity. + */ + readonly POSITIVE_INFINITY: number; +} - interface Int8Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; - } +/** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */ +var Number: NumberConstructor; - interface Uint8Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; - } +interface TemplateStringsArray extends ReadonlyArray { + readonly raw: readonly string[]; +} - interface Uint8ClampedArray { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; - } +interface Math { + /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */ + readonly E: number; - interface Int16Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; - } + /** The natural logarithm of 10. */ + readonly LN10: number; - interface Uint16Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; - } + /** The natural logarithm of 2. */ + readonly LN2: number; - interface Int32Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; - } + /** The base-2 logarithm of e. */ + readonly LOG2E: number; - interface Uint32Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; - } + /** The base-10 logarithm of e. */ + readonly LOG10E: number; - interface Float32Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; - } + /** Pi. This is the ratio of the circumference of a circle to its diameter. */ + readonly PI: number; - interface Float64Array { - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; - } + /** The square root of 0.5, or, equivalently, one divided by the square root of 2. */ + readonly SQRT1_2: number; - ///////////////////////////// - // lib.es2016.intl.d.ts - ///////////////////////////// - namespace Intl { - /** - * The `Intl.getCanonicalLocales()` method returns an array containing - * the canonical locale names. Duplicates will be omitted and elements - * will be validated as structurally valid language tags. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/getCanonicalLocales) - * - * @param locale A list of String values for which to get the canonical locale names - * @returns An array containing the canonical and validated locale names. - */ - function getCanonicalLocales(locale?: string | readonly string[]): string[]; - } + /** The square root of 2. */ + readonly SQRT2: number; - ///////////////////////////// - // lib.es2017.date.d.ts - ///////////////////////////// - interface DateConstructor { - /** - * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. - * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. - * @param monthIndex The month as a number between 0 and 11 (January to December). - * @param date The date as a number between 1 and 31. - * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. - * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. - * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. - * @param ms A number from 0 to 999 that specifies the milliseconds. - */ - UTC(year: number, monthIndex?: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; - } + /** + * Returns the absolute value of a number (the value without regard to whether it is positive or negative). + * For example, the absolute value of -5 is the same as the absolute value of 5. + * @param x A numeric expression for which the absolute value is needed. + */ + abs(x: number): number; - ///////////////////////////// - // lib.es2017.intl.d.ts - ///////////////////////////// - namespace Intl { - interface DateTimeFormatPartTypesRegistry { - day: any; + /** + * Returns the arc cosine (or inverse cosine) of a number. + * @param x A numeric expression. + */ + acos(x: number): number; - dayPeriod: any; + /** + * Returns the arcsine of a number. + * @param x A numeric expression. + */ + asin(x: number): number; - era: any; + /** + * Returns the arctangent of a number. + * @param x A numeric expression for which the arctangent is needed. + */ + atan(x: number): number; - hour: any; + /** + * Returns the angle (in radians) between the X axis and the line going through both the origin and the given point. + * @param y A numeric expression representing the cartesian y-coordinate. + * @param x A numeric expression representing the cartesian x-coordinate. + */ + atan2(y: number, x: number): number; - literal: any; + /** + * Returns the smallest integer greater than or equal to its numeric argument. + * @param x A numeric expression. + */ + ceil(x: number): number; - minute: any; + /** + * Returns the cosine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + cos(x: number): number; - month: any; + /** + * Returns e (the base of natural logarithms) raised to a power. + * @param x A numeric expression representing the power of e. + */ + exp(x: number): number; - second: any; + /** + * Returns the greatest integer less than or equal to its numeric argument. + * @param x A numeric expression. + */ + floor(x: number): number; - timeZoneName: any; + /** + * Returns the natural logarithm (base e) of a number. + * @param x A numeric expression. + */ + log(x: number): number; - weekday: any; + /** + * Returns the larger of a set of supplied numeric expressions. + * @param values Numeric expressions to be evaluated. + */ + max(...values: number[]): number; - year: any; - } + /** + * Returns the smaller of a set of supplied numeric expressions. + * @param values Numeric expressions to be evaluated. + */ + min(...values: number[]): number; - type DateTimeFormatPartTypes = keyof DateTimeFormatPartTypesRegistry; + /** + * Returns the value of a base expression taken to a specified power. + * @param x The base value of the expression. + * @param y The exponent value of the expression. + */ + pow(x: number, y: number): number; - interface DateTimeFormatPart { - type: DateTimeFormatPartTypes; + /** Returns a pseudorandom number between 0 and 1. */ + random(): number; - value: string; - } + /** + * Returns a supplied numeric expression rounded to the nearest integer. + * @param x The value to be rounded to the nearest integer. + */ + round(x: number): number; - interface DateTimeFormat { - formatToParts(date?: Date | number): DateTimeFormatPart[]; - } - } + /** + * Returns the sine of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + sin(x: number): number; - ///////////////////////////// - // lib.es2017.object.d.ts - ///////////////////////////// - interface ObjectConstructor { - /** - * Returns an array of values of the enumerable own properties of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - values(o: { [s: string]: T; } | ArrayLike): T[]; - - /** - * Returns an array of values of the enumerable own properties of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - values(o: {}): any[]; - - /** - * Returns an array of key/values of the enumerable own properties of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - entries(o: { [s: string]: T; } | ArrayLike): [string, T][]; - - /** - * Returns an array of key/values of the enumerable own properties of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - entries(o: {}): [string, any][]; - - /** - * Returns an object containing all own property descriptors of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - getOwnPropertyDescriptors(o: T): { [P in keyof T]: TypedPropertyDescriptor; } & { [x: string]: PropertyDescriptor; }; - } + /** + * Returns the square root of a number. + * @param x A numeric expression. + */ + sqrt(x: number): number; - ///////////////////////////// - // lib.es2017.sharedmemory.d.ts - ///////////////////////////// - interface SharedArrayBuffer { - /** - * Read-only. The length of the ArrayBuffer (in bytes). - */ - readonly byteLength: number; - - /** - * Returns a section of an SharedArrayBuffer. - */ - slice(begin?: number, end?: number): SharedArrayBuffer; - - readonly [Symbol.toStringTag]: "SharedArrayBuffer"; - } + /** + * Returns the tangent of a number. + * @param x A numeric expression that contains an angle measured in radians. + */ + tan(x: number): number; +} - interface SharedArrayBufferConstructor { - readonly prototype: SharedArrayBuffer; +/** An intrinsic object that provides basic mathematics functionality and constants. */ +var Math: Math; - new (byteLength?: number): SharedArrayBuffer; +/** Enables basic storage and retrieval of dates and times. */ +interface Date { + /** Returns a string representation of a date. The format of the string depends on the locale. */ + toString(): string; - readonly [Symbol.species]: SharedArrayBufferConstructor; - } + /** Returns a date as a string value. */ + toDateString(): string; - var SharedArrayBuffer: SharedArrayBufferConstructor; + /** Returns a time as a string value. */ + toTimeString(): string; - interface ArrayBufferTypes { - SharedArrayBuffer: SharedArrayBuffer; - } + /** Returns a value as a string value appropriate to the host environment's current locale. */ + toLocaleString(): string; - interface Atomics { - /** - * Adds a value to the value at the given position in the array, returning the original value. - * Until this atomic operation completes, any other read or write operation against the array - * will block. - */ - add(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - - /** - * Stores the bitwise AND of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or - * write operation against the array will block. - */ - and(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - - /** - * Replaces the value at the given position in the array if the original value equals the given - * expected value, returning the original value. Until this atomic operation completes, any - * other read or write operation against the array will block. - */ - compareExchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, expectedValue: number, replacementValue: number): number; - - /** - * Replaces the value at the given position in the array, returning the original value. Until - * this atomic operation completes, any other read or write operation against the array will - * block. - */ - exchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - - /** - * Returns a value indicating whether high-performance algorithms can use atomic operations - * (`true`) or must use locks (`false`) for the given number of bytes-per-element of a typed - * array. - */ - isLockFree(size: number): boolean; - - /** - * Returns the value at the given position in the array. Until this atomic operation completes, - * any other read or write operation against the array will block. - */ - load(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number): number; - - /** - * Stores the bitwise OR of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or write - * operation against the array will block. - */ - or(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - - /** - * Stores a value at the given position in the array, returning the new value. Until this - * atomic operation completes, any other read or write operation against the array will block. - */ - store(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - - /** - * Subtracts a value from the value at the given position in the array, returning the original - * value. Until this atomic operation completes, any other read or write operation against the - * array will block. - */ - sub(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - - /** - * If the value at the given position in the array is equal to the provided value, the current - * agent is put to sleep causing execution to suspend until the timeout expires (returning - * `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns - * `"not-equal"`. - */ - wait(typedArray: Int32Array, index: number, value: number, timeout?: number): "ok" | "not-equal" | "timed-out"; - - /** - * Wakes up sleeping agents that are waiting on the given index of the array, returning the - * number of agents that were awoken. - * @param typedArray A shared Int32Array. - * @param index The position in the typedArray to wake up on. - * @param count The number of sleeping agents to notify. Defaults to +Infinity. - */ - notify(typedArray: Int32Array, index: number, count?: number): number; - - /** - * Stores the bitwise XOR of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or write - * operation against the array will block. - */ - xor(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; - - readonly [Symbol.toStringTag]: "Atomics"; - } + /** Returns a date as a string value appropriate to the host environment's current locale. */ + toLocaleDateString(): string; - var Atomics: Atomics; - - ///////////////////////////// - // lib.es2017.string.d.ts - ///////////////////////////// - interface String { - /** - * Pads the current string with a given string (repeated and/or truncated, if needed) so that the resulting string has a given length. - * The padding is applied from the start of the current string. - * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart) - * - * @param targetLength The length of the resulting string once the current `str` has been padded. - * If the value is less than or equal to `str.length`, then `str` is returned as-is. - * - * @param padString The string to pad the current `str` with. - * If `padString` is too long to stay within `targetLength`, it will be truncated from the end. - * The default value is the space character (U+0020). - */ - padStart(targetLength: number, padString?: string): string; - - /** - * Pads the current string with a given string (repeated and/or truncated, if needed) so that the resulting string has a given length. - * The padding is applied from the end of the current string. - * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padEnd) - * - * @param targetLength The length of the resulting string once the current `str` has been padded. - * If the value is less than or equal to `str.length`, then `str` is returned as-is. - * - * @param padString The string to pad the current `str` with. - * If `padString` is too long to stay within `targetLength`, it will be truncated from the end. - * The default value is the space character (U+0020). - */ - padEnd(targetLength: number, padString?: string): string; - } + /** Returns a time as a string value appropriate to the host environment's current locale. */ + toLocaleTimeString(): string; - ///////////////////////////// - // lib.es2017.typedarrays.d.ts - ///////////////////////////// - interface Int8ArrayConstructor { - new (): Int8Array; - } + /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */ + valueOf(): number; - interface Uint8ArrayConstructor { - new (): Uint8Array; - } + /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */ + getTime(): number; - interface Uint8ClampedArrayConstructor { - new (): Uint8ClampedArray; - } + /** Gets the year, using local time. */ + getFullYear(): number; - interface Int16ArrayConstructor { - new (): Int16Array; - } + /** Gets the year using Universal Coordinated Time (UTC). */ + getUTCFullYear(): number; - interface Uint16ArrayConstructor { - new (): Uint16Array; - } + /** Gets the month, using local time. */ + getMonth(): number; - interface Int32ArrayConstructor { - new (): Int32Array; - } + /** Gets the month of a Date object using Universal Coordinated Time (UTC). */ + getUTCMonth(): number; - interface Uint32ArrayConstructor { - new (): Uint32Array; - } + /** Gets the day-of-the-month, using local time. */ + getDate(): number; - interface Float32ArrayConstructor { - new (): Float32Array; - } + /** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */ + getUTCDate(): number; - interface Float64ArrayConstructor { - new (): Float64Array; - } + /** Gets the day of the week, using local time. */ + getDay(): number; - ///////////////////////////// - // lib.es2018.asyncgenerator.d.ts - ///////////////////////////// - interface AsyncGenerator extends AsyncIteratorObject { - // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. - next(...[value]: [] | [TNext]): Promise>; + /** Gets the day of the week using Universal Coordinated Time (UTC). */ + getUTCDay(): number; - return(value: TReturn | PromiseLike): Promise>; + /** Gets the hours in a date, using local time. */ + getHours(): number; - throw(e: any): Promise>; + /** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */ + getUTCHours(): number; - [Symbol.asyncIterator](): AsyncGenerator; - } + /** Gets the minutes of a Date object, using local time. */ + getMinutes(): number; - interface AsyncGeneratorFunction { - /** - * Creates a new AsyncGenerator object. - * @param args A list of arguments the function accepts. - */ - new (...args: any[]): AsyncGenerator; - - /** - * Creates a new AsyncGenerator object. - * @param args A list of arguments the function accepts. - */ - (...args: any[]): AsyncGenerator; - - /** - * The length of the arguments. - */ - readonly length: number; - - /** - * Returns the name of the function. - */ - readonly name: string; - - /** - * A reference to the prototype. - */ - readonly prototype: AsyncGenerator; - } + /** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */ + getUTCMinutes(): number; - ///////////////////////////// - // lib.es2018.asynciterable.d.ts - ///////////////////////////// - interface SymbolConstructor { - /** - * A method that returns the default async iterator for an object. Called by the semantics of - * the for-await-of statement. - */ - readonly asyncIterator: unique symbol; - } + /** Gets the seconds of a Date object, using local time. */ + getSeconds(): number; - interface AsyncIterator { - // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. - next(...[value]: [] | [TNext]): Promise>; + /** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */ + getUTCSeconds(): number; - return?(value?: TReturn | PromiseLike): Promise>; + /** Gets the milliseconds of a Date, using local time. */ + getMilliseconds(): number; - throw?(e?: any): Promise>; - } + /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */ + getUTCMilliseconds(): number; - interface AsyncIterable { - [Symbol.asyncIterator](): AsyncIterator; - } + /** Gets the difference in minutes between Universal Coordinated Time (UTC) and the time on the local computer. */ + getTimezoneOffset(): number; /** - * Describes a user-defined {@link AsyncIterator} that is also async iterable. + * Sets the date and time value in the Date object. + * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT. */ - interface AsyncIterableIterator extends AsyncIterator { - [Symbol.asyncIterator](): AsyncIterableIterator; - } + setTime(time: number): number; /** - * Describes an {@link AsyncIterator} produced by the runtime that inherits from the intrinsic `AsyncIterator.prototype`. + * Sets the milliseconds value in the Date object using local time. + * @param ms A numeric value equal to the millisecond value. */ - interface AsyncIteratorObject extends AsyncIterator { - [Symbol.asyncIterator](): AsyncIteratorObject; - } - - ///////////////////////////// - // lib.es2018.intl.d.ts - ///////////////////////////// - namespace Intl { - // http://cldr.unicode.org/index/cldr-spec/plural-rules#TOC-Determining-Plural-Categories - type LDMLPluralRule = "zero" | "one" | "two" | "few" | "many" | "other"; - - type PluralRuleType = "cardinal" | "ordinal"; + setMilliseconds(ms: number): number; - interface PluralRulesOptions { - localeMatcher?: "lookup" | "best fit" | undefined; - - type?: PluralRuleType | undefined; - - minimumIntegerDigits?: number | undefined; - - minimumFractionDigits?: number | undefined; - - maximumFractionDigits?: number | undefined; + /** + * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC). + * @param ms A numeric value equal to the millisecond value. + */ + setUTCMilliseconds(ms: number): number; - minimumSignificantDigits?: number | undefined; + /** + * Sets the seconds value in the Date object using local time. + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setSeconds(sec: number, ms?: number): number; - maximumSignificantDigits?: number | undefined; - } + /** + * Sets the seconds value in the Date object using Universal Coordinated Time (UTC). + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setUTCSeconds(sec: number, ms?: number): number; - interface ResolvedPluralRulesOptions { - locale: string; + /** + * Sets the minutes value in the Date object using local time. + * @param min A numeric value equal to the minutes value. + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setMinutes(min: number, sec?: number, ms?: number): number; - pluralCategories: LDMLPluralRule[]; + /** + * Sets the minutes value in the Date object using Universal Coordinated Time (UTC). + * @param min A numeric value equal to the minutes value. + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setUTCMinutes(min: number, sec?: number, ms?: number): number; - type: PluralRuleType; + /** + * Sets the hour value in the Date object using local time. + * @param hours A numeric value equal to the hours value. + * @param min A numeric value equal to the minutes value. + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setHours(hours: number, min?: number, sec?: number, ms?: number): number; - minimumIntegerDigits: number; + /** + * Sets the hours value in the Date object using Universal Coordinated Time (UTC). + * @param hours A numeric value equal to the hours value. + * @param min A numeric value equal to the minutes value. + * @param sec A numeric value equal to the seconds value. + * @param ms A numeric value equal to the milliseconds value. + */ + setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number; - minimumFractionDigits: number; + /** + * Sets the numeric day-of-the-month value of the Date object using local time. + * @param date A numeric value equal to the day of the month. + */ + setDate(date: number): number; - maximumFractionDigits: number; + /** + * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC). + * @param date A numeric value equal to the day of the month. + */ + setUTCDate(date: number): number; - minimumSignificantDigits?: number; + /** + * Sets the month value in the Date object using local time. + * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. + * @param date A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used. + */ + setMonth(month: number, date?: number): number; - maximumSignificantDigits?: number; - } + /** + * Sets the month value in the Date object using Universal Coordinated Time (UTC). + * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. + * @param date A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used. + */ + setUTCMonth(month: number, date?: number): number; - interface PluralRules { - resolvedOptions(): ResolvedPluralRulesOptions; + /** + * Sets the year of the Date object using local time. + * @param year A numeric value for the year. + * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified. + * @param date A numeric value equal for the day of the month. + */ + setFullYear(year: number, month?: number, date?: number): number; - select(n: number): LDMLPluralRule; - } + /** + * Sets the year value in the Date object using Universal Coordinated Time (UTC). + * @param year A numeric value equal to the year. + * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied. + * @param date A numeric value equal to the day of the month. + */ + setUTCFullYear(year: number, month?: number, date?: number): number; - interface PluralRulesConstructor { - new (locales?: string | readonly string[], options?: PluralRulesOptions): PluralRules; + /** Returns a date converted to a string using Universal Coordinated Time (UTC). */ + toUTCString(): string; - (locales?: string | readonly string[], options?: PluralRulesOptions): PluralRules; + /** Returns a date as a string value in ISO format. */ + toISOString(): string; - supportedLocalesOf(locales: string | readonly string[], options?: { localeMatcher?: "lookup" | "best fit"; }): string[]; - } + /** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */ + toJSON(key?: any): string; +} - const PluralRules: PluralRulesConstructor; +interface DateConstructor { + new (): Date; - interface NumberFormatPartTypeRegistry { - literal: never; + new (value: number | string): Date; - nan: never; + /** + * Creates a new Date. + * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. + * @param monthIndex The month as a number between 0 and 11 (January to December). + * @param date The date as a number between 1 and 31. + * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. + * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. + * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. + * @param ms A number from 0 to 999 that specifies the milliseconds. + */ + new (year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; - infinity: never; + (): string; - percent: never; + readonly prototype: Date; - integer: never; + /** + * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970. + * @param s A date string + */ + parse(s: string): number; - group: never; + /** + * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. + * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. + * @param monthIndex The month as a number between 0 and 11 (January to December). + * @param date The date as a number between 1 and 31. + * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. + * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. + * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. + * @param ms A number from 0 to 999 that specifies the milliseconds. + */ + UTC(year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; - decimal: never; + /** Returns the number of milliseconds elapsed since midnight, January 1, 1970 Universal Coordinated Time (UTC). */ + now(): number; +} - fraction: never; +var Date: DateConstructor; - plusSign: never; +interface RegExpMatchArray extends Array { + /** + * The index of the search at which the result was found. + */ + index?: number; - minusSign: never; + /** + * A copy of the search string. + */ + input?: string; - percentSign: never; + /** + * The first match. This will always be present because `null` will be returned if there are no matches. + */ + 0: string; +} - currency: never; - } +interface RegExpExecArray extends Array { + /** + * The index of the search at which the result was found. + */ + index: number; - type NumberFormatPartTypes = keyof NumberFormatPartTypeRegistry; + /** + * A copy of the search string. + */ + input: string; - interface NumberFormatPart { - type: NumberFormatPartTypes; + /** + * The first match. This will always be present because `null` will be returned if there are no matches. + */ + 0: string; +} - value: string; - } - } +interface RegExp { + /** + * Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search. + * @param string The String object or string literal on which to perform the search. + */ + exec(string: string): RegExpExecArray | null; - ///////////////////////////// - // lib.es2018.promise.d.ts - ///////////////////////////// /** - * Represents the completion of an asynchronous operation + * Returns a Boolean value that indicates whether or not a pattern exists in a searched string. + * @param string String on which to perform the search. */ - interface Promise { - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): Promise; - } + test(string: string): boolean; - ///////////////////////////// - // lib.es2018.regexp.d.ts - ///////////////////////////// - interface RegExp { - /** - * Returns a Boolean value indicating the state of the dotAll flag (s) used with a regular expression. - * Default is false. Read-only. - */ - readonly dotAll: boolean; - } + /** Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. */ + readonly source: string; - ///////////////////////////// - // lib.es2019.array.d.ts - ///////////////////////////// - type FlatArray = { - done: Arr; - recur: Arr extends ReadonlyArray ? FlatArray - : Arr; - }[Depth extends -1 ? "done" : "recur"]; - - interface ReadonlyArray { - /** - * Calls a defined callback function on each element of an array. Then, flattens the result into - * a new array. - * This is identical to a map followed by flat with depth 1. - * - * @param callback A function that accepts up to three arguments. The flatMap method calls the - * callback function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callback function. If - * thisArg is omitted, undefined is used as the this value. - */ - flatMap( - callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray, - thisArg?: This, - ): U[]; - - /** - * Returns a new array with all sub-array elements concatenated into it recursively up to the - * specified depth. - * - * @param depth The maximum recursion depth - */ - flat( - this: A, - depth?: D, - ): FlatArray[]; - } + /** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */ + readonly global: boolean; - interface Array { - /** - * Calls a defined callback function on each element of an array. Then, flattens the result into - * a new array. - * This is identical to a map followed by flat with depth 1. - * - * @param callback A function that accepts up to three arguments. The flatMap method calls the - * callback function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callback function. If - * thisArg is omitted, undefined is used as the this value. - */ - flatMap( - callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray, - thisArg?: This, - ): U[]; - - /** - * Returns a new array with all sub-array elements concatenated into it recursively up to the - * specified depth. - * - * @param depth The maximum recursion depth - */ - flat( - this: A, - depth?: D, - ): FlatArray[]; - } + /** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */ + readonly ignoreCase: boolean; - ///////////////////////////// - // lib.es2019.object.d.ts - ///////////////////////////// - interface ObjectConstructor { - /** - * Returns an object created by key-value entries for properties and methods - * @param entries An iterable object that contains key-value entries for properties and methods. - */ - fromEntries(entries: Iterable): { [k: string]: T; }; - - /** - * Returns an object created by key-value entries for properties and methods - * @param entries An iterable object that contains key-value entries for properties and methods. - */ - fromEntries(entries: Iterable): any; - } + /** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */ + readonly multiline: boolean; - ///////////////////////////// - // lib.es2019.string.d.ts - ///////////////////////////// - interface String { - /** Removes the trailing white space and line terminator characters from a string. */ - trimEnd(): string; + lastIndex: number; +} - /** Removes the leading white space and line terminator characters from a string. */ - trimStart(): string; - } +interface RegExpConstructor { + new (pattern: RegExp | string): RegExp; - ///////////////////////////// - // lib.es2019.symbol.d.ts - ///////////////////////////// - interface Symbol { - /** - * Expose the [[Description]] internal slot of a symbol directly. - */ - readonly description: string | undefined; - } + new (pattern: string, flags?: string): RegExp; - ///////////////////////////// - // lib.es2020.bigint.d.ts - ///////////////////////////// - interface BigIntToLocaleStringOptions { - /** - * The locale matching algorithm to use.The default is "best fit". For information about this option, see the {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation Intl page}. - */ - localeMatcher?: string; - - /** - * The formatting style to use , the default is "decimal". - */ - style?: string; - - numberingSystem?: string; - - /** - * The unit to use in unit formatting, Possible values are core unit identifiers, defined in UTS #35, Part 2, Section 6. A subset of units from the full list was selected for use in ECMAScript. Pairs of simple units can be concatenated with "-per-" to make a compound unit. There is no default value; if the style is "unit", the unit property must be provided. - */ - unit?: string; - - /** - * The unit formatting style to use in unit formatting, the defaults is "short". - */ - unitDisplay?: string; - - /** - * The currency to use in currency formatting. Possible values are the ISO 4217 currency codes, such as "USD" for the US dollar, "EUR" for the euro, or "CNY" for the Chinese RMB — see the Current currency & funds code list. There is no default value; if the style is "currency", the currency property must be provided. It is only used when [[Style]] has the value "currency". - */ - currency?: string; - - /** - * How to display the currency in currency formatting. It is only used when [[Style]] has the value "currency". The default is "symbol". - * - * "symbol" to use a localized currency symbol such as €, - * - * "code" to use the ISO currency code, - * - * "name" to use a localized currency name such as "dollar" - */ - currencyDisplay?: string; - - /** - * Whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators. The default is true. - */ - useGrouping?: boolean; - - /** - * The minimum number of integer digits to use. Possible values are from 1 to 21; the default is 1. - */ - minimumIntegerDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; - - /** - * The minimum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number and percent formatting is 0; the default for currency formatting is the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html ISO 4217 currency codes list} (2 if the list doesn't provide that information). - */ - minimumFractionDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20; - - /** - * The maximum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number formatting is the larger of minimumFractionDigits and 3; the default for currency formatting is the larger of minimumFractionDigits and the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html ISO 4217 currency codes list} (2 if the list doesn't provide that information); the default for percent formatting is the larger of minimumFractionDigits and 0. - */ - maximumFractionDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20; - - /** - * The minimum number of significant digits to use. Possible values are from 1 to 21; the default is 1. - */ - minimumSignificantDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; - - /** - * The maximum number of significant digits to use. Possible values are from 1 to 21; the default is 21. - */ - maximumSignificantDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; - - /** - * The formatting that should be displayed for the number, the defaults is "standard" - * - * "standard" plain number formatting - * - * "scientific" return the order-of-magnitude for formatted number. - * - * "engineering" return the exponent of ten when divisible by three - * - * "compact" string representing exponent, defaults is using the "short" form - */ - notation?: string; - - /** - * used only when notation is "compact" - */ - compactDisplay?: string; - } + (pattern: RegExp | string): RegExp; - interface BigInt { - /** - * Returns a string representation of an object. - * @param radix Specifies a radix for converting numeric values to strings. - */ - toString(radix?: number): string; + (pattern: string, flags?: string): RegExp; - /** Returns a string representation appropriate to the host environment's current locale. */ - toLocaleString(locales?: Intl.LocalesArgument, options?: BigIntToLocaleStringOptions): string; + readonly "prototype": RegExp; +} - /** Returns the primitive value of the specified object. */ - valueOf(): bigint; +var RegExp: RegExpConstructor; - readonly [Symbol.toStringTag]: "BigInt"; - } +interface Error { + name: string; - interface BigIntConstructor { - (value: bigint | boolean | number | string): bigint; - - readonly prototype: BigInt; - - /** - * Interprets the low bits of a BigInt as a 2's-complement signed integer. - * All higher bits are discarded. - * @param bits The number of low bits to use - * @param int The BigInt whose bits to extract - */ - asIntN(bits: number, int: bigint): bigint; - - /** - * Interprets the low bits of a BigInt as an unsigned integer. - * All higher bits are discarded. - * @param bits The number of low bits to use - * @param int The BigInt whose bits to extract - */ - asUintN(bits: number, int: bigint): bigint; - } + message: string; - var BigInt: BigIntConstructor; - - /** - * A typed array of 64-bit signed integer values. The contents are initialized to 0. If the - * requested number of bytes could not be allocated, an exception is raised. - */ - interface BigInt64Array { - /** The size in bytes of each element in the array. */ - readonly BYTES_PER_ELEMENT: number; - - /** The ArrayBuffer instance referenced by the array. */ - readonly buffer: TArrayBuffer; - - /** The length in bytes of the array. */ - readonly byteLength: number; - - /** The offset in bytes of the array. */ - readonly byteOffset: number; - - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; - - /** Yields index, value pairs for every entry in the array. */ - entries(): ArrayIterator<[number, bigint]>; - - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns false, - * or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean; - - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: bigint, start?: number, end?: number): this; - - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: bigint, index: number, array: BigInt64Array) => any, thisArg?: any): BigInt64Array; - - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): bigint | undefined; - - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): number; - - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: bigint, index: number, array: BigInt64Array) => void, thisArg?: any): void; - - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: bigint, fromIndex?: number): boolean; - - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: bigint, fromIndex?: number): number; - - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; - - /** Yields each index in the array. */ - keys(): ArrayIterator; - - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: bigint, fromIndex?: number): number; - - /** The length of the array. */ - readonly length: number; - - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: bigint, index: number, array: BigInt64Array) => bigint, thisArg?: any): BigInt64Array; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U; - - /** Reverses the elements in the array. */ - reverse(): this; - - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; - - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. - */ - slice(start?: number, end?: number): BigInt64Array; - - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls the - * predicate function for each element in the array until the predicate returns true, or until - * the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean; - - /** - * Sorts the array. - * @param compareFn The function used to determine the order of the elements. If omitted, the elements are sorted in ascending order. - */ - sort(compareFn?: (a: bigint, b: bigint) => number | bigint): this; - - /** - * Gets a new BigInt64Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): BigInt64Array; - - /** Converts the array to a string by using the current locale. */ - toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; - - /** Returns a string representation of the array. */ - toString(): string; - - /** Returns the primitive value of the specified object. */ - valueOf(): BigInt64Array; - - /** Yields each value in the array. */ - values(): ArrayIterator; - - [Symbol.iterator](): ArrayIterator; - - readonly [Symbol.toStringTag]: "BigInt64Array"; - - [index: number]: bigint; - } + stack?: string; +} - interface BigInt64ArrayConstructor { - readonly prototype: BigInt64Array; +interface ErrorConstructor { + new (message?: string): Error; - new (length?: number): BigInt64Array; + (message?: string): Error; - new (array: ArrayLike | Iterable): BigInt64Array; + readonly prototype: Error; +} - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): BigInt64Array; +var Error: ErrorConstructor; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): BigInt64Array; +interface EvalError extends Error { +} - new (array: ArrayLike | ArrayBuffer): BigInt64Array; +interface EvalErrorConstructor extends ErrorConstructor { + new (message?: string): EvalError; - /** The size in bytes of each element in the array. */ - readonly BYTES_PER_ELEMENT: number; + (message?: string): EvalError; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: bigint[]): BigInt64Array; + readonly prototype: EvalError; +} - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): BigInt64Array; +var EvalError: EvalErrorConstructor; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigInt64Array; +interface RangeError extends Error { +} - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): BigInt64Array; +interface RangeErrorConstructor extends ErrorConstructor { + new (message?: string): RangeError; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => bigint, thisArg?: any): BigInt64Array; - } + (message?: string): RangeError; - var BigInt64Array: BigInt64ArrayConstructor; - - /** - * A typed array of 64-bit unsigned integer values. The contents are initialized to 0. If the - * requested number of bytes could not be allocated, an exception is raised. - */ - interface BigUint64Array { - /** The size in bytes of each element in the array. */ - readonly BYTES_PER_ELEMENT: number; - - /** The ArrayBuffer instance referenced by the array. */ - readonly buffer: TArrayBuffer; - - /** The length in bytes of the array. */ - readonly byteLength: number; - - /** The offset in bytes of the array. */ - readonly byteOffset: number; - - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; - - /** Yields index, value pairs for every entry in the array. */ - entries(): ArrayIterator<[number, bigint]>; - - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns false, - * or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean; - - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: bigint, start?: number, end?: number): this; - - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: bigint, index: number, array: BigUint64Array) => any, thisArg?: any): BigUint64Array; - - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): bigint | undefined; - - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): number; - - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: bigint, index: number, array: BigUint64Array) => void, thisArg?: any): void; - - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: bigint, fromIndex?: number): boolean; - - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: bigint, fromIndex?: number): number; - - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; - - /** Yields each index in the array. */ - keys(): ArrayIterator; - - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: bigint, fromIndex?: number): number; - - /** The length of the array. */ - readonly length: number; - - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: bigint, index: number, array: BigUint64Array) => bigint, thisArg?: any): BigUint64Array; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U; - - /** Reverses the elements in the array. */ - reverse(): this; - - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; - - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. - */ - slice(start?: number, end?: number): BigUint64Array; - - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls the - * predicate function for each element in the array until the predicate returns true, or until - * the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean; - - /** - * Sorts the array. - * @param compareFn The function used to determine the order of the elements. If omitted, the elements are sorted in ascending order. - */ - sort(compareFn?: (a: bigint, b: bigint) => number | bigint): this; - - /** - * Gets a new BigUint64Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): BigUint64Array; - - /** Converts the array to a string by using the current locale. */ - toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; - - /** Returns a string representation of the array. */ - toString(): string; - - /** Returns the primitive value of the specified object. */ - valueOf(): BigUint64Array; - - /** Yields each value in the array. */ - values(): ArrayIterator; - - [Symbol.iterator](): ArrayIterator; - - readonly [Symbol.toStringTag]: "BigUint64Array"; - - [index: number]: bigint; - } + readonly prototype: RangeError; +} - interface BigUint64ArrayConstructor { - readonly prototype: BigUint64Array; +var RangeError: RangeErrorConstructor; - new (length?: number): BigUint64Array; +interface ReferenceError extends Error { +} - new (array: ArrayLike | Iterable): BigUint64Array; +interface ReferenceErrorConstructor extends ErrorConstructor { + new (message?: string): ReferenceError; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): BigUint64Array; + (message?: string): ReferenceError; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): BigUint64Array; + readonly prototype: ReferenceError; +} - new (array: ArrayLike | ArrayBuffer): BigUint64Array; +var ReferenceError: ReferenceErrorConstructor; - /** The size in bytes of each element in the array. */ - readonly BYTES_PER_ELEMENT: number; +interface SyntaxError extends Error { +} - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: bigint[]): BigUint64Array; +interface SyntaxErrorConstructor extends ErrorConstructor { + new (message?: string): SyntaxError; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): BigUint64Array; + (message?: string): SyntaxError; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigUint64Array; + readonly prototype: SyntaxError; +} - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): BigUint64Array; +var SyntaxError: SyntaxErrorConstructor; - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => bigint, thisArg?: any): BigUint64Array; - } +interface TypeError extends Error { +} - var BigUint64Array: BigUint64ArrayConstructor; - - interface DataView { - /** - * Gets the BigInt64 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getBigInt64(byteOffset: number, littleEndian?: boolean): bigint; - - /** - * Gets the BigUint64 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getBigUint64(byteOffset: number, littleEndian?: boolean): bigint; - - /** - * Stores a BigInt64 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setBigInt64(byteOffset: number, value: bigint, littleEndian?: boolean): void; - - /** - * Stores a BigUint64 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setBigUint64(byteOffset: number, value: bigint, littleEndian?: boolean): void; - } +interface TypeErrorConstructor extends ErrorConstructor { + new (message?: string): TypeError; - ///////////////////////////// - // lib.es2020.date.d.ts - ///////////////////////////// - interface Date { - /** - * Converts a date and time to a string by using the current or specified locale. - * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; - - /** - * Converts a date to a string by using the current or specified locale. - * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleDateString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; - - /** - * Converts a time to a string by using the current or specified locale. - * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleTimeString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; - } + (message?: string): TypeError; - ///////////////////////////// - // lib.es2020.intl.d.ts - ///////////////////////////// - namespace Intl { - /** - * A string that is a valid [Unicode BCP 47 Locale Identifier](https://unicode.org/reports/tr35/#Unicode_locale_identifier). - * - * For example: "fa", "es-MX", "zh-Hant-TW". - * - * See [MDN - Intl - locales argument](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). - */ - type UnicodeBCP47LocaleIdentifier = string; + readonly prototype: TypeError; +} - /** - * Unit to use in the relative time internationalized message. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format#Parameters). - */ - type RelativeTimeFormatUnit = - | "year" - | "years" - | "quarter" - | "quarters" - | "month" - | "months" - | "week" - | "weeks" - | "day" - | "days" - | "hour" - | "hours" - | "minute" - | "minutes" - | "second" - | "seconds"; +var TypeError: TypeErrorConstructor; - /** - * Value of the `unit` property in objects returned by - * `Intl.RelativeTimeFormat.prototype.formatToParts()`. `formatToParts` and - * `format` methods accept either singular or plural unit names as input, - * but `formatToParts` only outputs singular (e.g. "day") not plural (e.g. - * "days"). - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts). - */ - type RelativeTimeFormatUnitSingular = - | "year" - | "quarter" - | "month" - | "week" - | "day" - | "hour" - | "minute" - | "second"; +interface URIError extends Error { +} - /** - * The locale matching algorithm to use. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). - */ - type RelativeTimeFormatLocaleMatcher = "lookup" | "best fit"; +interface URIErrorConstructor extends ErrorConstructor { + new (message?: string): URIError; - /** - * The format of output message. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). - */ - type RelativeTimeFormatNumeric = "always" | "auto"; + (message?: string): URIError; - /** - * The length of the internationalized message. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). - */ - type RelativeTimeFormatStyle = "long" | "short" | "narrow"; + readonly prototype: URIError; +} - /** - * The locale or locales to use - * - * See [MDN - Intl - locales argument](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). - */ - type LocalesArgument = UnicodeBCP47LocaleIdentifier | Locale | readonly (UnicodeBCP47LocaleIdentifier | Locale)[] | undefined; +var URIError: URIErrorConstructor; - /** - * An object with some or all of properties of `options` parameter - * of `Intl.RelativeTimeFormat` constructor. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). - */ - interface RelativeTimeFormatOptions { - /** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */ - localeMatcher?: RelativeTimeFormatLocaleMatcher; - - /** The format of output message. */ - numeric?: RelativeTimeFormatNumeric; - } +interface JSON { + /** + * Converts a JavaScript Object Notation (JSON) string into an object. + * @param text A valid JSON string. + * @param reviver A function that transforms the results. This function is called for each member of the object. + * If a member contains nested objects, the nested objects are transformed before the parent object is. + * @throws {SyntaxError} If `text` is not valid JSON. + */ + parse(text: string, reviver?: (this: any, key: string, value: any) => any): any; - /** - * An object with properties reflecting the locale - * and formatting options computed during initialization - * of the `Intl.RelativeTimeFormat` object - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions#Description). - */ - interface ResolvedRelativeTimeFormatOptions { - numeric: RelativeTimeFormatNumeric; - - numberingSystem: string; - } + /** + * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. + * @param value A JavaScript value, usually an object or array, to be converted. + * @param replacer A function that transforms the results. + * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. + * @throws {TypeError} If a circular reference or a BigInt value is found. + */ + stringify(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string; - /** - * An object representing the relative time format in parts - * that can be used for custom locale-aware formatting. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts). - */ - type RelativeTimeFormatPart = - | { - type: "literal"; - value: string; - } - | { - type: Exclude; - value: string; - unit: RelativeTimeFormatUnitSingular; - }; - - interface RelativeTimeFormat { - /** - * Formats a value and a unit according to the locale - * and formatting options of the given - * [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) - * object. - * - * While this method automatically provides the correct plural forms, - * the grammatical form is otherwise as neutral as possible. - * - * It is the caller's responsibility to handle cut-off logic - * such as deciding between displaying "in 7 days" or "in 1 week". - * This API does not support relative dates involving compound units. - * e.g "in 5 days and 4 hours". - * - * @param value - Numeric value to use in the internationalized relative time message - * - * @param unit - [Unit](https://tc39.es/ecma402/#sec-singularrelativetimeunit) to use in the relative time internationalized message. - * - * @throws `RangeError` if `unit` was given something other than `unit` possible values - * - * @returns {string} Internationalized relative time message as string - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format). - */ - format(value: number, unit: RelativeTimeFormatUnit): string; - - /** - * Returns an array of objects representing the relative time format in parts that can be used for custom locale-aware formatting. - * - * @param value - Numeric value to use in the internationalized relative time message - * - * @param unit - [Unit](https://tc39.es/ecma402/#sec-singularrelativetimeunit) to use in the relative time internationalized message. - * - * @throws `RangeError` if `unit` was given something other than `unit` possible values - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts). - */ - formatToParts(value: number, unit: RelativeTimeFormatUnit): RelativeTimeFormatPart[]; - - /** - * Provides access to the locale and options computed during initialization of this `Intl.RelativeTimeFormat` object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions). - */ - resolvedOptions(): ResolvedRelativeTimeFormatOptions; - } + /** + * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. + * @param value A JavaScript value, usually an object or array, to be converted. + * @param replacer An array of strings and numbers that acts as an approved list for selecting the object properties that will be stringified. + * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. + * @throws {TypeError} If a circular reference or a BigInt value is found. + */ + stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string; +} - /** - * The [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) - * object is a constructor for objects that enable language-sensitive relative time formatting. - * - * [Compatibility](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat#Browser_compatibility). - */ - const RelativeTimeFormat: { - /** - * Creates [Intl.RelativeTimeFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) objects - * - * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. - * For the general form and interpretation of the locales argument, - * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). - * - * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters) - * with some or all of options of `RelativeTimeFormatOptions`. - * - * @returns [Intl.RelativeTimeFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat). - */ - new ( - locales?: LocalesArgument, - options?: RelativeTimeFormatOptions, - ): RelativeTimeFormat; - - /** - * Returns an array containing those of the provided locales - * that are supported in date and time formatting - * without having to fall back to the runtime's default locale. - * - * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. - * For the general form and interpretation of the locales argument, - * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). - * - * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters) - * with some or all of options of the formatting. - * - * @returns An array containing those of the provided locales - * that are supported in date and time formatting - * without having to fall back to the runtime's default locale. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/supportedLocalesOf). - */ - supportedLocalesOf( - locales?: LocalesArgument, - options?: RelativeTimeFormatOptions, - ): UnicodeBCP47LocaleIdentifier[]; - }; +/** + * An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format. + */ +var JSON: JSON; - interface NumberFormatOptionsSignDisplayRegistry { - auto: never; +///////////////////////////// +/// ECMAScript Array API (specially handled by compiler) +///////////////////////////// - never: never; +interface ReadonlyArray { + /** + * Gets the length of the array. This is a number one higher than the highest element defined in an array. + */ + readonly length: number; - always: never; + /** + * Returns a string representation of an array. + */ + toString(): string; - exceptZero: never; - } + /** + * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods. + */ + toLocaleString(): string; - type NumberFormatOptionsSignDisplay = keyof NumberFormatOptionsSignDisplayRegistry; + /** + * Combines two or more arrays. + * @param items Additional items to add to the end of array1. + */ + concat(...items: ConcatArray[]): T[]; - interface NumberFormatOptions { - numberingSystem?: string | undefined; + /** + * Combines two or more arrays. + * @param items Additional items to add to the end of array1. + */ + concat(...items: (T | ConcatArray)[]): T[]; - compactDisplay?: "short" | "long" | undefined; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - notation?: "standard" | "scientific" | "engineering" | "compact" | undefined; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): T[]; - signDisplay?: NumberFormatOptionsSignDisplay | undefined; + /** + * Returns the index of the first occurrence of a value in an array. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. + */ + indexOf(searchElement: T, fromIndex?: number): number; - unit?: string | undefined; + /** + * Returns the index of the last occurrence of a specified value in an array. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array. + */ + lastIndexOf(searchElement: T, fromIndex?: number): number; - unitDisplay?: "short" | "long" | "narrow" | undefined; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): this is readonly S[]; - currencySign?: "standard" | "accounting" | undefined; - } + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean; - interface ResolvedNumberFormatOptions { - compactDisplay?: "short" | "long"; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean; - notation: "standard" | "scientific" | "engineering" | "compact"; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: T, index: number, array: readonly T[]) => void, thisArg?: any): void; - signDisplay: NumberFormatOptionsSignDisplay; + /** + * Calls a defined callback function on each element of an array, and returns an array that contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: T, index: number, array: readonly T[]) => U, thisArg?: any): U[]; - unit?: string; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): S[]; - unitDisplay?: "short" | "long" | "narrow"; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): T[]; - currencySign?: "standard" | "accounting"; - } + /** + * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T; - interface DateTimeFormatOptions { - calendar?: string | undefined; + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T; - numberingSystem?: string | undefined; + /** + * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U; - hourCycle?: "h11" | "h12" | "h23" | "h24" | undefined; - } + /** + * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T; - type LocaleHourCycleKey = "h12" | "h23" | "h11" | "h24"; + reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T; - type LocaleCollationCaseFirst = "upper" | "lower" | "false"; + /** + * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U; - interface LocaleOptions { - /** The part of the Locale that indicates the locale's calendar era. */ - calendar?: string; + readonly [n: number]: T; +} - /** Flag that defines whether case is taken into account for the locale's collation rules. */ - caseFirst?: LocaleCollationCaseFirst; +interface ConcatArray { + readonly length: number; - /** The collation type used for sorting */ - collation?: string; + readonly [n: number]: T; - /** The time keeping format convention used by the locale. */ - hourCycle?: LocaleHourCycleKey; + join(separator?: string): string; - /** The numeral system used by the locale. */ - numberingSystem?: string; + slice(start?: number, end?: number): T[]; +} - /** Flag that defines whether the locale has special collation handling for numeric characters. */ - numeric?: boolean; +interface Array { + /** + * Gets or sets the length of the array. This is a number one higher than the highest index in the array. + */ + length: number; - /** The region of the world (usually a country) associated with the locale. Possible values are region codes as defined by ISO 3166-1. */ - region?: string; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** The script used for writing the particular language used in the locale. Possible values are script codes as defined by ISO 15924. */ - script?: string; - } + /** + * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods. + */ + toLocaleString(): string; - interface Locale extends LocaleOptions { - /** A string containing the language, and the script and region if available. */ - baseName: string; + /** + * Removes the last element from an array and returns it. + * If the array is empty, undefined is returned and the array is not modified. + */ + pop(): T | undefined; - /** The primary language subtag associated with the locale. */ - language: string; + /** + * Appends new elements to the end of an array, and returns the new length of the array. + * @param items New elements to add to the array. + */ + push(...items: T[]): number; - /** Gets the most likely values for the language, script, and region of the locale based on existing values. */ - maximize(): Locale; + /** + * Combines two or more arrays. + * This method returns a new array without modifying any existing arrays. + * @param items Additional arrays and/or items to add to the end of the array. + */ + concat(...items: ConcatArray[]): T[]; - /** Attempts to remove information about the locale that would be added by calling `Locale.maximize()`. */ - minimize(): Locale; + /** + * Combines two or more arrays. + * This method returns a new array without modifying any existing arrays. + * @param items Additional arrays and/or items to add to the end of the array. + */ + concat(...items: (T | ConcatArray)[]): T[]; - /** Returns the locale's full locale identifier string. */ - toString(): UnicodeBCP47LocaleIdentifier; - } + /** + * Adds all the elements of an array into a string, separated by the specified separator string. + * @param separator A string used to separate one element of the array from the next in the resulting string. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Constructor creates [Intl.Locale](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) - * objects - * - * @param tag - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646). - * For the general form and interpretation of the locales argument, - * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). - * - * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/Locale#Parameters) with some or all of options of the locale. - * - * @returns [Intl.Locale](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale). - */ - const Locale: { - new (tag: UnicodeBCP47LocaleIdentifier | Locale, options?: LocaleOptions): Locale; - }; + /** + * Reverses the elements in an array in place. + * This method mutates the array and returns a reference to the same array. + */ + reverse(): T[]; - type DisplayNamesFallback = - | "code" - | "none"; + /** + * Removes the first element from an array and returns it. + * If the array is empty, undefined is returned and the array is not modified. + */ + shift(): T | undefined; - type DisplayNamesType = - | "language" - | "region" - | "script" - | "calendar" - | "dateTimeField" - | "currency"; + /** + * Returns a copy of a section of an array. + * For both start and end, a negative index can be used to indicate an offset from the end of the array. + * For example, -2 refers to the second to last element of the array. + * @param start The beginning index of the specified portion of the array. + * If start is undefined, then the slice begins at index 0. + * @param end The end index of the specified portion of the array. This is exclusive of the element at the index 'end'. + * If end is undefined, then the slice extends to the end of the array. + */ + slice(start?: number, end?: number): T[]; - type DisplayNamesLanguageDisplay = - | "dialect" - | "standard"; + /** + * Sorts an array in place. + * This method mutates the array and returns a reference to the same array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: T, b: T) => number): this; - interface DisplayNamesOptions { - localeMatcher?: RelativeTimeFormatLocaleMatcher; + /** + * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. + * @param start The zero-based location in the array from which to start removing elements. + * @param deleteCount The number of elements to remove. Omitting this argument will remove all elements from the start + * paramater location to end of the array. If value of this argument is either a negative number, zero, undefined, or a type + * that cannot be converted to an integer, the function will evaluate the argument as zero and not remove any elements. + * @returns An array containing the elements that were deleted. + */ + splice(start: number, deleteCount?: number): T[]; - style?: RelativeTimeFormatStyle; + /** + * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. + * @param start The zero-based location in the array from which to start removing elements. + * @param deleteCount The number of elements to remove. If value of this argument is either a negative number, zero, + * undefined, or a type that cannot be converted to an integer, the function will evaluate the argument as zero and + * not remove any elements. + * @param items Elements to insert into the array in place of the deleted elements. + * @returns An array containing the elements that were deleted. + */ + splice(start: number, deleteCount: number, ...items: T[]): T[]; - type: DisplayNamesType; + /** + * Inserts new elements at the start of an array, and returns the new length of the array. + * @param items Elements to insert at the start of the array. + */ + unshift(...items: T[]): number; - languageDisplay?: DisplayNamesLanguageDisplay; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. + */ + indexOf(searchElement: T, fromIndex?: number): number; - fallback?: DisplayNamesFallback; - } + /** + * Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin searching backward. If fromIndex is omitted, the search starts at the last index in the array. + */ + lastIndexOf(searchElement: T, fromIndex?: number): number; - interface ResolvedDisplayNamesOptions { - locale: UnicodeBCP47LocaleIdentifier; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): this is S[]; - style: RelativeTimeFormatStyle; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; - type: DisplayNamesType; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; - fallback: DisplayNamesFallback; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void; - languageDisplay?: DisplayNamesLanguageDisplay; - } + /** + * Calls a defined callback function on each element of an array, and returns an array that contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[]; - interface DisplayNames { - /** - * Receives a code and returns a string based on the locale and options provided when instantiating - * [`Intl.DisplayNames()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) - * - * @param code The `code` to provide depends on the `type` passed to display name during creation: - * - If the type is `"region"`, code should be either an [ISO-3166 two letters region code](https://www.iso.org/iso-3166-country-codes.html), - * or a [three digits UN M49 Geographic Regions](https://unstats.un.org/unsd/methodology/m49/). - * - If the type is `"script"`, code should be an [ISO-15924 four letters script code](https://unicode.org/iso15924/iso15924-codes.html). - * - If the type is `"language"`, code should be a `languageCode` ["-" `scriptCode`] ["-" `regionCode` ] *("-" `variant` ) - * subsequence of the unicode_language_id grammar in [UTS 35's Unicode Language and Locale Identifiers grammar](https://unicode.org/reports/tr35/#Unicode_language_identifier). - * `languageCode` is either a two letters ISO 639-1 language code or a three letters ISO 639-2 language code. - * - If the type is `"currency"`, code should be a [3-letter ISO 4217 currency code](https://www.iso.org/iso-4217-currency-codes.html). - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/of). - */ - of(code: string): string | undefined; - - /** - * Returns a new object with properties reflecting the locale and style formatting options computed during the construction of the current - * [`Intl/DisplayNames`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/resolvedOptions). - */ - resolvedOptions(): ResolvedDisplayNamesOptions; - } + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; - /** - * The [`Intl.DisplayNames()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) - * object enables the consistent translation of language, region and script display names. - * - * [Compatibility](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames#browser_compatibility). - */ - const DisplayNames: { - prototype: DisplayNames; - - /** - * @param locales A string with a BCP 47 language tag, or an array of such strings. - * For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) - * page. - * - * @param options An object for setting up a display name. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/DisplayNames). - */ - new (locales: LocalesArgument, options: DisplayNamesOptions): DisplayNames; - - /** - * Returns an array containing those of the provided locales that are supported in display names without having to fall back to the runtime's default locale. - * - * @param locales A string with a BCP 47 language tag, or an array of such strings. - * For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) - * page. - * - * @param options An object with a locale matcher. - * - * @returns An array of strings representing a subset of the given locale tags that are supported in display names without having to fall back to the runtime's default locale. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/supportedLocalesOf). - */ - supportedLocalesOf(locales?: LocalesArgument, options?: { localeMatcher?: RelativeTimeFormatLocaleMatcher; }): UnicodeBCP47LocaleIdentifier[]; - }; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T[]; - interface CollatorConstructor { - new (locales?: LocalesArgument, options?: CollatorOptions): Collator; + /** + * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; - (locales?: LocalesArgument, options?: CollatorOptions): Collator; + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; - supportedLocalesOf(locales: LocalesArgument, options?: CollatorOptions): string[]; - } + /** + * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; - interface DateTimeFormatConstructor { - new (locales?: LocalesArgument, options?: DateTimeFormatOptions): DateTimeFormat; + /** + * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; - (locales?: LocalesArgument, options?: DateTimeFormatOptions): DateTimeFormat; + reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; - supportedLocalesOf(locales: LocalesArgument, options?: DateTimeFormatOptions): string[]; - } + /** + * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; - interface NumberFormatConstructor { - new (locales?: LocalesArgument, options?: NumberFormatOptions): NumberFormat; + [n: number]: T; +} - (locales?: LocalesArgument, options?: NumberFormatOptions): NumberFormat; +interface ArrayConstructor { + new (arrayLength?: number): any[]; - supportedLocalesOf(locales: LocalesArgument, options?: NumberFormatOptions): string[]; - } + new (arrayLength: number): T[]; - interface PluralRulesConstructor { - new (locales?: LocalesArgument, options?: PluralRulesOptions): PluralRules; + new (...items: T[]): T[]; - (locales?: LocalesArgument, options?: PluralRulesOptions): PluralRules; + (arrayLength?: number): any[]; - supportedLocalesOf(locales: LocalesArgument, options?: { localeMatcher?: "lookup" | "best fit"; }): string[]; - } - } + (arrayLength: number): T[]; - ///////////////////////////// - // lib.es2020.number.d.ts - ///////////////////////////// - interface Number { - /** - * Converts a number to a string by using the current or specified locale. - * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.NumberFormatOptions): string; - } + (...items: T[]): T[]; - ///////////////////////////// - // lib.es2020.promise.d.ts - ///////////////////////////// - interface PromiseFulfilledResult { - status: "fulfilled"; + isArray(arg: any): arg is any[]; - value: T; - } + readonly prototype: any[]; +} - interface PromiseRejectedResult { - status: "rejected"; +var Array: ArrayConstructor; - reason: any; - } +interface TypedPropertyDescriptor { + enumerable?: boolean; - type PromiseSettledResult = PromiseFulfilledResult | PromiseRejectedResult; - - interface PromiseConstructor { - /** - * Creates a Promise that is resolved with an array of results when all - * of the provided Promises resolve or reject. - * @param values An array of Promises. - * @returns A new Promise. - */ - allSettled(values: T): Promise<{ -readonly [P in keyof T]: PromiseSettledResult>; }>; - - /** - * Creates a Promise that is resolved with an array of results when all - * of the provided Promises resolve or reject. - * @param values An array of Promises. - * @returns A new Promise. - */ - allSettled(values: Iterable>): Promise>[]>; - } + configurable?: boolean; - ///////////////////////////// - // lib.es2020.sharedmemory.d.ts - ///////////////////////////// - interface Atomics { - /** - * Adds a value to the value at the given position in the array, returning the original value. - * Until this atomic operation completes, any other read or write operation against the array - * will block. - */ - add(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - - /** - * Stores the bitwise AND of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or - * write operation against the array will block. - */ - and(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - - /** - * Replaces the value at the given position in the array if the original value equals the given - * expected value, returning the original value. Until this atomic operation completes, any - * other read or write operation against the array will block. - */ - compareExchange(typedArray: BigInt64Array | BigUint64Array, index: number, expectedValue: bigint, replacementValue: bigint): bigint; - - /** - * Replaces the value at the given position in the array, returning the original value. Until - * this atomic operation completes, any other read or write operation against the array will - * block. - */ - exchange(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - - /** - * Returns the value at the given position in the array. Until this atomic operation completes, - * any other read or write operation against the array will block. - */ - load(typedArray: BigInt64Array | BigUint64Array, index: number): bigint; - - /** - * Stores the bitwise OR of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or write - * operation against the array will block. - */ - or(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - - /** - * Stores a value at the given position in the array, returning the new value. Until this - * atomic operation completes, any other read or write operation against the array will block. - */ - store(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - - /** - * Subtracts a value from the value at the given position in the array, returning the original - * value. Until this atomic operation completes, any other read or write operation against the - * array will block. - */ - sub(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - - /** - * If the value at the given position in the array is equal to the provided value, the current - * agent is put to sleep causing execution to suspend until the timeout expires (returning - * `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns - * `"not-equal"`. - */ - wait(typedArray: BigInt64Array, index: number, value: bigint, timeout?: number): "ok" | "not-equal" | "timed-out"; - - /** - * Wakes up sleeping agents that are waiting on the given index of the array, returning the - * number of agents that were awoken. - * @param typedArray A shared BigInt64Array. - * @param index The position in the typedArray to wake up on. - * @param count The number of sleeping agents to notify. Defaults to +Infinity. - */ - notify(typedArray: BigInt64Array, index: number, count?: number): number; - - /** - * Stores the bitwise XOR of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or write - * operation against the array will block. - */ - xor(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - } + writable?: boolean; - ///////////////////////////// - // lib.es2020.string.d.ts - ///////////////////////////// - interface String { - /** - * Matches a string with a regular expression, and returns an iterable of matches - * containing the results of that search. - * @param regexp A regular expression - */ - matchAll(regexp: RegExp): RegExpStringIterator; - - /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */ - toLocaleLowerCase(locales?: Intl.LocalesArgument): string; - - /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */ - toLocaleUpperCase(locales?: Intl.LocalesArgument): string; - - /** - * Determines whether two strings are equivalent in the current or specified locale. - * @param that String to compare to target string - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details. - * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details. - */ - localeCompare(that: string, locales?: Intl.LocalesArgument, options?: Intl.CollatorOptions): number; - } + value?: T; - ///////////////////////////// - // lib.es2020.symbol.wellknown.d.ts - ///////////////////////////// - interface SymbolConstructor { - /** - * A regular expression method that matches the regular expression against a string. Called - * by the String.prototype.matchAll method. - */ - readonly matchAll: unique symbol; - } + get?: () => T; - interface RegExpStringIterator extends IteratorObject { - [Symbol.iterator](): RegExpStringIterator; - } + set?: (value: T) => void; +} - interface RegExp { - /** - * Matches a string with this regular expression, and returns an iterable of matches - * containing the results of that search. - * @param string A string to search within. - */ - [Symbol.matchAll](str: string): RegExpStringIterator; - } +type PromiseConstructorLike = new (executor: (resolve: (value: T | PromiseLike) => void, reject: (reason?: any) => void) => void) => PromiseLike; - ///////////////////////////// - // lib.es2021.intl.d.ts - ///////////////////////////// - namespace Intl { - interface DateTimeFormatOptions { - dateStyle?: "full" | "long" | "medium" | "short" | undefined; +interface PromiseLike { + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): PromiseLike; +} - timeStyle?: "full" | "long" | "medium" | "short" | undefined; +/** + * Represents the completion of an asynchronous operation + */ +interface Promise { + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise; - dayPeriod?: "narrow" | "short" | "long" | undefined; + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise; +} - fractionalSecondDigits?: 1 | 2 | 3 | undefined; - } +/** + * Recursively unwraps the "awaited type" of a type. Non-promise "thenables" should resolve to `never`. This emulates the behavior of `await`. + */ +type Awaited = T extends null | undefined ? T : // special case for `null | undefined` when not in `--strictNullChecks` mode + T extends object & { then(onfulfilled: infer F, ...args: infer _): any; } ? // `await` only unwraps object types with a callable `then`. Non-object types are not unwrapped + F extends ((value: infer V, ...args: infer _) => any) ? // if the argument to `then` is callable, extracts the first argument + Awaited : // recursively unwrap the value + never : // the argument to `then` was not callable + T; - interface DateTimeRangeFormatPart extends DateTimeFormatPart { - source: "startRange" | "endRange" | "shared"; - } +// non-object or non-thenable - interface DateTimeFormat { - formatRange(startDate: Date | number | bigint, endDate: Date | number | bigint): string; +interface ArrayLike { + readonly length: number; - formatRangeToParts(startDate: Date | number | bigint, endDate: Date | number | bigint): DateTimeRangeFormatPart[]; - } + readonly [n: number]: T; +} - interface ResolvedDateTimeFormatOptions { - dateStyle?: "full" | "long" | "medium" | "short"; +/** + * Make all properties in T optional + */ +type Partial = { + [P in keyof T]?: T[P]; +}; + +/** + * Make all properties in T required + */ +type Required = { + [P in keyof T]-?: T[P]; +}; + +/** + * Make all properties in T readonly + */ +type Readonly = { + readonly [P in keyof T]: T[P]; +}; + +/** + * From T, pick a set of properties whose keys are in the union K + */ +type Pick = { + [P in K]: T[P]; +}; + +/** + * Construct a type with a set of properties K of type T + */ +type Record = { + [P in K]: T; +}; + +/** + * Exclude from T those types that are assignable to U + */ +type Exclude = T extends U ? never : T; + +/** + * Extract from T those types that are assignable to U + */ +type Extract = T extends U ? T : never; + +/** + * Construct a type with the properties of T except for those in type K. + */ +type Omit = Pick>; + +/** + * Exclude null and undefined from T + */ +type NonNullable = T & {}; + +/** + * Obtain the parameters of a function type in a tuple + */ +type Parameters any> = T extends (...args: infer P) => any ? P : never; + +/** + * Obtain the parameters of a constructor function type in a tuple + */ +type ConstructorParameters any> = T extends abstract new (...args: infer P) => any ? P : never; + +/** + * Obtain the return type of a function type + */ +type ReturnType any> = T extends (...args: any) => infer R ? R : any; + +/** + * Obtain the return type of a constructor function type + */ +type InstanceType any> = T extends abstract new (...args: any) => infer R ? R : any; + +/** + * Convert string literal type to uppercase + */ +type Uppercase = intrinsic; + +/** + * Convert string literal type to lowercase + */ +type Lowercase = intrinsic; + +/** + * Convert first character of string literal type to uppercase + */ +type Capitalize = intrinsic; + +/** + * Convert first character of string literal type to lowercase + */ +type Uncapitalize = intrinsic; + +/** + * Marker for non-inference type position + */ +type NoInfer = intrinsic; + +/** + * Marker for contextual 'this' type + */ +interface ThisType { +} - timeStyle?: "full" | "long" | "medium" | "short"; +/** + * Stores types to be used with WeakSet, WeakMap, WeakRef, and FinalizationRegistry + */ +interface WeakKeyTypes { +} - hourCycle?: "h11" | "h12" | "h23" | "h24"; +type WeakKey = WeakKeyTypes[keyof WeakKeyTypes]; - dayPeriod?: "narrow" | "short" | "long"; +/** + * Represents a raw buffer of binary data, which is used to store data for the + * different typed arrays. ArrayBuffers cannot be read from or written to directly, + * but can be passed to a typed array or DataView Object to interpret the raw + * buffer as needed. + */ +interface ArrayBuffer { + /** + * Read-only. The length of the ArrayBuffer (in bytes). + */ + readonly byteLength: number; - fractionalSecondDigits?: 1 | 2 | 3; - } + /** + * Returns a section of an ArrayBuffer. + */ + slice(begin?: number, end?: number): ArrayBuffer; +} - /** - * The locale matching algorithm to use. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). - */ - type ListFormatLocaleMatcher = "lookup" | "best fit"; +/** + * Allowed ArrayBuffer types for the buffer of an ArrayBufferView and related Typed Arrays. + */ +interface ArrayBufferTypes { + ArrayBuffer: ArrayBuffer; +} - /** - * The format of output message. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). - */ - type ListFormatType = "conjunction" | "disjunction" | "unit"; +type ArrayBufferLike = ArrayBufferTypes[keyof ArrayBufferTypes]; - /** - * The length of the formatted message. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). - */ - type ListFormatStyle = "long" | "short" | "narrow"; +interface ArrayBufferConstructor { + readonly prototype: ArrayBuffer; - /** - * An object with some or all properties of the `Intl.ListFormat` constructor `options` parameter. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). - */ - interface ListFormatOptions { - /** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */ - localeMatcher?: ListFormatLocaleMatcher | undefined; - - /** The format of output message. */ - type?: ListFormatType | undefined; - - /** The length of the internationalized message. */ - style?: ListFormatStyle | undefined; - } + new (byteLength: number): ArrayBuffer; - interface ResolvedListFormatOptions { - locale: string; + isView(arg: any): arg is ArrayBufferView; +} - style: ListFormatStyle; +var ArrayBuffer: ArrayBufferConstructor; - type: ListFormatType; - } +interface ArrayBufferView { + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - interface ListFormat { - /** - * Returns a string with a language-specific representation of the list. - * - * @param list - An iterable object, such as an [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array). - * - * @throws `TypeError` if `list` includes something other than the possible values. - * - * @returns {string} A language-specific formatted string representing the elements of the list. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/format). - */ - format(list: Iterable): string; - - /** - * Returns an Array of objects representing the different components that can be used to format a list of values in a locale-aware fashion. - * - * @param list - An iterable object, such as an [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array), to be formatted according to a locale. - * - * @throws `TypeError` if `list` includes something other than the possible values. - * - * @returns {{ type: "element" | "literal", value: string; }[]} An Array of components which contains the formatted parts from the list. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/formatToParts). - */ - formatToParts(list: Iterable): { type: "element" | "literal"; value: string; }[]; - - /** - * Returns a new object with properties reflecting the locale and style - * formatting options computed during the construction of the current - * `Intl.ListFormat` object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/resolvedOptions). - */ - resolvedOptions(): ResolvedListFormatOptions; - } + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - const ListFormat: { - prototype: ListFormat; - - /** - * Creates [Intl.ListFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat) objects that - * enable language-sensitive list formatting. - * - * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. - * For the general form and interpretation of the `locales` argument, - * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). - * - * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters) - * with some or all options of `ListFormatOptions`. - * - * @returns [Intl.ListFormatOptions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat) object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat). - */ - new (locales?: LocalesArgument, options?: ListFormatOptions): ListFormat; - - /** - * Returns an array containing those of the provided locales that are - * supported in list formatting without having to fall back to the runtime's default locale. - * - * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. - * For the general form and interpretation of the `locales` argument, - * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). - * - * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf#parameters). - * with some or all possible options. - * - * @returns An array of strings representing a subset of the given locale tags that are supported in list - * formatting without having to fall back to the runtime's default locale. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf). - */ - supportedLocalesOf(locales: LocalesArgument, options?: Pick): UnicodeBCP47LocaleIdentifier[]; - }; - } + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; +} - ///////////////////////////// - // lib.es2021.promise.d.ts - ///////////////////////////// - interface AggregateError extends Error { - errors: any[]; - } +interface DataView { + readonly buffer: TArrayBuffer; - interface AggregateErrorConstructor { - new (errors: Iterable, message?: string): AggregateError; + readonly byteLength: number; - (errors: Iterable, message?: string): AggregateError; + readonly byteOffset: number; - readonly prototype: AggregateError; - } + /** + * Gets the Float32 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getFloat32(byteOffset: number, littleEndian?: boolean): number; - var AggregateError: AggregateErrorConstructor; + /** + * Gets the Float64 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getFloat64(byteOffset: number, littleEndian?: boolean): number; /** - * Represents the completion of an asynchronous operation + * Gets the Int8 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. */ - interface PromiseConstructor { - /** - * The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm. - * @param values An array or iterable of Promises. - * @returns A new Promise. - */ - any(values: T): Promise>; + getInt8(byteOffset: number): number; - /** - * The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm. - * @param values An array or iterable of Promises. - * @returns A new Promise. - */ - any(values: Iterable>): Promise>; - } + /** + * Gets the Int16 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getInt16(byteOffset: number, littleEndian?: boolean): number; - ///////////////////////////// - // lib.es2021.string.d.ts - ///////////////////////////// - interface String { - /** - * Replace all instances of a substring in a string, using a regular expression or search string. - * @param searchValue A string to search for. - * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string. - */ - replaceAll(searchValue: string | RegExp, replaceValue: string): string; - - /** - * Replace all instances of a substring in a string, using a regular expression or search string. - * @param searchValue A string to search for. - * @param replacer A function that returns the replacement text. - */ - replaceAll(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; - } + /** + * Gets the Int32 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getInt32(byteOffset: number, littleEndian?: boolean): number; - ///////////////////////////// - // lib.es2021.weakref.d.ts - ///////////////////////////// - interface WeakRef { - readonly [Symbol.toStringTag]: "WeakRef"; - - /** - * Returns the WeakRef instance's target value, or undefined if the target value has been - * reclaimed. - * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. - */ - deref(): T | undefined; - } + /** + * Gets the Uint8 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + */ + getUint8(byteOffset: number): number; - interface WeakRefConstructor { - readonly prototype: WeakRef; + /** + * Gets the Uint16 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getUint16(byteOffset: number, littleEndian?: boolean): number; - /** - * Creates a WeakRef instance for the given target value. - * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. - * @param target The target value for the WeakRef instance. - */ - new (target: T): WeakRef; - } + /** + * Gets the Uint32 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getUint32(byteOffset: number, littleEndian?: boolean): number; - var WeakRef: WeakRefConstructor; - - interface FinalizationRegistry { - readonly [Symbol.toStringTag]: "FinalizationRegistry"; - - /** - * Registers a value with the registry. - * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. - * @param target The target value to register. - * @param heldValue The value to pass to the finalizer for this value. This cannot be the - * target value. - * @param unregisterToken The token to pass to the unregister method to unregister the target - * value. If not provided, the target cannot be unregistered. - */ - register(target: WeakKey, heldValue: T, unregisterToken?: WeakKey): void; - - /** - * Unregisters a value from the registry. - * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. - * @param unregisterToken The token that was used as the unregisterToken argument when calling - * register to register the target value. - */ - unregister(unregisterToken: WeakKey): boolean; - } + /** + * Stores an Float32 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void; - interface FinalizationRegistryConstructor { - readonly prototype: FinalizationRegistry; + /** + * Stores an Float64 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void; - /** - * Creates a finalization registry with an associated cleanup callback - * @param cleanupCallback The callback to call after a value in the registry has been reclaimed. - */ - new (cleanupCallback: (heldValue: T) => void): FinalizationRegistry; - } + /** + * Stores an Int8 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + */ + setInt8(byteOffset: number, value: number): void; - var FinalizationRegistry: FinalizationRegistryConstructor; - - ///////////////////////////// - // lib.es2022.array.d.ts - ///////////////////////////// - interface Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): T | undefined; - } + /** + * Stores an Int16 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setInt16(byteOffset: number, value: number, littleEndian?: boolean): void; - interface ReadonlyArray { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): T | undefined; - } + /** + * Stores an Int32 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setInt32(byteOffset: number, value: number, littleEndian?: boolean): void; - interface Int8Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; - } + /** + * Stores an Uint8 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + */ + setUint8(byteOffset: number, value: number): void; - interface Uint8Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; - } + /** + * Stores an Uint16 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setUint16(byteOffset: number, value: number, littleEndian?: boolean): void; - interface Uint8ClampedArray { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; - } + /** + * Stores an Uint32 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setUint32(byteOffset: number, value: number, littleEndian?: boolean): void; +} - interface Int16Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; - } +interface DataViewConstructor { + readonly prototype: DataView; - interface Uint16Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; - } + new (buffer: TArrayBuffer, byteOffset?: number, byteLength?: number): DataView; +} - interface Int32Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; - } +var DataView: DataViewConstructor; - interface Uint32Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; - } +/** + * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested + * number of bytes could not be allocated an exception is raised. + */ +interface Int8Array { + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - interface Float32Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; - } + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - interface Float64Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; - } + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - interface BigInt64Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): bigint | undefined; - } + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - interface BigUint64Array { - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): bigint | undefined; - } + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - ///////////////////////////// - // lib.es2022.error.d.ts - ///////////////////////////// - interface ErrorOptions { - cause?: unknown; - } + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - interface Error { - cause?: unknown; - } + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - interface ErrorConstructor { - new (message?: string, options?: ErrorOptions): Error; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int8Array; - (message?: string, options?: ErrorOptions): Error; - } + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - interface EvalErrorConstructor { - new (message?: string, options?: ErrorOptions): EvalError; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - (message?: string, options?: ErrorOptions): EvalError; - } + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - interface RangeErrorConstructor { - new (message?: string, options?: ErrorOptions): RangeError; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - (message?: string, options?: ErrorOptions): RangeError; - } + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - interface ReferenceErrorConstructor { - new (message?: string, options?: ErrorOptions): ReferenceError; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - (message?: string, options?: ErrorOptions): ReferenceError; - } + /** + * The length of the array. + */ + readonly length: number; - interface SyntaxErrorConstructor { - new (message?: string, options?: ErrorOptions): SyntaxError; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int8Array; - (message?: string, options?: ErrorOptions): SyntaxError; - } + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; - interface TypeErrorConstructor { - new (message?: string, options?: ErrorOptions): TypeError; + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - (message?: string, options?: ErrorOptions): TypeError; - } + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - interface URIErrorConstructor { - new (message?: string, options?: ErrorOptions): URIError; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; - (message?: string, options?: ErrorOptions): URIError; - } + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - interface AggregateErrorConstructor { - new ( - errors: Iterable, - message?: string, - options?: ErrorOptions, - ): AggregateError; - - ( - errors: Iterable, - message?: string, - options?: ErrorOptions, - ): AggregateError; - } + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - ///////////////////////////// - // lib.es2022.intl.d.ts - ///////////////////////////// - namespace Intl { - /** - * An object with some or all properties of the `Intl.Segmenter` constructor `options` parameter. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/Segmenter#parameters) - */ - interface SegmenterOptions { - /** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */ - localeMatcher?: "best fit" | "lookup" | undefined; - - /** The type of input to be split */ - granularity?: "grapheme" | "word" | "sentence" | undefined; - } + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * The `Intl.Segmenter` object enables locale-sensitive text segmentation, enabling you to get meaningful items (graphemes, words or sentences) from a string. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter) - */ - interface Segmenter { - /** - * Returns `Segments` object containing the segments of the input string, using the segmenter's locale and granularity. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/segment) - * - * @param input - The text to be segmented as a `string`. - * - * @returns A new iterable Segments object containing the segments of the input string, using the segmenter's locale and granularity. - */ - segment(input: string): Segments; - - /** - * The `resolvedOptions()` method of `Intl.Segmenter` instances returns a new object with properties reflecting the options computed during initialization of this `Segmenter` object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/resolvedOptions) - */ - resolvedOptions(): ResolvedSegmenterOptions; - } + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - interface ResolvedSegmenterOptions { - locale: string; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Int8Array; - granularity: "grapheme" | "word" | "sentence"; - } + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - interface SegmentIterator extends IteratorObject { - [Symbol.iterator](): SegmentIterator; - } + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** - * A `Segments` object is an iterable collection of the segments of a text string. It is returned by a call to the `segment()` method of an `Intl.Segmenter` object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/segment/Segments) - */ - interface Segments { - /** - * Returns an object describing the segment in the original string that includes the code unit at a specified index. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/segment/Segments/containing) - * - * @param codeUnitIndex - A number specifying the index of the code unit in the original input string. If the value is omitted, it defaults to `0`. - */ - containing(codeUnitIndex?: number): SegmentData | undefined; - - /** Returns an iterator to iterate over the segments. */ - [Symbol.iterator](): SegmentIterator; - } + /** + * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Int8Array; - interface SegmentData { - /** A string containing the segment extracted from the original input string. */ - segment: string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** The code unit index in the original input string at which the segment begins. */ - index: number; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** The complete input string that was segmented. */ - input: string; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - /** - * A boolean value only if granularity is "word"; otherwise, undefined. - * If granularity is "word", then isWordLike is true when the segment is word-like (i.e., consists of letters/numbers/ideographs/etc.); otherwise, false. - */ - isWordLike?: boolean; - } + [index: number]: number; +} - /** - * The `Intl.Segmenter` object enables locale-sensitive text segmentation, enabling you to get meaningful items (graphemes, words or sentences) from a string. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter) - */ - const Segmenter: { - prototype: Segmenter; - - /** - * Creates a new `Intl.Segmenter` object. - * - * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. - * For the general form and interpretation of the `locales` argument, - * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). - * - * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/Segmenter#parameters) - * with some or all options of `SegmenterOptions`. - * - * @returns [Intl.Segmenter](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segments) object. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter). - */ - new (locales?: LocalesArgument, options?: SegmenterOptions): Segmenter; - - /** - * Returns an array containing those of the provided locales that are supported without having to fall back to the runtime's default locale. - * - * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. - * For the general form and interpretation of the `locales` argument, - * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). - * - * @param options An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/supportedLocalesOf#parameters). - * with some or all possible options. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/supportedLocalesOf) - */ - supportedLocalesOf(locales: LocalesArgument, options?: Pick): UnicodeBCP47LocaleIdentifier[]; - }; +interface Int8ArrayConstructor { + readonly prototype: Int8Array; - /** - * Returns a sorted array of the supported collation, calendar, currency, numbering system, timezones, and units by the implementation. - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf) - * - * @param key A string indicating the category of values to return. - * @returns A sorted array of the supported values. - */ - function supportedValuesOf(key: "calendar" | "collation" | "currency" | "numberingSystem" | "timeZone" | "unit"): string[]; - } + new (length: number): Int8Array; - ///////////////////////////// - // lib.es2022.object.d.ts - ///////////////////////////// - interface ObjectConstructor { - /** - * Determines whether an object has a property with the specified name. - * @param o An object. - * @param v A property name. - */ - hasOwn(o: object, v: PropertyKey): boolean; - } + new (array: ArrayLike): Int8Array; - ///////////////////////////// - // lib.es2022.regexp.d.ts - ///////////////////////////// - interface RegExp { - /** - * Returns a Boolean value indicating the state of the hasIndices flag (d) used with a regular expression. - * Default is false. Read-only. - */ - readonly hasIndices: boolean; - } + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int8Array; - ///////////////////////////// - // lib.es2022.string.d.ts - ///////////////////////////// - interface String { - /** - * Returns a new String consisting of the single UTF-16 code unit located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): string | undefined; - } + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int8Array; - ///////////////////////////// - // lib.es2023.array.d.ts - ///////////////////////////// - interface Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S | undefined; - - findLast(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T | undefined; - - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): number; - - /** - * Returns a copy of an array with its elements reversed. - */ - toReversed(): T[]; - - /** - * Returns a copy of an array with its elements sorted. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order. - * ```ts - * [11, 2, 22, 1].toSorted((a, b) => a - b) // [1, 2, 11, 22] - * ``` - */ - toSorted(compareFn?: (a: T, b: T) => number): T[]; - - /** - * Copies an array and removes elements and, if necessary, inserts new elements in their place. Returns the copied array. - * @param start The zero-based location in the array from which to start removing elements. - * @param deleteCount The number of elements to remove. - * @param items Elements to insert into the copied array in place of the deleted elements. - * @returns The copied array. - */ - toSpliced(start: number, deleteCount: number, ...items: T[]): T[]; - - /** - * Copies an array and removes elements while returning the remaining elements. - * @param start The zero-based location in the array from which to start removing elements. - * @param deleteCount The number of elements to remove. - * @returns A copy of the original array with the remaining elements. - */ - toSpliced(start: number, deleteCount?: number): T[]; - - /** - * Copies an array, then overwrites the value at the provided index with the - * given value. If the index is negative, then it replaces from the end - * of the array. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to write into the copied array. - * @returns The copied array with the updated value. - */ - with(index: number, value: T): T[]; - } + new (array: ArrayLike | ArrayBuffer): Int8Array; - interface ReadonlyArray { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: (value: T, index: number, array: readonly T[]) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: (value: T, index: number, array: readonly T[]) => unknown, - thisArg?: any, - ): T | undefined; - - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: (value: T, index: number, array: readonly T[]) => unknown, - thisArg?: any, - ): number; - - /** - * Copies the array and returns the copied array with all of its elements reversed. - */ - toReversed(): T[]; - - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order. - * ```ts - * [11, 2, 22, 1].toSorted((a, b) => a - b) // [1, 2, 11, 22] - * ``` - */ - toSorted(compareFn?: (a: T, b: T) => number): T[]; - - /** - * Copies an array and removes elements while, if necessary, inserting new elements in their place, returning the remaining elements. - * @param start The zero-based location in the array from which to start removing elements. - * @param deleteCount The number of elements to remove. - * @param items Elements to insert into the copied array in place of the deleted elements. - * @returns A copy of the original array with the remaining elements. - */ - toSpliced(start: number, deleteCount: number, ...items: T[]): T[]; - - /** - * Copies an array and removes elements while returning the remaining elements. - * @param start The zero-based location in the array from which to start removing elements. - * @param deleteCount The number of elements to remove. - * @returns A copy of the original array with the remaining elements. - */ - toSpliced(start: number, deleteCount?: number): T[]; - - /** - * Copies an array, then overwrites the value at the provided index with the - * given value. If the index is negative, then it replaces from the end - * of the array - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: T): T[]; - } + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - interface Int8Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, - ): number | undefined; - - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, - ): number; - - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): Int8Array; - - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = Int8Array.from([11, 2, 22, 1]); - * myNums.toSorted((a, b) => a - b) // Int8Array(4) [1, 2, 11, 22] - * ``` - */ - toSorted(compareFn?: (a: number, b: number) => number): Int8Array; - - /** - * Copies the array and inserts the given number at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: number): Int8Array; - } + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Int8Array; - interface Uint8Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, - ): number | undefined; - - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, - ): number; - - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): Uint8Array; - - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = Uint8Array.from([11, 2, 22, 1]); - * myNums.toSorted((a, b) => a - b) // Uint8Array(4) [1, 2, 11, 22] - * ``` - */ - toSorted(compareFn?: (a: number, b: number) => number): Uint8Array; - - /** - * Copies the array and inserts the given number at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: number): Uint8Array; - } + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Int8Array; - interface Uint8ClampedArray { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number | undefined; - - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number; - - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): Uint8ClampedArray; - - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = Uint8ClampedArray.from([11, 2, 22, 1]); - * myNums.toSorted((a, b) => a - b) // Uint8ClampedArray(4) [1, 2, 11, 22] - * ``` - */ - toSorted(compareFn?: (a: number, b: number) => number): Uint8ClampedArray; - - /** - * Copies the array and inserts the given number at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: number): Uint8ClampedArray; - } + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; +} - interface Int16Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, - ): number | undefined; - - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, - ): number; - - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): Int16Array; - - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = Int16Array.from([11, 2, -22, 1]); - * myNums.toSorted((a, b) => a - b) // Int16Array(4) [-22, 1, 2, 11] - * ``` - */ - toSorted(compareFn?: (a: number, b: number) => number): Int16Array; - - /** - * Copies the array and inserts the given number at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: number): Int16Array; - } +var Int8Array: Int8ArrayConstructor; - interface Uint16Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number | undefined; - - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number; - - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): Uint16Array; - - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = Uint16Array.from([11, 2, 22, 1]); - * myNums.toSorted((a, b) => a - b) // Uint16Array(4) [1, 2, 11, 22] - * ``` - */ - toSorted(compareFn?: (a: number, b: number) => number): Uint16Array; - - /** - * Copies the array and inserts the given number at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: number): Uint16Array; - } +/** + * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the + * requested number of bytes could not be allocated an exception is raised. + */ +interface Uint8Array { + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - interface Int32Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, - ): number | undefined; - - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, - ): number; - - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): Int32Array; - - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = Int32Array.from([11, 2, -22, 1]); - * myNums.toSorted((a, b) => a - b) // Int32Array(4) [-22, 1, 2, 11] - * ``` - */ - toSorted(compareFn?: (a: number, b: number) => number): Int32Array; - - /** - * Copies the array and inserts the given number at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: number): Int32Array; - } + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - interface Uint32Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number | undefined; - - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number; - - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): Uint32Array; - - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = Uint32Array.from([11, 2, 22, 1]); - * myNums.toSorted((a, b) => a - b) // Uint32Array(4) [1, 2, 11, 22] - * ``` - */ - toSorted(compareFn?: (a: number, b: number) => number): Uint32Array; - - /** - * Copies the array and inserts the given number at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: number): Uint32Array; - } + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - interface Float32Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number | undefined; - - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number; - - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): Float32Array; - - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = Float32Array.from([11.25, 2, -22.5, 1]); - * myNums.toSorted((a, b) => a - b) // Float32Array(4) [-22.5, 1, 2, 11.5] - * ``` - */ - toSorted(compareFn?: (a: number, b: number) => number): Float32Array; - - /** - * Copies the array and inserts the given number at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: number): Float32Array; - } + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - interface Float64Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number | undefined; - - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number; - - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): Float64Array; - - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = Float64Array.from([11.25, 2, -22.5, 1]); - * myNums.toSorted((a, b) => a - b) // Float64Array(4) [-22.5, 1, 2, 11.5] - * ``` - */ - toSorted(compareFn?: (a: number, b: number) => number): Float64Array; - - /** - * Copies the array and inserts the given number at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: number): Float64Array; - } + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - interface BigInt64Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: bigint, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: ( - value: bigint, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): bigint | undefined; - - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: ( - value: bigint, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number; - - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): BigInt64Array; - - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = BigInt64Array.from([11n, 2n, -22n, 1n]); - * myNums.toSorted((a, b) => Number(a - b)) // BigInt64Array(4) [-22n, 1n, 2n, 11n] - * ``` - */ - toSorted(compareFn?: (a: bigint, b: bigint) => number): BigInt64Array; - - /** - * Copies the array and inserts the given bigint at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: bigint): BigInt64Array; - } + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - interface BigUint64Array { - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: bigint, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: ( - value: bigint, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): bigint | undefined; - - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: ( - value: bigint, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number; - - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): BigUint64Array; - - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = BigUint64Array.from([11n, 2n, 22n, 1n]); - * myNums.toSorted((a, b) => Number(a - b)) // BigUint64Array(4) [1n, 2n, 11n, 22n] - * ``` - */ - toSorted(compareFn?: (a: bigint, b: bigint) => number): BigUint64Array; - - /** - * Copies the array and inserts the given bigint at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: bigint): BigUint64Array; - } + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - ///////////////////////////// - // lib.es2023.collection.d.ts - ///////////////////////////// - interface WeakKeyTypes { - symbol: symbol; - } + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint8Array; - ///////////////////////////// - // lib.es2023.intl.d.ts - ///////////////////////////// - namespace Intl { - interface NumberFormatRangePartTypeRegistry extends NumberFormatPartTypeRegistry { - approximatelySign: never; - } + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - type NumberFormatRangePartTypes = keyof NumberFormatRangePartTypeRegistry; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - interface NumberFormatOptions { - roundingPriority?: "auto" | "morePrecision" | "lessPrecision" | undefined; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - roundingIncrement?: 1 | 2 | 5 | 10 | 20 | 25 | 50 | 100 | 200 | 250 | 500 | 1000 | 2000 | 2500 | 5000 | undefined; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - roundingMode?: "ceil" | "floor" | "expand" | "trunc" | "halfCeil" | "halfFloor" | "halfExpand" | "halfTrunc" | "halfEven" | undefined; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - trailingZeroDisplay?: "auto" | "stripIfInteger" | undefined; - } + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - interface ResolvedNumberFormatOptions { - roundingPriority: "auto" | "morePrecision" | "lessPrecision"; + /** + * The length of the array. + */ + readonly length: number; - roundingMode: "ceil" | "floor" | "expand" | "trunc" | "halfCeil" | "halfFloor" | "halfExpand" | "halfTrunc" | "halfEven"; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint8Array; - roundingIncrement: 1 | 2 | 5 | 10 | 20 | 25 | 50 | 100 | 200 | 250 | 500 | 1000 | 2000 | 2500 | 5000; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; - trailingZeroDisplay: "auto" | "stripIfInteger"; - } + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - interface NumberRangeFormatPart { - type: NumberFormatRangePartTypes; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - value: string; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; - source: "startRange" | "endRange" | "shared"; - } + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - type StringNumericLiteral = `${number}` | "Infinity" | "-Infinity" | "+Infinity"; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - interface NumberFormat { - format(value: number | bigint | StringNumericLiteral): string; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - formatToParts(value: number | bigint | StringNumericLiteral): NumberFormatPart[]; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - formatRange(start: number | bigint | StringNumericLiteral, end: number | bigint | StringNumericLiteral): string; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Uint8Array; - formatRangeToParts(start: number | bigint | StringNumericLiteral, end: number | bigint | StringNumericLiteral): NumberRangeFormatPart[]; - } - } + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - ///////////////////////////// - // lib.es2024.arraybuffer.d.ts - ///////////////////////////// - interface ArrayBuffer { - /** - * If this ArrayBuffer is resizable, returns the maximum byte length given during construction; returns the byte length if not. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/maxByteLength) - */ - get maxByteLength(): number; - - /** - * Returns true if this ArrayBuffer can be resized. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/resizable) - */ - get resizable(): boolean; - - /** - * Resizes the ArrayBuffer to the specified size (in bytes). - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/resize) - */ - resize(newByteLength?: number): void; - - /** - * Returns a boolean indicating whether or not this buffer has been detached (transferred). - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/detached) - */ - get detached(): boolean; - - /** - * Creates a new ArrayBuffer with the same byte content as this buffer, then detaches this buffer. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/transfer) - */ - transfer(newByteLength?: number): ArrayBuffer; - - /** - * Creates a new non-resizable ArrayBuffer with the same byte content as this buffer, then detaches this buffer. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/transferToFixedLength) - */ - transferToFixedLength(newByteLength?: number): ArrayBuffer; - } + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - interface ArrayBufferConstructor { - new (byteLength: number, options?: { maxByteLength?: number; }): ArrayBuffer; - } + /** + * Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Uint8Array; - ///////////////////////////// - // lib.es2024.collection.d.ts - ///////////////////////////// - interface MapConstructor { - /** - * Groups members of an iterable according to the return value of the passed callback. - * @param items An iterable. - * @param keySelector A callback which will be invoked for each item in items. - */ - groupBy( - items: Iterable, - keySelector: (item: T, index: number) => K, - ): Map; - } + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - ///////////////////////////// - // lib.es2024.object.d.ts - ///////////////////////////// - interface ObjectConstructor { - /** - * Groups members of an iterable according to the return value of the passed callback. - * @param items An iterable. - * @param keySelector A callback which will be invoked for each item in items. - */ - groupBy( - items: Iterable, - keySelector: (item: T, index: number) => K, - ): Partial>; - } + /** + * Returns a string representation of an array. + */ + toString(): string; - ///////////////////////////// - // lib.es2024.promise.d.ts - ///////////////////////////// - interface PromiseWithResolvers { - promise: Promise; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - resolve: (value: T | PromiseLike) => void; + [index: number]: number; +} - reject: (reason?: any) => void; - } +interface Uint8ArrayConstructor { + readonly prototype: Uint8Array; - interface PromiseConstructor { - /** - * Creates a new Promise and returns it in an object, along with its resolve and reject functions. - * @returns An object with the properties `promise`, `resolve`, and `reject`. - * - * ```ts - * const { promise, resolve, reject } = Promise.withResolvers(); - * ``` - */ - withResolvers(): PromiseWithResolvers; - } + new (length: number): Uint8Array; - ///////////////////////////// - // lib.es2024.regexp.d.ts - ///////////////////////////// - interface RegExp { - /** - * Returns a Boolean value indicating the state of the unicodeSets flag (v) used with a regular expression. - * Default is false. Read-only. - */ - readonly unicodeSets: boolean; - } + new (array: ArrayLike): Uint8Array; - ///////////////////////////// - // lib.es2024.sharedmemory.d.ts - ///////////////////////////// - interface Atomics { - /** - * A non-blocking, asynchronous version of wait which is usable on the main thread. - * Waits asynchronously on a shared memory location and returns a Promise - * @param typedArray A shared Int32Array or BigInt64Array. - * @param index The position in the typedArray to wait on. - * @param value The expected value to test. - * @param [timeout] The expected value to test. - */ - waitAsync(typedArray: Int32Array, index: number, value: number, timeout?: number): { async: false; value: "not-equal" | "timed-out"; } | { async: true; value: Promise<"ok" | "timed-out">; }; - - /** - * A non-blocking, asynchronous version of wait which is usable on the main thread. - * Waits asynchronously on a shared memory location and returns a Promise - * @param typedArray A shared Int32Array or BigInt64Array. - * @param index The position in the typedArray to wait on. - * @param value The expected value to test. - * @param [timeout] The expected value to test. - */ - waitAsync(typedArray: BigInt64Array, index: number, value: bigint, timeout?: number): { async: false; value: "not-equal" | "timed-out"; } | { async: true; value: Promise<"ok" | "timed-out">; }; - } + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint8Array; - interface SharedArrayBuffer { - /** - * Returns true if this SharedArrayBuffer can be grown. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/growable) - */ - get growable(): boolean; - - /** - * If this SharedArrayBuffer is growable, returns the maximum byte length given during construction; returns the byte length if not. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/maxByteLength) - */ - get maxByteLength(): number; - - /** - * Grows the SharedArrayBuffer to the specified size (in bytes). - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/grow) - */ - grow(newByteLength?: number): void; - } + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8Array; - interface SharedArrayBufferConstructor { - new (byteLength: number, options?: { maxByteLength?: number; }): SharedArrayBuffer; - } + new (array: ArrayLike | ArrayBuffer): Uint8Array; - ///////////////////////////// - // lib.es2024.string.d.ts - ///////////////////////////// - interface String { - /** - * Returns true if all leading surrogates and trailing surrogates appear paired and in order. - */ - isWellFormed(): boolean; - - /** - * Returns a string where all lone or out-of-order surrogates have been replaced by the Unicode replacement character (U+FFFD). - */ - toWellFormed(): string; - } + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - ///////////////////////////// - // lib.es2025.collection.d.ts - ///////////////////////////// - interface ReadonlySetLike { - /** - * Despite its name, returns an iterator of the values in the set-like. - */ - keys(): Iterator; - - /** - * @returns a boolean indicating whether an element with the specified value exists in the set-like or not. - */ - has(value: T): boolean; - - /** - * @returns the number of (unique) elements in the set-like. - */ - readonly size: number; - } + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Uint8Array; - interface Set { - /** - * @returns a new Set containing all the elements in this Set and also all the elements in the argument. - */ - union(other: ReadonlySetLike): Set; - - /** - * @returns a new Set containing all the elements which are both in this Set and in the argument. - */ - intersection(other: ReadonlySetLike): Set; - - /** - * @returns a new Set containing all the elements in this Set which are not also in the argument. - */ - difference(other: ReadonlySetLike): Set; - - /** - * @returns a new Set containing all the elements which are in either this Set or in the argument, but not in both. - */ - symmetricDifference(other: ReadonlySetLike): Set; - - /** - * @returns a boolean indicating whether all the elements in this Set are also in the argument. - */ - isSubsetOf(other: ReadonlySetLike): boolean; - - /** - * @returns a boolean indicating whether all the elements in the argument are also in this Set. - */ - isSupersetOf(other: ReadonlySetLike): boolean; - - /** - * @returns a boolean indicating whether this Set has no elements in common with the argument. - */ - isDisjointFrom(other: ReadonlySetLike): boolean; - } + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Uint8Array; - interface ReadonlySet { - /** - * @returns a new Set containing all the elements in this Set and also all the elements in the argument. - */ - union(other: ReadonlySetLike): Set; - - /** - * @returns a new Set containing all the elements which are both in this Set and in the argument. - */ - intersection(other: ReadonlySetLike): Set; - - /** - * @returns a new Set containing all the elements in this Set which are not also in the argument. - */ - difference(other: ReadonlySetLike): Set; - - /** - * @returns a new Set containing all the elements which are in either this Set or in the argument, but not in both. - */ - symmetricDifference(other: ReadonlySetLike): Set; - - /** - * @returns a boolean indicating whether all the elements in this Set are also in the argument. - */ - isSubsetOf(other: ReadonlySetLike): boolean; - - /** - * @returns a boolean indicating whether all the elements in the argument are also in this Set. - */ - isSupersetOf(other: ReadonlySetLike): boolean; - - /** - * @returns a boolean indicating whether this Set has no elements in common with the argument. - */ - isDisjointFrom(other: ReadonlySetLike): boolean; - } + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; +} - ///////////////////////////// - // lib.es2025.float16.d.ts - ///////////////////////////// - /** - * A typed array of 16-bit float values. The contents are initialized to 0. If the requested number - * of bytes could not be allocated an exception is raised. - */ - interface Float16Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; - - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; - - /** - * Returns the item located at the specified index. - * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. - */ - at(index: number): number | undefined; - - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; - - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; - - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float16Array; - - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - - /** - * Returns the value of the last element in the array where predicate is true, and undefined - * otherwise. - * @param predicate findLast calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, findLast - * immediately returns that element value. Otherwise, findLast returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => value is S, - thisArg?: any, - ): S | undefined; - - findLast( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number | undefined; - - /** - * Returns the index of the last element in the array where predicate is true, and -1 - * otherwise. - * @param predicate findLastIndex calls predicate once for each element of the array, in descending - * order, until it finds one where predicate returns true. If such an element is found, - * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findLastIndex( - predicate: ( - value: number, - index: number, - array: this, - ) => unknown, - thisArg?: any, - ): number; - - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; - - /** - * Returns the index of the first occurrence of a value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; - - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; - - /** - * Returns the index of the last occurrence of a value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; - - /** - * The length of the array. - */ - readonly length: number; - - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float16Array; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; - - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; - - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - - /** - * Reverses the elements in an Array. - */ - reverse(): this; - - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; - - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Float16Array; - - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; - - /** - * Gets a new Float16Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Float16Array; - - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; - - /** - * Copies the array and returns the copy with the elements in reverse order. - */ - toReversed(): Float16Array; - - /** - * Copies and sorts the array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * const myNums = Float16Array.from([11.25, 2, -22.5, 1]); - * myNums.toSorted((a, b) => a - b) // Float16Array(4) [-22.5, 1, 2, 11.5] - * ``` - */ - toSorted(compareFn?: (a: number, b: number) => number): Float16Array; - - /** - * Returns a string representation of an array. - */ - toString(): string; - - /** Returns the primitive value of the specified object. */ - valueOf(): this; - - /** - * Copies the array and inserts the given number at the provided index. - * @param index The index of the value to overwrite. If the index is - * negative, then it replaces from the end of the array. - * @param value The value to insert into the copied array. - * @returns A copy of the original array with the inserted value. - */ - with(index: number, value: number): Float16Array; - - [index: number]: number; - - [Symbol.iterator](): ArrayIterator; - - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): ArrayIterator<[number, number]>; - - /** - * Returns an list of keys in the array - */ - keys(): ArrayIterator; - - /** - * Returns an list of values in the array - */ - values(): ArrayIterator; - - readonly [Symbol.toStringTag]: "Float16Array"; - } +var Uint8Array: Uint8ArrayConstructor; - interface Float16ArrayConstructor { - readonly prototype: Float16Array; - - new (length?: number): Float16Array; - - new (array: ArrayLike | Iterable): Float16Array; - - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Float16Array; - - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float16Array; - - new (array: ArrayLike | ArrayBuffer): Float16Array; - - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Float16Array; - - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Float16Array; - - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float16Array; - - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - */ - from(elements: Iterable): Float16Array; - - /** - * Creates an array from an array-like or iterable object. - * @param elements An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Float16Array; - } +/** + * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0. + * If the requested number of bytes could not be allocated an exception is raised. + */ +interface Uint8ClampedArray { + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - var Float16Array: Float16ArrayConstructor; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - interface Math { - /** - * Returns the nearest half precision float representation of a number. - * @param x A numeric expression. - */ - f16round(x: number): number; - } + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - interface DataView { - /** - * Gets the Float16 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getFloat16(byteOffset: number, littleEndian?: boolean): number; - - /** - * Stores an Float16 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setFloat16(byteOffset: number, value: number, littleEndian?: boolean): void; - } + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - ///////////////////////////// - // lib.es2025.intl.d.ts - ///////////////////////////// - namespace Intl { - /** - * The locale matching algorithm to use. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). - */ - type DurationFormatLocaleMatcher = "lookup" | "best fit"; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - /** - * The style of the formatted duration. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/DurationFormat#style). - */ - type DurationFormatStyle = "long" | "short" | "narrow" | "digital"; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Whether to always display a unit, or only if it is non-zero. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/DurationFormat#display). - */ - type DurationFormatDisplayOption = "always" | "auto"; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - /** - * Value of the `unit` property in duration objects - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/format#duration). - */ - type DurationFormatUnit = - | "years" - | "months" - | "weeks" - | "days" - | "hours" - | "minutes" - | "seconds" - | "milliseconds" - | "microseconds" - | "nanoseconds"; - - type DurationFormatUnitSingular = - | "year" - | "month" - | "week" - | "day" - | "hour" - | "minute" - | "second" - | "millisecond" - | "microsecond" - | "nanosecond"; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint8ClampedArray; - /** - * An object representing the relative time format in parts - * that can be used for custom locale-aware formatting. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/formatToParts). - */ - type DurationFormatPart = - | { - type: "literal"; - value: string; - unit?: DurationFormatUnitSingular; - } - | { - type: Exclude; - value: string; - unit: DurationFormatUnitSingular; - }; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - /** - * An object with some or all properties of the `Intl.DurationFormat` constructor `options` parameter. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/DurationFormat#parameters) - */ - interface DurationFormatOptions { - localeMatcher?: DurationFormatLocaleMatcher | undefined; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - numberingSystem?: string | undefined; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - style?: DurationFormatStyle | undefined; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - years?: "long" | "short" | "narrow" | undefined; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - yearsDisplay?: DurationFormatDisplayOption | undefined; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - months?: "long" | "short" | "narrow" | undefined; + /** + * The length of the array. + */ + readonly length: number; - monthsDisplay?: DurationFormatDisplayOption | undefined; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint8ClampedArray; - weeks?: "long" | "short" | "narrow" | undefined; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; - weeksDisplay?: DurationFormatDisplayOption | undefined; + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - days?: "long" | "short" | "narrow" | undefined; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - daysDisplay?: DurationFormatDisplayOption | undefined; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; - hours?: "long" | "short" | "narrow" | "numeric" | "2-digit" | undefined; + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - hoursDisplay?: DurationFormatDisplayOption | undefined; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - minutes?: "long" | "short" | "narrow" | "numeric" | "2-digit" | undefined; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - minutesDisplay?: DurationFormatDisplayOption | undefined; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - seconds?: "long" | "short" | "narrow" | "numeric" | "2-digit" | undefined; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Uint8ClampedArray; - secondsDisplay?: DurationFormatDisplayOption | undefined; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - milliseconds?: "long" | "short" | "narrow" | "numeric" | undefined; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - millisecondsDisplay?: DurationFormatDisplayOption | undefined; + /** + * Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Uint8ClampedArray; - microseconds?: "long" | "short" | "narrow" | "numeric" | undefined; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - microsecondsDisplay?: DurationFormatDisplayOption | undefined; + /** + * Returns a string representation of an array. + */ + toString(): string; - nanoseconds?: "long" | "short" | "narrow" | "numeric" | undefined; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - nanosecondsDisplay?: DurationFormatDisplayOption | undefined; + [index: number]: number; +} - fractionalDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined; - } +interface Uint8ClampedArrayConstructor { + readonly prototype: Uint8ClampedArray; - /** - * The Intl.DurationFormat object enables language-sensitive duration formatting. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat) - */ - interface DurationFormat { - /** - * @param duration The duration object to be formatted. It should include some or all of the following properties: months, weeks, days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/format). - */ - format(duration: Partial>): string; - - /** - * @param duration The duration object to be formatted. It should include some or all of the following properties: months, weeks, days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/formatToParts). - */ - formatToParts(duration: Partial>): DurationFormatPart[]; - - /** - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/resolvedOptions). - */ - resolvedOptions(): ResolvedDurationFormatOptions; - } + new (length: number): Uint8ClampedArray; - interface ResolvedDurationFormatOptions { - locale: UnicodeBCP47LocaleIdentifier; + new (array: ArrayLike): Uint8ClampedArray; - numberingSystem: string; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray; - style: DurationFormatStyle; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray; - years: "long" | "short" | "narrow"; + new (array: ArrayLike | ArrayBuffer): Uint8ClampedArray; - yearsDisplay: DurationFormatDisplayOption; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - months: "long" | "short" | "narrow"; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Uint8ClampedArray; - monthsDisplay: DurationFormatDisplayOption; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Uint8ClampedArray; - weeks: "long" | "short" | "narrow"; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; +} - weeksDisplay: DurationFormatDisplayOption; +var Uint8ClampedArray: Uint8ClampedArrayConstructor; - days: "long" | "short" | "narrow"; +/** + * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the + * requested number of bytes could not be allocated an exception is raised. + */ +interface Int16Array { + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - daysDisplay: DurationFormatDisplayOption; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - hours: "long" | "short" | "narrow" | "numeric" | "2-digit"; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - hoursDisplay: DurationFormatDisplayOption; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - minutes: "long" | "short" | "narrow" | "numeric" | "2-digit"; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - minutesDisplay: DurationFormatDisplayOption; + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - seconds: "long" | "short" | "narrow" | "numeric" | "2-digit"; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - secondsDisplay: DurationFormatDisplayOption; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int16Array; - milliseconds: "long" | "short" | "narrow" | "numeric"; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - millisecondsDisplay: DurationFormatDisplayOption; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - microseconds: "long" | "short" | "narrow" | "numeric"; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - microsecondsDisplay: DurationFormatDisplayOption; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - nanoseconds: "long" | "short" | "narrow" | "numeric"; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - nanosecondsDisplay: DurationFormatDisplayOption; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - fractionalDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9; - } + /** + * The length of the array. + */ + readonly length: number; - const DurationFormat: { - prototype: DurationFormat; - - /** - * @param locales A string with a BCP 47 language tag, or an array of such strings. - * For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) - * page. - * - * @param options An object for setting up a duration format. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/DurationFormat). - */ - new (locales?: LocalesArgument, options?: DurationFormatOptions): DurationFormat; - - /** - * Returns an array containing those of the provided locales that are supported in display names without having to fall back to the runtime's default locale. - * - * @param locales A string with a BCP 47 language tag, or an array of such strings. - * For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) - * page. - * - * @param options An object with a locale matcher. - * - * @returns An array of strings representing a subset of the given locale tags that are supported in display names without having to fall back to the runtime's default locale. - * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/supportedLocalesOf). - */ - supportedLocalesOf(locales?: LocalesArgument, options?: { localeMatcher?: DurationFormatLocaleMatcher; }): UnicodeBCP47LocaleIdentifier[]; - }; - } + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int16Array; - ///////////////////////////// - // lib.es2025.promise.d.ts - ///////////////////////////// - interface PromiseConstructor { - /** - * Takes a callback of any kind (returns or throws, synchronously or asynchronously) and wraps its result - * in a Promise. - * - * @param callbackFn A function that is called synchronously. It can do anything: either return - * a value, throw an error, or return a promise. - * @param args Additional arguments, that will be passed to the callback. - * - * @returns A Promise that is: - * - Already fulfilled, if the callback synchronously returns a value. - * - Already rejected, if the callback synchronously throws an error. - * - Asynchronously fulfilled or rejected, if the callback returns a promise. - */ - try(callbackFn: (...args: U) => T | PromiseLike, ...args: U): Promise>; - } + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; - ///////////////////////////// - // lib.es2025.regexp.d.ts - ///////////////////////////// - interface RegExpConstructor { - /** - * Escapes any RegExp syntax characters in the input string, returning a - * new string that can be safely interpolated into a RegExp as a literal - * string to match. - * @example - * ```ts - * const regExp = new RegExp(RegExp.escape("foo.bar")); - * regExp.test("foo.bar"); // true - * regExp.test("foo!bar"); // false - * ``` - */ - escape(string: string): string; - } + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - ///////////////////////////// - // lib.es5.d.ts - ///////////////////////////// - ///////////////////////////// - /// ECMAScript APIs - ///////////////////////////// + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - var NaN: number; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; - var Infinity: number; + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; /** - * Evaluates JavaScript code and executes it. - * @param x A String value that contains valid JavaScript code. + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. */ - function eval(x: string): any; + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; /** - * Converts a string to an integer. - * @param string A string to convert into a number. - * @param radix A value between 2 and 36 that specifies the base of the number in `string`. - * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. - * All other strings are considered decimal. + * Reverses the elements in an Array. */ - function parseInt(string: string, radix?: number): number; + reverse(): this; /** - * Converts a string to a floating-point number. - * @param string A string that contains a floating-point number. + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. */ - function parseFloat(string: string): number; + set(array: ArrayLike, offset?: number): void; /** - * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a number). - * @param number A numeric value. + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. */ - function isNaN(number: number): boolean; + slice(start?: number, end?: number): Int16Array; /** - * Determines whether a supplied number is finite. - * @param number Any numeric value. + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. */ - function isFinite(number: number): boolean; + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; /** - * Gets the unencoded version of an encoded Uniform Resource Identifier (URI). - * @param encodedURI A value representing an encoded URI. + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` */ - function decodeURI(encodedURI: string): string; + sort(compareFn?: (a: number, b: number) => number): this; /** - * Gets the unencoded version of an encoded component of a Uniform Resource Identifier (URI). - * @param encodedURIComponent A value representing an encoded URI component. + * Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. */ - function decodeURIComponent(encodedURIComponent: string): string; + subarray(begin?: number, end?: number): Int16Array; /** - * Encodes a text string as a valid Uniform Resource Identifier (URI) - * @param uri A value representing an unencoded URI. + * Converts a number to a string by using the current locale. */ - function encodeURI(uri: string): string; + toLocaleString(): string; /** - * Encodes a text string as a valid component of a Uniform Resource Identifier (URI). - * @param uriComponent A value representing an unencoded URI component. + * Returns a string representation of an array. */ - function encodeURIComponent(uriComponent: string | number | boolean): string; - - interface Symbol { - /** Returns a string representation of an object. */ - toString(): string; - - /** Returns the primitive value of the specified object. */ - valueOf(): symbol; - } - - type PropertyKey = string | number | symbol; - - interface PropertyDescriptor { - configurable?: boolean; - - enumerable?: boolean; - - value?: any; + toString(): string; - writable?: boolean; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - get?(): any; - - set?(v: any): void; - } - - interface PropertyDescriptorMap { - [key: PropertyKey]: PropertyDescriptor; - } - - interface Object { - /** The initial value of Object.prototype.constructor is the standard built-in Object constructor. */ - constructor: Function; - - /** Returns a string representation of an object. */ - toString(): string; + [index: number]: number; +} - /** Returns a date converted to a string using the current locale. */ - toLocaleString(): string; +interface Int16ArrayConstructor { + readonly prototype: Int16Array; - /** Returns the primitive value of the specified object. */ - valueOf(): Object; + new (length: number): Int16Array; - /** - * Determines whether an object has a property with the specified name. - * @param v A property name. - */ - hasOwnProperty(v: PropertyKey): boolean; + new (array: ArrayLike): Int16Array; - /** - * Determines whether an object exists in another object's prototype chain. - * @param v Another object whose prototype chain is to be checked. - */ - isPrototypeOf(v: Object): boolean; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int16Array; - /** - * Determines whether a specified property is enumerable. - * @param v A property name. - */ - propertyIsEnumerable(v: PropertyKey): boolean; - } + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int16Array; - interface ObjectConstructor { - new (value?: any): Object; - - (): any; - - (value: any): any; - - /** A reference to the prototype for a class of objects. */ - readonly prototype: Object; - - /** - * Returns the prototype of an object. - * @param o The object that references the prototype. - */ - getPrototypeOf(o: any): any; - - /** - * Gets the own property descriptor of the specified object. - * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype. - * @param o Object that contains the property. - * @param p Name of the property. - */ - getOwnPropertyDescriptor(o: any, p: PropertyKey): PropertyDescriptor | undefined; - - /** - * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly - * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions. - * @param o Object that contains the own properties. - */ - getOwnPropertyNames(o: any): string[]; - - /** - * Creates an object that has the specified prototype or that has null prototype. - * @param o Object to use as a prototype. May be null. - */ - create(o: object | null): any; - - /** - * Creates an object that has the specified prototype, and that optionally contains specified properties. - * @param o Object to use as a prototype. May be null - * @param properties JavaScript object that contains one or more property descriptors. - */ - create(o: object | null, properties: PropertyDescriptorMap & ThisType): any; - - /** - * Adds a property to an object, or modifies attributes of an existing property. - * @param o Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object. - * @param p The property name. - * @param attributes Descriptor for the property. It can be for a data property or an accessor property. - */ - defineProperty(o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType): T; - - /** - * Adds one or more properties to an object, and/or modifies attributes of existing properties. - * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object. - * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property. - */ - defineProperties(o: T, properties: PropertyDescriptorMap & ThisType): T; - - /** - * Prevents the modification of attributes of existing properties, and prevents the addition of new properties. - * @param o Object on which to lock the attributes. - */ - seal(o: T): T; - - /** - * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. - * @param f Object on which to lock the attributes. - */ - freeze(f: T): T; - - /** - * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. - * @param o Object on which to lock the attributes. - */ - freeze(o: T): Readonly; - - /** - * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. - * @param o Object on which to lock the attributes. - */ - freeze(o: T): Readonly; - - /** - * Prevents the addition of new properties to an object. - * @param o Object to make non-extensible. - */ - preventExtensions(o: T): T; - - /** - * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object. - * @param o Object to test. - */ - isSealed(o: any): boolean; - - /** - * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object. - * @param o Object to test. - */ - isFrozen(o: any): boolean; - - /** - * Returns a value that indicates whether new properties can be added to an object. - * @param o Object to test. - */ - isExtensible(o: any): boolean; - - /** - * Returns the names of the enumerable string properties and methods of an object. - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - keys(o: object): string[]; - } + new (array: ArrayLike | ArrayBuffer): Int16Array; /** - * Provides functionality common to all JavaScript objects. + * The size in bytes of each element in the array. */ - var Object: ObjectConstructor; + readonly BYTES_PER_ELEMENT: number; /** - * Creates a new function. + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. */ - interface Function { - /** - * Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function. - * @param thisArg The object to be used as the this object. - * @param argArray A set of arguments to be passed to the function. - */ - apply(this: Function, thisArg: any, argArray?: any): any; - - /** - * Calls a method of an object, substituting another object for the current object. - * @param thisArg The object to be used as the current object. - * @param argArray A list of arguments to be passed to the method. - */ - call(this: Function, thisArg: any, ...argArray: any[]): any; - - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg An object to which the this keyword can refer inside the new function. - * @param argArray A list of arguments to be passed to the new function. - */ - bind(this: Function, thisArg: any, ...argArray: any[]): any; - - /** Returns a string representation of a function. */ - toString(): string; - - prototype: any; - - readonly length: number; - } - - interface FunctionConstructor { - /** - * Creates a new function. - * @param args A list of arguments the function accepts. - */ - new (...args: string[]): Function; - - (...args: string[]): Function; - - readonly prototype: Function; - } - - var Function: FunctionConstructor; + of(...items: number[]): Int16Array; /** - * Extracts the type of the 'this' parameter of a function type, or 'unknown' if the function type has no 'this' parameter. + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. */ - type ThisParameterType = T extends (this: infer U, ...args: never) => any ? U : unknown; + from(arrayLike: ArrayLike): Int16Array; /** - * Removes the 'this' parameter from a function type. + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. */ - type OmitThisParameter = unknown extends ThisParameterType ? T : T extends (...args: infer A) => infer R ? (...args: A) => R : T; - - interface CallableFunction extends Function { - /** - * Calls the function with the specified object as the this value and the elements of specified array as the arguments. - * @param thisArg The object to be used as the this object. - */ - apply(this: (this: T) => R, thisArg: T): R; - - /** - * Calls the function with the specified object as the this value and the elements of specified array as the arguments. - * @param thisArg The object to be used as the this object. - * @param args An array of argument values to be passed to the function. - */ - apply(this: (this: T, ...args: A) => R, thisArg: T, args: A): R; - - /** - * Calls the function with the specified object as the this value and the specified rest arguments as the arguments. - * @param thisArg The object to be used as the this object. - * @param args Argument values to be passed to the function. - */ - call(this: (this: T, ...args: A) => R, thisArg: T, ...args: A): R; - - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg The object to be used as the this object. - */ - bind(this: T, thisArg: ThisParameterType): OmitThisParameter; - - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg The object to be used as the this object. - * @param args Arguments to bind to the parameters of the function. - */ - bind(this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; - } - - interface NewableFunction extends Function { - /** - * Calls the function with the specified object as the this value and the elements of specified array as the arguments. - * @param thisArg The object to be used as the this object. - */ - apply(this: new () => T, thisArg: T): void; - - /** - * Calls the function with the specified object as the this value and the elements of specified array as the arguments. - * @param thisArg The object to be used as the this object. - * @param args An array of argument values to be passed to the function. - */ - apply(this: new (...args: A) => T, thisArg: T, args: A): void; - - /** - * Calls the function with the specified object as the this value and the specified rest arguments as the arguments. - * @param thisArg The object to be used as the this object. - * @param args Argument values to be passed to the function. - */ - call(this: new (...args: A) => T, thisArg: T, ...args: A): void; - - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg The object to be used as the this object. - */ - bind(this: T, thisArg: any): T; - - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg The object to be used as the this object. - * @param args Arguments to bind to the parameters of the function. - */ - bind(this: new (...args: [...A, ...B]) => R, thisArg: any, ...args: A): new (...args: B) => R; - } - - interface IArguments { - [index: number]: any; + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; +} - length: number; - } +var Int16Array: Int16ArrayConstructor; - interface String { - /** Returns a string representation of a string. */ - toString(): string; - - /** - * Returns the character at the specified index. - * @param pos The zero-based index of the desired character. - */ - charAt(pos: number): string; - - /** - * Returns the Unicode value of the character at the specified location, or NaN if the index is out of bounds. - * @param index The zero-based index of the desired character. - */ - charCodeAt(index: number): number; - - /** - * Returns a string that contains the concatenation of two or more strings. - * @param strings The strings to append to the end of the string. - */ - concat(...strings: string[]): string; - - /** - * Returns the position of the first occurrence of a substring, or -1 if it is not present. - * @param searchString The substring to search for in the string - * @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string. - */ - indexOf(searchString: string, position?: number): number; - - /** - * Returns the last occurrence of a substring in the string, or -1 if it is not present. - * @param searchString The substring to search for. - * @param position The index at which to begin searching. If omitted, the search begins at the end of the string. - */ - lastIndexOf(searchString: string, position?: number): number; - - /** - * Determines whether two strings are equivalent in the current locale. - * @param that String to compare to target string - */ - localeCompare(that: string): number; - - /** - * Matches a string with a regular expression, and returns an array containing the results of that search. - * @param regexp A variable name or string literal containing the regular expression pattern and flags. - */ - match(regexp: string | RegExp): RegExpMatchArray | null; - - /** - * Replaces text in a string, using a regular expression or search string. - * @param searchValue A string or regular expression to search for. - * @param replaceValue A string containing the text to replace. When the {@linkcode searchValue} is a `RegExp`, all matches are replaced if the `g` flag is set (or only those matches at the beginning, if the `y` flag is also present). Otherwise, only the first match of {@linkcode searchValue} is replaced. - */ - replace(searchValue: string | RegExp, replaceValue: string): string; - - /** - * Replaces text in a string, using a regular expression or search string. - * @param searchValue A string to search for. - * @param replacer A function that returns the replacement text. - */ - replace(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; - - /** - * Finds the first substring match in a regular expression search. - * @param regexp The regular expression pattern and applicable flags. - */ - search(regexp: string | RegExp): number; - - /** - * Returns a section of a string. - * @param start The index to the beginning of the specified portion of stringObj. - * @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end. - * If this value is not specified, the substring continues to the end of stringObj. - */ - slice(start?: number, end?: number): string; - - /** - * Split a string into substrings using the specified separator and return them as an array. - * @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned. - * @param limit A value used to limit the number of elements returned in the array. - */ - split(separator: string | RegExp, limit?: number): string[]; - - /** - * Returns the substring at the specified location within a String object. - * @param start The zero-based index number indicating the beginning of the substring. - * @param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end. - * If end is omitted, the characters from start through the end of the original string are returned. - */ - substring(start: number, end?: number): string; - - /** Converts all the alphabetic characters in a string to lowercase. */ - toLowerCase(): string; - - /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */ - toLocaleLowerCase(locales?: string | string[]): string; - - /** Converts all the alphabetic characters in a string to uppercase. */ - toUpperCase(): string; - - /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */ - toLocaleUpperCase(locales?: string | string[]): string; - - /** Removes the leading and trailing white space and line terminator characters from a string. */ - trim(): string; - - /** Returns the length of a String object. */ - readonly length: number; - - /** Returns the primitive value of the specified object. */ - valueOf(): string; - - readonly [index: number]: string; - } +/** + * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the + * requested number of bytes could not be allocated an exception is raised. + */ +interface Uint16Array { + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - interface StringConstructor { - new (value?: any): String; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - (value?: any): string; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - readonly prototype: String; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - fromCharCode(...codes: number[]): string; - } + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; /** - * Allows manipulation and formatting of text strings and determination and location of substrings within strings. + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. */ - var String: StringConstructor; + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - interface Boolean { - /** Returns the primitive value of the specified object. */ - valueOf(): boolean; - } + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - interface BooleanConstructor { - new (value?: any): Boolean; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint16Array; - (value?: T): boolean; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - readonly prototype: Boolean; - } + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - var Boolean: BooleanConstructor; - - interface Number { - /** - * Returns a string representation of an object. - * @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers. - */ - toString(radix?: number): string; - - /** - * Returns a string representing a number in fixed-point notation. - * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 100, inclusive. - */ - toFixed(fractionDigits?: number): string; - - /** - * Returns a string containing a number represented in exponential notation. - * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 100, inclusive. - */ - toExponential(fractionDigits?: number): string; - - /** - * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits. - * @param precision Number of significant digits. Must be in the range 1 - 100, inclusive. - */ - toPrecision(precision?: number): string; - - /** Returns the primitive value of the specified object. */ - valueOf(): number; - } + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - interface NumberConstructor { - new (value?: any): Number; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - (value?: any): number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - readonly prototype: Number; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */ - readonly MAX_VALUE: number; + /** + * The length of the array. + */ + readonly length: number; - /** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */ - readonly MIN_VALUE: number; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint16Array; - /** - * A value that is not a number. - * In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function. - */ - readonly NaN: number; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; - /** - * A value that is less than the largest negative number that can be represented in JavaScript. - * JavaScript displays NEGATIVE_INFINITY values as -infinity. - */ - readonly NEGATIVE_INFINITY: number; + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - /** - * A value greater than the largest number that can be represented in JavaScript. - * JavaScript displays POSITIVE_INFINITY values as infinity. - */ - readonly POSITIVE_INFINITY: number; - } + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */ - var Number: NumberConstructor; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; - interface TemplateStringsArray extends ReadonlyArray { - readonly raw: readonly string[]; - } + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - interface Math { - /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */ - readonly E: number; - - /** The natural logarithm of 10. */ - readonly LN10: number; - - /** The natural logarithm of 2. */ - readonly LN2: number; - - /** The base-2 logarithm of e. */ - readonly LOG2E: number; - - /** The base-10 logarithm of e. */ - readonly LOG10E: number; - - /** Pi. This is the ratio of the circumference of a circle to its diameter. */ - readonly PI: number; - - /** The square root of 0.5, or, equivalently, one divided by the square root of 2. */ - readonly SQRT1_2: number; - - /** The square root of 2. */ - readonly SQRT2: number; - - /** - * Returns the absolute value of a number (the value without regard to whether it is positive or negative). - * For example, the absolute value of -5 is the same as the absolute value of 5. - * @param x A numeric expression for which the absolute value is needed. - */ - abs(x: number): number; - - /** - * Returns the arc cosine (or inverse cosine) of a number. - * @param x A numeric expression. - */ - acos(x: number): number; - - /** - * Returns the arcsine of a number. - * @param x A numeric expression. - */ - asin(x: number): number; - - /** - * Returns the arctangent of a number. - * @param x A numeric expression for which the arctangent is needed. - */ - atan(x: number): number; - - /** - * Returns the angle (in radians) between the X axis and the line going through both the origin and the given point. - * @param y A numeric expression representing the cartesian y-coordinate. - * @param x A numeric expression representing the cartesian x-coordinate. - */ - atan2(y: number, x: number): number; - - /** - * Returns the smallest integer greater than or equal to its numeric argument. - * @param x A numeric expression. - */ - ceil(x: number): number; - - /** - * Returns the cosine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - cos(x: number): number; - - /** - * Returns e (the base of natural logarithms) raised to a power. - * @param x A numeric expression representing the power of e. - */ - exp(x: number): number; - - /** - * Returns the greatest integer less than or equal to its numeric argument. - * @param x A numeric expression. - */ - floor(x: number): number; - - /** - * Returns the natural logarithm (base e) of a number. - * @param x A numeric expression. - */ - log(x: number): number; - - /** - * Returns the larger of a set of supplied numeric expressions. - * @param values Numeric expressions to be evaluated. - */ - max(...values: number[]): number; - - /** - * Returns the smaller of a set of supplied numeric expressions. - * @param values Numeric expressions to be evaluated. - */ - min(...values: number[]): number; - - /** - * Returns the value of a base expression taken to a specified power. - * @param x The base value of the expression. - * @param y The exponent value of the expression. - */ - pow(x: number, y: number): number; - - /** Returns a pseudorandom number between 0 and 1. */ - random(): number; - - /** - * Returns a supplied numeric expression rounded to the nearest integer. - * @param x The value to be rounded to the nearest integer. - */ - round(x: number): number; - - /** - * Returns the sine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - sin(x: number): number; - - /** - * Returns the square root of a number. - * @param x A numeric expression. - */ - sqrt(x: number): number; - - /** - * Returns the tangent of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - tan(x: number): number; - } + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** An intrinsic object that provides basic mathematics functionality and constants. */ - var Math: Math; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** Enables basic storage and retrieval of dates and times. */ - interface Date { - /** Returns a string representation of a date. The format of the string depends on the locale. */ - toString(): string; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** Returns a date as a string value. */ - toDateString(): string; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Uint16Array; - /** Returns a time as a string value. */ - toTimeString(): string; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** Returns a value as a string value appropriate to the host environment's current locale. */ - toLocaleString(): string; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - /** Returns a date as a string value appropriate to the host environment's current locale. */ - toLocaleDateString(): string; + /** + * Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Uint16Array; - /** Returns a time as a string value appropriate to the host environment's current locale. */ - toLocaleTimeString(): string; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */ - valueOf(): number; + /** + * Returns a string representation of an array. + */ + toString(): string; - /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */ - getTime(): number; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - /** Gets the year, using local time. */ - getFullYear(): number; + [index: number]: number; +} - /** Gets the year using Universal Coordinated Time (UTC). */ - getUTCFullYear(): number; +interface Uint16ArrayConstructor { + readonly prototype: Uint16Array; - /** Gets the month, using local time. */ - getMonth(): number; + new (length: number): Uint16Array; - /** Gets the month of a Date object using Universal Coordinated Time (UTC). */ - getUTCMonth(): number; + new (array: ArrayLike): Uint16Array; - /** Gets the day-of-the-month, using local time. */ - getDate(): number; - - /** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */ - getUTCDate(): number; - - /** Gets the day of the week, using local time. */ - getDay(): number; - - /** Gets the day of the week using Universal Coordinated Time (UTC). */ - getUTCDay(): number; - - /** Gets the hours in a date, using local time. */ - getHours(): number; - - /** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */ - getUTCHours(): number; - - /** Gets the minutes of a Date object, using local time. */ - getMinutes(): number; - - /** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */ - getUTCMinutes(): number; - - /** Gets the seconds of a Date object, using local time. */ - getSeconds(): number; - - /** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */ - getUTCSeconds(): number; - - /** Gets the milliseconds of a Date, using local time. */ - getMilliseconds(): number; - - /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */ - getUTCMilliseconds(): number; - - /** Gets the difference in minutes between Universal Coordinated Time (UTC) and the time on the local computer. */ - getTimezoneOffset(): number; - - /** - * Sets the date and time value in the Date object. - * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT. - */ - setTime(time: number): number; - - /** - * Sets the milliseconds value in the Date object using local time. - * @param ms A numeric value equal to the millisecond value. - */ - setMilliseconds(ms: number): number; - - /** - * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC). - * @param ms A numeric value equal to the millisecond value. - */ - setUTCMilliseconds(ms: number): number; - - /** - * Sets the seconds value in the Date object using local time. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setSeconds(sec: number, ms?: number): number; - - /** - * Sets the seconds value in the Date object using Universal Coordinated Time (UTC). - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setUTCSeconds(sec: number, ms?: number): number; - - /** - * Sets the minutes value in the Date object using local time. - * @param min A numeric value equal to the minutes value. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setMinutes(min: number, sec?: number, ms?: number): number; - - /** - * Sets the minutes value in the Date object using Universal Coordinated Time (UTC). - * @param min A numeric value equal to the minutes value. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setUTCMinutes(min: number, sec?: number, ms?: number): number; - - /** - * Sets the hour value in the Date object using local time. - * @param hours A numeric value equal to the hours value. - * @param min A numeric value equal to the minutes value. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setHours(hours: number, min?: number, sec?: number, ms?: number): number; - - /** - * Sets the hours value in the Date object using Universal Coordinated Time (UTC). - * @param hours A numeric value equal to the hours value. - * @param min A numeric value equal to the minutes value. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number; - - /** - * Sets the numeric day-of-the-month value of the Date object using local time. - * @param date A numeric value equal to the day of the month. - */ - setDate(date: number): number; - - /** - * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC). - * @param date A numeric value equal to the day of the month. - */ - setUTCDate(date: number): number; - - /** - * Sets the month value in the Date object using local time. - * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. - * @param date A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used. - */ - setMonth(month: number, date?: number): number; - - /** - * Sets the month value in the Date object using Universal Coordinated Time (UTC). - * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. - * @param date A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used. - */ - setUTCMonth(month: number, date?: number): number; - - /** - * Sets the year of the Date object using local time. - * @param year A numeric value for the year. - * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified. - * @param date A numeric value equal for the day of the month. - */ - setFullYear(year: number, month?: number, date?: number): number; - - /** - * Sets the year value in the Date object using Universal Coordinated Time (UTC). - * @param year A numeric value equal to the year. - * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied. - * @param date A numeric value equal to the day of the month. - */ - setUTCFullYear(year: number, month?: number, date?: number): number; - - /** Returns a date converted to a string using Universal Coordinated Time (UTC). */ - toUTCString(): string; - - /** Returns a date as a string value in ISO format. */ - toISOString(): string; - - /** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */ - toJSON(key?: any): string; - } + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint16Array; - interface DateConstructor { - new (): Date; - - new (value: number | string): Date; - - /** - * Creates a new Date. - * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. - * @param monthIndex The month as a number between 0 and 11 (January to December). - * @param date The date as a number between 1 and 31. - * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. - * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. - * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. - * @param ms A number from 0 to 999 that specifies the milliseconds. - */ - new (year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; - - (): string; - - readonly prototype: Date; - - /** - * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970. - * @param s A date string - */ - parse(s: string): number; - - /** - * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. - * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. - * @param monthIndex The month as a number between 0 and 11 (January to December). - * @param date The date as a number between 1 and 31. - * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. - * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. - * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. - * @param ms A number from 0 to 999 that specifies the milliseconds. - */ - UTC(year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; - - /** Returns the number of milliseconds elapsed since midnight, January 1, 1970 Universal Coordinated Time (UTC). */ - now(): number; - } + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint16Array; - var Date: DateConstructor; + new (array: ArrayLike | ArrayBuffer): Uint16Array; - interface RegExpMatchArray extends Array { - /** - * The index of the search at which the result was found. - */ - index?: number; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * A copy of the search string. - */ - input?: string; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Uint16Array; - /** - * The first match. This will always be present because `null` will be returned if there are no matches. - */ - 0: string; - } + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Uint16Array; - interface RegExpExecArray extends Array { - /** - * The index of the search at which the result was found. - */ - index: number; - - /** - * A copy of the search string. - */ - input: string; - - /** - * The first match. This will always be present because `null` will be returned if there are no matches. - */ - 0: string; - } + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; +} - interface RegExp { - /** - * Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search. - * @param string The String object or string literal on which to perform the search. - */ - exec(string: string): RegExpExecArray | null; +var Uint16Array: Uint16ArrayConstructor; - /** - * Returns a Boolean value that indicates whether or not a pattern exists in a searched string. - * @param string String on which to perform the search. - */ - test(string: string): boolean; +/** + * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the + * requested number of bytes could not be allocated an exception is raised. + */ +interface Int32Array { + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. */ - readonly source: string; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */ - readonly global: boolean; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */ - readonly ignoreCase: boolean; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */ - readonly multiline: boolean; + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - lastIndex: number; - } + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - interface RegExpConstructor { - new (pattern: RegExp | string): RegExp; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - new (pattern: string, flags?: string): RegExp; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int32Array; - (pattern: RegExp | string): RegExp; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - (pattern: string, flags?: string): RegExp; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - readonly "prototype": RegExp; - } + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - var RegExp: RegExpConstructor; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - interface Error { - name: string; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - message: string; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - stack?: string; - } + /** + * The length of the array. + */ + readonly length: number; - interface ErrorConstructor { - new (message?: string): Error; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int32Array; - (message?: string): Error; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; - readonly prototype: Error; - } + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - var Error: ErrorConstructor; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - interface EvalError extends Error { - } + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; - interface EvalErrorConstructor extends ErrorConstructor { - new (message?: string): EvalError; + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - (message?: string): EvalError; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - readonly prototype: EvalError; - } + /** + * Reverses the elements in an Array. + */ + reverse(): this; - var EvalError: EvalErrorConstructor; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - interface RangeError extends Error { - } + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Int32Array; - interface RangeErrorConstructor extends ErrorConstructor { - new (message?: string): RangeError; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - (message?: string): RangeError; + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - readonly prototype: RangeError; - } + /** + * Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Int32Array; - var RangeError: RangeErrorConstructor; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - interface ReferenceError extends Error { - } + /** + * Returns a string representation of an array. + */ + toString(): string; - interface ReferenceErrorConstructor extends ErrorConstructor { - new (message?: string): ReferenceError; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - (message?: string): ReferenceError; + [index: number]: number; +} - readonly prototype: ReferenceError; - } +interface Int32ArrayConstructor { + readonly prototype: Int32Array; - var ReferenceError: ReferenceErrorConstructor; + new (length: number): Int32Array; - interface SyntaxError extends Error { - } + new (array: ArrayLike): Int32Array; - interface SyntaxErrorConstructor extends ErrorConstructor { - new (message?: string): SyntaxError; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int32Array; - (message?: string): SyntaxError; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int32Array; - readonly prototype: SyntaxError; - } + new (array: ArrayLike | ArrayBuffer): Int32Array; - var SyntaxError: SyntaxErrorConstructor; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - interface TypeError extends Error { - } + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Int32Array; - interface TypeErrorConstructor extends ErrorConstructor { - new (message?: string): TypeError; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Int32Array; - (message?: string): TypeError; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; +} - readonly prototype: TypeError; - } +var Int32Array: Int32ArrayConstructor; - var TypeError: TypeErrorConstructor; +/** + * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the + * requested number of bytes could not be allocated an exception is raised. + */ +interface Uint32Array { + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - interface URIError extends Error { - } + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - interface URIErrorConstructor extends ErrorConstructor { - new (message?: string): URIError; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - (message?: string): URIError; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - readonly prototype: URIError; - } + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - var URIError: URIErrorConstructor; - - interface JSON { - /** - * Converts a JavaScript Object Notation (JSON) string into an object. - * @param text A valid JSON string. - * @param reviver A function that transforms the results. This function is called for each member of the object. - * If a member contains nested objects, the nested objects are transformed before the parent object is. - * @throws {SyntaxError} If `text` is not valid JSON. - */ - parse(text: string, reviver?: (this: any, key: string, value: any) => any): any; - - /** - * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. - * @param value A JavaScript value, usually an object or array, to be converted. - * @param replacer A function that transforms the results. - * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. - * @throws {TypeError} If a circular reference or a BigInt value is found. - */ - stringify(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string; - - /** - * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. - * @param value A JavaScript value, usually an object or array, to be converted. - * @param replacer An array of strings and numbers that acts as an approved list for selecting the object properties that will be stringified. - * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. - * @throws {TypeError} If a circular reference or a BigInt value is found. - */ - stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string; - } + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; /** - * An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format. - */ - var JSON: JSON; - - ///////////////////////////// - /// ECMAScript Array API (specially handled by compiler) - ///////////////////////////// - - interface ReadonlyArray { - /** - * Gets the length of the array. This is a number one higher than the highest element defined in an array. - */ - readonly length: number; - - /** - * Returns a string representation of an array. - */ - toString(): string; - - /** - * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods. - */ - toLocaleString(): string; - - /** - * Combines two or more arrays. - * @param items Additional items to add to the end of array1. - */ - concat(...items: ConcatArray[]): T[]; - - /** - * Combines two or more arrays. - * @param items Additional items to add to the end of array1. - */ - concat(...items: (T | ConcatArray)[]): T[]; - - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; - - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): T[]; - - /** - * Returns the index of the first occurrence of a value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. - */ - indexOf(searchElement: T, fromIndex?: number): number; - - /** - * Returns the index of the last occurrence of a specified value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array. - */ - lastIndexOf(searchElement: T, fromIndex?: number): number; - - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): this is readonly S[]; - - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean; - - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean; - - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: T, index: number, array: readonly T[]) => void, thisArg?: any): void; - - /** - * Calls a defined callback function on each element of an array, and returns an array that contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: T, index: number, array: readonly T[]) => U, thisArg?: any): U[]; - - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): S[]; - - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): T[]; - - /** - * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T; - - reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T; - - /** - * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T; - - reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U; - - readonly [n: number]: T; - } + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - interface ConcatArray { - readonly length: number; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint32Array; - readonly [n: number]: T; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - join(separator?: string): string; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - slice(start?: number, end?: number): T[]; - } + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - interface Array { - /** - * Gets or sets the length of the array. This is a number one higher than the highest index in the array. - */ - length: number; - - /** - * Returns a string representation of an array. - */ - toString(): string; - - /** - * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods. - */ - toLocaleString(): string; - - /** - * Removes the last element from an array and returns it. - * If the array is empty, undefined is returned and the array is not modified. - */ - pop(): T | undefined; - - /** - * Appends new elements to the end of an array, and returns the new length of the array. - * @param items New elements to add to the array. - */ - push(...items: T[]): number; - - /** - * Combines two or more arrays. - * This method returns a new array without modifying any existing arrays. - * @param items Additional arrays and/or items to add to the end of the array. - */ - concat(...items: ConcatArray[]): T[]; - - /** - * Combines two or more arrays. - * This method returns a new array without modifying any existing arrays. - * @param items Additional arrays and/or items to add to the end of the array. - */ - concat(...items: (T | ConcatArray)[]): T[]; - - /** - * Adds all the elements of an array into a string, separated by the specified separator string. - * @param separator A string used to separate one element of the array from the next in the resulting string. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; - - /** - * Reverses the elements in an array in place. - * This method mutates the array and returns a reference to the same array. - */ - reverse(): T[]; - - /** - * Removes the first element from an array and returns it. - * If the array is empty, undefined is returned and the array is not modified. - */ - shift(): T | undefined; - - /** - * Returns a copy of a section of an array. - * For both start and end, a negative index can be used to indicate an offset from the end of the array. - * For example, -2 refers to the second to last element of the array. - * @param start The beginning index of the specified portion of the array. - * If start is undefined, then the slice begins at index 0. - * @param end The end index of the specified portion of the array. This is exclusive of the element at the index 'end'. - * If end is undefined, then the slice extends to the end of the array. - */ - slice(start?: number, end?: number): T[]; - - /** - * Sorts an array in place. - * This method mutates the array and returns a reference to the same array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: T, b: T) => number): this; - - /** - * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. - * @param start The zero-based location in the array from which to start removing elements. - * @param deleteCount The number of elements to remove. Omitting this argument will remove all elements from the start - * paramater location to end of the array. If value of this argument is either a negative number, zero, undefined, or a type - * that cannot be converted to an integer, the function will evaluate the argument as zero and not remove any elements. - * @returns An array containing the elements that were deleted. - */ - splice(start: number, deleteCount?: number): T[]; - - /** - * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. - * @param start The zero-based location in the array from which to start removing elements. - * @param deleteCount The number of elements to remove. If value of this argument is either a negative number, zero, - * undefined, or a type that cannot be converted to an integer, the function will evaluate the argument as zero and - * not remove any elements. - * @param items Elements to insert into the array in place of the deleted elements. - * @returns An array containing the elements that were deleted. - */ - splice(start: number, deleteCount: number, ...items: T[]): T[]; - - /** - * Inserts new elements at the start of an array, and returns the new length of the array. - * @param items Elements to insert at the start of the array. - */ - unshift(...items: T[]): number; - - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. - */ - indexOf(searchElement: T, fromIndex?: number): number; - - /** - * Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin searching backward. If fromIndex is omitted, the search starts at the last index in the array. - */ - lastIndexOf(searchElement: T, fromIndex?: number): number; - - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): this is S[]; - - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; - - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; - - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void; - - /** - * Calls a defined callback function on each element of an array, and returns an array that contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[]; - - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; - - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T[]; - - /** - * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; - - reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; - - /** - * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; - - reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; - - [n: number]: T; - } + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - interface ArrayConstructor { - new (arrayLength?: number): any[]; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - new (arrayLength: number): T[]; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - new (...items: T[]): T[]; + /** + * The length of the array. + */ + readonly length: number; - (arrayLength?: number): any[]; + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint32Array; - (arrayLength: number): T[]; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; - (...items: T[]): T[]; + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - isArray(arg: any): arg is any[]; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - readonly prototype: any[]; - } + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; - var Array: ArrayConstructor; + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - interface TypedPropertyDescriptor { - enumerable?: boolean; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - configurable?: boolean; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - writable?: boolean; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - value?: T; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Uint32Array; - get?: () => T; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - set?: (value: T) => void; - } + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - type PromiseConstructorLike = new (executor: (resolve: (value: T | PromiseLike) => void, reject: (reason?: any) => void) => void) => PromiseLike; + /** + * Gets a new Uint32Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Uint32Array; - interface PromiseLike { - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): PromiseLike; - } + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; /** - * Represents the completion of an asynchronous operation + * Returns a string representation of an array. */ - interface Promise { - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise; + toString(): string; + + /** Returns the primitive value of the specified object. */ + valueOf(): this; + + [index: number]: number; +} - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise; - } +interface Uint32ArrayConstructor { + readonly prototype: Uint32Array; - /** - * Recursively unwraps the "awaited type" of a type. Non-promise "thenables" should resolve to `never`. This emulates the behavior of `await`. - */ - type Awaited = T extends null | undefined ? T : // special case for `null | undefined` when not in `--strictNullChecks` mode - T extends object & { then(onfulfilled: infer F, ...args: infer _): any; } ? // `await` only unwraps object types with a callable `then`. Non-object types are not unwrapped - F extends ((value: infer V, ...args: infer _) => any) ? // if the argument to `then` is callable, extracts the first argument - Awaited : // recursively unwrap the value - never : // the argument to `then` was not callable - T; + new (length: number): Uint32Array; - // non-object or non-thenable + new (array: ArrayLike): Uint32Array; - interface ArrayLike { - readonly length: number; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint32Array; - readonly [n: number]: T; - } + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint32Array; + + new (array: ArrayLike | ArrayBuffer): Uint32Array; /** - * Make all properties in T optional + * The size in bytes of each element in the array. */ - type Partial = { - [P in keyof T]?: T[P]; - }; + readonly BYTES_PER_ELEMENT: number; /** - * Make all properties in T required + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. */ - type Required = { - [P in keyof T]-?: T[P]; - }; + of(...items: number[]): Uint32Array; /** - * Make all properties in T readonly + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. */ - type Readonly = { - readonly [P in keyof T]: T[P]; - }; + from(arrayLike: ArrayLike): Uint32Array; /** - * From T, pick a set of properties whose keys are in the union K + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. */ - type Pick = { - [P in K]: T[P]; - }; + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; +} +var Uint32Array: Uint32ArrayConstructor; + +/** + * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number + * of bytes could not be allocated an exception is raised. + */ +interface Float32Array { /** - * Construct a type with a set of properties K of type T + * The size in bytes of each element in the array. */ - type Record = { - [P in K]: T; - }; + readonly BYTES_PER_ELEMENT: number; /** - * Exclude from T those types that are assignable to U + * The ArrayBuffer instance referenced by the array. */ - type Exclude = T extends U ? never : T; + readonly buffer: TArrayBuffer; /** - * Extract from T those types that are assignable to U + * The length in bytes of the array. */ - type Extract = T extends U ? T : never; + readonly byteLength: number; /** - * Construct a type with the properties of T except for those in type K. + * The offset in bytes of the array. */ - type Omit = Pick>; + readonly byteOffset: number; /** - * Exclude null and undefined from T + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. */ - type NonNullable = T & {}; + copyWithin(target: number, start: number, end?: number): this; /** - * Obtain the parameters of a function type in a tuple + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. */ - type Parameters any> = T extends (...args: infer P) => any ? P : never; + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; /** - * Obtain the parameters of a constructor function type in a tuple + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. */ - type ConstructorParameters any> = T extends abstract new (...args: infer P) => any ? P : never; + fill(value: number, start?: number, end?: number): this; /** - * Obtain the return type of a function type + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. */ - type ReturnType any> = T extends (...args: any) => infer R ? R : any; + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float32Array; /** - * Obtain the return type of a constructor function type + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. */ - type InstanceType any> = T extends abstract new (...args: any) => infer R ? R : any; + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; /** - * Convert string literal type to uppercase + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. */ - type Uppercase = intrinsic; + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; /** - * Convert string literal type to lowercase + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. */ - type Lowercase = intrinsic; + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; /** - * Convert first character of string literal type to uppercase + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. */ - type Capitalize = intrinsic; + indexOf(searchElement: number, fromIndex?: number): number; /** - * Convert first character of string literal type to lowercase + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. */ - type Uncapitalize = intrinsic; + join(separator?: string): string; /** - * Marker for non-inference type position + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. */ - type NoInfer = intrinsic; + lastIndexOf(searchElement: number, fromIndex?: number): number; /** - * Marker for contextual 'this' type + * The length of the array. */ - interface ThisType { - } + readonly length: number; /** - * Stores types to be used with WeakSet, WeakMap, WeakRef, and FinalizationRegistry + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. */ - interface WeakKeyTypes { - } - - type WeakKey = WeakKeyTypes[keyof WeakKeyTypes]; + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float32Array; /** - * Represents a raw buffer of binary data, which is used to store data for the - * different typed arrays. ArrayBuffers cannot be read from or written to directly, - * but can be passed to a typed array or DataView Object to interpret the raw - * buffer as needed. + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. */ - interface ArrayBuffer { - /** - * Read-only. The length of the ArrayBuffer (in bytes). - */ - readonly byteLength: number; + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; - /** - * Returns a section of an ArrayBuffer. - */ - slice(begin?: number, end?: number): ArrayBuffer; - } + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; /** - * Allowed ArrayBuffer types for the buffer of an ArrayBufferView and related Typed Arrays. + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. */ - interface ArrayBufferTypes { - ArrayBuffer: ArrayBuffer; - } - - type ArrayBufferLike = ArrayBufferTypes[keyof ArrayBufferTypes]; - - interface ArrayBufferConstructor { - readonly prototype: ArrayBuffer; - - new (byteLength: number): ArrayBuffer; - - isView(arg: any): arg is ArrayBufferView; - } - - var ArrayBuffer: ArrayBufferConstructor; - - interface ArrayBufferView { - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; - - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; - } - - interface DataView { - readonly buffer: TArrayBuffer; - - readonly byteLength: number; - - readonly byteOffset: number; - - /** - * Gets the Float32 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getFloat32(byteOffset: number, littleEndian?: boolean): number; - - /** - * Gets the Float64 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getFloat64(byteOffset: number, littleEndian?: boolean): number; - - /** - * Gets the Int8 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - */ - getInt8(byteOffset: number): number; - - /** - * Gets the Int16 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getInt16(byteOffset: number, littleEndian?: boolean): number; - - /** - * Gets the Int32 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getInt32(byteOffset: number, littleEndian?: boolean): number; - - /** - * Gets the Uint8 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - */ - getUint8(byteOffset: number): number; - - /** - * Gets the Uint16 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getUint16(byteOffset: number, littleEndian?: boolean): number; - - /** - * Gets the Uint32 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - * @param littleEndian If false or undefined, a big-endian value should be read. - */ - getUint32(byteOffset: number, littleEndian?: boolean): number; - - /** - * Stores an Float32 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void; - - /** - * Stores an Float64 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void; - - /** - * Stores an Int8 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - */ - setInt8(byteOffset: number, value: number): void; - - /** - * Stores an Int16 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setInt16(byteOffset: number, value: number, littleEndian?: boolean): void; - - /** - * Stores an Int32 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setInt32(byteOffset: number, value: number, littleEndian?: boolean): void; - - /** - * Stores an Uint8 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - */ - setUint8(byteOffset: number, value: number): void; - - /** - * Stores an Uint16 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setUint16(byteOffset: number, value: number, littleEndian?: boolean): void; - - /** - * Stores an Uint32 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written. - */ - setUint32(byteOffset: number, value: number, littleEndian?: boolean): void; - } - - interface DataViewConstructor { - readonly prototype: DataView; - - new (buffer: TArrayBuffer, byteOffset?: number, byteLength?: number): DataView; - } + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - var DataView: DataViewConstructor; - - /** - * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested - * number of bytes could not be allocated an exception is raised. - */ - interface Int8Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; - - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; - - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; - - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; - - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int8Array; - - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; - - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; - - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; - - /** - * The length of the array. - */ - readonly length: number; - - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int8Array; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; - - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; - - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - - /** - * Reverses the elements in an Array. - */ - reverse(): this; - - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; - - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Int8Array; - - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; - - /** - * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Int8Array; - - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; - - /** - * Returns a string representation of an array. - */ - toString(): string; - - /** Returns the primitive value of the specified object. */ - valueOf(): this; - - [index: number]: number; - } - - interface Int8ArrayConstructor { - readonly prototype: Int8Array; - - new (length: number): Int8Array; - - new (array: ArrayLike): Int8Array; - - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int8Array; - - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int8Array; - - new (array: ArrayLike | ArrayBuffer): Int8Array; - - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Int8Array; - - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Int8Array; - - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; - } - - var Int8Array: Int8ArrayConstructor; - - /** - * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the - * requested number of bytes could not be allocated an exception is raised. - */ - interface Uint8Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; - - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; - - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; - - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; - - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint8Array; - - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; - - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; - - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; - - /** - * The length of the array. - */ - readonly length: number; - - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint8Array; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; - - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; - - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - - /** - * Reverses the elements in an Array. - */ - reverse(): this; - - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; - - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Uint8Array; - - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; - - /** - * Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Uint8Array; - - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; - - /** - * Returns a string representation of an array. - */ - toString(): string; - - /** Returns the primitive value of the specified object. */ - valueOf(): this; - - [index: number]: number; - } - - interface Uint8ArrayConstructor { - readonly prototype: Uint8Array; - - new (length: number): Uint8Array; - - new (array: ArrayLike): Uint8Array; - - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint8Array; - - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8Array; - - new (array: ArrayLike | ArrayBuffer): Uint8Array; - - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Uint8Array; - - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Uint8Array; - - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; - } - - var Uint8Array: Uint8ArrayConstructor; - - /** - * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0. - * If the requested number of bytes could not be allocated an exception is raised. - */ - interface Uint8ClampedArray { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; - - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; - - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; - - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; - - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint8ClampedArray; - - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; - - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; - - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; - - /** - * The length of the array. - */ - readonly length: number; - - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint8ClampedArray; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; - - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; - - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - - /** - * Reverses the elements in an Array. - */ - reverse(): this; - - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; - - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Uint8ClampedArray; - - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; - - /** - * Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Uint8ClampedArray; - - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; - - /** - * Returns a string representation of an array. - */ - toString(): string; - - /** Returns the primitive value of the specified object. */ - valueOf(): this; - - [index: number]: number; - } - - interface Uint8ClampedArrayConstructor { - readonly prototype: Uint8ClampedArray; - - new (length: number): Uint8ClampedArray; - - new (array: ArrayLike): Uint8ClampedArray; - - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray; + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - new (array: ArrayLike | ArrayBuffer): Uint8ClampedArray; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Uint8ClampedArray; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Uint8ClampedArray; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Float32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; - } + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - var Uint8ClampedArray: Uint8ClampedArrayConstructor; - - /** - * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the - * requested number of bytes could not be allocated an exception is raised. - */ - interface Int16Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; - - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; - - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; - - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; - - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int16Array; - - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; - - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; - - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; - - /** - * The length of the array. - */ - readonly length: number; - - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int16Array; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; - - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; - - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - - /** - * Reverses the elements in an Array. - */ - reverse(): this; - - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; - - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Int16Array; - - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; - - /** - * Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Int16Array; - - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; - - /** - * Returns a string representation of an array. - */ - toString(): string; - - /** Returns the primitive value of the specified object. */ - valueOf(): this; - - [index: number]: number; - } + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - interface Int16ArrayConstructor { - readonly prototype: Int16Array; + /** + * Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Float32Array; - new (length: number): Int16Array; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - new (array: ArrayLike): Int16Array; + /** + * Returns a string representation of an array. + */ + toString(): string; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int16Array; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int16Array; + [index: number]: number; +} - new (array: ArrayLike | ArrayBuffer): Int16Array; +interface Float32ArrayConstructor { + readonly prototype: Float32Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + new (length: number): Float32Array; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Int16Array; + new (array: ArrayLike): Float32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Int16Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Float32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; - } + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float32Array; - var Int16Array: Int16ArrayConstructor; - - /** - * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the - * requested number of bytes could not be allocated an exception is raised. - */ - interface Uint16Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; - - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; - - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; - - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; - - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint16Array; - - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; - - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; - - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; - - /** - * The length of the array. - */ - readonly length: number; - - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint16Array; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; - - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; - - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - - /** - * Reverses the elements in an Array. - */ - reverse(): this; - - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; - - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Uint16Array; - - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; - - /** - * Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Uint16Array; - - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; - - /** - * Returns a string representation of an array. - */ - toString(): string; - - /** Returns the primitive value of the specified object. */ - valueOf(): this; - - [index: number]: number; - } + new (array: ArrayLike | ArrayBuffer): Float32Array; - interface Uint16ArrayConstructor { - readonly prototype: Uint16Array; + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - new (length: number): Uint16Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Float32Array; - new (array: ArrayLike): Uint16Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Float32Array; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint16Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; +} - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint16Array; +var Float32Array: Float32ArrayConstructor; - new (array: ArrayLike | ArrayBuffer): Uint16Array; +/** + * A typed array of 64-bit float values. The contents are initialized to 0. If the requested + * number of bytes could not be allocated an exception is raised. + */ +interface Float64Array { + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Uint16Array; + /** + * The length in bytes of the array. + */ + readonly byteLength: number; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Uint16Array; + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; - } + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; - var Uint16Array: Uint16ArrayConstructor; - - /** - * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the - * requested number of bytes could not be allocated an exception is raised. - */ - interface Int32Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; - - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; - - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; - - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; - - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int32Array; - - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; - - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; - - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; - - /** - * The length of the array. - */ - readonly length: number; - - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int32Array; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; - - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; - - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - - /** - * Reverses the elements in an Array. - */ - reverse(): this; - - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; - - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Int32Array; - - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; - - /** - * Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Int32Array; - - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; - - /** - * Returns a string representation of an array. - */ - toString(): string; - - /** Returns the primitive value of the specified object. */ - valueOf(): this; - - [index: number]: number; - } + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - interface Int32ArrayConstructor { - readonly prototype: Int32Array; + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; - new (length: number): Int32Array; + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float64Array; - new (array: ArrayLike): Int32Array; + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int32Array; + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int32Array; + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - new (array: ArrayLike | ArrayBuffer): Int32Array; + /** + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Int32Array; + /** + * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Int32Array; + /** + * The length of the array. + */ + readonly length: number; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; - } + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float64Array; - var Int32Array: Int32ArrayConstructor; - - /** - * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the - * requested number of bytes could not be allocated an exception is raised. - */ - interface Uint32Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; - - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; - - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; - - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; - - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint32Array; - - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; - - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; - - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; - - /** - * The length of the array. - */ - readonly length: number; - - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint32Array; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; - - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; - - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - - /** - * Reverses the elements in an Array. - */ - reverse(): this; - - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; - - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Uint32Array; - - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; - - /** - * Gets a new Uint32Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Uint32Array; - - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; - - /** - * Returns a string representation of an array. - */ - toString(): string; - - /** Returns the primitive value of the specified object. */ - valueOf(): this; - - [index: number]: number; - } + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; - interface Uint32ArrayConstructor { - readonly prototype: Uint32Array; + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - new (length: number): Uint32Array; + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - new (array: ArrayLike): Uint32Array; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint32Array; + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint32Array; + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - new (array: ArrayLike | ArrayBuffer): Uint32Array; + /** + * Reverses the elements in an Array. + */ + reverse(): this; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Uint32Array; + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Float64Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Uint32Array; + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; - } + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; - var Uint32Array: Uint32ArrayConstructor; - - /** - * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number - * of bytes could not be allocated an exception is raised. - */ - interface Float32Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; - - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; - - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; - - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; - - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float32Array; - - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; - - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; - - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; - - /** - * The length of the array. - */ - readonly length: number; - - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float32Array; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; - - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; - - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - - /** - * Reverses the elements in an Array. - */ - reverse(): this; - - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; - - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Float32Array; - - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; - - /** - * Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Float32Array; - - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; - - /** - * Returns a string representation of an array. - */ - toString(): string; - - /** Returns the primitive value of the specified object. */ - valueOf(): this; - - [index: number]: number; - } + /** + * Gets a new Float64Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Float64Array; - interface Float32ArrayConstructor { - readonly prototype: Float32Array; + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(): string; - new (length: number): Float32Array; + /** + * Returns a string representation of an array. + */ + toString(): string; - new (array: ArrayLike): Float32Array; + /** Returns the primitive value of the specified object. */ + valueOf(): this; - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Float32Array; + [index: number]: number; +} - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float32Array; +interface Float64ArrayConstructor { + readonly prototype: Float64Array; - new (array: ArrayLike | ArrayBuffer): Float32Array; + new (length: number): Float64Array; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + new (array: ArrayLike): Float64Array; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Float32Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Float64Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Float32Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float64Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; - } + new (array: ArrayLike | ArrayBuffer): Float64Array; - var Float32Array: Float32ArrayConstructor; - - /** - * A typed array of 64-bit float values. The contents are initialized to 0. If the requested - * number of bytes could not be allocated an exception is raised. - */ - interface Float64Array { - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; - - /** - * The ArrayBuffer instance referenced by the array. - */ - readonly buffer: TArrayBuffer; - - /** - * The length in bytes of the array. - */ - readonly byteLength: number; - - /** - * The offset in bytes of the array. - */ - readonly byteOffset: number; - - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): this; - - /** - * Determines whether all the members of an array satisfy the specified test. - * @param predicate A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - - /** - * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; - - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param predicate A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float64Array; - - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; - - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param predicate find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; - - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; - - /** - * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; - - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; - - /** - * Returns the index of the last occurrence of a value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; - - /** - * The length of the array. - */ - readonly length: number; - - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float64Array; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; - - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; - - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; - - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; - - /** - * Reverses the elements in an Array. - */ - reverse(): this; - - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: ArrayLike, offset?: number): void; - - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Float64Array; - - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param predicate A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; - - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compareFn?: (a: number, b: number) => number): this; - - /** - * Gets a new Float64Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): Float64Array; - - /** - * Converts a number to a string by using the current locale. - */ - toLocaleString(): string; - - /** - * Returns a string representation of an array. - */ - toString(): string; - - /** Returns the primitive value of the specified object. */ - valueOf(): this; - - [index: number]: number; - } + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; - interface Float64ArrayConstructor { - readonly prototype: Float64Array; + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Float64Array; - new (length: number): Float64Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Float64Array; - new (array: ArrayLike): Float64Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; +} - new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Float64Array; +var Float64Array: Float64ArrayConstructor; - new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float64Array; +///////////////////////////// +/// ECMAScript Internationalization API +///////////////////////////// - new (array: ArrayLike | ArrayBuffer): Float64Array; +namespace Intl { +interface CollatorOptions { + usage?: "sort" | "search" | undefined; - /** - * The size in bytes of each element in the array. - */ - readonly BYTES_PER_ELEMENT: number; + localeMatcher?: "lookup" | "best fit" | undefined; - /** - * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. - */ - of(...items: number[]): Float64Array; + numeric?: boolean | undefined; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - */ - from(arrayLike: ArrayLike): Float64Array; + caseFirst?: "upper" | "lower" | "false" | undefined; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; - } + sensitivity?: "base" | "accent" | "case" | "variant" | undefined; - var Float64Array: Float64ArrayConstructor; + collation?: "big5han" | "compat" | "default" | "dict" | "direct" | "ducet" | "emoji" | "eor" | "gb2312" | "phonebk" | "phonetic" | "pinyin" | "reformed" | "searchjl" | "stroke" | "trad" | "unihan" | "zhuyin" | undefined; - ///////////////////////////// - /// ECMAScript Internationalization API - ///////////////////////////// + ignorePunctuation?: boolean | undefined; +} - namespace Intl { - interface CollatorOptions { - usage?: "sort" | "search" | undefined; +interface ResolvedCollatorOptions { + locale: string; - localeMatcher?: "lookup" | "best fit" | undefined; + usage: string; - numeric?: boolean | undefined; + sensitivity: string; - caseFirst?: "upper" | "lower" | "false" | undefined; + ignorePunctuation: boolean; - sensitivity?: "base" | "accent" | "case" | "variant" | undefined; + collation: string; - collation?: "big5han" | "compat" | "default" | "dict" | "direct" | "ducet" | "emoji" | "eor" | "gb2312" | "phonebk" | "phonetic" | "pinyin" | "reformed" | "searchjl" | "stroke" | "trad" | "unihan" | "zhuyin" | undefined; + caseFirst: string; - ignorePunctuation?: boolean | undefined; - } + numeric: boolean; +} - interface ResolvedCollatorOptions { - locale: string; +interface Collator { + compare(x: string, y: string): number; - usage: string; + resolvedOptions(): ResolvedCollatorOptions; +} - sensitivity: string; +interface CollatorConstructor { + new (locales?: string | string[], options?: CollatorOptions): Collator; - ignorePunctuation: boolean; + (locales?: string | string[], options?: CollatorOptions): Collator; - collation: string; + supportedLocalesOf(locales: string | string[], options?: CollatorOptions): string[]; +} - caseFirst: string; +var Collator: CollatorConstructor; - numeric: boolean; - } +interface NumberFormatOptionsStyleRegistry { + decimal: never; - interface Collator { - compare(x: string, y: string): number; + percent: never; - resolvedOptions(): ResolvedCollatorOptions; - } + currency: never; +} - interface CollatorConstructor { - new (locales?: string | string[], options?: CollatorOptions): Collator; +type NumberFormatOptionsStyle = keyof NumberFormatOptionsStyleRegistry; - (locales?: string | string[], options?: CollatorOptions): Collator; +interface NumberFormatOptionsCurrencyDisplayRegistry { + code: never; - supportedLocalesOf(locales: string | string[], options?: CollatorOptions): string[]; - } + symbol: never; - var Collator: CollatorConstructor; + name: never; +} - interface NumberFormatOptionsStyleRegistry { - decimal: never; +type NumberFormatOptionsCurrencyDisplay = keyof NumberFormatOptionsCurrencyDisplayRegistry; - percent: never; +interface NumberFormatOptionsUseGroupingRegistry { +} - currency: never; - } +type NumberFormatOptionsUseGrouping = {} extends NumberFormatOptionsUseGroupingRegistry ? boolean : keyof NumberFormatOptionsUseGroupingRegistry | "true" | "false" | boolean; - type NumberFormatOptionsStyle = keyof NumberFormatOptionsStyleRegistry; +type ResolvedNumberFormatOptionsUseGrouping = {} extends NumberFormatOptionsUseGroupingRegistry ? boolean : keyof NumberFormatOptionsUseGroupingRegistry | false; - interface NumberFormatOptionsCurrencyDisplayRegistry { - code: never; +interface NumberFormatOptions { + localeMatcher?: "lookup" | "best fit" | undefined; - symbol: never; + style?: NumberFormatOptionsStyle | undefined; - name: never; - } + currency?: string | undefined; - type NumberFormatOptionsCurrencyDisplay = keyof NumberFormatOptionsCurrencyDisplayRegistry; + currencyDisplay?: NumberFormatOptionsCurrencyDisplay | undefined; - interface NumberFormatOptionsUseGroupingRegistry { - } + useGrouping?: NumberFormatOptionsUseGrouping | undefined; - type NumberFormatOptionsUseGrouping = {} extends NumberFormatOptionsUseGroupingRegistry ? boolean : keyof NumberFormatOptionsUseGroupingRegistry | "true" | "false" | boolean; + minimumIntegerDigits?: number | undefined; - type ResolvedNumberFormatOptionsUseGrouping = {} extends NumberFormatOptionsUseGroupingRegistry ? boolean : keyof NumberFormatOptionsUseGroupingRegistry | false; + minimumFractionDigits?: number | undefined; - interface NumberFormatOptions { - localeMatcher?: "lookup" | "best fit" | undefined; + maximumFractionDigits?: number | undefined; - style?: NumberFormatOptionsStyle | undefined; + minimumSignificantDigits?: number | undefined; - currency?: string | undefined; + maximumSignificantDigits?: number | undefined; +} - currencyDisplay?: NumberFormatOptionsCurrencyDisplay | undefined; +interface ResolvedNumberFormatOptions { + locale: string; - useGrouping?: NumberFormatOptionsUseGrouping | undefined; + numberingSystem: string; - minimumIntegerDigits?: number | undefined; + style: NumberFormatOptionsStyle; - minimumFractionDigits?: number | undefined; + currency?: string; - maximumFractionDigits?: number | undefined; + currencyDisplay?: NumberFormatOptionsCurrencyDisplay; - minimumSignificantDigits?: number | undefined; + minimumIntegerDigits: number; - maximumSignificantDigits?: number | undefined; - } + minimumFractionDigits?: number; - interface ResolvedNumberFormatOptions { - locale: string; + maximumFractionDigits?: number; - numberingSystem: string; + minimumSignificantDigits?: number; - style: NumberFormatOptionsStyle; + maximumSignificantDigits?: number; - currency?: string; + useGrouping: ResolvedNumberFormatOptionsUseGrouping; +} - currencyDisplay?: NumberFormatOptionsCurrencyDisplay; +interface NumberFormat { + format(value: number): string; - minimumIntegerDigits: number; + resolvedOptions(): ResolvedNumberFormatOptions; +} - minimumFractionDigits?: number; +interface NumberFormatConstructor { + new (locales?: string | string[], options?: NumberFormatOptions): NumberFormat; - maximumFractionDigits?: number; + (locales?: string | string[], options?: NumberFormatOptions): NumberFormat; - minimumSignificantDigits?: number; + supportedLocalesOf(locales: string | string[], options?: NumberFormatOptions): string[]; - maximumSignificantDigits?: number; + readonly prototype: NumberFormat; +} - useGrouping: ResolvedNumberFormatOptionsUseGrouping; - } +var NumberFormat: NumberFormatConstructor; - interface NumberFormat { - format(value: number): string; +interface DateTimeFormatOptions { + localeMatcher?: "best fit" | "lookup" | undefined; - resolvedOptions(): ResolvedNumberFormatOptions; - } + weekday?: "long" | "short" | "narrow" | undefined; - interface NumberFormatConstructor { - new (locales?: string | string[], options?: NumberFormatOptions): NumberFormat; + era?: "long" | "short" | "narrow" | undefined; - (locales?: string | string[], options?: NumberFormatOptions): NumberFormat; + year?: "numeric" | "2-digit" | undefined; - supportedLocalesOf(locales: string | string[], options?: NumberFormatOptions): string[]; + month?: "numeric" | "2-digit" | "long" | "short" | "narrow" | undefined; - readonly prototype: NumberFormat; - } + day?: "numeric" | "2-digit" | undefined; - var NumberFormat: NumberFormatConstructor; + hour?: "numeric" | "2-digit" | undefined; - interface DateTimeFormatOptions { - localeMatcher?: "best fit" | "lookup" | undefined; + minute?: "numeric" | "2-digit" | undefined; - weekday?: "long" | "short" | "narrow" | undefined; + second?: "numeric" | "2-digit" | undefined; - era?: "long" | "short" | "narrow" | undefined; + timeZoneName?: "short" | "long" | "shortOffset" | "longOffset" | "shortGeneric" | "longGeneric" | undefined; - year?: "numeric" | "2-digit" | undefined; + formatMatcher?: "best fit" | "basic" | undefined; - month?: "numeric" | "2-digit" | "long" | "short" | "narrow" | undefined; + hour12?: boolean | undefined; - day?: "numeric" | "2-digit" | undefined; + timeZone?: string | undefined; +} - hour?: "numeric" | "2-digit" | undefined; +interface ResolvedDateTimeFormatOptions { + locale: string; - minute?: "numeric" | "2-digit" | undefined; + calendar: string; - second?: "numeric" | "2-digit" | undefined; + numberingSystem: string; - timeZoneName?: "short" | "long" | "shortOffset" | "longOffset" | "shortGeneric" | "longGeneric" | undefined; + timeZone: string; - formatMatcher?: "best fit" | "basic" | undefined; + hour12?: boolean; - hour12?: boolean | undefined; + weekday?: string; - timeZone?: string | undefined; - } + era?: string; - interface ResolvedDateTimeFormatOptions { - locale: string; + year?: string; - calendar: string; + month?: string; - numberingSystem: string; + day?: string; - timeZone: string; + hour?: string; - hour12?: boolean; + minute?: string; - weekday?: string; + second?: string; - era?: string; + timeZoneName?: string; +} - year?: string; +interface DateTimeFormat { + format(date?: Date | number): string; - month?: string; + resolvedOptions(): ResolvedDateTimeFormatOptions; +} - day?: string; +interface DateTimeFormatConstructor { + new (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat; - hour?: string; + (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat; - minute?: string; + supportedLocalesOf(locales: string | string[], options?: DateTimeFormatOptions): string[]; - second?: string; + readonly prototype: DateTimeFormat; +} - timeZoneName?: string; - } +var DateTimeFormat: DateTimeFormatConstructor; +} - interface DateTimeFormat { - format(date?: Date | number): string; +interface String { + /** + * Determines whether two strings are equivalent in the current or specified locale. + * @param that String to compare to target string + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details. + * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details. + */ + localeCompare(that: string, locales?: string | string[], options?: Intl.CollatorOptions): number; +} - resolvedOptions(): ResolvedDateTimeFormatOptions; - } +interface Number { + /** + * Converts a number to a string by using the current or specified locale. + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; +} - interface DateTimeFormatConstructor { - new (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat; +interface Date { + /** + * Converts a date and time to a string by using the current or specified locale. + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; - (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat; + /** + * Converts a date to a string by using the current or specified locale. + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleDateString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; - supportedLocalesOf(locales: string | string[], options?: DateTimeFormatOptions): string[]; + /** + * Converts a time to a string by using the current or specified locale. + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleTimeString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; +} - readonly prototype: DateTimeFormat; - } +///////////////////////////// +// lib.esnext.array.d.ts +///////////////////////////// +interface ArrayConstructor { + /** + * Creates an array from an async iterator or iterable object. + * @param iterableOrArrayLike An async iterator or array-like object to convert to an array. + */ + fromAsync(iterableOrArrayLike: AsyncIterable | Iterable> | ArrayLike>): Promise; - var DateTimeFormat: DateTimeFormatConstructor; - } + /** + * Creates an array from an async iterator or iterable object. + * + * @param iterableOrArrayLike An async iterator or array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of itarableOrArrayLike. + * Each return value is awaited before being added to result array. + * @param thisArg Value of 'this' used when executing mapfn. + */ + fromAsync(iterableOrArrayLike: AsyncIterable | Iterable | ArrayLike, mapFn: (value: Awaited, index: number) => U, thisArg?: any): Promise[]>; +} - interface String { - /** - * Determines whether two strings are equivalent in the current or specified locale. - * @param that String to compare to target string - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details. - * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details. - */ - localeCompare(that: string, locales?: string | string[], options?: Intl.CollatorOptions): number; - } +///////////////////////////// +// lib.esnext.sharedmemory.d.ts +///////////////////////////// +interface Atomics { + /** + * Performs a finite-time microwait by signaling to the operating system or + * CPU that the current executing code is in a spin-wait loop. + */ + pause(n?: number): void; +} - interface Number { - /** - * Converts a number to a string by using the current or specified locale. - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; - } +///////////////////////////// +// lib.esnext.typedarrays.d.ts +///////////////////////////// +interface Uint8Array { + /** + * Converts the `Uint8Array` to a base64-encoded string. + * @param options If provided, sets the alphabet and padding behavior used. + * @returns A base64-encoded string. + */ + toBase64( + options?: { + alphabet?: "base64" | "base64url" | undefined; + omitPadding?: boolean | undefined; + }, + ): string; - interface Date { - /** - * Converts a date and time to a string by using the current or specified locale. - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; - - /** - * Converts a date to a string by using the current or specified locale. - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleDateString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; - - /** - * Converts a time to a string by using the current or specified locale. - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleTimeString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; - } + /** + * Sets the `Uint8Array` from a base64-encoded string. + * @param string The base64-encoded string. + * @param options If provided, specifies the alphabet and handling of the last chunk. + * @returns An object containing the number of bytes read and written. + * @throws {SyntaxError} If the input string contains characters outside the specified alphabet, or if the last + * chunk is inconsistent with the `lastChunkHandling` option. + */ + setFromBase64( + string: string, + options?: { + alphabet?: "base64" | "base64url" | undefined; + lastChunkHandling?: "loose" | "strict" | "stop-before-partial" | undefined; + }, + ): { + read: number; + written: number; + }; - ///////////////////////////// - // lib.esnext.array.d.ts - ///////////////////////////// - interface ArrayConstructor { - /** - * Creates an array from an async iterator or iterable object. - * @param iterableOrArrayLike An async iterator or array-like object to convert to an array. - */ - fromAsync(iterableOrArrayLike: AsyncIterable | Iterable> | ArrayLike>): Promise; - - /** - * Creates an array from an async iterator or iterable object. - * - * @param iterableOrArrayLike An async iterator or array-like object to convert to an array. - * @param mapfn A mapping function to call on every element of itarableOrArrayLike. - * Each return value is awaited before being added to result array. - * @param thisArg Value of 'this' used when executing mapfn. - */ - fromAsync(iterableOrArrayLike: AsyncIterable | Iterable | ArrayLike, mapFn: (value: Awaited, index: number) => U, thisArg?: any): Promise[]>; - } + /** + * Converts the `Uint8Array` to a base16-encoded string. + * @returns A base16-encoded string. + */ + toHex(): string; - ///////////////////////////// - // lib.esnext.sharedmemory.d.ts - ///////////////////////////// - interface Atomics { - /** - * Performs a finite-time microwait by signaling to the operating system or - * CPU that the current executing code is in a spin-wait loop. - */ - pause(n?: number): void; - } + /** + * Sets the `Uint8Array` from a base16-encoded string. + * @param string The base16-encoded string. + * @returns An object containing the number of bytes read and written. + */ + setFromHex(string: string): { + read: number; + written: number; + }; +} - ///////////////////////////// - // lib.esnext.typedarrays.d.ts - ///////////////////////////// - interface Uint8Array { - /** - * Converts the `Uint8Array` to a base64-encoded string. - * @param options If provided, sets the alphabet and padding behavior used. - * @returns A base64-encoded string. - */ - toBase64( - options?: { - alphabet?: "base64" | "base64url" | undefined; - omitPadding?: boolean | undefined; - }, - ): string; - - /** - * Sets the `Uint8Array` from a base64-encoded string. - * @param string The base64-encoded string. - * @param options If provided, specifies the alphabet and handling of the last chunk. - * @returns An object containing the number of bytes read and written. - * @throws {SyntaxError} If the input string contains characters outside the specified alphabet, or if the last - * chunk is inconsistent with the `lastChunkHandling` option. - */ - setFromBase64( - string: string, - options?: { - alphabet?: "base64" | "base64url" | undefined; - lastChunkHandling?: "loose" | "strict" | "stop-before-partial" | undefined; - }, - ): { - read: number; - written: number; - }; - - /** - * Converts the `Uint8Array` to a base16-encoded string. - * @returns A base16-encoded string. - */ - toHex(): string; - - /** - * Sets the `Uint8Array` from a base16-encoded string. - * @param string The base16-encoded string. - * @returns An object containing the number of bytes read and written. - */ - setFromHex(string: string): { - read: number; - written: number; - }; - } +interface Uint8ArrayConstructor { + /** + * Creates a new `Uint8Array` from a base64-encoded string. + * @param string The base64-encoded string. + * @param options If provided, specifies the alphabet and handling of the last chunk. + * @returns A new `Uint8Array` instance. + * @throws {SyntaxError} If the input string contains characters outside the specified alphabet, or if the last + * chunk is inconsistent with the `lastChunkHandling` option. + */ + fromBase64( + string: string, + options?: { + alphabet?: "base64" | "base64url" | undefined; + lastChunkHandling?: "loose" | "strict" | "stop-before-partial" | undefined; + }, + ): Uint8Array; - interface Uint8ArrayConstructor { - /** - * Creates a new `Uint8Array` from a base64-encoded string. - * @param string The base64-encoded string. - * @param options If provided, specifies the alphabet and handling of the last chunk. - * @returns A new `Uint8Array` instance. - * @throws {SyntaxError} If the input string contains characters outside the specified alphabet, or if the last - * chunk is inconsistent with the `lastChunkHandling` option. - */ - fromBase64( - string: string, - options?: { - alphabet?: "base64" | "base64url" | undefined; - lastChunkHandling?: "loose" | "strict" | "stop-before-partial" | undefined; - }, - ): Uint8Array; - - /** - * Creates a new `Uint8Array` from a base16-encoded string. - * @returns A new `Uint8Array` instance. - */ - fromHex( - string: string, - ): Uint8Array; - } + /** + * Creates a new `Uint8Array` from a base16-encoded string. + * @returns A new `Uint8Array` instance. + */ + fromHex( + string: string, + ): Uint8Array; +} } ///////////////////////////// diff --git a/lib/classifier.mjs b/lib/classifier.mjs index 367303d..baef2cc 100644 --- a/lib/classifier.mjs +++ b/lib/classifier.mjs @@ -5,6 +5,7 @@ import { writeFile, } from "node:fs/promises"; import path from "node:path"; +import ts from "typescript-strada"; import { loadCompatManagementRegistry } from "./compat-management-registry.mjs"; import { loadBaselineDataset, @@ -19,9 +20,9 @@ import { import { findLongestCompatRoot, getCompatSegments, - getDeclarationUnits, getMemberUnits, - getPreferredBaseDeclarationUnits, + getInheritedMemberUnits, + getPreferredDeclarationUnits, getPreferredMemberUnits, getRootSurface, isLibCompatKey, @@ -108,6 +109,7 @@ function createTypedArrayFamilyResolver(libCompatRows, baselineTarget) { const compatRowByKey = new Map( libCompatRows.map(compatRow => [compatRow.compatKey, compatRow]), ); + /** @type {string[]} */ const missingSymbols = []; /** @type {string[]} */ @@ -115,10 +117,12 @@ function createTypedArrayFamilyResolver(libCompatRows, baselineTarget) { for (const symbol of TYPED_ARRAY_INSTANCE_SYMBOLS) { const compatRow = compatRowByKey.get(`javascript.builtins.${symbol}`); + if (!compatRow) { missingSymbols.push(symbol); continue; } + if (isCompatIncluded(compatRow, baselineTarget)) { instanceSymbols.push(symbol); } @@ -132,6 +136,7 @@ function createTypedArrayFamilyResolver(libCompatRows, baselineTarget) { "or the dataset extraction dropped rows (fix the dataset).", ].join("\n")); } + if (!instanceSymbols.length) { throw new Error("Typed array family resolution produced no included typed arrays; refusing to classify TypedArray rows against an empty family"); } @@ -140,6 +145,7 @@ function createTypedArrayFamilyResolver(libCompatRows, baselineTarget) { instanceSymbols, constructorSymbols: instanceSymbols.map(symbol => `${symbol}Constructor`), }; + return resolvedFamily; }; } @@ -159,12 +165,15 @@ export async function classifyManifest(options) { repoRoot, inventory, } = options; + const baselineTarget = manifest.baselineTarget ?? "high"; const datasetPath = requireRelativeManifestPath(manifest.dataset, manifestPath, "dataset"); + const managedDerivedRoots = [ path.join(repoRoot, "derived", "current"), path.join(repoRoot, ".tmp"), ]; + const classificationOutputPath = resolveManagedOutputPath( manifest.classificationOutput, repoRoot, @@ -172,6 +181,7 @@ export async function classifyManifest(options) { "classificationOutput", managedDerivedRoots, ); + const compatManagementOutputPath = resolveManagedOutputPath( manifest.compatManagementOutput, repoRoot, @@ -179,9 +189,11 @@ export async function classifyManifest(options) { "compatManagementOutput", managedDerivedRoots, ); + const compatManagementRegistryPath = manifest.compatManagementRegistry ? requireRelativeManifestPath(manifest.compatManagementRegistry, manifestPath, "compatManagementRegistry") : undefined; + if (!compatManagementRegistryPath) { throw new Error(`Manifest ${manifestPath} is missing compatManagementRegistry`); } @@ -192,6 +204,7 @@ export async function classifyManifest(options) { manifest.snapshot.baselineDate, manifest.snapshot.webFeaturesPackageVersion, ); + const libCompatRows = dataset.compatRows .filter( /** @param {any} compatRow */ @@ -201,6 +214,7 @@ export async function classifyManifest(options) { /** @param {any} left @param {any} right */ (left, right) => compareStringsCaseSensitive(left.compatKey, right.compatKey), ); + const compatManagementRegistry = await loadCompatManagementRegistry(compatManagementRegistryPath, manifest.libSource?.basePackage); const classifiedCompatRows = classifyCompatRowsForTarget({ @@ -282,6 +296,7 @@ export async function classifyManifest(options) { */ export function classifyCompatRowsForTarget(options) { const typedArrayFamily = createTypedArrayFamilyResolver(options.libCompatRows, options.baselineTarget); + const classifiedCompatRows = options.libCompatRows.map(compatRow => classifyCompatRow({ compatRow, baselineTarget: options.baselineTarget, @@ -289,6 +304,7 @@ export function classifyCompatRowsForTarget(options) { compatManagementRegistry: options.compatManagementRegistry, typedArrayFamily, })); + validateDeclarationMappingCoverage({ classifiedCompatRows, compatManagementRegistry: options.compatManagementRegistry, @@ -299,6 +315,7 @@ export function classifyCompatRowsForTarget(options) { classifiedCompatRows, compatManagementRegistry: options.compatManagementRegistry, }); + return classifiedCompatRows; } @@ -319,6 +336,7 @@ function validateDeclarationMappingCoverage(options) { const mappedEntries = options.compatManagementRegistry.entries.flatMap(entry => entry.declarationMapping ? [{ entry, declarationMapping: entry.declarationMapping }] : [] ); + if (!mappedEntries.length) { return; } @@ -326,6 +344,7 @@ function validateDeclarationMappingCoverage(options) { const classifiedRowByCompatKey = new Map( options.classifiedCompatRows.map(row => [row.compatKey, row]), ); + const claimedMemberKeys = new Set( options.classifiedCompatRows .flatMap(row => row.resolvedUnitIds) @@ -334,22 +353,27 @@ function validateDeclarationMappingCoverage(options) { ? [getMemberClaimKey(unit.ownerSymbol, unit.memberName)] : []), ); + const auditedContainerSymbols = new Set(); for (const { entry, declarationMapping } of mappedEntries) { const classifiedRow = classifiedRowByCompatKey.get(entry.compatKey); + if (!classifiedRow) { throw new Error(`Declaration mapping ${entry.compatKey} has no classified compat row`); } + const rootResolution = resolveCompatRoot( options.inventory, getCompatSegments(entry.compatKey), entry, options.typedArrayFamily, ); + if (!rootResolution?.rootSurface) { throw new Error(`Declaration mapping ${entry.compatKey} has no root surface for ${classifiedRow.compatRoot}`); } + for (const symbol of getDeclarationMappingContainerSymbols(rootResolution.rootSurface, declarationMapping.scope)) { auditedContainerSymbols.add(symbol); } @@ -364,7 +388,9 @@ function validateDeclarationMappingCoverage(options) { ? [`${unit.ownerSymbol}.${unit.memberName}`] : [] ); + const uniqueUnclaimedMembers = [...new Set(unclaimedMembers)].sort(compareStringsCaseSensitive); + if (uniqueUnclaimedMembers.length) { throw new Error([ "Declaration mapping coverage drift detected. Members in mapped containers lack compat claims:", @@ -397,16 +423,19 @@ function validateCompatManagementRegistry(options) { .filter(row => row.management) .map(row => row.compatKey) .sort(compareStringsCaseSensitive); + const expectedManaged = compatManagementRegistry.entries .map(entry => entry.compatKey) .sort(compareStringsCaseSensitive); const unexpectedManaged = actualManaged.filter(compatKey => !expectedManaged.includes(compatKey)); const staleManaged = expectedManaged.filter(compatKey => !actualManaged.includes(compatKey)); + const unmanagedSpecialCases = classifiedCompatRows .filter(row => isRegistryManagedResolutionKind(row.resolutionKind) && !row.management) .map(row => row.compatKey) .sort(compareStringsCaseSensitive); + const incompatibleExpectedKinds = classifiedCompatRows .filter(row => row.management?.expectedResolutionKinds @@ -457,10 +486,12 @@ function getCompatManagementReport(options) { /** @type {Map} */ const rowsByGroupId = new Map(); + for (const row of classifiedCompatRows) { if (!row.management) { continue; } + const rows = rowsByGroupId.get(row.management.groupId) ?? []; rows.push(row); rowsByGroupId.set(row.management.groupId, rows); @@ -489,6 +520,7 @@ function getCompatManagementReport(options) { }, groups: compatManagementRegistry.groups.map(group => { const rows = rowsByGroupId.get(group.id) ?? []; + return { id: group.id, category: group.category, @@ -524,9 +556,11 @@ function classifyCompatRow(options) { compatManagementRegistry, typedArrayFamily, } = options; + const compatSegments = getCompatSegments(compatRow.compatKey); const compatManagement = compatManagementRegistry.entryByCompatKey.get(compatRow.compatKey); const rootResolution = resolveCompatRoot(inventory, compatSegments, compatManagement, typedArrayFamily); + if (!rootResolution) { return createClassifiedRow( compatRow, @@ -541,10 +575,12 @@ function classifyCompatRow(options) { compatManagement, ); } + const { compatRoot, rootSurface, } = rootResolution; + const includeInTarget = isCompatIncluded(compatRow, baselineTarget); if (!rootSurface) { @@ -581,15 +617,18 @@ function classifyCompatRow(options) { includeInTarget, typedArrayFamily, }); + if (manualResolution) { return createClassifiedRow(compatRow, compatRoot, includeInTarget, manualResolution, compatManagement); } if (!tailSegments.length) { const resolvedUnitIds = resolveRootAvailabilityUnitIds(inventory, rootSurface); + if (compatRoot === "ArrayBuffer" || compatRoot === "SharedArrayBuffer") { resolvedUnitIds.push(...getMemberUnits(inventory, "ArrayBufferTypes", compatRoot).map(unit => unit.id)); } + return createClassifiedRow(compatRow, compatRoot, includeInTarget, { resolutionKind: "root-availability", resolvedUnitIds, @@ -602,6 +641,7 @@ function classifyCompatRow(options) { const rootBaseName = compatRoot.split(".").at(-1); const isConstructorTail = tailSegments[0] === rootBaseName; + if (isConstructorTail) { return createClassifiedRow( compatRow, @@ -658,6 +698,7 @@ function resolveDeclarationMapping(options) { options.rootSurface, options.declarationMapping.scope, ); + if (!containerSymbols.length) { throw new Error( `Declaration mapping ${options.compatKey} found no ${options.declarationMapping.scope} containers`, @@ -671,9 +712,11 @@ function resolveDeclarationMapping(options) { units: getMemberUnits(options.inventory, containerSymbol, memberName), })) ); + const missingMembers = unitsByContainerAndMember .filter(entry => !entry.units.length) .map(entry => `${entry.containerSymbol}.${entry.memberName}`); + if (missingMembers.length) { throw new Error( `Declaration mapping ${options.compatKey} could not resolve ${options.declarationMapping.scope} members: ` @@ -697,14 +740,17 @@ function resolveDeclarationMapping(options) { function getDeclarationMappingContainerSymbols(rootSurface, scope) { const containerSymbols = scope === "static" ? rootSurface.staticContainerSymbols : rootSurface.instanceContainerSymbols; const oppositeContainerSymbols = scope === "static" ? rootSurface.instanceContainerSymbols : rootSurface.staticContainerSymbols; + const ambiguousSymbols = [...containerSymbols] .filter(symbol => oppositeContainerSymbols.has(symbol)) .sort(compareStringsCaseSensitive); + if (ambiguousSymbols.length) { throw new Error( `Declaration mapping cannot distinguish ${scope} members on shared containers: ${ambiguousSymbols.join(", ")}`, ); } + return [...containerSymbols] .sort(compareStringsCaseSensitive); } @@ -717,8 +763,10 @@ function getDeclarationMappingContainerSymbols(rootSurface, scope) { */ function resolveCompatRoot(inventory, compatSegments, compatManagement, typedArrayFamily) { const compatRoot = findLongestCompatRoot(inventory, compatSegments); + if (compatRoot) { const rootSurface = getRootSurface(inventory, compatRoot); + return { compatRoot, rootSurface, @@ -729,6 +777,7 @@ function resolveCompatRoot(inventory, compatSegments, compatManagement, typedArr switch (compatSegments[0]) { case "TypedArray": { const family = typedArrayFamily(); + return { compatRoot: "TypedArray", rootSurface: { @@ -740,6 +789,7 @@ function resolveCompatRoot(inventory, compatSegments, compatManagement, typedArr resolutionKind: "synthetic-typed-array", }; } + default: if (compatManagement?.compatRoot) { return { @@ -748,6 +798,7 @@ function resolveCompatRoot(inventory, compatSegments, compatManagement, typedArr resolutionKind: "registry-root", }; } + return undefined; } } @@ -770,14 +821,18 @@ function classifyConstructorRow(options) { inventory, rootSurface, } = options; + const staticContainerSymbols = [...rootSurface.staticContainerSymbols]; + const callableUnits = staticContainerSymbols.flatMap(symbol => [ ...getPreferredMemberUnits(inventory, symbol, ""), ...getPreferredMemberUnits(inventory, symbol, ""), ]); + const prototypeUnits = staticContainerSymbols.flatMap(symbol => getPreferredMemberUnits(inventory, symbol, "prototype") ); + const rootVarUnits = rootSurface.rootDeclarationUnitIds .map(unitId => inventory.unitById.get(unitId)) .filter(isPresent) @@ -786,9 +841,11 @@ function classifyConstructorRow(options) { && unit.typeRefName && rootSurface.staticContainerSymbols.has(unit.typeRefName) ); + const resolvedUnits = qualifierSegments.length ? callableUnits : [...callableUnits, ...prototypeUnits, ...rootVarUnits]; + if (!resolvedUnits.length) { return { resolutionKind: "not-modeled-upstream", @@ -797,6 +854,7 @@ function classifyConstructorRow(options) { transforms: [], }; } + const resolvedUnitIds = resolvedUnits.map(unit => unit.id); if (!qualifierSegments.length) { @@ -818,12 +876,14 @@ function classifyConstructorRow(options) { } const optionProperty = getOptionPropertyName(qualifierSegments); + if (optionProperty) { const propertyUnitIds = resolveOptionPropertyUnitIds({ inventory, baseUnits: resolvedUnits, propertyName: optionProperty, }); + if (propertyUnitIds.length) { return { resolutionKind: "option-property", @@ -832,6 +892,7 @@ function classifyConstructorRow(options) { transforms: [], }; } + return { resolutionKind: "not-modeled-upstream", resolvedUnitIds: [], @@ -895,16 +956,13 @@ function classifyMemberRow(options) { const inheritedUnits = [ ...[...rootSurface.instanceContainerSymbols].flatMap(symbol => - getDeclarationUnits(inventory, symbol) - .flatMap(unit => unit.dependencySymbols) - .flatMap(dependencySymbol => getPreferredMemberUnits(inventory, dependencySymbol, memberName)) + getInheritedMemberUnits(inventory, symbol, memberName) ), ...[...rootSurface.staticContainerSymbols].flatMap(symbol => - getDeclarationUnits(inventory, symbol) - .flatMap(unit => unit.dependencySymbols) - .flatMap(dependencySymbol => getPreferredMemberUnits(inventory, dependencySymbol, memberName)) + getInheritedMemberUnits(inventory, symbol, memberName) ), ]; + if (inheritedUnits.length) { return { resolutionKind: "inherited-member", @@ -914,16 +972,6 @@ function classifyMemberRow(options) { }; } - const directOptionUnits = getPreferredMemberUnits(inventory, `${compatRoot}Options`, memberName); - if (directOptionUnits.length) { - return { - resolutionKind: "inherited-member", - resolvedUnitIds: [...new Set(directOptionUnits.map(unit => unit.id))].sort(compareStringsCaseSensitive), - notes: `${compatRow.compatKey} is provided through ${compatRoot}Options`, - transforms: [], - }; - } - if (memberName === "@@dispose" || memberName === "@@asyncDispose") { return { resolutionKind: "not-modeled-upstream", @@ -949,6 +997,7 @@ function classifyMemberRow(options) { transforms: [], }; } + const resolvedUnitIds = [...new Set(memberUnits.map(unit => unit.id))]; if (!qualifierSegments.length) { @@ -970,12 +1019,14 @@ function classifyMemberRow(options) { } const optionProperty = getOptionPropertyName(qualifierSegments); + if (optionProperty) { const propertyUnitIds = resolveOptionPropertyUnitIds({ inventory, baseUnits: memberUnits, propertyName: optionProperty, }); + if (propertyUnitIds.length) { return { resolutionKind: "option-property", @@ -984,6 +1035,7 @@ function classifyMemberRow(options) { transforms: [], }; } + return { resolutionKind: "not-modeled-upstream", resolvedUnitIds: [], @@ -1031,13 +1083,16 @@ function resolveManualClassification(options) { if (compatRow.compatKey === "javascript.builtins.JSON.parse.reviver_parameter_context_argument") { const parseUnits = getMemberUnits(inventory, "JSON", "parse"); + if (!parseUnits.length) { throw new Error( `${compatRow.compatKey}: could not find JSON.parse in the current lib to verify the reviver signature. ` + "The fossilized 'already-excluded-upstream' verdict can no longer be trusted; re-evaluate this row.", ); } - const contextUnits = parseUnits.filter(unit => /reviver[\s\S]*\bcontext\b/u.test(unit.text)); + + const contextUnits = parseUnits.filter(hasReviverContextParameter); + if (contextUnits.length) { return { resolutionKind: "member", @@ -1046,6 +1101,7 @@ function resolveManualClassification(options) { transforms: [], }; } + return { resolutionKind: "already-excluded-upstream", resolvedUnitIds: [], @@ -1057,9 +1113,11 @@ function resolveManualClassification(options) { if (compatRoot === "Proxy" && tailSegments[0] === "handler" && tailSegments[1]) { const handlerMemberName = tailSegments[1]; const handlerUnits = getPreferredMemberUnits(inventory, "ProxyHandler", handlerMemberName); + if (!handlerUnits.length) { throw new Error(`Unable to resolve ProxyHandler.${handlerMemberName} for ${compatRow.compatKey}`); } + return { resolutionKind: "member", resolvedUnitIds: handlerUnits.map(unit => unit.id), @@ -1072,9 +1130,11 @@ function resolveManualClassification(options) { if (qualifierPath === "constructor_without_parameters" || qualifierPath === "iterable_in_constructor") { const constructorUnits = options.typedArrayFamily().constructorSymbols .flatMap(symbol => getPreferredMemberUnits(inventory, symbol, "")); + if (!constructorUnits.length) { throw new Error(`Unable to resolve typed array constructors for ${compatRow.compatKey}`); } + return { resolutionKind: "signature-compat", resolvedUnitIds: [...new Set(constructorUnits.map(unit => unit.id))].sort(compareStringsCaseSensitive), @@ -1085,9 +1145,11 @@ function resolveManualClassification(options) { if (qualifierPath === "name") { const functionNameUnits = getPreferredMemberUnits(inventory, "Function", "name"); + if (!functionNameUnits.length) { throw new Error(`Unable to resolve Function.name for ${compatRow.compatKey}`); } + return { resolutionKind: "inherited-member", resolvedUnitIds: [...new Set(functionNameUnits.map(unit => unit.id))].sort(compareStringsCaseSensitive), @@ -1099,9 +1161,11 @@ function resolveManualClassification(options) { if (qualifierPath === "symbol_as_keys" || qualifierPath.endsWith(".symbol_as_target")) { const symbolUnits = getPreferredMemberUnits(inventory, "WeakKeyTypes", "symbol"); + if (!symbolUnits.length) { throw new Error(`Unable to resolve WeakKeyTypes.symbol for ${compatRow.compatKey}`); } + return { resolutionKind: "type-property", resolvedUnitIds: symbolUnits.map(unit => unit.id), @@ -1112,15 +1176,19 @@ function resolveManualClassification(options) { if (qualifierPath === `${compatRoot.split(".").at(-1)}.maxByteLength_option` || qualifierPath === "maxByteLength_option") { const rootSurface = getRootSurface(inventory, compatRoot); + if (!rootSurface) { throw new Error(`Missing root surface for ${compatRoot}`); } + const constructorUnits = [...rootSurface.staticContainerSymbols] .flatMap(symbol => getPreferredMemberUnits(inventory, symbol, "")) .filter(unit => unit.text.includes("maxByteLength")); + if (!constructorUnits.length) { throw new Error(`Unable to resolve constructor for ${compatRow.compatKey}`); } + return { resolutionKind: "transform-only", resolvedUnitIds: constructorUnits.map(unit => unit.id), @@ -1136,6 +1204,55 @@ function resolveManualClassification(options) { return undefined; } +/** @param {import("./surface-inventory.mjs").InventoryUnitRecord} unit */ +function hasReviverContextParameter(unit) { + const source = ts.createSourceFile("json-parse.d.ts", `interface JSON { ${unit.text} }`, ts.ScriptTarget.Latest); + const declaration = source.statements[0]; + const member = declaration && ts.isInterfaceDeclaration(declaration) ? declaration.members[0] : undefined; + + if (!member || !ts.isMethodSignature(member)) { + throw new Error(`Cannot inspect JSON.parse reviver signature in ${unit.id}`); + } + + const reviver = member.parameters[1]; + + if (!reviver) { + return false; + } + + if (!reviver.type) { + throw new Error(`Missing JSON.parse reviver type in ${unit.id}`); + } + + const callbacks = getCallbackTypes(reviver.type); + + return callbacks.some(callback => callback.parameters.filter(parameter => parameter.name.getText(source) !== "this").length >= 3); + + /** + * @param {ts.TypeNode} type + * @returns {ts.FunctionTypeNode[]} + */ + function getCallbackTypes(type) { + if (ts.isParenthesizedTypeNode(type)) { + return getCallbackTypes(type.type); + } + + if (ts.isUnionTypeNode(type)) { + return type.types.flatMap(getCallbackTypes); + } + + if (ts.isFunctionTypeNode(type)) { + return [type]; + } + + if (type.kind === ts.SyntaxKind.UndefinedKeyword || (ts.isLiteralTypeNode(type) && type.literal.kind === ts.SyntaxKind.NullKeyword)) { + return []; + } + + throw new Error(`Unsupported JSON.parse reviver type in ${unit.id}: ${type.getText(source)}`); + } +} + /** * @param {any} compatRow * @param {string} compatRoot @@ -1183,8 +1300,9 @@ function createClassifiedRow(compatRow, compatRoot, includeInTarget, resolution, */ export function resolveRootAvailabilityUnitIds(inventory, rootSurface) { const preferredRootUnitIds = new Set( - getPreferredBaseDeclarationUnits(inventory, rootSurface.compatName).map(unit => unit.id), + getPreferredDeclarationUnits(inventory, rootSurface.compatName).map(unit => unit.id), ); + const rootDeclarationUnits = rootSurface.rootDeclarationUnitIds .map(unitId => inventory.unitById.get(unitId)) .filter(isPresent) @@ -1209,17 +1327,20 @@ export function resolveRootAvailabilityUnitIds(inventory, rootSurface) { if (unit.declarationKind === "var") { return unit.typeRefName ? [unit.typeRefName] : []; } + return unit.symbolName ? [unit.symbolName] : []; }), ); + for (const symbol of rootSurface.instanceContainerSymbols) { resolvedUnitIds.push( - ...getPreferredBaseDeclarationUnits(inventory, symbol).map(unit => unit.id), + ...getPreferredDeclarationUnits(inventory, symbol).map(unit => unit.id), ); } + for (const symbol of preferredStaticSymbols) { resolvedUnitIds.push( - ...getPreferredBaseDeclarationUnits(inventory, symbol).map(unit => unit.id), + ...getPreferredDeclarationUnits(inventory, symbol).map(unit => unit.id), ); } @@ -1232,6 +1353,7 @@ export function resolveRootAvailabilityUnitIds(inventory, rootSurface) { || compareStringsCaseSensitive(left.id, right.id) ) .at(0); + if (canonicalRootUnit) { resolvedUnitIds.push(canonicalRootUnit.id); } @@ -1271,6 +1393,7 @@ function resolveOptionPropertyUnitIds(options) { } = options; const optionSymbols = new Set(); + for (const unit of baseUnits) { for (const dependencySymbol of unit.dependencySymbols) { if (dependencySymbol.endsWith("Options")) { @@ -1280,6 +1403,7 @@ function resolveOptionPropertyUnitIds(options) { for (const match of unit.text.matchAll(/\b([A-Z][A-Za-z0-9]+Options)\b/g)) { optionSymbols.add(match[1]); + if (unit.ownerSymbol?.includes(".")) { const ownerNamespace = unit.ownerSymbol.split(".").slice(0, -1).join("."); optionSymbols.add(`${ownerNamespace}.${match[1]}`); @@ -1288,9 +1412,11 @@ function resolveOptionPropertyUnitIds(options) { } const resolvedUnits = []; + for (const optionSymbol of optionSymbols) { resolvedUnits.push(...getPreferredMemberUnits(inventory, optionSymbol, propertyName)); const resolvedOptionSymbol = getResolvedOptionsSymbol(optionSymbol); + if (resolvedOptionSymbol) { resolvedUnits.push(...getPreferredMemberUnits(inventory, resolvedOptionSymbol, propertyName)); } @@ -1306,8 +1432,10 @@ function getResolvedOptionsSymbol(optionSymbol) { if (!optionSymbol.endsWith("Options")) { return undefined; } + const baseName = optionSymbol.slice(0, -"Options".length); const resolvedName = `${baseName.startsWith("Intl.") ? "Intl." : ""}Resolved${baseName.replace(/^Intl\./, "")}Options`; + return resolvedName; } @@ -1317,10 +1445,12 @@ function getResolvedOptionsSymbol(optionSymbol) { function getOptionPropertyName(qualifierSegments) { for (const qualifier of qualifierSegments) { const optionsMatch = qualifier.match(/^options_(.+)_parameter$/); + if (optionsMatch) { return optionsMatch[1]; } } + return undefined; } @@ -1349,17 +1479,22 @@ function isCompatIncluded(compatRow, baselineTarget) { case "low": return compatRow.baselineStatus === "high" || compatRow.baselineStatus === "low"; } + const yearMatch = baselineTarget.match(/^year:(\d{4})$/); + if (!yearMatch) { throw new Error(`Unsupported baseline target ${baselineTarget}`); } + if (compatRow.baselineStatus === false) { return false; } + const lowDate = parseBaselineLowDate( compatRow.baselineLowDate, `Compat row ${compatRow.compatKey} baselineLowDate`, ); + return Number(lowDate.slice(0, 4)) <= Number(yearMatch[1]); } @@ -1370,17 +1505,22 @@ function isCompatIncluded(compatRow, baselineTarget) { function countManagedRowsByKey(rows, selector) { /** @type {Record} */ const counts = {}; + for (const row of rows) { const key = selector(row); + if (!key) { continue; } + counts[key] = (counts[key] ?? 0) + 1; } + return Object.keys(counts) .sort(compareStringsCaseSensitive) .reduce((result, key) => { result[key] = counts[key]; + return result; }, /** @type {Record} */ ({})); } diff --git a/lib/compat-management-registry.mjs b/lib/compat-management-registry.mjs index 3c8e32c..897c096 100644 --- a/lib/compat-management-registry.mjs +++ b/lib/compat-management-registry.mjs @@ -161,7 +161,7 @@ async function parseCompatManagementRegistry(data, filePath) { } /** -* @param {RegistryGroupSource} rawGroup + * @param {RegistryGroupSource} rawGroup * @param {string | undefined} libSource */ function normalizeCompatManagementGroup(rawGroup, libSource) { diff --git a/lib/generator.mjs b/lib/generator.mjs index 1180e5e..2b4d26d 100644 --- a/lib/generator.mjs +++ b/lib/generator.mjs @@ -36,7 +36,9 @@ import { loadAllowlistRegistry } from "./allowlist-registry.mjs"; import { hasDeclarationSurface } from "./resolution-kinds.mjs"; const RUNTIME_DECLARATION_KINDS = new Set(["var", "function", "class", "enum", "namespace"]); + const NON_MERGEABLE_ALLOW_CONTAINER_KINDS = new Set(["class", "type-literal-var"]); + const BASELINE_SURFACE = Symbol("baseline"); // Resolution kinds where resolvedUnitIds points at the declaration surface of @@ -67,6 +69,7 @@ const SURFACE_DEFINING_RESOLUTION_KINDS = new Set([ export async function generateFirstClassBaselineLib(options) { const plan = await createGenerationPlan(options); await publishGenerationPlan(plan); + return plan; } @@ -91,14 +94,17 @@ export function resolveExcludedUnits(classifiedCompatRows) { /** @type {Map} */ const excludedRowsByUnitId = new Map(); + for (const row of classifiedCompatRows) { if (row.includeInTarget || !SURFACE_DEFINING_RESOLUTION_KINDS.has(row.resolutionKind)) { continue; } + for (const unitId of row.resolvedUnitIds) { if (includedUnitIds.has(unitId)) { continue; } + const compatKeys = excludedRowsByUnitId.get(unitId) ?? []; compatKeys.push(row.compatKey); excludedRowsByUnitId.set(unitId, compatKeys); @@ -127,6 +133,7 @@ export function resolveUnclaimedTypeOnlyUnitIds(options) { classifiedCompatRows, excludedUnitIds, } = options; + const claimedUnitIds = new Set(classifiedCompatRows.flatMap(row => row.resolvedUnitIds)); return inventory.units @@ -137,9 +144,11 @@ export function resolveUnclaimedTypeOnlyUnitIds(options) { ) { return false; } + if (inventory.fileByLibFileName.get(unit.libFileName)?.preserveWholeFile) { return false; } + return unit.unitKind === "declaration" && unit.declarationKind === "type-alias" && !unit.parentContainerId; @@ -168,6 +177,7 @@ export function resolveTypeOnlyDependencyClosure(options) { completeContainerUnitIds: new Set(options.completeContainerUnitIds), excludedUnitIds: options.excludedUnitIds, })); + const selectedUnitIds = resolveDependencyClosure({ inventory: options.inventory, initiallySelectedUnitIds: new Set([ @@ -178,20 +188,25 @@ export function resolveTypeOnlyDependencyClosure(options) { completeContainerUnitIds: options.completeContainerUnitIds, excludedUnitIds: options.excludedUnitIds, }); + const introducedRuntimeUnits = selectedUnitIds.filter(unitId => { if (compatClosure.has(unitId)) { return false; } + const unit = options.inventory.unitById.get(unitId); + return unit?.unitKind === "declaration" && RUNTIME_DECLARATION_KINDS.has(unit.declarationKind ?? ""); }); + if (introducedRuntimeUnits.length) { throw new Error( "Type-only aliases introduce runtime declarations not selected by compat data:\n" + introducedRuntimeUnits.map(unitId => `- ${unitId}`).join("\n"), ); } + return selectedUnitIds; } @@ -222,10 +237,12 @@ export function assertExclusionInvariants(options) { const selectedExcludedUnitIds = [...selectedSet] .filter(unitId => excludedUnitIds.has(unitId)) .sort(compareStringsCaseSensitive); + if (selectedExcludedUnitIds.length) { const details = selectedExcludedUnitIds .map(unitId => `- ${unitId} (excluded by: ${(excludedRowsByUnitId.get(unitId) ?? []).join(", ")})`) .join("\n"); + throw new Error( `Excluded compat units were selected for emission. ` + `Resolve the policy conflict explicitly (registry) instead of emitting non-Baseline surface:\n${details}`, @@ -237,14 +254,18 @@ export function assertExclusionInvariants(options) { // selection contradiction, not an exclusion, so fail. /** @type {string[]} */ const orphanedMembers = []; + for (const unitId of selectedSet) { const unit = inventory.unitById.get(unitId); + if (!unit?.parentContainerId) { continue; } + const containerDeclarationUnits = inventory.units.filter( candidate => candidate.unitKind === "declaration" && candidate.containerId === unit.parentContainerId, ); + if ( containerDeclarationUnits.length && containerDeclarationUnits.every(declarationUnit => excludedUnitIds.has(declarationUnit.id)) @@ -252,11 +273,13 @@ export function assertExclusionInvariants(options) { orphanedMembers.push(unitId); } } + if (orphanedMembers.length) { const details = orphanedMembers .sort(compareStringsCaseSensitive) .map(unitId => `- ${unitId}`) .join("\n"); + throw new Error( `Selected units belong to containers whose declarations are all excluded:\n${details}`, ); @@ -282,14 +305,17 @@ export function assertExclusionInvariants(options) { */ export function assertRuntimeDeclarationProvenance(options) { const selectedUnitIds = [...options.selectedUnitIds]; + const emittedUnitIds = collectEmittedUnitIds({ inventory: options.inventory, selectedUnitIds, completeContainerUnitIds: options.completeContainerUnitIds, excludedUnitIds: options.excludedUnitIds, }); + const includedRows = options.classifiedCompatRows.filter(row => row.includeInTarget); const claimedUnitIds = new Set(includedRows.flatMap(row => row.resolvedUnitIds)); + const claimedMemberKeys = new Set( [...claimedUnitIds] .map(unitId => options.inventory.unitById.get(unitId)) @@ -297,62 +323,73 @@ export function assertRuntimeDeclarationProvenance(options) { ? [`${unit.ownerSymbol}\0${unit.memberName}`] : []), ); + const runtimeOwnerSymbols = new Set( [...options.inventory.rootSurfaceByCompatName.values()] .filter(root => root.rootDeclarationUnitIds.some(unitId => { const unit = options.inventory.unitById.get(unitId); + return unit && RUNTIME_DECLARATION_KINDS.has(unit.declarationKind ?? "") && !(options.inventory.fileByLibFileName.get(unit.libFileName)?.preserveWholeFile && !unit.containerPath.length); })) .flatMap(root => [...root.instanceContainerSymbols, ...root.staticContainerSymbols]), ); + const compilerSupportUnits = [...options.compilerSupportUnitIds] .map(unitId => options.inventory.unitById.get(unitId)); + const runtimeAliasUnits = [...options.runtimeAliasUnitIds] .map(unitId => options.inventory.unitById.get(unitId)); + const compilerSupportMemberKeys = new Set( [...compilerSupportUnits, ...runtimeAliasUnits].flatMap(unit => unit?.ownerSymbol && unit.memberName ? [`${unit.ownerSymbol}\0${unit.memberName}`] : []), ); - const unprovenUnits = [...emittedUnitIds] - .map(unitId => options.inventory.unitById.get(unitId)) - .filter(unit => { + + const unprovenUnits = []; + + for (const unitId of emittedUnitIds) { + const unit = options.inventory.unitById.get(unitId); + + if ( + !unit + || options.compilerSupportUnitIds.has(unit.id) + || options.runtimeAliasUnitIds.has(unit.id) + || claimedUnitIds.has(unit.id) + ) { + continue; + } + + if (unit.unitKind === "member") { if ( - !unit - || options.compilerSupportUnitIds.has(unit.id) - || options.runtimeAliasUnitIds.has(unit.id) - || claimedUnitIds.has(unit.id) + unit.memberName === "" + || (unit.ownerSymbol && !runtimeOwnerSymbols.has(unit.ownerSymbol)) + || ( + unit.ownerSymbol + && unit.memberName + && (compilerSupportMemberKeys.has(`${unit.ownerSymbol}\0${unit.memberName}`) + || claimedMemberKeys.has(`${unit.ownerSymbol}\0${unit.memberName}`)) + ) ) { - return false; - } - if (unit.unitKind === "member") { - if ( - unit.memberName === "" - || (unit.ownerSymbol && !runtimeOwnerSymbols.has(unit.ownerSymbol)) - || ( - unit.ownerSymbol - && unit.memberName - && compilerSupportMemberKeys.has(`${unit.ownerSymbol}\0${unit.memberName}`) - ) - ) { - return false; - } - return !unit.ownerSymbol - || !unit.memberName - || !claimedMemberKeys.has(`${unit.ownerSymbol}\0${unit.memberName}`); + continue; } - return RUNTIME_DECLARATION_KINDS.has(unit.declarationKind ?? "") - && unit.declarationKind !== "namespace" - && !( - options.inventory.fileByLibFileName.get(unit.libFileName)?.preserveWholeFile - && !unit.containerPath.length - ); - }) - .map(unit => unit?.id) - .filter(unitId => unitId !== undefined) - .sort(compareStringsCaseSensitive); + } + else if ( + !RUNTIME_DECLARATION_KINDS.has(unit.declarationKind ?? "") + || unit.declarationKind === "namespace" + || (options.inventory.fileByLibFileName.get(unit.libFileName)?.preserveWholeFile + && !unit.containerPath.length) + ) { + continue; + } + + unprovenUnits.push(unit.id); + } + + unprovenUnits.sort(compareStringsCaseSensitive); + if (unprovenUnits.length) { throw new Error( "Emitted runtime declarations lack compat or compiler-support provenance:\n" @@ -373,20 +410,25 @@ export function assertRuntimeDeclarationProvenance(options) { async function createGenerationPlan(options) { const { manifestPath, repoRoot } = options; const manifest = options.manifest ?? await readManifest(manifestPath); + if (!manifest.firstClassLib?.libName) { throw new Error(`Manifest ${manifestPath} is missing firstClassLib.libName`); } + if (!manifest.firstClassLib?.outputFile) { throw new Error(`Manifest ${manifestPath} is missing firstClassLib.outputFile`); } + if (!manifest.firstClassLib?.yearDirectory) { throw new Error(`Manifest ${manifestPath} is missing firstClassLib.yearDirectory`); } + if (!Number.isInteger(manifest.firstClassLib?.firstYear)) { throw new Error(`Manifest ${manifestPath} is missing firstClassLib.firstYear`); } const testOutputRoot = path.join(repoRoot, ".tmp"); + const topLevelOutputPath = resolveManagedOutputPath( manifest.firstClassLib.outputFile, repoRoot, @@ -394,6 +436,7 @@ async function createGenerationPlan(options) { "firstClassLib.outputFile", [path.join(repoRoot, "generated", "current"), testOutputRoot], ); + const allowOutputDirectory = resolveManagedOutputPath( manifest.firstClassLib.allowDirectory, repoRoot, @@ -401,11 +444,14 @@ async function createGenerationPlan(options) { "firstClassLib.allowDirectory", [path.join(repoRoot, "generated", "current", "allow"), testOutputRoot], ); + if (!manifest.allowlistRegistry) { throw new Error(`Manifest ${manifestPath} is missing allowlistRegistry`); } + const allowlistRegistryPath = path.resolve(path.dirname(manifestPath), manifest.allowlistRegistry); const allowlistRegistry = await loadAllowlistRegistry(allowlistRegistryPath); + const yearOutputDirectory = resolveManagedOutputPath( manifest.firstClassLib.yearDirectory, repoRoot, @@ -413,7 +459,9 @@ async function createGenerationPlan(options) { "firstClassLib.yearDirectory", [path.join(repoRoot, "generated", "current", "year"), testOutputRoot], ); + const managedDerivedRoots = [path.join(repoRoot, "derived", "current"), testOutputRoot]; + const generationOutputPath = resolveManagedOutputPath( manifest.generationOutput, repoRoot, @@ -421,6 +469,7 @@ async function createGenerationPlan(options) { "generationOutput", managedDerivedRoots, ); + const inventoryOutputPath = resolveManagedOutputPath( manifest.inventoryOutput, repoRoot, @@ -434,13 +483,14 @@ async function createGenerationPlan(options) { const libSource = options.libDirectory ? { libDirectory: path.resolve(options.libDirectory) } : await verifyLibSource({ repoRoot, manifest }); + const sourceLibEntries = await discoverBuiltinSourceLibEntries({ libDirectory: libSource.libDirectory, reportPathPrefix: options.reportPathPrefix ?? `${manifest.libSource.basePackage}/lib`, }); + const inventory = await createSurfaceInventory({ snapshotName: manifest.snapshot.name, - repoRoot, sourceLibEntries, inventoryOutputPath, }); @@ -458,6 +508,7 @@ async function createGenerationPlan(options) { compilerSupportSurfaces: classification.compatManagementRegistry.compilerSupportSurfaces, runtimeAliasSurfaces: classification.compatManagementRegistry.runtimeAliasSurfaces, }); + const libCompatRows = classification.dataset.compatRows .filter( /** @param {{ compatKey: string; }} row */ @@ -467,6 +518,7 @@ async function createGenerationPlan(options) { /** @param {{ compatKey: string; }} left @param {{ compatKey: string; }} right */ (left, right) => compareStringsCaseSensitive(left.compatKey, right.compatKey), ); + const yearEntries = resolveBaselineYears( manifest.snapshot.baselineDate, manifest.firstClassLib.firstYear, @@ -477,6 +529,7 @@ async function createGenerationPlan(options) { inventory, compatManagementRegistry: classification.compatManagementRegistry, }); + return { year, outputPath: path.join(yearOutputDirectory, String(year), "index.d.ts"), @@ -506,6 +559,7 @@ async function createGenerationPlan(options) { allowOutputDirectory, registryEntries: allowlistRegistry.entries, }); + assertAllowEntryIsolation({ allowEntries, baselineUnitIds: emittedBaselineUnitIds, @@ -570,6 +624,7 @@ function collectEmittedUnitIds(options) { excludedUnitIds: options.excludedUnitIds, emittedUnitIds, }); + return emittedUnitIds; } @@ -588,8 +643,10 @@ function createAllowEntries(options) { const rowByCompatKey = new Map( options.classification.classifiedCompatRows.map(row => [row.compatKey, row]), ); + /** @type {Map>} */ const claimsByUnitId = new Map(); + for (const row of options.classification.classifiedCompatRows) { for (const unitId of [ ...row.resolvedUnitIds, @@ -604,22 +661,28 @@ function createAllowEntries(options) { return options.registryEntries.map(registryEntry => { const rows = registryEntry.compatKeys.map(compatKey => { const row = rowByCompatKey.get(compatKey); + if (!row) { throw new Error(`Allow entry ${registryEntry.entryName} references missing compat key ${compatKey}`); } + if (row.baselineStatus !== "high" && row.baselineStatus !== "low") { throw new Error( `Allow entry ${registryEntry.entryName} references a compat key that is not Baseline: ${compatKey}`, ); } + return row; }); + const highRows = rows.filter(row => row.baselineStatus === "high"); + for (const row of highRows) { const rowUnitIds = [ ...row.resolvedUnitIds, ...row.transforms.map(transform => transform.unitId), ]; + if ( !hasDeclarationSurface(row.resolutionKind) || !rowUnitIds.length @@ -631,8 +694,10 @@ function createAllowEntries(options) { ); } } + const lowRows = rows.filter(row => row.baselineStatus === "low"); const outputPath = path.join(options.allowOutputDirectory, registryEntry.entryName, "index.d.ts"); + if (!lowRows.length) { return { kind: "alias", @@ -645,24 +710,31 @@ function createAllowEntries(options) { } const unitIds = new Set(); + for (const row of lowRows) { if (!hasDeclarationSurface(row.resolutionKind)) { throw new Error( `Allow entry ${registryEntry.entryName} cannot emit ${row.compatKey} (${row.resolutionKind})`, ); } + const rowUnitIds = new Set(); + for (const unitId of row.resolvedUnitIds) { if (options.excludedUnitIds.has(unitId)) { rowUnitIds.add(unitId); } + if (row.resolutionKind !== "root-availability") { continue; } + const rootUnit = options.inventory.unitById.get(unitId); + if (!rootUnit?.containerId) { continue; } + for (const childUnit of options.inventory.units) { if ( childUnit.parentContainerId === rootUnit.containerId @@ -673,14 +745,17 @@ function createAllowEntries(options) { } } } + for (const transform of row.transforms) { rowUnitIds.add(transform.unitId); } + if (!rowUnitIds.size) { throw new Error( `Allow entry ${registryEntry.entryName} does not emit declarations for ${row.compatKey}`, ); } + for (const unitId of rowUnitIds) { unitIds.add(unitId); } @@ -691,6 +766,7 @@ function createAllowEntries(options) { } const registeredCompatKeys = new Set(registryEntry.compatKeys); + for (const unitId of unitIds) { for (const claim of claimsByUnitId.get(unitId) ?? []) { if ( @@ -707,18 +783,22 @@ function createAllowEntries(options) { const selectedWithEntry = new Set([...options.emittedBaselineUnitIds, ...unitIds]); const blockedUnitIds = new Set(options.excludedUnitIds); + for (const unitId of unitIds) { blockedUnitIds.delete(unitId); } + const resolvedUnitIds = resolveDependencyClosure({ inventory: options.inventory, initiallySelectedUnitIds: selectedWithEntry, completeContainerUnitIds: new Set(options.completeContainerUnitIds), excludedUnitIds: blockedUnitIds, }); + const supportUnitIds = resolvedUnitIds .filter(unitId => !selectedWithEntry.has(unitId)) .sort(compareStringsCaseSensitive); + return { kind: "active", entryName: registryEntry.entryName, @@ -742,30 +822,36 @@ function assertAllowEntryIsolation(options) { const primaryEntryByUnitId = new Map(); /** @type {Map>} */ const supportEntriesByUnitId = new Map(); - /** @type {Map>} */ + /** @type {Map>} */ const surfaceIdsByContainerId = new Map(); /** - * @param {string | symbol} surfaceId + * @param {string | typeof BASELINE_SURFACE} surfaceId * @param {Iterable} unitIds */ function recordNonMergeableContainers(surfaceId, unitIds) { for (const unitId of new Set(unitIds)) { const unit = options.inventory.unitById.get(unitId); + if (!unit) { throw new Error(`Unknown generated declaration unit ${unitId}`); } + let containerId = unit.containerId ?? unit.parentContainerId; + while (containerId) { const container = options.inventory.containerById.get(containerId); + if (!container) { throw new Error(`Unknown generated declaration container ${containerId}`); } + if (NON_MERGEABLE_ALLOW_CONTAINER_KINDS.has(container.containerKind)) { const surfaceIds = surfaceIdsByContainerId.get(containerId) ?? new Set(); surfaceIds.add(surfaceId); surfaceIdsByContainerId.set(containerId, surfaceIds); } + containerId = container.parentContainerId; } } @@ -777,21 +863,26 @@ function assertAllowEntryIsolation(options) { if (entry.kind !== "active") { continue; } + for (const unitId of entry.unitIds) { const existingEntryName = primaryEntryByUnitId.get(unitId); + if (existingEntryName && existingEntryName !== entry.entryName) { throw new Error( `Allow declaration unit ${unitId} belongs to multiple entries: ` + `${existingEntryName}, ${entry.entryName}`, ); } + primaryEntryByUnitId.set(unitId, entry.entryName); } + for (const unitId of entry.supportUnitIds) { const entryNames = supportEntriesByUnitId.get(unitId) ?? new Set(); entryNames.add(entry.entryName); supportEntriesByUnitId.set(unitId, entryNames); } + recordNonMergeableContainers(entry.entryName, [...entry.unitIds, ...entry.supportUnitIds]); } @@ -799,6 +890,7 @@ function assertAllowEntryIsolation(options) { const conflictingEntryNames = [...supportEntriesByUnitId.get(unitId) ?? []] .filter(entryName => entryName !== primaryEntryName) .sort(compareStringsCaseSensitive); + if (conflictingEntryNames.length) { throw new Error( `Allow declaration unit ${unitId} is primary in ${primaryEntryName} ` @@ -809,8 +901,9 @@ function assertAllowEntryIsolation(options) { for (const [containerId, surfaceIds] of surfaceIdsByContainerId) { const sortedSurfaceNames = [...surfaceIds] - .map(surfaceId => typeof surfaceId === "string" ? surfaceId : "baseline") + .map(surfaceId => surfaceId === BASELINE_SURFACE ? "baseline" : surfaceId) .sort(compareStringsCaseSensitive); + if (sortedSurfaceNames.length > 1) { const container = options.inventory.containerById.get(containerId); throw new Error( @@ -828,6 +921,7 @@ function assertAllowEntryIsolation(options) { function createAllowSupportArtifacts(allowEntries, allowOutputDirectory) { /** @type {Map>} */ const entryNamesByUnitId = new Map(); + for (const entry of allowEntries) { for (const unitId of entry.supportUnitIds) { const entryNames = entryNamesByUnitId.get(unitId) ?? new Set(); @@ -838,27 +932,35 @@ function createAllowSupportArtifacts(allowEntries, allowOutputDirectory) { /** @type {Map} */ const groups = new Map(); + for (const [unitId, entryNames] of entryNamesByUnitId) { const sortedEntryNames = [...entryNames].sort(compareStringsCaseSensitive); const groupKey = sortedEntryNames.join("\0"); + const group = groups.get(groupKey) ?? { entryNames: sortedEntryNames, unitIds: [], }; + group.unitIds.push(unitId); groups.set(groupKey, group); } const fileNames = new Set(); + return [...groups.values()].map(group => { group.unitIds.sort(compareStringsCaseSensitive); + const fileName = group.entryNames.length === 1 ? `${group.entryNames[0]}.d.ts` : `shared-${createHash("sha256").update(group.entryNames.join("\0")).digest("hex").slice(0, 16)}.d.ts`; + if (fileNames.has(fileName)) { throw new Error(`Allow support filename collision: ${fileName}`); } + fileNames.add(fileName); + return { entryNames: group.entryNames, unitIds: group.unitIds, @@ -876,11 +978,14 @@ function createYearCompatAudit(classifiedCompatRows) { const includedCompatKeys = []; /** @type {string[]} */ const notModeledUpstreamCompatKeys = []; + for (const row of classifiedCompatRows) { const declarationBacked = hasDeclarationSurface(row.resolutionKind); + if (!row.includeInTarget) { continue; } + if (declarationBacked) { includedCompatKeys.push(row.compatKey); } @@ -888,6 +993,7 @@ function createYearCompatAudit(classifiedCompatRows) { notModeledUpstreamCompatKeys.push(row.compatKey); } } + return { includedCompatKeys: includedCompatKeys.sort(compareStringsCaseSensitive), notModeledUpstreamCompatKeys: notModeledUpstreamCompatKeys.sort(compareStringsCaseSensitive), @@ -913,47 +1019,60 @@ function createTargetSelection(options) { const compatSelectedUnitIds = options.classifiedCompatRows .filter(row => row.includeInTarget) .flatMap(row => row.resolvedUnitIds); + const { excludedUnitIds, excludedRowsByUnitId } = resolveExcludedUnits(options.classifiedCompatRows); + const typeOnlyUnitIds = resolveUnclaimedTypeOnlyUnitIds({ inventory: options.inventory, classifiedCompatRows: options.classifiedCompatRows, excludedUnitIds, }); + const registrySupportUnitIds = resolveCompilerSupportSurfaceUnitIds( options.inventory, options.compilerSupportSurfaces, ); + const runtimeAliasUnitIds = resolveRuntimeAliasUnitIds( options.inventory, options.runtimeAliasSurfaces, ); + const excludedRegistrySupportUnitIds = registrySupportUnitIds.filter(unitId => excludedUnitIds.has(unitId)); + if (excludedRegistrySupportUnitIds.length) { throw new Error( "Compiler support surfaces conflict with excluded compat declarations:\n" + excludedRegistrySupportUnitIds.map(unitId => `- ${unitId}`).join("\n"), ); } + const initiallySelectedUnitIds = new Set([ ...compatSelectedUnitIds, ...typeOnlyUnitIds, ...registrySupportUnitIds, ]); + const compilerSupportUnitIds = new Set(registrySupportUnitIds); + const registrySupportContainerUnitIds = registrySupportUnitIds.filter(unitId => { const unit = options.inventory.unitById.get(unitId); + return unit?.unitKind === "declaration" && Boolean(unit.containerId); }); + const completeContainerUnitIds = new Set([ ...options.classifiedCompatRows .filter(row => row.includeInTarget && row.resolutionKind === "root-availability") .flatMap(row => row.resolvedUnitIds) .filter(unitId => { const unit = options.inventory.unitById.get(unitId); + return unit?.unitKind === "declaration" && Boolean(unit.containerId); }), ...registrySupportContainerUnitIds, ]); + for (const unitId of collectEmittedUnitIds({ inventory: options.inventory, selectedUnitIds: registrySupportUnitIds, @@ -962,11 +1081,13 @@ function createTargetSelection(options) { })) { compilerSupportUnitIds.add(unitId); } + const unitTextOverrides = buildUnitTextOverrides({ classifiedCompatRows: options.classifiedCompatRows, inventory: options.inventory, initiallySelectedUnitIds, }); + const selectedBeforeCompilerStabilization = resolveTypeOnlyDependencyClosure({ inventory: options.inventory, compatSelectedUnitIds: new Set(compatSelectedUnitIds), @@ -975,6 +1096,7 @@ function createTargetSelection(options) { completeContainerUnitIds, excludedUnitIds, }); + const selectedUnitIds = stabilizeCompilerGlobalSupport({ inventory: options.inventory, unitTextOverrides, @@ -982,6 +1104,7 @@ function createTargetSelection(options) { completeContainerUnitIds, excludedUnitIds, }); + assertExclusionInvariants({ inventory: options.inventory, selectedUnitIds, @@ -997,6 +1120,7 @@ function createTargetSelection(options) { compilerSupportUnitIds, runtimeAliasUnitIds: new Set(runtimeAliasUnitIds), }); + return { selectedUnitIds, completeContainerUnitIds, @@ -1016,9 +1140,11 @@ function resolveRuntimeAliasUnitIds(inventory, surfaces) { const units = inventory.units.filter( unit => unit.unitKind === "member" && unit.surfacePath === surface, ); + if (!units.length) { throw new Error(`Runtime alias surface is not modeled by the TypeScript lib inventory: ${surface}`); } + return units.map(unit => unit.id); }).sort(compareStringsCaseSensitive); } @@ -1032,14 +1158,17 @@ function resolveCompilerSupportSurfaceUnitIds(inventory, surfaces) { const memberUnits = inventory.units.filter( unit => unit.unitKind === "member" && unit.surfacePath === surface, ); + const units = memberUnits.length ? memberUnits : getPreferredDeclarationUnits(inventory, surface).filter( unit => !RUNTIME_DECLARATION_KINDS.has(unit.declarationKind ?? ""), ); + if (!units.length) { throw new Error(`Compiler support surface is not modeled by the TypeScript lib inventory: ${surface}`); } + return units.map(unit => unit.id); }).sort(compareStringsCaseSensitive); } @@ -1051,6 +1180,7 @@ function resolveCompilerSupportSurfaceUnitIds(inventory, surfaces) { export function resolveBaselineYears(baselineDate, firstYear) { const match = baselineDate.match(/^(\d{4})-\d{2}-\d{2}$/); const timestamp = Date.parse(`${baselineDate}T00:00:00Z`); + if ( !match || !Number.isFinite(timestamp) @@ -1058,10 +1188,13 @@ export function resolveBaselineYears(baselineDate, firstYear) { ) { throw new Error(`Invalid Baseline snapshot date ${baselineDate}`); } + const snapshotYear = Number(match[1]); + if (!Number.isInteger(firstYear) || firstYear < 2015 || firstYear >= snapshotYear) { throw new Error(`Invalid first Baseline year ${firstYear}`); } + return Array.from({ length: snapshotYear - firstYear }, (_, index) => index + firstYear); } @@ -1101,48 +1234,60 @@ async function publishGenerationPlan(plan) { ); /** @type {Map} */ const supportArtifactsByEntryName = new Map(); + for (const artifact of plan.allowSupportArtifacts) { const contents = emitSelectedUnits({ inventory: plan.inventory, selectedUnitIds: artifact.unitIds, }); + await mkdir(path.dirname(artifact.outputPath), { recursive: true }); await writeFile(artifact.outputPath, contents); + for (const entryName of artifact.entryNames) { const artifacts = supportArtifactsByEntryName.get(entryName) ?? []; artifacts.push(artifact); supportArtifactsByEntryName.set(entryName, artifacts); } } + for (const entry of plan.allowEntries) { if (entry.kind === "alias") { const relativePath = path.relative(path.dirname(entry.outputPath), plan.topLevelOutputPath) .split(path.sep) .join(path.posix.sep); + await mkdir(path.dirname(entry.outputPath), { recursive: true }); await writeFile(entry.outputPath, `/// \n`); continue; } + const declarations = emitSelectedUnits({ inventory: plan.inventory, selectedUnitIds: entry.unitIds, }); + const supportArtifacts = supportArtifactsByEntryName.get(entry.entryName) ?? []; const coveredSupportUnitIds = new Set(supportArtifacts.flatMap(artifact => artifact.unitIds)); + for (const unitId of entry.supportUnitIds) { if (!coveredSupportUnitIds.has(unitId)) { throw new Error(`Missing allow support artifact for unit ${unitId}`); } } + const references = supportArtifacts.map(artifact => { const relativePath = path.relative(path.dirname(entry.outputPath), artifact.outputPath) .split(path.sep) .join(path.posix.sep); + return `/// `; }); + const contents = references.length ? `${references.join("\n")}\n\n${declarations}` : declarations; + await mkdir(path.dirname(entry.outputPath), { recursive: true }); await writeFile(entry.outputPath, contents); } @@ -1153,6 +1298,7 @@ async function publishGenerationPlan(plan) { [path.join(plan.repoRoot, "generated", "current", "year"), path.join(plan.repoRoot, ".tmp")], { recursive: true }, ); + for (const entry of plan.yearEntries) { const contents = emitSelectedUnits({ inventory: plan.inventory, @@ -1161,6 +1307,7 @@ async function publishGenerationPlan(plan) { completeContainerUnitIds: entry.completeContainerUnitIds, excludedUnitIds: entry.excludedUnitIds, }); + entry.contentHash = hashText(contents); await mkdir(path.dirname(entry.outputPath), { recursive: true }); await writeFile(entry.outputPath, contents); @@ -1208,6 +1355,7 @@ function buildUnitTextOverrides(options) { } const unit = inventory.unitById.get(transform.unitId); + if (!unit) { throw new Error(`Unknown transform target unit ${transform.unitId}`); } @@ -1252,10 +1400,13 @@ function resolveDependencyClosure(options) { while (pending.length) { const unitId = pending.pop(); + if (!unitId) { continue; } + const unit = inventory.unitById.get(unitId); + if (!unit) { throw new Error(`Unknown inventory unit ${unitId}`); } @@ -1264,10 +1415,12 @@ function resolveDependencyClosure(options) { if (excludedUnitIds.has(dependencyUnitId)) { continue; } + if (!selectedUnitIds.has(dependencyUnitId)) { selectedUnitIds.add(dependencyUnitId); pending.push(dependencyUnitId); } + maybePromoteDependencyDeclarationToCompleteContainer({ inventory, selectedUnitIds, @@ -1310,7 +1463,9 @@ function stabilizeCompilerGlobalSupport(options) { completeContainerUnitIds, excludedUnitIds, }); + const compilerCheck = getCompilerDiagnostics(emittedText); + if (!compilerCheck.missingGlobalTypes.length) { // Diagnostics other than missing global types (broken references, // corrupt syntax) are generation defects completion can't fix, so @@ -1322,15 +1477,18 @@ function stabilizeCompilerGlobalSupport(options) { .join("\n")}`, ); } + return [...selectedUnitIds].sort(compareStringsCaseSensitive); } let changed = false; + for (const missingGlobalType of compilerCheck.missingGlobalTypes) { for (const supportUnitId of resolveCompilerSupportUnitIds(inventory, missingGlobalType)) { if (excludedUnitIds.has(supportUnitId)) { continue; } + if (!selectedUnitIds.has(supportUnitId)) { maybePromoteDependencyDeclarationToCompleteContainer({ inventory, @@ -1372,6 +1530,7 @@ function stabilizeCompilerGlobalSupport(options) { */ function resolveCompilerSupportUnitIds(inventory, symbolName) { const rootSurface = getRootSurface(inventory, symbolName); + if (rootSurface) { return resolveRootAvailabilityUnitIds(inventory, rootSurface); } @@ -1385,6 +1544,7 @@ function resolveCompilerSupportUnitIds(inventory, symbolName) { function getCompilerDiagnostics(libText) { const libFileName = "/lib.baseline.d.ts"; const testFileName = "/baseline-support-check.ts"; + const files = new Map([ [libFileName, libText], [testFileName, ""], @@ -1396,6 +1556,7 @@ function getCompilerDiagnostics(libText) { readFile: fileName => files.get(fileName), getSourceFile(fileName, languageVersion) { const sourceText = files.get(fileName); + return sourceText === undefined ? undefined : ts.createSourceFile(fileName, sourceText, languageVersion, /*setParentNodes*/ true, ts.ScriptKind.TS); @@ -1424,18 +1585,23 @@ function getCompilerDiagnostics(libText) { const missingGlobalTypes = []; /** @type {string[]} */ const otherDiagnostics = []; + for (const diagnostic of ts.getPreEmitDiagnostics(program)) { const message = ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n"); + if (diagnostic.code === 2318) { const globalTypeName = message.match(/Cannot find global type '([^']+)'/)?.[1]; + if (globalTypeName) { missingGlobalTypes.push(globalTypeName); continue; } } + const position = diagnostic.file && diagnostic.start !== undefined ? diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start) : undefined; + otherDiagnostics.push( position ? `TS${diagnostic.code} at ${diagnostic.file?.fileName}:${position.line + 1}:${position.character + 1}: ${message}` @@ -1461,12 +1627,14 @@ function resolveDependencyUnitIds(inventory, unit, selectedUnitIds) { for (const dependencySymbol of unit.dependencySymbols) { const selectedDeclarationUnits = getDeclarationUnits(inventory, dependencySymbol) .filter(declarationUnit => selectedUnitIds.has(declarationUnit.id)); + if (selectedDeclarationUnits.length) { dependencyUnitIds.push(...selectedDeclarationUnits.map(declarationUnit => declarationUnit.id)); } const selectedMemberUnits = getOwnerMemberUnits(inventory, dependencySymbol) .filter(memberUnit => selectedUnitIds.has(memberUnit.id)); + if (selectedMemberUnits.length) { dependencyUnitIds.push(...selectedMemberUnits.map(memberUnit => memberUnit.id)); } @@ -1504,15 +1672,18 @@ function maybePromoteDependencyDeclarationToCompleteContainer(options) { } = options; const unit = inventory.unitById.get(declarationUnitId); + if (!unit || unit.unitKind !== "declaration" || !unit.containerId || !unit.symbolName) { return; } + if (initiallySelectedUnitIds.has(declarationUnitId) || completeContainerUnitIds.has(declarationUnitId)) { return; } const hasExplicitMemberSelection = getOwnerMemberUnits(inventory, unit.symbolName) .some(memberUnit => initiallySelectedUnitIds.has(memberUnit.id)); + if (hasExplicitMemberSelection) { return; } @@ -1549,9 +1720,11 @@ function includeCompleteContainerChildren(options) { } = options; const unit = inventory.unitById.get(declarationUnitId); + if (!unit || unit.unitKind !== "declaration" || !unit.containerId) { return; } + completeContainerUnitIds.add(declarationUnitId); for (const childUnit of inventory.units @@ -1564,6 +1737,7 @@ function includeCompleteContainerChildren(options) { if (excludedUnitIds.has(childUnit.id)) { continue; } + if (!selectedUnitIds.has(childUnit.id)) { selectedUnitIds.add(childUnit.id); pending.push(childUnit.id); @@ -1579,11 +1753,14 @@ function applyTransform(currentText, transform) { switch (transform.kind) { case "strip-inline-max-byte-length-option": { const updatedText = currentText.replace(/,\s*options\?:\s*\{\s*maxByteLength\?:\s*number;\s*\}/g, ""); + if (updatedText === currentText) { throw new Error(`Transform ${transform.kind} did not change the source for ${transform.compatKey}`); } + return updatedText; } + default: throw new Error(`Unsupported transform kind ${transform.kind}`); } @@ -1676,10 +1853,12 @@ async function readPreviousOutputEntries(generationOutputPath, repoRoot) { const previousReport = JSON.parse(await readFile(generationOutputPath, "utf8")); /** @type {string[]} */ const previousOutputEntries = []; + for (const entry of previousReport.outputEntries ?? []) { if (!entry.outputPath) { continue; } + previousOutputEntries.push( resolveManagedOutputPath( entry.outputPath, @@ -1690,12 +1869,14 @@ async function readPreviousOutputEntries(generationOutputPath, repoRoot) { ), ); } + return previousOutputEntries; } catch (error) { if (error && typeof error === "object" && "code" in error && error.code === "ENOENT") { return []; } + throw error; } } diff --git a/lib/surface-inventory.mjs b/lib/surface-inventory.mjs index c2215ab..be30b24 100644 --- a/lib/surface-inventory.mjs +++ b/lib/surface-inventory.mjs @@ -62,6 +62,7 @@ const GENERATED_LIB_HEADER = [ export async function discoverBuiltinSourceLibEntries(options) { const libDirectory = options.libDirectory; const entries = await readdir(libDirectory, { withFileTypes: true }); + const sourceFiles = entries .filter(entry => entry.isFile()) .map(entry => entry.name) @@ -70,6 +71,7 @@ export async function discoverBuiltinSourceLibEntries(options) { /** @type {BuiltinSourceLibEntry[]} */ const sourceLibEntries = []; + for (const sourceFileName of sourceFiles) { const sourcePath = path.join(libDirectory, sourceFileName); sourceLibEntries.push({ @@ -87,7 +89,6 @@ export async function discoverBuiltinSourceLibEntries(options) { /** * @param {{ * snapshotName: string; - * repoRoot: string; * sourceLibEntries: BuiltinSourceLibEntry[]; * inventoryOutputPath: string; * }} options @@ -95,7 +96,6 @@ export async function discoverBuiltinSourceLibEntries(options) { export async function createSurfaceInventory(options) { const { snapshotName, - repoRoot, sourceLibEntries, inventoryOutputPath, } = options; @@ -109,6 +109,7 @@ export async function createSurfaceInventory(options) { for (const sourceLibEntry of sourceLibEntries) { const sourceText = await readFile(sourceLibEntry.sourcePath, "utf8"); + const sourceFile = ts.createSourceFile( sourceLibEntry.sourceFileName, sourceText, @@ -116,7 +117,9 @@ export async function createSurfaceInventory(options) { /*setParentNodes*/ true, ts.ScriptKind.TS, ); + assertGlobalLibScope(sourceFile, sourceLibEntry.libFileName); + const fileRecord = { sourceFileName: sourceLibEntry.sourceFileName, libFileName: sourceLibEntry.libFileName, @@ -124,15 +127,17 @@ export async function createSurfaceInventory(options) { reportPath: sourceLibEntry.reportPath, sourceHash: sourceLibEntry.sourceHash, referenceLibs: getReferenceLibs(sourceFile), - preserveWholeFile: shouldPreserveWholeFile(sourceFile, sourceText), + preserveWholeFile: shouldPreserveWholeFile(sourceFile), stageRank: getLibStageRank(sourceLibEntry.libFileName), sourceText, unitIds: [], containerIds: [], }; + files.push(fileRecord); let order = 0; + for (const statement of sourceFile.statements) { collectStatementUnits({ units, @@ -148,7 +153,8 @@ export async function createSurfaceInventory(options) { } const fileByLibFileName = new Map(files.map(fileRecord => [fileRecord.libFileName, fileRecord])); - const containersByIdForWrite = new Map(containers.map(container => [container.id, stripRuntimeFields(container)])); + const strippedContainers = containers.map(({ bodyStart, bodyEnd, ...container }) => container); + const containersByIdForWrite = new Map(strippedContainers.map(container => [container.id, container])); /** @type {Map} */ const declarationUnitsBySymbol = new Map(); @@ -169,61 +175,75 @@ export async function createSurfaceInventory(options) { for (const unit of units) { if (unit.unitKind === "declaration" && unit.symbolName) { let declarationUnitIds = declarationUnitIdsBySymbol.get(unit.symbolName); + if (!declarationUnitIds) { declarationUnitIds = []; declarationUnitIdsBySymbol.set(unit.symbolName, declarationUnitIds); } + declarationUnitIds.push(unit.id); } } // Pass 2: finalize the dependency fields on the original unit. for (const unit of units) { + if (unit.typeRefName && !unit.containerId) { + unit.typeRefName = normalizeReference(unit.typeRefName, unit.containerPath, declarationUnitIdsBySymbol); + } + unit.dependencySymbols = collectDependencySymbols({ unit, declarationUnitIdsBySymbol, }); + const heritageSymbols = collectHeritageSymbols(unit, declarationUnitIdsBySymbol); + + if (heritageSymbols.length) { + unit.heritageSymbols = heritageSymbols; + } + unit.dependencyUnitIds = [ ...new Set(unit.dependencySymbols.flatMap(symbol => declarationUnitIdsBySymbol.get(symbol) ?? [])), ].filter(unitId => unitId !== unit.id).sort(compareStringsCaseSensitive); } - // Pass 3: make one stripped copy per unit and share the same object across - // unitById and every lookup map. A separate copy per map splits into copies - // that do and don't carry later-computed fields (dependency info, etc.), - // producing a bug where the classification result changes with the map you - // read from (a real failure that once dead-coded inherited-member - // classification). + // Share each finalized record across the lookup maps. /** @type {Map} */ - const strippedUnitById = new Map(units.map(unit => [unit.id, stripRuntimeFields(unit)])); + const strippedUnitById = new Map(units.map(({ node, sourceFile, ...unit }) => [unit.id, unit])); for (const unit of units) { const strippedUnit = strippedUnitById.get(unit.id); + if (!strippedUnit) { throw new Error(`Missing stripped unit for ${unit.id}`); } let fileUnits = unitsByLibFileName.get(unit.libFileName); + if (!fileUnits) { fileUnits = []; unitsByLibFileName.set(unit.libFileName, fileUnits); } + fileUnits.push(strippedUnit); if (unit.unitKind === "declaration" && unit.symbolName) { let symbolUnits = declarationUnitsBySymbol.get(unit.symbolName); + if (!symbolUnits) { symbolUnits = []; declarationUnitsBySymbol.set(unit.symbolName, symbolUnits); } + symbolUnits.push(strippedUnit); if (!unit.symbolName.endsWith("Constructor")) { let rootUnits = rootDeclarationUnitsByCompatName.get(unit.symbolName); + if (!rootUnits) { rootUnits = []; rootDeclarationUnitsByCompatName.set(unit.symbolName, rootUnits); } + rootUnits.push(strippedUnit); } } @@ -231,17 +251,21 @@ export async function createSurfaceInventory(options) { if (unit.unitKind === "member" && unit.ownerSymbol && unit.memberName) { const memberKey = getMemberLookupKey(unit.ownerSymbol, unit.memberName); let memberUnits = memberUnitsByOwnerAndName.get(memberKey); + if (!memberUnits) { memberUnits = []; memberUnitsByOwnerAndName.set(memberKey, memberUnits); } + memberUnits.push(strippedUnit); let ownerUnits = memberUnitsByOwnerSymbol.get(unit.ownerSymbol); + if (!ownerUnits) { ownerUnits = []; memberUnitsByOwnerSymbol.set(unit.ownerSymbol, ownerUnits); } + ownerUnits.push(strippedUnit); } } @@ -249,15 +273,19 @@ export async function createSurfaceInventory(options) { for (const rootDeclarationUnits of rootDeclarationUnitsByCompatName.values()) { rootDeclarationUnits.sort(compareUnitsByOrder); } + for (const memberUnits of memberUnitsByOwnerAndName.values()) { memberUnits.sort(compareUnitsByOrder); } + for (const ownerUnits of memberUnitsByOwnerSymbol.values()) { ownerUnits.sort(compareUnitsByOrder); } + for (const declarationUnits of declarationUnitsBySymbol.values()) { declarationUnits.sort(compareUnitsByOrder); } + for (const fileUnits of unitsByLibFileName.values()) { fileUnits.sort(compareUnitsByOrder); } @@ -267,39 +295,49 @@ export async function createSurfaceInventory(options) { registerRootSurface(rootSurfaceByCompatName, declarationUnit); } } + for (const rootSurface of rootSurfaceByCompatName.values()) { const readonlySymbol = READONLY_COMPANION_BY_RUNTIME_ROOT.get(rootSurface.compatName); + if (readonlySymbol) { const hasRuntimeRoot = rootSurface.rootDeclarationUnitIds.some(unitId => { const declarationKind = strippedUnitById.get(unitId)?.declarationKind; + return declarationKind === "var" || declarationKind === "class"; }); + if (!hasRuntimeRoot || !declarationUnitsBySymbol.has(readonlySymbol)) { throw new Error(`Missing readonly companion ${readonlySymbol} for ${rootSurface.compatName}`); } + const rootMemberNames = new Set( (memberUnitsByOwnerSymbol.get(rootSurface.compatName) ?? []) .flatMap(unit => unit.memberName ? [unit.memberName] : []), ); + const readonlyMemberNames = new Set( (memberUnitsByOwnerSymbol.get(readonlySymbol) ?? []) .flatMap(unit => unit.memberName ? [unit.memberName] : []), ); + const unmatchedMembers = [...readonlyMemberNames] .filter(memberName => !rootMemberNames.has(memberName)) .sort(compareStringsCaseSensitive); + if (!readonlyMemberNames.size || unmatchedMembers.length) { throw new Error( `Readonly companion ${readonlySymbol} does not structurally match ${rootSurface.compatName}: ` + (unmatchedMembers.length ? unmatchedMembers.join(", ") : "no members"), ); } + rootSurface.instanceContainerSymbols.add(readonlySymbol); } const objectSymbol = `${rootSurface.compatName}Object`; const rootDeclarations = declarationUnitsBySymbol.get(rootSurface.compatName) ?? []; const objectDeclarations = declarationUnitsBySymbol.get(objectSymbol) ?? []; + if ( rootDeclarations.some(unit => unit.dependencySymbols.includes(objectSymbol)) || objectDeclarations.some(unit => unit.dependencySymbols.includes(rootSurface.compatName)) @@ -312,7 +350,7 @@ export async function createSurfaceInventory(options) { snapshot: snapshotName, inventoryOutputPath, files, - containers: containers.map(container => stripRuntimeFields(container)), + containers: strippedContainers, fileByLibFileName, containerById: containersByIdForWrite, declarationUnitsBySymbol, @@ -322,9 +360,11 @@ export async function createSurfaceInventory(options) { rootSurfaceByCompatName, units: units.map(unit => { const strippedUnit = strippedUnitById.get(unit.id); + if (!strippedUnit) { throw new Error(`Missing stripped unit for ${unit.id}`); } + return strippedUnit; }), unitById: strippedUnitById, @@ -334,7 +374,7 @@ export async function createSurfaceInventory(options) { await mkdir(path.dirname(inventoryOutputPath), { recursive: true }); await writeFile( inventoryOutputPath, - `${JSON.stringify(getInventoryReport(inventory, repoRoot), undefined, 2)}\n`, + `${JSON.stringify(getInventoryReport(inventory), undefined, 2)}\n`, ); return inventory; @@ -359,11 +399,15 @@ export function emitSelectedUnits(options) { excludedUnitIds = new Set(), emittedUnitIds, } = options; + const selectedSet = new Set(selectedUnitIds); /** @type {string[]} */ const globalSections = []; /** @type {string[]} */ const moduleSections = []; + /** @type {Map} */ + const moduleFileByLocalSymbol = new Map(); + for (const fileRecord of inventory.files) { const fileSection = emitFileSelection( inventory, @@ -374,7 +418,31 @@ export function emitSelectedUnits(options) { excludedUnitIds, emittedUnitIds, ); + if (fileSection) { + if (fileRecord.preserveWholeFile) { + for (const unit of inventory.unitsByLibFileName.get(fileRecord.libFileName) ?? []) { + if ( + unit.unitKind !== "declaration" + || unit.containerPath.length + || !unit.symbolName + || (unit.declarationKind === "namespace" && unit.symbolName === "global") + ) { + continue; + } + + const previousFile = moduleFileByLocalSymbol.get(unit.symbolName); + + if (previousFile && previousFile !== fileRecord.libFileName) { + throw new Error( + `Cannot combine module-local symbol ${unit.symbolName} from ${previousFile} and ${fileRecord.libFileName}`, + ); + } + + moduleFileByLocalSymbol.set(unit.symbolName, fileRecord.libFileName); + } + } + (fileRecord.preserveWholeFile ? moduleSections : globalSections).push(fileSection); } } @@ -384,12 +452,13 @@ export function emitSelectedUnits(options) { "export {};", "", "declare global {", - indentBlock(stripAmbientDeclareModifiers(globalSections.join("\n\n").trimEnd())), + stripAmbientDeclareModifiers(globalSections.join("\n\n").trimEnd()), "}", "", moduleSections.join("\n\n").trimEnd(), ].join("\n") : globalSections.join("\n\n").trimEnd(); + return [ GENERATED_LIB_HEADER, body, @@ -401,7 +470,27 @@ export function emitSelectedUnits(options) { * @param {string} text */ function stripAmbientDeclareModifiers(text) { - return text.replace(/^(\s*)declare\s+/gmu, "$1"); + const source = ts.createSourceFile("globals.d.ts", text, ts.ScriptTarget.Latest); + /** @type {ts.Modifier[]} */ + const modifiers = []; + + /** @param {ts.Node} node */ + function visit(node) { + if (ts.canHaveModifiers(node)) { + modifiers.push(...(ts.getModifiers(node) ?? []).filter(modifier => modifier.kind === ts.SyntaxKind.DeclareKeyword)); + } + + ts.forEachChild(node, visit); + } + + visit(source); + + for (const modifier of modifiers.reverse()) { + const end = modifier.end + (text[modifier.end] === " " ? 1 : 0); + text = text.slice(0, modifier.getStart(source)) + text.slice(end); + } + + return text; } /** @@ -411,13 +500,17 @@ export function getCompatSegments(compatKey) { if (compatKey.startsWith("javascript.builtins.")) { return compatKey.slice("javascript.builtins.".length).split("."); } + const argumentsPrefix = "javascript.functions.arguments"; + if (compatKey === argumentsPrefix) { return ["IArguments"]; } + if (compatKey.startsWith(`${argumentsPrefix}.`)) { return ["IArguments", ...compatKey.slice(argumentsPrefix.length + 1).split(".")]; } + throw new Error(`Unsupported JavaScript lib compat key ${compatKey}`); } @@ -437,10 +530,12 @@ export function isLibCompatKey(compatKey) { export function findLongestCompatRoot(inventory, compatSegments) { for (let length = compatSegments.length; length >= 1; length--) { const candidate = compatSegments.slice(0, length).join("."); + if (inventory.rootSurfaceByCompatName.has(candidate)) { return candidate; } } + return undefined; } @@ -457,7 +552,7 @@ export function getMemberUnits(inventory, ownerSymbol, memberName) { * @param {SurfaceInventory} inventory * @param {string} symbolName */ -export function getPreferredBaseDeclarationUnits(inventory, symbolName) { +export function getPreferredDeclarationUnits(inventory, symbolName) { return selectPreferredUnits( inventory, getDeclarationUnits(inventory, symbolName).filter(unit => unit.unitKind === "declaration"), @@ -467,14 +562,31 @@ export function getPreferredBaseDeclarationUnits(inventory, symbolName) { /** * @param {SurfaceInventory} inventory - * @param {string} symbolName + * @param {string} ownerSymbol + * @param {string} memberName */ -export function getPreferredDeclarationUnits(inventory, symbolName) { - return selectPreferredUnits( - inventory, - getDeclarationUnits(inventory, symbolName).filter(unit => unit.unitKind === "declaration"), - { prefer: "base" }, - ); +export function getInheritedMemberUnits(inventory, ownerSymbol, memberName) { + const visited = new Set([ownerSymbol]); + const pending = getDeclarationUnits(inventory, ownerSymbol).flatMap(unit => unit.heritageSymbols ?? []); + const inheritedUnits = []; + + for (const symbol of pending) { + if (visited.has(symbol)) { + continue; + } + + visited.add(symbol); + const memberUnits = getPreferredMemberUnits(inventory, symbol, memberName); + + if (memberUnits.length) { + inheritedUnits.push(...memberUnits); + } + else { + pending.push(...getDeclarationUnits(inventory, symbol).flatMap(unit => unit.heritageSymbols ?? [])); + } + } + + return inheritedUnits; } /** @@ -521,26 +633,33 @@ function isBuiltinSourceLibFileName(fileName) { if (!fileName.endsWith(".d.ts")) { return false; } + if (!fileName.startsWith("lib.")) { return false; } + const libName = fileName.slice("lib.".length, -".d.ts".length); if (libName === "baseline") { return false; } + if (libName.endsWith(".full")) { return false; } + if (libName === "esnext.disposable") { return false; } + if (libName === "es6") { return false; } + if (libName.startsWith("dom") || libName.startsWith("webworker") || libName === "scripthost") { return false; } + if (libName === "decorators" || libName === "decorators.legacy") { return false; } @@ -555,16 +674,21 @@ function isBuiltinSourceLibFileName(fileName) { */ function getLibStageRank(libFileName) { const libName = libFileName.replace(/^lib\./u, "").replace(/\.d\.ts$/u, ""); + if (libName === "es5") { return 5; } + if (libName.startsWith("esnext")) { return Number.POSITIVE_INFINITY; } + const match = /^es(\d{4})(?:\.|$)/u.exec(libName); + if (match) { return Number.parseInt(match[1], 10); } + return Number.POSITIVE_INFINITY; } @@ -601,6 +725,7 @@ function collectStatementUnits(options) { if (ts.isModuleDeclaration(statement) && ts.isIdentifier(statement.name) && statement.body && ts.isModuleBlock(statement.body)) { const symbolName = formatSymbolName(containerPath, statement.name.text); + const container = createContainerRecord({ fileRecord, sourceFile, @@ -612,6 +737,7 @@ function collectStatementUnits(options) { parentContainerId, nextOrder, }); + containers.push(container); fileRecord.containerIds.push(container.id); @@ -640,11 +766,13 @@ function collectStatementUnits(options) { nextOrder, }); } + return; } if (ts.isInterfaceDeclaration(statement) && ts.isIdentifier(statement.name)) { const symbolName = formatSymbolName(containerPath, statement.name.text); + const container = createContainerRecord({ fileRecord, sourceFile, @@ -656,6 +784,7 @@ function collectStatementUnits(options) { parentContainerId, nextOrder, }); + containers.push(container); fileRecord.containerIds.push(container.id); @@ -682,15 +811,18 @@ function collectStatementUnits(options) { parentContainerId: container.id, nextOrder, }); + if (memberUnit) { units.push(memberUnit); } } + return; } if (ts.isClassDeclaration(statement) && statement.name && ts.isIdentifier(statement.name)) { const symbolName = formatSymbolName(containerPath, statement.name.text); + const container = createContainerRecord({ fileRecord, sourceFile, @@ -702,6 +834,7 @@ function collectStatementUnits(options) { parentContainerId, nextOrder, }); + containers.push(container); fileRecord.containerIds.push(container.id); @@ -728,10 +861,12 @@ function collectStatementUnits(options) { parentContainerId: container.id, nextOrder, }); + if (memberUnit) { units.push(memberUnit); } } + return; } @@ -742,9 +877,12 @@ function collectStatementUnits(options) { + "Each runtime global must have its own inventory unit.", ); } + const declaration = statement.declarationList.declarations[0]; + if (declaration?.type && ts.isTypeLiteralNode(declaration.type) && ts.isIdentifier(declaration.name)) { const symbolName = formatSymbolName(containerPath, declaration.name.text); + const container = createContainerRecord({ fileRecord, sourceFile, @@ -756,6 +894,7 @@ function collectStatementUnits(options) { parentContainerId, nextOrder, }); + containers.push(container); fileRecord.containerIds.push(container.id); @@ -782,10 +921,12 @@ function collectStatementUnits(options) { parentContainerId: container.id, nextOrder, }); + if (memberUnit) { units.push(memberUnit); } } + return; } } @@ -799,7 +940,7 @@ function collectStatementUnits(options) { nextOrder, symbolName: getStatementSymbolName(statement, containerPath), declarationKind: getDeclarationKind(statement), - typeRefName: getTypeReferenceName(statement, containerPath), + typeRefName: getTypeReferenceName(statement), containerId: undefined, })); } @@ -830,6 +971,7 @@ function createContainerRecord(options) { parentContainerId, nextOrder, } = options; + return { id: `${fileRecord.libFileName}::container::${containerKind}::${symbolName}::${nextOrder()}`, libFileName: fileRecord.libFileName, @@ -898,7 +1040,9 @@ function createDeclarationUnit(options) { node, sourceFile, }; + fileRecord.unitIds.push(unit.id); + return unit; } @@ -926,6 +1070,7 @@ function createMemberUnit(options) { } = options; const memberName = getMemberName(node, sourceFile); + if (!memberName) { return undefined; } @@ -953,7 +1098,9 @@ function createMemberUnit(options) { node, sourceFile, }; + fileRecord.unitIds.push(unit.id); + return unit; } @@ -968,6 +1115,7 @@ function collectDependencySymbols(options) { unit, declarationUnitIdsBySymbol, } = options; + const typeParameterNames = getTypeParameterNames(unit.node); const dependencySymbols = new Set(); @@ -989,6 +1137,7 @@ function collectDependencySymbols(options) { addReference(heritageType.expression.getText(unit.sourceFile)); } } + ts.forEachChild(node, visit); } @@ -997,8 +1146,10 @@ function collectDependencySymbols(options) { for (const declaredSymbol of unit.declaredSymbols) { dependencySymbols.delete(declaredSymbol); } + for (const typeParameterName of typeParameterNames) { dependencySymbols.delete(typeParameterName); + for (const prefix of unit.containerPath.map((_, index) => unit.containerPath.slice(0, index + 1).join("."))) { dependencySymbols.delete(`${prefix}.${typeParameterName}`); } @@ -1015,13 +1166,44 @@ function collectDependencySymbols(options) { if (!referenceText || referenceText.includes("<") || typeParameterNames.has(referenceText)) { return; } - const normalized = normalizeReference(referenceText, unit.containerPath, declarationUnitIdsBySymbol); + + const namespacePath = unit.unitKind === "member" ? unit.containerPath.slice(0, -1) : unit.containerPath; + const normalized = normalizeReference(referenceText, namespacePath, declarationUnitIdsBySymbol); + if (normalized) { dependencySymbols.add(normalized); } } } +/** + * @param {InventoryUnitRecord & { node: ts.Node; sourceFile: ts.SourceFile; }} unit + * @param {Map} declarationUnitIdsBySymbol + */ +function collectHeritageSymbols(unit, declarationUnitIdsBySymbol) { + if (!ts.isInterfaceDeclaration(unit.node) && !ts.isClassDeclaration(unit.node)) { + return []; + } + + const symbols = new Set(); + + for (const clause of unit.node.heritageClauses ?? []) { + if (clause.token !== ts.SyntaxKind.ExtendsKeyword) { + continue; + } + + for (const type of clause.types) { + const symbol = normalizeReference(type.expression.getText(unit.sourceFile), unit.containerPath, declarationUnitIdsBySymbol); + + if (symbol && declarationUnitIdsBySymbol.has(symbol)) { + symbols.add(symbol); + } + } + } + + return [...symbols].sort(compareStringsCaseSensitive); +} + /** * @param {Map} rootSurfaceByCompatName * @param {InventoryUnitRecord} declarationUnit @@ -1032,6 +1214,7 @@ function registerRootSurface(rootSurfaceByCompatName, declarationUnit) { } let root = rootSurfaceByCompatName.get(declarationUnit.symbolName); + if (!root) { root = { compatName: declarationUnit.symbolName, @@ -1045,9 +1228,11 @@ function registerRootSurface(rootSurfaceByCompatName, declarationUnit) { switch (declarationUnit.declarationKind) { case "var": root.rootDeclarationUnitIds.push(declarationUnit.id); + if (declarationUnit.typeRefName) { root.staticContainerSymbols.add(declarationUnit.typeRefName); } + break; case "function": case "enum": @@ -1081,10 +1266,13 @@ function registerRootSurface(rootSurfaceByCompatName, declarationUnit) { */ function emitFileSelection(inventory, libFileName, selectedUnitIds, unitTextOverrides, completeContainerUnitIds, excludedUnitIds, emittedUnitIds) { const fileRecord = inventory.fileByLibFileName.get(libFileName); + if (!fileRecord) { return undefined; } + const fileUnits = inventory.unitsByLibFileName.get(libFileName) ?? []; + if (!fileUnits.some(unit => selectedUnitIds.has(unit.id))) { return undefined; } @@ -1097,6 +1285,7 @@ function emitFileSelection(inventory, libFileName, selectedUnitIds, unitTextOver .filter(unit => excludedUnitIds.has(unit.id)) .map(unit => unit.id) .sort(compareStringsCaseSensitive); + if (excludedInFile.length) { throw new Error( `Cannot emit whole-file lib ${libFileName}: it contains units excluded from the baseline target:\n${excludedInFile @@ -1104,9 +1293,11 @@ function emitFileSelection(inventory, libFileName, selectedUnitIds, unitTextOver .join("\n")}`, ); } + for (const unit of fileUnits) { emittedUnitIds?.add(unit.id); } + return [ `/////////////////////////////`, `// ${libFileName}`, @@ -1121,6 +1312,7 @@ function emitFileSelection(inventory, libFileName, selectedUnitIds, unitTextOver for (const unit of topLevelUnits) { const emitted = emitUnit(inventory, unit.id, selectedUnitIds, unitTextOverrides, completeContainerUnitIds, excludedUnitIds, emittedUnitIds); + if (emitted) { sections.push(emitted.trimEnd()); } @@ -1156,7 +1348,9 @@ function emitUnit(inventory, unitId, selectedUnitIds, unitTextOverrides, complet if (excludedUnitIds.has(unitId)) { return undefined; } + const unit = inventory.unitById.get(unitId); + if (!unit) { return undefined; } @@ -1165,6 +1359,7 @@ function emitUnit(inventory, unitId, selectedUnitIds, unitTextOverrides, complet /** @type {string[]} */ const selectedChildEmissions = []; const forceChildren = forceEmit || completeContainerUnitIds.has(unit.id); + for (const child of childUnits) { const childEmission = emitUnit( inventory, @@ -1176,10 +1371,12 @@ function emitUnit(inventory, unitId, selectedUnitIds, unitTextOverrides, complet emittedUnitIds, forceChildren, ); + if (childEmission) { selectedChildEmissions.push(childEmission); } } + const isSelected = forceEmit || selectedUnitIds.has(unitId); const hasSelectedChildren = selectedChildEmissions.length > 0; @@ -1189,22 +1386,28 @@ function emitUnit(inventory, unitId, selectedUnitIds, unitTextOverrides, complet if (unit.unitKind === "declaration" && unit.containerId) { const container = inventory.containerById.get(unit.containerId); + if (!container) { throw new Error(`Missing container ${unit.containerId} for unit ${unit.id}`); } + emittedUnitIds?.add(unit.id); + if (!selectedChildEmissions.length) { return `${container.headerText}\n${container.footerText}`.trimEnd(); } - return `${container.headerText}\n${indentBlock(selectedChildEmissions.join("\n\n"))}\n${container.footerText}`.trimEnd(); + + return `${container.headerText}\n${selectedChildEmissions.join("\n\n")}\n${container.footerText}`.trimEnd(); } if (unit.unitKind === "declaration" && !unit.containerId) { emittedUnitIds?.add(unit.id); + return stripSourceFilePreamble(unitTextOverrides.get(unit.id) ?? unit.text).trimEnd(); } emittedUnitIds?.add(unit.id); + return (unitTextOverrides.get(unit.id) ?? unit.text).trimEnd(); } @@ -1220,9 +1423,8 @@ function getChildUnits(inventory, containerId) { /** * @param {SurfaceInventory} inventory - * @param {string} repoRoot */ -function getInventoryReport(inventory, repoRoot) { +function getInventoryReport(inventory) { return { snapshot: inventory.snapshot, summary: { @@ -1268,6 +1470,7 @@ function getInventoryReport(inventory, repoRoot) { declaredSymbols: unit.declaredSymbols, dependencySymbols: unit.dependencySymbols, dependencyUnitIds: unit.dependencyUnitIds, + heritageSymbols: unit.heritageSymbols, parameterNames: unit.parameterNames, surfacePath: unit.surfacePath, order: unit.order, @@ -1292,12 +1495,15 @@ function getStatementSymbolName(statement, containerPath) { return formatSymbolName(containerPath, statement.name.text); } } + if (ts.isVariableStatement(statement)) { const declaration = statement.declarationList.declarations[0]; + if (declaration && ts.isIdentifier(declaration.name)) { return formatSymbolName(containerPath, declaration.name.text); } } + return undefined; } @@ -1308,48 +1514,52 @@ function getDeclarationKind(statement) { if (ts.isInterfaceDeclaration(statement)) { return "interface"; } + if (ts.isTypeAliasDeclaration(statement)) { return "type-alias"; } + if (ts.isClassDeclaration(statement)) { return "class"; } + if (ts.isEnumDeclaration(statement)) { return "enum"; } + if (ts.isFunctionDeclaration(statement)) { return "function"; } + if (ts.isModuleDeclaration(statement)) { return "namespace"; } + if (ts.isVariableStatement(statement)) { return "var"; } + return "statement"; } /** * @param {ts.Statement} statement - * @param {string[]} containerPath */ -function getTypeReferenceName(statement, containerPath) { +function getTypeReferenceName(statement) { if (!ts.isVariableStatement(statement)) { return undefined; } + const declaration = statement.declarationList.declarations[0]; + if (!declaration?.type) { return undefined; } + if (ts.isTypeReferenceNode(declaration.type)) { - if (ts.isIdentifier(declaration.type.typeName) && containerPath.length) { - return formatSymbolName(containerPath, declaration.type.typeName.text); - } return declaration.type.typeName.getText(); } - if (ts.isQualifiedName(declaration.type)) { - return declaration.type.getText(); - } + return declaration.type.getText(); } @@ -1370,14 +1580,18 @@ function getMemberName(node, sourceFile) { if (ts.isIndexSignatureDeclaration(node)) { return ""; } + return getPropertyNameText(node.name, sourceFile); } + if (ts.isConstructSignatureDeclaration(node) || ts.isConstructorDeclaration(node)) { return ""; } + if (ts.isCallSignatureDeclaration(node)) { return ""; } + return undefined; } @@ -1389,14 +1603,18 @@ function getPropertyNameText(name, sourceFile) { if (!name) { return undefined; } + if (ts.isIdentifier(name) || ts.isPrivateIdentifier(name)) { return name.text; } + if (ts.isStringLiteral(name) || ts.isNumericLiteral(name)) { return name.text; } + if (ts.isComputedPropertyName(name)) { const text = name.expression.getText(sourceFile); + switch (text) { case "Symbol.iterator": return "@@iterator"; @@ -1432,6 +1650,7 @@ function getPropertyNameText(name, sourceFile) { return text; } } + return name.getText(sourceFile); } @@ -1451,13 +1670,16 @@ function getParameterNames(node) { ) { return []; } + /** @type {string[]} */ const parameterNames = []; + for (const parameter of node.parameters) { if (ts.isIdentifier(parameter.name)) { parameterNames.push(parameter.name.text); } } + return parameterNames; } @@ -1510,16 +1732,17 @@ function stripReferenceDirectives(sourceText) { /*setParentNodes*/ false, ts.ScriptKind.TS, ); + let stripped = sourceText; + for (const directive of [...sourceFile.libReferenceDirectives].reverse()) { const lineStart = stripped.lastIndexOf("\n", directive.pos - 1) + 1; const nextLineStart = stripped.indexOf("\n", directive.end); const lineEnd = nextLineStart === -1 ? stripped.length : nextLineStart + 1; stripped = stripped.slice(0, lineStart) + stripped.slice(lineEnd); } - return stripped - .replace(/^\s+$/gmu, "") - .trim(); + + return stripped.trim(); } /** @@ -1538,14 +1761,12 @@ function stripSourceFilePreamble(sourceText) { /** * @param {ts.SourceFile} sourceFile - * @param {string} sourceText */ -function shouldPreserveWholeFile(sourceFile, sourceText) { - const hasTopLevelModuleSyntax = sourceFile.statements.some(statement => - ts.isExportDeclaration(statement), - ); - return hasTopLevelModuleSyntax - || /\bdeclare\s+global\b/u.test(sourceText); +function shouldPreserveWholeFile(sourceFile) { + return ts.isExternalModule(sourceFile) + || sourceFile.statements.some(statement => + ts.isModuleDeclaration(statement) && (statement.flags & ts.NodeFlags.GlobalAugmentation) !== 0, + ); } /** @@ -1559,9 +1780,11 @@ function assertGlobalLibScope(sourceFile, libFileName) { if (sourceFile.referencedFiles.length) { throw new Error(`${libFileName} contains a path reference; baseline lib inputs must be self-contained`); } + if (sourceFile.typeReferenceDirectives.length) { throw new Error(`${libFileName} contains a types reference; baseline lib inputs must be self-contained`); } + if (sourceFile.amdDependencies.length || sourceFile.moduleName) { throw new Error(`${libFileName} contains AMD metadata; baseline lib inputs must be self-contained`); } @@ -1571,6 +1794,7 @@ function assertGlobalLibScope(sourceFile, libFileName) { if (ts.isModuleDeclaration(node) && ts.isStringLiteral(node.name)) { throw new Error(`${libFileName} contains an ambient module; baseline lib inputs may only declare globals`); } + if ( ts.isImportDeclaration(node) || ts.isImportEqualsDeclaration(node) @@ -1578,6 +1802,7 @@ function assertGlobalLibScope(sourceFile, libFileName) { ) { throw new Error(`${libFileName} contains a module import; baseline lib inputs must be self-contained`); } + ts.forEachChild(node, rejectModuleDependencies); } @@ -1591,6 +1816,7 @@ function assertGlobalLibScope(sourceFile, libFileName) { ) { continue; } + if ( ts.isExportDeclaration(statement) || ts.isExportAssignment(statement) @@ -1601,6 +1827,7 @@ function assertGlobalLibScope(sourceFile, libFileName) { throw new Error(`${libFileName} exposes a module export; baseline lib inputs may only use an empty export marker`); } } + rejectModuleDependencies(sourceFile); } @@ -1616,6 +1843,7 @@ function selectPreferredUnits(inventory, units, options) { let candidates = units; const stableCandidates = candidates.filter(unit => !isEsNextLibFileName(unit.libFileName)); + if (stableCandidates.length) { candidates = stableCandidates; } @@ -1623,6 +1851,7 @@ function selectPreferredUnits(inventory, units, options) { const nonScopeSensitiveCandidates = candidates.filter( unit => !inventory.fileByLibFileName.get(unit.libFileName)?.preserveWholeFile, ); + if (nonScopeSensitiveCandidates.length) { candidates = nonScopeSensitiveCandidates; } @@ -1630,6 +1859,7 @@ function selectPreferredUnits(inventory, units, options) { const stageRanks = candidates.map( unit => inventory.fileByLibFileName.get(unit.libFileName)?.stageRank ?? Number.POSITIVE_INFINITY, ); + const preferredStageRank = options.prefer === "base" ? Math.min(...stageRanks) : Math.max(...stageRanks); @@ -1677,24 +1907,19 @@ function getNodeSlice(sourceText, start, end) { * @param {Map} declarationUnitIdsBySymbol */ function normalizeReference(referenceText, containerPath, declarationUnitIdsBySymbol) { - if (declarationUnitIdsBySymbol.has(referenceText)) { - return referenceText; - } if (referenceText.startsWith("globalThis.")) { const globalName = referenceText.slice("globalThis.".length); - if (declarationUnitIdsBySymbol.has(globalName)) { - return globalName; - } - } - if (referenceText.includes(".") && !referenceText.includes("<")) { - return referenceText; + + return declarationUnitIdsBySymbol.has(globalName) ? globalName : undefined; } + if (referenceText.includes("<")) { return undefined; } for (let index = containerPath.length; index >= 1; index--) { const candidate = formatSymbolName(containerPath.slice(0, index), referenceText); + if (declarationUnitIdsBySymbol.has(candidate)) { return candidate; } @@ -1709,6 +1934,7 @@ function normalizeReference(referenceText, containerPath, declarationUnitIdsBySy */ function formatSymbolName(containerPath, symbolName) { const symbolPath = containerPath[0] === "global" ? containerPath.slice(1) : containerPath; + return symbolPath.length ? `${symbolPath.join(".")}.${symbolName}` : symbolName; } @@ -1737,25 +1963,6 @@ function compareUnitsByOrder(left, right) { return left.order - right.order || compareStringsCaseSensitive(left.id, right.id); } -/** - * @param {InventoryUnitRecord | InventoryContainerRecord} value - */ -function stripRuntimeFields(value) { - return JSON.parse(JSON.stringify(value, (key, currentValue) => { - if (key === "node" || key === "sourceFile" || key === "bodyStart" || key === "bodyEnd") { - return undefined; - } - return currentValue; - })); -} - -/** - * @param {string} value - */ -function indentBlock(value) { - return value.split("\n").map(line => line ? ` ${line}` : line).join("\n"); -} - /** * @typedef {"statement" | "namespace" | "interface" | "class" | "function" | "var" | "enum" | "type-alias" | "member"} DeclarationKind */ @@ -1817,6 +2024,7 @@ function indentBlock(value) { * declaredSymbols: string[]; * dependencySymbols: string[]; * dependencyUnitIds: string[]; + * heritageSymbols?: string[]; * order: number; * text: string; * parameterNames: string[]; diff --git a/lib/typescript-proposal.mjs b/lib/typescript-proposal.mjs index 16d9bff..48e9c85 100644 --- a/lib/typescript-proposal.mjs +++ b/lib/typescript-proposal.mjs @@ -27,13 +27,16 @@ import { export async function generateTypeScriptProposalLib(options) { const repoRoot = path.resolve(options.repoRoot); const typescriptDir = path.resolve(options.typescriptDir ?? path.join(repoRoot, ".tmp", "TypeScript")); + if (options.expectedCommit && !options.allowUnpinned) { assertTypeScriptSourcePin(typescriptDir, options.expectedCommit); } const workspaceRoot = fs.mkdtempSync(path.join(os.tmpdir(), "typescript-baseline-proposal-")); + try { const libDirectory = path.join(workspaceRoot, "libs"); + if (options.expectedCommit && !options.allowUnpinned) { snapshotDeclarationCorpusFromCommit(typescriptDir, options.expectedCommit, libDirectory); } @@ -70,13 +73,16 @@ export async function generateTypeScriptProposalLib(options) { libDirectory, reportPathPrefix: "microsoft/TypeScript/tsc/internal/bundled/libs", }); + const verifiedFingerprint = computeLibDirectoryContentHash(libDirectory); + if ( verifiedFingerprint.hash !== fingerprint.hash || verifiedFingerprint.fileCount !== fingerprint.fileCount ) { throw new Error("TypeScript declaration corpus changed while generating the proposal"); } + return { outputPath: plan.topLevelOutputPath, cleanup: () => fs.rmSync(workspaceRoot, { recursive: true, force: true }), @@ -95,6 +101,7 @@ export async function generateTypeScriptProposalLib(options) { */ function snapshotDeclarationCorpusFromCommit(typescriptDir, commit, destinationDirectory) { const relativeDirectory = typescriptLibSourceDirectory.split(path.sep).join("/"); + const filePaths = execFileSync( "git", ["--no-replace-objects", "ls-tree", "-r", "--name-only", "-z", commit, "--", relativeDirectory], @@ -104,16 +111,19 @@ function snapshotDeclarationCorpusFromCommit(typescriptDir, commit, destinationD && relativePath.endsWith(".d.ts") && path.posix.basename(relativePath) !== "lib.baseline.d.ts" )).sort(); + if (!filePaths.length) { throw new Error(`Pinned TypeScript commit contains no declaration files under ${relativeDirectory}`); } fs.mkdirSync(destinationDirectory, { recursive: true }); + for (const relativePath of filePaths) { const source = execFileSync("git", ["--no-replace-objects", "show", `${commit}:${relativePath}`], { cwd: typescriptDir, maxBuffer: 16 * 1024 * 1024, }); + fs.writeFileSync(path.join(destinationDirectory, path.posix.basename(relativePath)), source); } } @@ -128,13 +138,16 @@ function snapshotDeclarationCorpus(sourceDirectory, destinationDirectory) { } fs.mkdirSync(destinationDirectory, { recursive: true }); + const fileNames = fs.readdirSync(sourceDirectory, { withFileTypes: true }) .filter(entry => entry.isFile() && entry.name.endsWith(".d.ts") && entry.name !== "lib.baseline.d.ts") .map(entry => entry.name) .sort(); + if (!fileNames.length) { throw new Error(`TypeScript generated lib directory contains no declaration files: ${sourceDirectory}`); } + for (const fileName of fileNames) { fs.copyFileSync(path.join(sourceDirectory, fileName), path.join(destinationDirectory, fileName)); } diff --git a/lib/typescript-upstream.mjs b/lib/typescript-upstream.mjs index b4924e8..e924afb 100644 --- a/lib/typescript-upstream.mjs +++ b/lib/typescript-upstream.mjs @@ -12,9 +12,11 @@ import { } from "./text-patch.mjs"; export const typescriptLibSourceDirectory = path.join("tsc", "internal", "bundled", "libs"); + export const compilerOptionsRelativePath = path.join("tools", "scripts", "tsc", "options.ts"); const libMapEntry = ' { name: "baseline", value: "lib.baseline.d.ts" },'; + const libMapAnchor = ' { name: "esnext", value: "lib.esnext.d.ts" },'; /** @@ -34,9 +36,11 @@ export function prepareTypeScriptBaselinePatch(options) { if (options.expectedCommit && !options.allowUnpinned) { assertTypeScriptSourcePin(typescriptDir, options.expectedCommit); } + const generatedLibPath = path.resolve( options.generatedLibPath ?? path.join(repoRoot, "generated", "current", "baseline.d.ts"), ); + const fixturesRoot = path.resolve(options.fixturesRoot ?? path.join(repoRoot, "fixtures", "typescript")); const fixtureCasesRoot = path.join(fixturesRoot, "tests", "cases"); const fixtureBaselinesRoot = path.join(fixturesRoot, "tests", "baselines", "reference"); @@ -54,22 +58,28 @@ export function prepareTypeScriptBaselinePatch(options) { const source = fs.readFileSync(generatedLibPath, "utf8"); const copyright = fs.readFileSync(copyrightPath, "utf8"); const license = source.match(/\/\*! \*+[\s\S]*?\*+ \*\/\s*/u); + if (!license || license[0].trim() !== copyright.trim()) { throw new Error("Generated baseline lib does not contain the TypeScript copyright notice"); } + const libText = `${copyright}\n${source.replace(license[0], "")}`.replace(/\r\n/gu, "\n"); + const patchedCompilerOptions = ensurePatchedTextFile(compilerOptionsPath, { alreadyPresentMarker: libMapEntry.trim(), anchor: libMapAnchor, insertion: `${libMapAnchor}\n${libMapEntry}`, description: "options.ts lib entry", }); + const copiedGeneratedLib = { changed: !fs.existsSync(targetLibSourcePath) || fs.readFileSync(targetLibSourcePath, "utf8") !== libText, }; + if (copiedGeneratedLib.changed) { fs.writeFileSync(targetLibSourcePath, libText); } + const fixtureFiles = [ ...copyDirectoryContents( fixtureCasesRoot, @@ -80,8 +90,9 @@ export function prepareTypeScriptBaselinePatch(options) { path.join(typescriptDir, "tsc", "testdata", "baselines", "reference", "compiler"), ), ]; + const fixtureFilePaths = fixtureFiles.map(entry => entry.targetPath); - const changedFixtureFiles = fixtureFiles.filter(entry => entry.changed).map(entry => entry.targetPath); + const changedFixtureFiles = fixtureFiles.flatMap(entry => entry.changed ? [entry.targetPath] : []); return { typescriptDir, @@ -110,7 +121,9 @@ export function findUnexpectedTypeScriptPatchPaths(typescriptDir, allowedRelativ encoding: "utf8", }).split(/\r?\n/u), ].filter(Boolean); + const allowedPaths = new Set(allowedRelativePaths.map(relativePath => relativePath.split(path.sep).join("/"))); + return [...new Set(changedPaths)] .filter(relativePath => ( !allowedPaths.has(relativePath) @@ -127,23 +140,28 @@ export function renderTypeScriptPatchDiff(typescriptDir) { cwd: typescriptDir, encoding: "utf8", }); + const untrackedPaths = execFileSync("git", ["ls-files", "--others", "--exclude-standard"], { cwd: typescriptDir, encoding: "utf8", }).split(/\r?\n/u).filter(Boolean).sort(); + const untrackedDiffs = untrackedPaths.map(relativePath => { const result = spawnSync("git", ["diff", "--no-index", "--binary", "--", os.devNull, relativePath], { cwd: typescriptDir, encoding: "utf8", stdio: ["ignore", "pipe", "pipe"], }); + if (result.error || result.status !== 1) { throw result.error ?? new Error( `Could not render diff for ${relativePath}: ${result.stderr || `git exited with ${result.status}`}`, ); } + return result.stdout; }); + return [trackedDiff, ...untrackedDiffs].filter(Boolean).join(""); } @@ -170,13 +188,16 @@ function isExpectedTypeScriptBaselineUpdate(typescriptDir, relativePath) { ) { return false; } + const previousText = execFileSync("git", ["show", `HEAD:${relativePath}`], { cwd: typescriptDir, encoding: "utf8", }); + const nextText = fs.readFileSync(path.join(typescriptDir, relativePath), "utf8"); const previousNormalized = normalizeTypeScriptBaselineUpdate(previousText); const nextNormalized = normalizeTypeScriptBaselineUpdate(nextText); + return previousNormalized !== undefined && nextNormalized !== undefined && previousNormalized === nextNormalized; @@ -187,20 +208,25 @@ function isExpectedTypeScriptBaselineUpdate(typescriptDir, relativePath) { */ function normalizeTypeScriptBaselineUpdate(text) { let matched = false; + const diagnosticNormalized = text.replace( /^.*Argument for '--lib' option must be:.*$/gmu, line => { matched = true; + return line.replace(/,\s*'baseline'(?=,)/gu, ""); }, ); + const helpNormalized = diagnosticNormalized.replace( /^[^\r\n]*one or more:\s+es5[\s\S]*?(?=\r?\n(?:[+-]?[ \t]*default:|[ \t]*\r?\n))/gimu, block => { matched = true; + return block.replace(/,\s*baseline(?=,)/gu, "").replace(/\s+/gu, ""); }, ); + return matched ? helpNormalized : undefined; } @@ -237,6 +263,7 @@ export function renderTypeScriptPatchSummary(summary) { export function assertTypeScriptSourcePin(typescriptDir, expectedCommit) { /** @type {string | undefined} */ let headCommit; + try { headCommit = execFileSync("git", ["rev-parse", "HEAD"], { cwd: typescriptDir, @@ -263,6 +290,7 @@ export function assertTypeScriptSourcePin(typescriptDir, expectedCommit) { */ function resolveTypeScriptWorkingDirectory(repoRoot, explicitDirectory) { const candidatePath = path.resolve(explicitDirectory ?? path.join(repoRoot, ".tmp", "TypeScript")); + if (fs.existsSync(path.join(candidatePath, typescriptLibSourceDirectory, "lib.es5.d.ts"))) { return candidatePath; } diff --git a/test/classifier.test.mjs b/test/classifier.test.mjs index b57afa0..61c3b28 100644 --- a/test/classifier.test.mjs +++ b/test/classifier.test.mjs @@ -173,6 +173,7 @@ async function classifyFixture(options) { version: "0.0.0-test", }); fs.writeFileSync(path.join(libDirectory, "lib.es5.d.ts"), options.libSource ?? FIXTURE_LIB_SOURCE); + for (const [fileName, sourceText] of Object.entries(options.additionalLibSources ?? {})) { fs.writeFileSync(path.join(libDirectory, fileName), sourceText); } @@ -181,9 +182,9 @@ async function classifyFixture(options) { libDirectory, reportPathPrefix: "typescript/lib", }); + const inventory = await createSurfaceInventory({ snapshotName: "classifier-test", - repoRoot: tempDirectory, sourceLibEntries, inventoryOutputPath: path.join(tempDirectory, "out", "inventory.json"), }); @@ -196,21 +197,23 @@ async function classifyFixture(options) { writeJsonFile(path.join(tempDirectory, "registry.json"), { kind: "typescript-baseline-lib/compat-management-registry", schemaVersion: 1, - ...(options.declarationMappings ? { declarationMappings: options.declarationMappings } : {}), + declarationMappings: options.declarationMappings, compilerSupport: [], runtimeAliases: [], groups: options.registryGroups ?? [], }); const manifestPath = path.join(tempDirectory, "manifest.json"); + const manifest = { snapshot: { name: "classifier-test" }, - ...(options.baselineTarget ? { baselineTarget: options.baselineTarget } : {}), + baselineTarget: options.baselineTarget, dataset: "dataset.json", compatManagementRegistry: "registry.json", classificationOutput: "derived/current/classification.json", compatManagementOutput: "derived/current/compat-management-report.json", }; + writeJsonFile(manifestPath, manifest); return classifyManifest({ @@ -226,13 +229,19 @@ async function classifyFixture(options) { * @param {string | boolean} baselineStatus */ function row(compatKey, baselineStatus) { - return { + /** @type {{ compatKey: string; featureId: string; featureName: string; baselineStatus: string | boolean; baselineLowDate?: string; }} */ + const compatRow = { compatKey, featureId: "widget-fixture", featureName: "Widget fixture", baselineStatus, - ...(baselineStatus === false ? {} : { baselineLowDate: "2020-01-01" }), }; + + if (baselineStatus !== false) { + compatRow.baselineLowDate = "2020-01-01"; + } + + return compatRow; } // When resolving the abstract TypedArray row, the classifier requires that @@ -256,6 +265,7 @@ function typedArrayFamilyRows(overrides = {}) { "BigInt64Array", "BigUint64Array", ]; + return names.map(name => row(`javascript.builtins.${name}`, overrides[name] ?? "high")); } @@ -266,11 +276,13 @@ function typedArrayFamilyRows(overrides = {}) { function findRow(classification, compatKey) { const found = classification.classifiedCompatRows.find(candidate => candidate.compatKey === compatKey); assert.ok(found, `expected classified row for ${compatKey}`); + return found; } test("SharedArrayBuffer selects its ArrayBufferLike augmentation only when the root is included", async () => { const key = "javascript.builtins.SharedArrayBuffer"; + const libSource = [ "interface ArrayBuffer { byteLength: number; }", "interface ArrayBufferTypes { ArrayBuffer: ArrayBuffer; }", @@ -280,6 +292,7 @@ test("SharedArrayBuffer selects its ArrayBufferLike augmentation only when the r "declare var SharedArrayBuffer: SharedArrayBufferConstructor;", "interface ArrayBufferTypes { SharedArrayBuffer: SharedArrayBuffer; }", ].join("\n"); + const rows = [row("javascript.builtins.ArrayBuffer", "high"), { ...row(key, "high"), baselineLowDate: "2021-12-01" }]; const current = await classifyFixture({ rows, libSource }); const currentRow = findRow(current, key); @@ -348,6 +361,7 @@ test("classifier routes synthetic compat rows to the expected resolution kinds", classification, "javascript.builtins.Widget.configure.options_size_parameter.extended_values", ); + assert.equal(qualifiedOptionRow.resolutionKind, "option-property"); assert.ok(qualifiedOptionRow.resolvedUnitIds.some(unitId => unitId.includes("WidgetOptions.size"))); @@ -382,8 +396,35 @@ test("classifier routes synthetic compat rows to the expected resolution kinds", assert.equal(argumentsCallee.includeInTarget, false); }); +test("inherited members follow extends clauses, not parameter or return types", async () => { + const libSource = [ + "interface Root { inherited(): string; overridden(): string; }", + "interface Middle extends Root { overridden(): 'middle'; }", + "interface Widget extends Middle { configure(options: WidgetOptions): Result; }", + "interface WidgetOptions { parameterOnly(): void; guessedByName(): void; }", + "interface Result { returnOnly(): void; }", + ].join("\n"); + + const classification = await classifyFixture({ + libSource, + rows: [row("javascript.builtins.Widget.inherited", "high"), row("javascript.builtins.Widget.overridden", "high")], + }); + + assert.match(findRow(classification, "javascript.builtins.Widget.inherited").resolvedUnitIds.join(), /Root\.inherited/); + assert.match(findRow(classification, "javascript.builtins.Widget.overridden").resolvedUnitIds.join(), /Middle\.overridden/); + assert.doesNotMatch(findRow(classification, "javascript.builtins.Widget.overridden").resolvedUnitIds.join(), /Root\.overridden/); + + for (const member of ["parameterOnly", "returnOnly", "guessedByName"]) { + await assert.rejects( + classifyFixture({ libSource, rows: [row(`javascript.builtins.Widget.${member}`, "high")] }), + new RegExp(`Special compat keys missing registry metadata:[\\s\\S]*Widget\\.${member}`), + ); + } +}); + test("classifier resolves declaration mappings and audits their containers", async () => { const compatKey = "javascript.builtins.Widget.legacy"; + const widgetLibSource = [ "interface UnrelatedHelper {", ' "$future": string;', @@ -398,17 +439,20 @@ test("classifier resolves declaration mappings and audits their containers", asy "}", "", ].join("\n"); + const rows = [ row("javascript.builtins.Widget", "high"), row("javascript.builtins.Widget.Widget", "high"), row(compatKey, false), ]; + const declarationMappings = { [compatKey]: { scope: "static", memberNames: ["legacy", "$alias"], }, }; + const registryGroups = [{ id: "widget-legacy", category: "legacy_excluded", @@ -435,6 +479,7 @@ test("classifier resolves declaration mappings and audits their containers", asy declarationMappings, registryGroups, }); + const classifiedRow = findRow(classification, compatKey); assert.equal(classifiedRow.resolutionKind, "member"); assert.deepEqual( @@ -483,9 +528,11 @@ test("classifier resolves declaration mappings and audits their containers", asy test("classifier audits declaration mappings on synthetic roots", async () => { const compatKey = "javascript.builtins.TypedArray.at"; const rows = [row(compatKey, false), ...typedArrayFamilyRows()]; + const declarationMappings = { [compatKey]: { scope: "instance", memberNames: ["at"] }, }; + const registryGroups = [{ id: "typed-array-mapping", category: "legacy_excluded", @@ -497,6 +544,7 @@ test("classifier audits declaration mappings on synthetic roots", async () => { externalAction: { kind: "none", note: "Synthetic fixture." }, compatKeys: [compatKey], }]; + const classification = await classifyFixture({ rows, declarationMappings, registryGroups }); const classifiedRow = findRow(classification, compatKey); @@ -519,11 +567,13 @@ test("classifier honors the low baseline target and rejects unknown targets", as rows: [row("javascript.builtins.Iterator.map", "low")], baselineTarget: "low", }); + assert.equal(findRow(lowTarget, "javascript.builtins.Iterator.map").includeInTarget, true); const highTarget = await classifyFixture({ rows: [row("javascript.builtins.Iterator.map", "low")], }); + assert.equal(findRow(highTarget, "javascript.builtins.Iterator.map").includeInTarget, false); await assert.rejects( @@ -537,6 +587,7 @@ test("classifier honors the low baseline target and rejects unknown targets", as test("classifier fails closed on unmanaged, stale, and kind-drifted registry state", async () => { const mysteryKey = "javascript.builtins.Widget.mystery"; + /** * @param {{ compatKeys: string[]; expectedResolutionKinds?: string[]; }} groupOptions */ @@ -564,6 +615,7 @@ test("classifier fails closed on unmanaged, stale, and kind-drifted registry sta rows: [row(mysteryKey, "high")], registryGroups: [registryGroup({ compatKeys: [mysteryKey] })], }); + const managedRow = findRow(managed, mysteryKey); assert.equal(managedRow.resolutionKind, "not-modeled-upstream"); assert.equal(managedRow.management?.groupId, "widget-mystery"); @@ -617,6 +669,7 @@ test("typed array family follows each concrete array's own baseline status", asy ...typedArrayFamilyRows({ Float16Array: "low" }), ], }); + const todayRow = findRow(today, "javascript.builtins.TypedArray.at"); assert.ok(todayRow.resolvedUnitIds.some(unitId => unitId.includes("Int8Array.at"))); assert.ok(!todayRow.resolvedUnitIds.some(unitId => unitId.includes("Float16Array.at"))); @@ -628,6 +681,7 @@ test("typed array family follows each concrete array's own baseline status", asy ...typedArrayFamilyRows(), ], }); + const promotedRow = findRow(promoted, "javascript.builtins.TypedArray.at"); assert.ok(promotedRow.resolvedUnitIds.some(unitId => unitId.includes("Int8Array.at"))); assert.ok(promotedRow.resolvedUnitIds.some(unitId => unitId.includes("Float16Array.at"))); @@ -674,6 +728,8 @@ function jsonParseRegistryGroup() { test("JSON.parse reviver verdict stays excluded while TypeScript does not model the context argument", async () => { const libSource = [ "interface JSON {", + " parse(text: string): any;", + " /** The reviver receives no context parameter in this signature. */", " parse(text: string, reviver?: (this: any, key: string, value: any) => any): any;", "}", "declare var JSON: JSON;", @@ -685,18 +741,17 @@ test("JSON.parse reviver verdict stays excluded while TypeScript does not model libSource, registryGroups: [jsonParseRegistryGroup()], }); + const parseRow = findRow(classification, JSON_PARSE_KEY); assert.equal(parseRow.resolutionKind, "already-excluded-upstream"); assert.equal(parseRow.includeInTarget, false); }); test("JSON.parse reviver verdict fails closed once TypeScript models the context argument", async () => { - // A lib where TypeScript has added the context argument to reviver. The - // pinned verdict must stop and prompt re-evaluation instead of silently lying. const libSource = [ "interface JSONParseContext { source: string; }", "interface JSON {", - " parse(text: string, reviver?: (this: any, key: string, value: any, context: JSONParseContext) => any): any;", + " parse(text: string, visit?: ((this: any, key: string, value: any, info: JSONParseContext) => any) | undefined): any;", "}", "declare var JSON: JSON;", "", @@ -707,3 +762,15 @@ test("JSON.parse reviver verdict fails closed once TypeScript models the context /resolution kind no longer matches registry expectations/u, ); }); + +test("JSON.parse callback aliases require an explicit mapping update", async () => { + const libSource = [ + "type Reviver = (key: string, value: unknown, info: { source: string }) => unknown;", + "interface JSON { parse(text: string, reviver?: Reviver): unknown; }", + ].join("\n"); + + await assert.rejects( + classifyFixture({ rows: [row(JSON_PARSE_KEY, "low")], libSource, registryGroups: [jsonParseRegistryGroup()] }), + /Unsupported JSON\.parse reviver type.*Reviver/, + ); +}); diff --git a/test/excluded-units.test.mjs b/test/excluded-units.test.mjs index aa2dd1a..63aaa3f 100644 --- a/test/excluded-units.test.mjs +++ b/test/excluded-units.test.mjs @@ -53,7 +53,6 @@ async function createFixtureInventory(tempDirectory, libFiles) { return createSurfaceInventory({ snapshotName: "excluded-units-test", - repoRoot: tempDirectory, sourceLibEntries, inventoryOutputPath: path.join(tempDirectory, "inventory.json"), }); diff --git a/test/generate.test.mjs b/test/generate.test.mjs index be70f80..ac2e0ea 100644 --- a/test/generate.test.mjs +++ b/test/generate.test.mjs @@ -48,6 +48,7 @@ test("generate emits the current TypeScript-declarable Baseline JavaScript surfa assert.match(topLevelOutput, /interface Iterator \{[\s\S]*next\(/); assert.match(topLevelOutput, /interface ArrayBufferTypes \{[\s\S]*ArrayBuffer: ArrayBuffer;/); assert.match(topLevelOutput, /interface ListFormatOptions \{[\s\S]*localeMatcher\?:/); + for (const typeName of [ "Awaited", "Partial", @@ -83,6 +84,7 @@ test("generate emits the current TypeScript-declarable Baseline JavaScript surfa `expected erased declaration ${typeName}`, ); } + assert.doesNotMatch(topLevelOutput, /\/\/\/ = 4, "expected stable probes plus at least one active low probe"); + for (const probe of negativeProbes) { if (probe.absencePattern) { assert.doesNotMatch( @@ -100,6 +103,7 @@ test("generate emits the current TypeScript-declarable Baseline JavaScript surfa ); } } + assert.doesNotMatch(topLevelOutput, /^declare function escape\b/m); // The exclusion-invariant audit info must appear in the report. @@ -111,19 +115,23 @@ test("generate emits the current TypeScript-declarable Baseline JavaScript surfa entry => entry.compatKeys.includes("javascript.builtins.Function.caller"), ), ); + const classifiedRowByCompatKey = new Map(classificationReport.classifiedCompatRows.map( /** @param {{ compatKey: string; }} row */ row => [row.compatKey, row], )); + const excludedUnitById = new Map(generationReport.excludedUnits.map( /** @param {{ unitId: string; }} entry */ entry => [entry.unitId, entry], )); + for (const compatKey of Object.keys(registry.declarationMappings ?? {})) { const classifiedRow = classifiedRowByCompatKey.get(compatKey); assert.ok(classifiedRow, `expected mapped classification row ${compatKey}`); assert.equal(classifiedRow.resolutionKind, "member"); assert.ok(classifiedRow.resolvedUnitIds.length > 0); + if (!classifiedRow.includeInTarget) { for (const unitId of classifiedRow.resolvedUnitIds) { assert.ok( @@ -151,6 +159,7 @@ test("generate emits the current TypeScript-declarable Baseline JavaScript surfa // the determinism check (a regression that actually happened). for (const [label, report] of [["generation", generationReport], ["inventory", inventoryReport]]) { assert.ok(Array.isArray(report.sourceLibs) && report.sourceLibs.length > 0, `${label} report must list source libs`); + for (const sourceLib of report.sourceLibs) { assert.equal( sourceLib.sourcePath, diff --git a/test/surface-inventory.test.mjs b/test/surface-inventory.test.mjs index 8e354dd..f97ca0a 100644 --- a/test/surface-inventory.test.mjs +++ b/test/surface-inventory.test.mjs @@ -4,6 +4,7 @@ import assert from "node:assert/strict"; import fs from "node:fs"; import path from "node:path"; import test from "node:test"; +import ts from "typescript-strada"; import { cleanupTempDirectories, createTempDirectory, @@ -11,6 +12,7 @@ import { import { createSurfaceInventory, discoverBuiltinSourceLibEntries, + emitSelectedUnits, } from "../lib/surface-inventory.mjs"; import { resolveTypeOnlyDependencyClosure } from "../lib/generator.mjs"; @@ -21,6 +23,127 @@ test.afterEach(() => { cleanupTempDirectories(tempDirectories); }); +test("dependency lookup respects namespace shadowing and explicit globalThis", async () => { + const inventory = await inventoryFromSources({ + "lib.es5.d.ts": [ + "interface Same { globalOnly: number; }", + "interface Parent { globalOnly(): void; }", + "declare namespace Child { interface Value { globalOnly: number; } }", + "declare namespace N {", + " interface Same { localOnly: string; }", + " interface Parent { localOnly(): void; }", + " namespace Child { interface Value { localOnly: string; } }", + " interface Use extends Parent { local: Same; global: globalThis.Same; relative: Child.Value; }", + " const local: Same; const absolute: globalThis.Same;", + "}", + ].join("\n"), + }); + + const use = inventory.declarationUnitsBySymbol.get("N.Use")?.[0]; + assert.ok(use); + assert.deepEqual(use.dependencySymbols, ["N.Child.Value", "N.Parent", "N.Same", "Same"]); + assert.deepEqual(use.heritageSymbols, ["N.Parent"]); + assert.deepEqual(inventory.memberUnitsByOwnerAndName.get("N.Use::local")?.[0].dependencySymbols, ["N.Same"]); + assert.equal(inventory.declarationUnitsBySymbol.get("N.local")?.[0].typeRefName, "N.Same"); + assert.equal(inventory.declarationUnitsBySymbol.get("N.absolute")?.[0].typeRefName, "Same"); +}); + +test("comments mentioning declare global do not turn a script into a module", async () => { + const inventory = await inventoryFromSources({ + "lib.es5.d.ts": "// Avoid declare global here.\ninterface Plain { value: string; }\n", + }); + + assert.equal(inventory.files[0].preserveWholeFile, false); + assert.doesNotMatch(emitSelectedUnits({ inventory, selectedUnitIds: inventory.units.map(unit => unit.id) }), /export \{\};/); +}); + +test("whole-file emission rejects cross-module local merges and preserves valid globals", async () => { + const sources = { + "lib.es2025.a.d.ts": [ + "export {};", + "interface Helper { a: string; }", + "interface Helper { optional?: boolean; }", + "declare function factory(value: string): Helper;", + "declare function factory(value: number): Helper;", + "declare global { interface AuditA { value: Helper; } interface AuditCommon { a: string; } }", + ].join("\n"), + "lib.es2025.b.d.ts": "export {}; interface Helper { b: number; } declare global { interface AuditB { value: Helper; } interface AuditCommon { b: number; } }", + }; + + const inventory = await inventoryFromSources(sources); + const directory = createTempDirectory(tempDirectories); + const probePath = path.join(directory, "probe.ts"); + fs.writeFileSync(probePath, "declare const a: AuditA; a.value.b;"); + const originalFiles = inventory.files.map(file => file.sourcePath); + assert.deepEqual(typecheck([...originalFiles, probePath]), [2339]); + assert.throws( + () => emitSelectedUnits({ inventory, selectedUnitIds: inventory.units.map(unit => unit.id) }), + /Cannot combine module-local symbol Helper from lib\.es2025\.a\.d\.ts and lib\.es2025\.b\.d\.ts/, + ); + + sources["lib.es2025.b.d.ts"] = sources["lib.es2025.b.d.ts"].replaceAll("Helper", "OtherHelper"); + const distinct = await inventoryFromSources(sources); + const generatedPath = path.join(directory, "generated.d.ts"); + fs.writeFileSync(generatedPath, emitSelectedUnits({ inventory: distinct, selectedUnitIds: distinct.units.map(unit => unit.id) })); + assert.deepEqual(typecheck([generatedPath, probePath]), [2339]); + fs.writeFileSync(probePath, "declare const a: AuditA; declare const b: AuditB; declare const common: AuditCommon; a.value.a; b.value.b; common.a; common.b;"); + assert.deepEqual(typecheck([generatedPath, probePath]), []); +}); + +test("emission preserves multiline literal types inside global wrappers and containers", async () => { + const inventory = await inventoryFromSources({ + "lib.es5.d.ts": [ + "type AuditLiteral = `\ndeclare foo\n`;", + "declare namespace AuditNamespace {", + " type Literal = `\n nested\n`;", + " interface Widget { code: `\nmember\n`; }", + "}", + "declare var auditValue: AuditLiteral;", + ].join("\n"), + "lib.es2025.a.d.ts": [ + '/// ', + "export {};", + "type ModuleLiteral = `\n \n/// \ndeclare foo\n`;", + "declare global { interface AuditMarker { code: ModuleLiteral; } }", + ].join("\n"), + }); + + const directory = createTempDirectory(tempDirectories); + const probePath = path.join(directory, "probe.ts"); + fs.writeFileSync(probePath, [ + "const literal: AuditLiteral = `\ndeclare foo\n`;", + "const nested: AuditNamespace.Literal = `\n nested\n`;", + "const member: AuditNamespace.Widget['code'] = `\nmember\n`;", + "const moduleLiteral: AuditMarker['code'] = `\n \n/// \ndeclare foo\n`;", + ].join("\n")); + assert.deepEqual(typecheck([...inventory.files.map(file => file.sourcePath), probePath]), []); + const generatedPath = path.join(directory, "generated.d.ts"); + fs.writeFileSync(generatedPath, emitSelectedUnits({ inventory, selectedUnitIds: inventory.units.map(unit => unit.id) })); + assert.deepEqual(typecheck([generatedPath, probePath]), []); +}); + +/** @param {Record} sources */ +async function inventoryFromSources(sources) { + const directory = createTempDirectory(tempDirectories); + const libDirectory = path.join(directory, "lib"); + fs.mkdirSync(libDirectory); + + for (const [fileName, source] of Object.entries(sources)) { + fs.writeFileSync(path.join(libDirectory, fileName), source); + } + + const sourceLibEntries = await discoverBuiltinSourceLibEntries({ libDirectory, reportPathPrefix: "typescript/lib" }); + + return createSurfaceInventory({ snapshotName: "scope-test", sourceLibEntries, inventoryOutputPath: path.join(directory, "inventory.json") }); +} + +/** @param {string[]} files */ +function typecheck(files) { + const program = ts.createProgram(files, { strict: true, noEmit: true, target: ts.ScriptTarget.ESNext, types: [] }); + + return ts.getPreEmitDiagnostics(program).map(diagnostic => diagnostic.code); +} + test("surface inventory discovers future ES lib files without hard-coded year updates", async () => { const tempDirectory = createTempDirectory(tempDirectories); const libDirectory = path.join(tempDirectory, "lib"); @@ -45,6 +168,7 @@ test("surface inventory discovers future ES lib files without hard-coded year up libDirectory, reportPathPrefix: "typescript/lib", }); + const sourceFileNames = sourceLibEntries.map(entry => entry.sourceFileName); assert.deepEqual(sourceFileNames, [ @@ -97,9 +221,9 @@ test("surface inventory lookup maps share dependency-populated unit records", as libDirectory, reportPathPrefix: "typescript/lib", }); + const inventory = await createSurfaceInventory({ snapshotName: "surface-inventory-test", - repoRoot: tempDirectory, sourceLibEntries, inventoryOutputPath: path.join(tempDirectory, "inventory.json"), }); @@ -139,6 +263,7 @@ test("surface inventory lookup maps share dependency-populated unit records", as ); } } + for (const [memberKey, memberUnits] of inventory.memberUnitsByOwnerAndName) { for (const unit of memberUnits) { assert.equal( @@ -158,6 +283,7 @@ test("surface inventory rejects multi-declarator runtime globals", async () => { path.join(libDirectory, "lib.es5.d.ts"), "declare var Known: KnownConstructor, Surprise: SurpriseConstructor;\n", ); + const sourceLibEntries = await discoverBuiltinSourceLibEntries({ libDirectory, reportPathPrefix: "typescript/lib", @@ -166,7 +292,6 @@ test("surface inventory rejects multi-declarator runtime globals", async () => { await assert.rejects( createSurfaceInventory({ snapshotName: "multi-declarator-test", - repoRoot: tempDirectory, sourceLibEntries, inventoryOutputPath: path.join(tempDirectory, "inventory.json"), }), @@ -199,10 +324,10 @@ test("readonly companion discovery fails closed on unmatched members", async () libDirectory, reportPathPrefix: "typescript/lib", }); + await assert.rejects( createSurfaceInventory({ snapshotName: "readonly-companion-test", - repoRoot: tempDirectory, sourceLibEntries, inventoryOutputPath: path.join(tempDirectory, "inventory.json"), }), @@ -225,16 +350,18 @@ test("type-only aliases cannot introduce unclassified runtime declarations", asy "", ].join("\n"), ); + const sourceLibEntries = await discoverBuiltinSourceLibEntries({ libDirectory, reportPathPrefix: "typescript/lib", }); + const inventory = await createSurfaceInventory({ snapshotName: "type-only-runtime-test", - repoRoot: tempDirectory, sourceLibEntries, inventoryOutputPath: path.join(tempDirectory, "inventory.json"), }); + const aliasUnit = inventory.declarationUnitsBySymbol.get("FutureAlias")?.[0]; assert.ok(aliasUnit); @@ -250,6 +377,7 @@ test("type-only aliases cannot introduce unclassified runtime declarations", asy /Type-only aliases introduce runtime declarations.*FutureThing/s, ); }); + test("declare global declarations merge into the global inventory surface", async () => { const tempDirectory = createTempDirectory(tempDirectories); const libDirectory = path.join(tempDirectory, "lib"); @@ -276,9 +404,9 @@ test("declare global declarations merge into the global inventory surface", asyn libDirectory, reportPathPrefix: "typescript/lib", }); + const inventory = await createSurfaceInventory({ snapshotName: "global-surface-test", - repoRoot: tempDirectory, sourceLibEntries, inventoryOutputPath: path.join(tempDirectory, "inventory.json"), }); diff --git a/test/typescript-proposal.test.mjs b/test/typescript-proposal.test.mjs index b2b0c14..0a683c7 100644 --- a/test/typescript-proposal.test.mjs +++ b/test/typescript-proposal.test.mjs @@ -46,6 +46,7 @@ test("proposal generation follows the pinned TypeScript checkout declaration cor generateTypeScriptProposalLib({ repoRoot: proposalRepoRoot, manifestPath: repoManifestPath, manifest: repoManifest, typescriptDir }), generateTypeScriptProposalLib({ repoRoot: proposalRepoRoot, manifestPath: repoManifestPath, manifest: repoManifest, typescriptDir }), ]); + try { const packageOutput = fs.readFileSync(repoGeneratedLibPath, "utf8"); const proposalOutputs = proposals.map(proposal => fs.readFileSync(proposal.outputPath, "utf8")); @@ -81,10 +82,12 @@ test("pinned proposal generation reads commit blobs instead of hidden working-tr execFileSync("git", ["config", "user.name", "Test"], { cwd: typescriptDir }); execFileSync("git", ["add", "."], { cwd: typescriptDir }); execFileSync("git", ["commit", "--quiet", "-m", "fixture"], { cwd: typescriptDir }); + const expectedCommit = execFileSync("git", ["rev-parse", "HEAD"], { cwd: typescriptDir, encoding: "utf8", }).trim(); + const trackedRelativePath = "tsc/internal/bundled/libs/lib.es2018.intl.d.ts"; const trackedPath = path.join(typescriptDir, trackedRelativePath); fs.writeFileSync( @@ -96,10 +99,12 @@ test("pinned proposal generation reads commit blobs instead of hidden working-tr ); execFileSync("git", ["add", trackedRelativePath], { cwd: typescriptDir }); execFileSync("git", ["commit", "--quiet", "-m", "replacement"], { cwd: typescriptDir }); + const replacementCommit = execFileSync("git", ["rev-parse", "HEAD"], { cwd: typescriptDir, encoding: "utf8", }).trim(); + execFileSync("git", ["reset", "--hard", expectedCommit], { cwd: typescriptDir }); execFileSync("git", ["replace", expectedCommit, replacementCommit], { cwd: typescriptDir }); fs.writeFileSync( @@ -126,6 +131,7 @@ test("pinned proposal generation reads commit blobs instead of hidden working-tr typescriptDir, expectedCommit, }); + try { const output = fs.readFileSync(proposal.outputPath, "utf8"); assert.doesNotMatch(output, /"LOCAL"|"REPLACEMENT"|injected\(\): void/u); diff --git a/test/typescript-upstream.test.mjs b/test/typescript-upstream.test.mjs index 23046bb..91ca0ee 100644 --- a/test/typescript-upstream.test.mjs +++ b/test/typescript-upstream.test.mjs @@ -21,6 +21,7 @@ import { /** @type {string[]} */ const tempDirectories = []; + const COPYRIGHT = "/*! *****\nCopyright (c) Microsoft Corporation. All rights reserved.\n***** */\n\n"; test.afterEach(() => { @@ -64,6 +65,7 @@ test("prepareTypeScriptBaselinePatch patches the unified TypeScript tree once", generatedLibPath, fixturesRoot, }); + assert.equal(second.copiedGeneratedLib.changed, false); assert.equal(second.patchedCompilerOptions.changed, false); assert.equal(second.fixtureFiles.length, 2); @@ -87,6 +89,7 @@ test("prepareTypeScriptBaselinePatch uses the checkout command's default directo generatedLibPath, fixturesRoot, }); + assert.equal(summary.typescriptDir, typescriptDir); }); @@ -254,6 +257,7 @@ function createFixtureTree(tempDirectory) { fs.mkdirSync(path.dirname(baselinePath), { recursive: true }); fs.writeFileSync(testCasePath, "// @lib: baseline\nObject.hasOwn({}, 'x');\n"); fs.writeFileSync(baselinePath, "fixture baseline\n"); + return fixturesRoot; } @@ -265,11 +269,13 @@ function initializeGitFixture(directory, files) { execFileSync("git", ["init", "--quiet"], { cwd: directory }); execFileSync("git", ["config", "user.email", "test@example.com"], { cwd: directory }); execFileSync("git", ["config", "user.name", "Test"], { cwd: directory }); + for (const [relativePath, text] of Object.entries(files)) { const filePath = path.join(directory, relativePath); fs.mkdirSync(path.dirname(filePath), { recursive: true }); fs.writeFileSync(filePath, text); } + execFileSync("git", ["add", "."], { cwd: directory }); execFileSync("git", ["commit", "--quiet", "-m", "fixture"], { cwd: directory }); } diff --git a/tsconfig.typecheck.json b/tsconfig.typecheck.json index e8cdbe9..a0a00c7 100644 --- a/tsconfig.typecheck.json +++ b/tsconfig.typecheck.json @@ -14,6 +14,8 @@ "strict": true, "noEmit": true, "noImplicitOverride": true, + "noUnusedLocals": true, + "noUnusedParameters": true, "noFallthroughCasesInSwitch": true, "useUnknownInCatchVariables": true, "resolveJsonModule": true, From 048ddbd87c27084affb720e3be251528f7e9829a Mon Sep 17 00:00:00 2001 From: Ryuya Date: Sun, 4 Oct 2026 01:28:32 -0700 Subject: [PATCH 3/3] fix: distinguish global augmentation scopes --- derived/current/inventory.json | 1 + lib/surface-inventory.mjs | 8 +++++++- test/surface-inventory.test.mjs | 17 +++++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/derived/current/inventory.json b/derived/current/inventory.json index 235e01b..847298b 100644 --- a/derived/current/inventory.json +++ b/derived/current/inventory.json @@ -39050,6 +39050,7 @@ "lib.es2025.iterator.d.ts::IteratorObject::10", "lib.es2025.iterator.d.ts::IteratorObjectConstructor::6" ], + "isGlobalAugmentation": true, "parameterNames": [], "surfacePath": "global", "order": 5 diff --git a/lib/surface-inventory.mjs b/lib/surface-inventory.mjs index be30b24..4ecad68 100644 --- a/lib/surface-inventory.mjs +++ b/lib/surface-inventory.mjs @@ -426,7 +426,7 @@ export function emitSelectedUnits(options) { unit.unitKind !== "declaration" || unit.containerPath.length || !unit.symbolName - || (unit.declarationKind === "namespace" && unit.symbolName === "global") + || unit.isGlobalAugmentation ) { continue; } @@ -1041,6 +1041,10 @@ function createDeclarationUnit(options) { sourceFile, }; + if (ts.isModuleDeclaration(node) && (node.flags & ts.NodeFlags.GlobalAugmentation) !== 0) { + unit.isGlobalAugmentation = true; + } + fileRecord.unitIds.push(unit.id); return unit; @@ -1471,6 +1475,7 @@ function getInventoryReport(inventory) { dependencySymbols: unit.dependencySymbols, dependencyUnitIds: unit.dependencyUnitIds, heritageSymbols: unit.heritageSymbols, + isGlobalAugmentation: unit.isGlobalAugmentation, parameterNames: unit.parameterNames, surfacePath: unit.surfacePath, order: unit.order, @@ -2025,6 +2030,7 @@ function compareUnitsByOrder(left, right) { * dependencySymbols: string[]; * dependencyUnitIds: string[]; * heritageSymbols?: string[]; + * isGlobalAugmentation?: true; * order: number; * text: string; * parameterNames: string[]; diff --git a/test/surface-inventory.test.mjs b/test/surface-inventory.test.mjs index f97ca0a..12736b3 100644 --- a/test/surface-inventory.test.mjs +++ b/test/surface-inventory.test.mjs @@ -90,6 +90,23 @@ test("whole-file emission rejects cross-module local merges and preserves valid assert.deepEqual(typecheck([generatedPath, probePath]), []); }); +test("a module-local namespace named global cannot merge across source files", async () => { + const inventory = await inventoryFromSources({ + "lib.es2025.a.d.ts": "export {}; declare namespace global { interface Helper { a: string; } } declare global { interface AuditA { value: global.Helper; } }", + "lib.es2025.b.d.ts": "export {}; declare namespace global { interface Helper { b: number; } } declare global { interface AuditB { value: global.Helper; } }", + }); + + const directory = createTempDirectory(tempDirectories); + const probePath = path.join(directory, "probe.ts"); + fs.writeFileSync(probePath, "declare const a: AuditA; a.value.b;"); + + assert.deepEqual(typecheck([...inventory.files.map(file => file.sourcePath), probePath]), [2339]); + assert.throws( + () => emitSelectedUnits({ inventory, selectedUnitIds: inventory.units.map(unit => unit.id) }), + /Cannot combine module-local symbol global from lib\.es2025\.a\.d\.ts and lib\.es2025\.b\.d\.ts/, + ); +}); + test("emission preserves multiline literal types inside global wrappers and containers", async () => { const inventory = await inventoryFromSources({ "lib.es5.d.ts": [