summaryrefslogtreecommitdiff
path: root/cli/tsc
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tsc')
-rw-r--r--cli/tsc/README.md30
-rw-r--r--cli/tsc/compiler.d.ts2
-rw-r--r--cli/tsc/diagnostics.rs595
-rw-r--r--cli/tsc/dts/lib.d.ts24
-rw-r--r--cli/tsc/dts/lib.deno.ns.d.ts5217
-rw-r--r--cli/tsc/dts/lib.deno.shared_globals.d.ts684
-rw-r--r--cli/tsc/dts/lib.deno.unstable.d.ts1911
-rw-r--r--cli/tsc/dts/lib.deno.window.d.ts270
-rw-r--r--cli/tsc/dts/lib.deno.worker.d.ts208
-rw-r--r--cli/tsc/dts/lib.deno_webgpu.d.ts1322
-rw-r--r--cli/tsc/dts/lib.dom.asynciterable.d.ts9
-rw-r--r--cli/tsc/dts/lib.dom.d.ts18269
-rw-r--r--cli/tsc/dts/lib.dom.extras.d.ts149
-rw-r--r--cli/tsc/dts/lib.dom.iterable.d.ts337
-rw-r--r--cli/tsc/dts/lib.es2015.collection.d.ts150
-rw-r--r--cli/tsc/dts/lib.es2015.core.d.ts559
-rw-r--r--cli/tsc/dts/lib.es2015.d.ts30
-rw-r--r--cli/tsc/dts/lib.es2015.generator.d.ts79
-rw-r--r--cli/tsc/dts/lib.es2015.iterable.d.ts498
-rw-r--r--cli/tsc/dts/lib.es2015.promise.d.ts78
-rw-r--r--cli/tsc/dts/lib.es2015.proxy.d.ts130
-rw-r--r--cli/tsc/dts/lib.es2015.reflect.d.ts123
-rw-r--r--cli/tsc/dts/lib.es2015.symbol.d.ts48
-rw-r--r--cli/tsc/dts/lib.es2015.symbol.wellknown.d.ts324
-rw-r--r--cli/tsc/dts/lib.es2016.array.include.d.ts118
-rw-r--r--cli/tsc/dts/lib.es2016.d.ts22
-rw-r--r--cli/tsc/dts/lib.es2016.full.d.ts25
-rw-r--r--cli/tsc/dts/lib.es2017.d.ts26
-rw-r--r--cli/tsc/dts/lib.es2017.full.d.ts25
-rw-r--r--cli/tsc/dts/lib.es2017.intl.d.ts47
-rw-r--r--cli/tsc/dts/lib.es2017.object.d.ts51
-rw-r--r--cli/tsc/dts/lib.es2017.sharedmemory.d.ts137
-rw-r--r--cli/tsc/dts/lib.es2017.string.d.ts47
-rw-r--r--cli/tsc/dts/lib.es2017.typedarrays.d.ts55
-rw-r--r--cli/tsc/dts/lib.es2018.asyncgenerator.d.ts79
-rw-r--r--cli/tsc/dts/lib.es2018.asynciterable.d.ts45
-rw-r--r--cli/tsc/dts/lib.es2018.d.ts26
-rw-r--r--cli/tsc/dts/lib.es2018.full.d.ts25
-rw-r--r--cli/tsc/dts/lib.es2018.intl.d.ts73
-rw-r--r--cli/tsc/dts/lib.es2018.promise.d.ts32
-rw-r--r--cli/tsc/dts/lib.es2018.regexp.d.ts39
-rw-r--r--cli/tsc/dts/lib.es2019.array.d.ts85
-rw-r--r--cli/tsc/dts/lib.es2019.d.ts25
-rw-r--r--cli/tsc/dts/lib.es2019.full.d.ts25
-rw-r--r--cli/tsc/dts/lib.es2019.object.d.ts35
-rw-r--r--cli/tsc/dts/lib.es2019.string.d.ts39
-rw-r--r--cli/tsc/dts/lib.es2019.symbol.d.ts26
-rw-r--r--cli/tsc/dts/lib.es2020.bigint.d.ts730
-rw-r--r--cli/tsc/dts/lib.es2020.d.ts29
-rw-r--r--cli/tsc/dts/lib.es2020.date.d.ts44
-rw-r--r--cli/tsc/dts/lib.es2020.full.d.ts25
-rw-r--r--cli/tsc/dts/lib.es2020.intl.d.ts433
-rw-r--r--cli/tsc/dts/lib.es2020.number.d.ts30
-rw-r--r--cli/tsc/dts/lib.es2020.promise.d.ts49
-rw-r--r--cli/tsc/dts/lib.es2020.sharedmemory.d.ts99
-rw-r--r--cli/tsc/dts/lib.es2020.string.d.ts30
-rw-r--r--cli/tsc/dts/lib.es2020.symbol.wellknown.d.ts39
-rw-r--r--cli/tsc/dts/lib.es2021.d.ts25
-rw-r--r--cli/tsc/dts/lib.es2021.full.d.ts25
-rw-r--r--cli/tsc/dts/lib.es2021.intl.d.ts154
-rw-r--r--cli/tsc/dts/lib.es2021.promise.d.ts50
-rw-r--r--cli/tsc/dts/lib.es2021.string.d.ts35
-rw-r--r--cli/tsc/dts/lib.es2021.weakref.d.ts75
-rw-r--r--cli/tsc/dts/lib.es2022.array.d.ts123
-rw-r--r--cli/tsc/dts/lib.es2022.d.ts27
-rw-r--r--cli/tsc/dts/lib.es2022.error.d.ts75
-rw-r--r--cli/tsc/dts/lib.es2022.full.d.ts25
-rw-r--r--cli/tsc/dts/lib.es2022.intl.d.ts111
-rw-r--r--cli/tsc/dts/lib.es2022.object.d.ts28
-rw-r--r--cli/tsc/dts/lib.es2022.sharedmemory.d.ts27
-rw-r--r--cli/tsc/dts/lib.es2022.string.d.ts27
-rw-r--r--cli/tsc/dts/lib.es5.d.ts4513
-rw-r--r--cli/tsc/dts/lib.es6.d.ts25
-rw-r--r--cli/tsc/dts/lib.esnext.array.d.ts583
-rw-r--r--cli/tsc/dts/lib.esnext.d.ts23
-rw-r--r--cli/tsc/dts/lib.esnext.full.d.ts25
-rw-r--r--cli/tsc/dts/lib.esnext.intl.d.ts30
-rw-r--r--cli/tsc/dts/lib.scripthost.d.ts327
-rw-r--r--cli/tsc/dts/lib.webworker.d.ts5956
-rw-r--r--cli/tsc/dts/lib.webworker.importscripts.d.ts26
-rw-r--r--cli/tsc/dts/lib.webworker.iterable.d.ts167
-rw-r--r--cli/tsc/dts/typescript.d.ts8118
-rw-r--r--cli/tsc/mod.rs1226
83 files changed, 55486 insertions, 1 deletions
diff --git a/cli/tsc/README.md b/cli/tsc/README.md
index e8287f3c0..657aa2b5a 100644
--- a/cli/tsc/README.md
+++ b/cli/tsc/README.md
@@ -2,3 +2,33 @@
This directory contains the typescript compiler and a small compiler host for
the runtime snapshot.
+
+## How to upgrade TypeScript.
+
+The files in this directory are mostly from the TypeScript repository. We
+currently (unfortunately) have a rather manual process for upgrading TypeScript.
+It works like this currently:
+
+1. Checkout denoland/TypeScript repo in a separate directory.
+1. Add Microsoft/TypeScript as a remote and fetch its latest tags
+1. Checkout a new branch based on this tag.
+1. Cherry pick the custom commit we made in a previous release to the new one.
+1. This commit has a "deno.ts" file in it. Read the instructions in it.
+1. Copy typescript.js into Deno repo.
+1. Copy d.ts files into dts directory.
+
+So that might look something like this:
+
+```
+git clone https://github.com/denoland/TypeScript.git
+cd typescript
+git remote add upstream https://github.com/Microsoft/TypeScript
+git fetch upstream
+git checkout v3.9.7
+git checkout -b branch_v3.9.7
+git cherry pick <previous-release-branch-commit-we-did>
+npm install
+gulp local
+rsync lib/typescript.js ~/src/deno/cli/tsc/00_typescript.js
+rsync --exclude=protocol.d.ts --exclude=tsserverlibrary.d.ts --exclude=typescriptServices.d.ts lib/*.d.ts ~/src/deno/cli/tsc/dts/
+```
diff --git a/cli/tsc/compiler.d.ts b/cli/tsc/compiler.d.ts
index 62a1bbdd2..47910bbad 100644
--- a/cli/tsc/compiler.d.ts
+++ b/cli/tsc/compiler.d.ts
@@ -2,7 +2,7 @@
// Contains types that can be used to validate and check `99_main_compiler.js`
-import * as _ts from "../dts/typescript";
+import * as _ts from "./dts/typescript";
declare global {
namespace ts {
diff --git a/cli/tsc/diagnostics.rs b/cli/tsc/diagnostics.rs
new file mode 100644
index 000000000..05502dca4
--- /dev/null
+++ b/cli/tsc/diagnostics.rs
@@ -0,0 +1,595 @@
+// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
+
+use deno_runtime::colors;
+
+use deno_core::serde::Deserialize;
+use deno_core::serde::Deserializer;
+use deno_core::serde::Serialize;
+use deno_core::serde::Serializer;
+use once_cell::sync::Lazy;
+use regex::Regex;
+use std::error::Error;
+use std::fmt;
+
+const MAX_SOURCE_LINE_LENGTH: usize = 150;
+
+const UNSTABLE_DENO_PROPS: &[&str] = &[
+ "CreateHttpClientOptions",
+ "DatagramConn",
+ "HttpClient",
+ "UnixConnectOptions",
+ "UnixListenOptions",
+ "connect",
+ "createHttpClient",
+ "kill",
+ "listen",
+ "listenDatagram",
+ "dlopen",
+ "ppid",
+ "removeSignalListener",
+ "shutdown",
+ "umask",
+ "spawnChild",
+ "Child",
+ "spawn",
+ "spawnSync",
+ "SpawnOptions",
+ "ChildStatus",
+ "SpawnOutput",
+ "command",
+ "Command",
+ "CommandOptions",
+ "CommandStatus",
+ "CommandOutput",
+ "serve",
+ "ServeInit",
+ "ServeTlsInit",
+ "Handler",
+];
+
+static MSG_MISSING_PROPERTY_DENO: Lazy<Regex> = Lazy::new(|| {
+ Regex::new(r#"Property '([^']+)' does not exist on type 'typeof Deno'"#)
+ .unwrap()
+});
+
+static MSG_SUGGESTION: Lazy<Regex> =
+ Lazy::new(|| Regex::new(r#" Did you mean '([^']+)'\?"#).unwrap());
+
+/// Potentially convert a "raw" diagnostic message from TSC to something that
+/// provides a more sensible error message given a Deno runtime context.
+fn format_message(msg: &str, code: &u64) -> String {
+ match code {
+ 2339 => {
+ if let Some(captures) = MSG_MISSING_PROPERTY_DENO.captures(msg) {
+ if let Some(property) = captures.get(1) {
+ if UNSTABLE_DENO_PROPS.contains(&property.as_str()) {
+ return format!("{} 'Deno.{}' is an unstable API. Did you forget to run with the '--unstable' flag?", msg, property.as_str());
+ }
+ }
+ }
+
+ msg.to_string()
+ }
+ 2551 => {
+ if let (Some(caps_property), Some(caps_suggestion)) = (
+ MSG_MISSING_PROPERTY_DENO.captures(msg),
+ MSG_SUGGESTION.captures(msg),
+ ) {
+ if let (Some(property), Some(suggestion)) =
+ (caps_property.get(1), caps_suggestion.get(1))
+ {
+ if UNSTABLE_DENO_PROPS.contains(&property.as_str()) {
+ return format!("{} 'Deno.{}' is an unstable API. Did you forget to run with the '--unstable' flag, or did you mean '{}'?", MSG_SUGGESTION.replace(msg, ""), property.as_str(), suggestion.as_str());
+ }
+ }
+ }
+
+ msg.to_string()
+ }
+ _ => msg.to_string(),
+ }
+}
+
+#[derive(Clone, Debug, Eq, PartialEq)]
+pub enum DiagnosticCategory {
+ Warning,
+ Error,
+ Suggestion,
+ Message,
+}
+
+impl fmt::Display for DiagnosticCategory {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ write!(
+ f,
+ "{}",
+ match self {
+ DiagnosticCategory::Warning => "WARN ",
+ DiagnosticCategory::Error => "ERROR ",
+ DiagnosticCategory::Suggestion => "",
+ DiagnosticCategory::Message => "",
+ }
+ )
+ }
+}
+
+impl<'de> Deserialize<'de> for DiagnosticCategory {
+ fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
+ where
+ D: Deserializer<'de>,
+ {
+ let s: i64 = Deserialize::deserialize(deserializer)?;
+ Ok(DiagnosticCategory::from(s))
+ }
+}
+
+impl Serialize for DiagnosticCategory {
+ fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+ where
+ S: Serializer,
+ {
+ let value = match self {
+ DiagnosticCategory::Warning => 0_i32,
+ DiagnosticCategory::Error => 1_i32,
+ DiagnosticCategory::Suggestion => 2_i32,
+ DiagnosticCategory::Message => 3_i32,
+ };
+ Serialize::serialize(&value, serializer)
+ }
+}
+
+impl From<i64> for DiagnosticCategory {
+ fn from(value: i64) -> Self {
+ match value {
+ 0 => DiagnosticCategory::Warning,
+ 1 => DiagnosticCategory::Error,
+ 2 => DiagnosticCategory::Suggestion,
+ 3 => DiagnosticCategory::Message,
+ _ => panic!("Unknown value: {}", value),
+ }
+ }
+}
+
+#[derive(Debug, Deserialize, Serialize, Clone, Eq, PartialEq)]
+#[serde(rename_all = "camelCase")]
+pub struct DiagnosticMessageChain {
+ message_text: String,
+ category: DiagnosticCategory,
+ code: i64,
+ next: Option<Vec<DiagnosticMessageChain>>,
+}
+
+impl DiagnosticMessageChain {
+ pub fn format_message(&self, level: usize) -> String {
+ let mut s = String::new();
+
+ s.push_str(&" ".repeat(level * 2));
+ s.push_str(&self.message_text);
+ if let Some(next) = &self.next {
+ s.push('\n');
+ let arr = next.clone();
+ for dm in arr {
+ s.push_str(&dm.format_message(level + 1));
+ }
+ }
+
+ s
+ }
+}
+
+#[derive(Debug, Deserialize, Serialize, Clone, Eq, PartialEq)]
+#[serde(rename_all = "camelCase")]
+pub struct Position {
+ pub line: u64,
+ pub character: u64,
+}
+
+#[derive(Debug, Deserialize, Serialize, Clone, Eq, PartialEq)]
+#[serde(rename_all = "camelCase")]
+pub struct Diagnostic {
+ pub category: DiagnosticCategory,
+ pub code: u64,
+ pub start: Option<Position>,
+ pub end: Option<Position>,
+ pub message_text: Option<String>,
+ pub message_chain: Option<DiagnosticMessageChain>,
+ pub source: Option<String>,
+ pub source_line: Option<String>,
+ pub file_name: Option<String>,
+ pub related_information: Option<Vec<Diagnostic>>,
+}
+
+impl Diagnostic {
+ fn fmt_category_and_code(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ let category = match self.category {
+ DiagnosticCategory::Error => "ERROR",
+ DiagnosticCategory::Warning => "WARN",
+ _ => "",
+ };
+
+ let code = if self.code >= 900001 {
+ "".to_string()
+ } else {
+ colors::bold(format!("TS{} ", self.code)).to_string()
+ };
+
+ if !category.is_empty() {
+ write!(f, "{}[{}]: ", code, category)
+ } else {
+ Ok(())
+ }
+ }
+
+ fn fmt_frame(&self, f: &mut fmt::Formatter, level: usize) -> fmt::Result {
+ if let (Some(file_name), Some(start)) =
+ (self.file_name.as_ref(), self.start.as_ref())
+ {
+ write!(
+ f,
+ "\n{:indent$} at {}:{}:{}",
+ "",
+ colors::cyan(file_name),
+ colors::yellow(&(start.line + 1).to_string()),
+ colors::yellow(&(start.character + 1).to_string()),
+ indent = level
+ )
+ } else {
+ Ok(())
+ }
+ }
+
+ fn fmt_message(&self, f: &mut fmt::Formatter, level: usize) -> fmt::Result {
+ if let Some(message_chain) = &self.message_chain {
+ write!(f, "{}", message_chain.format_message(level))
+ } else {
+ write!(
+ f,
+ "{:indent$}{}",
+ "",
+ format_message(&self.message_text.clone().unwrap(), &self.code),
+ indent = level,
+ )
+ }
+ }
+
+ fn fmt_source_line(
+ &self,
+ f: &mut fmt::Formatter,
+ level: usize,
+ ) -> fmt::Result {
+ if let (Some(source_line), Some(start), Some(end)) =
+ (&self.source_line, &self.start, &self.end)
+ {
+ if !source_line.is_empty() && source_line.len() <= MAX_SOURCE_LINE_LENGTH
+ {
+ write!(f, "\n{:indent$}{}", "", source_line, indent = level)?;
+ let length = if start.line == end.line {
+ end.character - start.character
+ } else {
+ 1
+ };
+ let mut s = String::new();
+ for i in 0..start.character {
+ s.push(if source_line.chars().nth(i as usize).unwrap() == '\t' {
+ '\t'
+ } else {
+ ' '
+ });
+ }
+ // TypeScript always uses `~` when underlining, but v8 always uses `^`.
+ // We will use `^` to indicate a single point, or `~` when spanning
+ // multiple characters.
+ let ch = if length > 1 { '~' } else { '^' };
+ for _i in 0..length {
+ s.push(ch)
+ }
+ let underline = if self.is_error() {
+ colors::red(&s).to_string()
+ } else {
+ colors::cyan(&s).to_string()
+ };
+ write!(f, "\n{:indent$}{}", "", underline, indent = level)?;
+ }
+ }
+
+ Ok(())
+ }
+
+ fn fmt_related_information(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ if let Some(related_information) = self.related_information.as_ref() {
+ write!(f, "\n\n")?;
+ for info in related_information {
+ info.fmt_stack(f, 4)?;
+ }
+ }
+
+ Ok(())
+ }
+
+ fn fmt_stack(&self, f: &mut fmt::Formatter, level: usize) -> fmt::Result {
+ self.fmt_category_and_code(f)?;
+ self.fmt_message(f, level)?;
+ self.fmt_source_line(f, level)?;
+ self.fmt_frame(f, level)
+ }
+
+ fn is_error(&self) -> bool {
+ self.category == DiagnosticCategory::Error
+ }
+}
+
+impl fmt::Display for Diagnostic {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ self.fmt_stack(f, 0)?;
+ self.fmt_related_information(f)
+ }
+}
+
+#[derive(Clone, Debug, Default, Eq, PartialEq)]
+pub struct Diagnostics(Vec<Diagnostic>);
+
+impl Diagnostics {
+ #[cfg(test)]
+ pub fn new(diagnostics: Vec<Diagnostic>) -> Self {
+ Diagnostics(diagnostics)
+ }
+
+ /// Return a set of diagnostics where only the values where the predicate
+ /// returns `true` are included.
+ pub fn filter<P>(&self, predicate: P) -> Self
+ where
+ P: FnMut(&Diagnostic) -> bool,
+ {
+ let diagnostics = self.0.clone().into_iter().filter(predicate).collect();
+ Self(diagnostics)
+ }
+
+ pub fn is_empty(&self) -> bool {
+ self.0.is_empty()
+ }
+}
+
+impl<'de> Deserialize<'de> for Diagnostics {
+ fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
+ where
+ D: Deserializer<'de>,
+ {
+ let items: Vec<Diagnostic> = Deserialize::deserialize(deserializer)?;
+ Ok(Diagnostics(items))
+ }
+}
+
+impl Serialize for Diagnostics {
+ fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+ where
+ S: Serializer,
+ {
+ Serialize::serialize(&self.0, serializer)
+ }
+}
+
+impl fmt::Display for Diagnostics {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ let mut i = 0;
+ for item in &self.0 {
+ if i > 0 {
+ write!(f, "\n\n")?;
+ }
+ write!(f, "{}", item)?;
+ i += 1;
+ }
+
+ if i > 1 {
+ write!(f, "\n\nFound {} errors.", i)?;
+ }
+
+ Ok(())
+ }
+}
+
+impl Error for Diagnostics {}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+ use deno_core::serde_json;
+ use deno_core::serde_json::json;
+ use test_util::strip_ansi_codes;
+
+ #[test]
+ fn test_de_diagnostics() {
+ let value = json!([
+ {
+ "messageText": "Unknown compiler option 'invalid'.",
+ "category": 1,
+ "code": 5023
+ },
+ {
+ "start": {
+ "line": 0,
+ "character": 0
+ },
+ "end": {
+ "line": 0,
+ "character": 7
+ },
+ "fileName": "test.ts",
+ "messageText": "Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.",
+ "sourceLine": "console.log(\"a\");",
+ "category": 1,
+ "code": 2584
+ },
+ {
+ "start": {
+ "line": 7,
+ "character": 0
+ },
+ "end": {
+ "line": 7,
+ "character": 7
+ },
+ "fileName": "test.ts",
+ "messageText": "Cannot find name 'foo_Bar'. Did you mean 'foo_bar'?",
+ "sourceLine": "foo_Bar();",
+ "relatedInformation": [
+ {
+ "start": {
+ "line": 3,
+ "character": 9
+ },
+ "end": {
+ "line": 3,
+ "character": 16
+ },
+ "fileName": "test.ts",
+ "messageText": "'foo_bar' is declared here.",
+ "sourceLine": "function foo_bar() {",
+ "category": 3,
+ "code": 2728
+ }
+ ],
+ "category": 1,
+ "code": 2552
+ },
+ {
+ "start": {
+ "line": 18,
+ "character": 0
+ },
+ "end": {
+ "line": 18,
+ "character": 1
+ },
+ "fileName": "test.ts",
+ "messageChain": {
+ "messageText": "Type '{ a: { b: { c(): { d: number; }; }; }; }' is not assignable to type '{ a: { b: { c(): { d: string; }; }; }; }'.",
+ "category": 1,
+ "code": 2322,
+ "next": [
+ {
+ "messageText": "The types of 'a.b.c().d' are incompatible between these types.",
+ "category": 1,
+ "code": 2200,
+ "next": [
+ {
+ "messageText": "Type 'number' is not assignable to type 'string'.",
+ "category": 1,
+ "code": 2322
+ }
+ ]
+ }
+ ]
+ },
+ "sourceLine": "x = y;",
+ "code": 2322,
+ "category": 1
+ }
+ ]);
+ let diagnostics: Diagnostics =
+ serde_json::from_value(value).expect("cannot deserialize");
+ assert_eq!(diagnostics.0.len(), 4);
+ assert!(diagnostics.0[0].source_line.is_none());
+ assert!(diagnostics.0[0].file_name.is_none());
+ assert!(diagnostics.0[0].start.is_none());
+ assert!(diagnostics.0[0].end.is_none());
+ assert!(diagnostics.0[0].message_text.is_some());
+ assert!(diagnostics.0[0].message_chain.is_none());
+ assert!(diagnostics.0[0].related_information.is_none());
+ assert!(diagnostics.0[1].source_line.is_some());
+ assert!(diagnostics.0[1].file_name.is_some());
+ assert!(diagnostics.0[1].start.is_some());
+ assert!(diagnostics.0[1].end.is_some());
+ assert!(diagnostics.0[1].message_text.is_some());
+ assert!(diagnostics.0[1].message_chain.is_none());
+ assert!(diagnostics.0[1].related_information.is_none());
+ assert!(diagnostics.0[2].source_line.is_some());
+ assert!(diagnostics.0[2].file_name.is_some());
+ assert!(diagnostics.0[2].start.is_some());
+ assert!(diagnostics.0[2].end.is_some());
+ assert!(diagnostics.0[2].message_text.is_some());
+ assert!(diagnostics.0[2].message_chain.is_none());
+ assert!(diagnostics.0[2].related_information.is_some());
+ }
+
+ #[test]
+ fn test_diagnostics_no_source() {
+ let value = json!([
+ {
+ "messageText": "Unknown compiler option 'invalid'.",
+ "category":1,
+ "code":5023
+ }
+ ]);
+ let diagnostics: Diagnostics = serde_json::from_value(value).unwrap();
+ let actual = diagnostics.to_string();
+ assert_eq!(
+ strip_ansi_codes(&actual),
+ "TS5023 [ERROR]: Unknown compiler option \'invalid\'."
+ );
+ }
+
+ #[test]
+ fn test_diagnostics_basic() {
+ let value = json!([
+ {
+ "start": {
+ "line": 0,
+ "character": 0
+ },
+ "end": {
+ "line": 0,
+ "character": 7
+ },
+ "fileName": "test.ts",
+ "messageText": "Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.",
+ "sourceLine": "console.log(\"a\");",
+ "category": 1,
+ "code": 2584
+ }
+ ]);
+ let diagnostics: Diagnostics = serde_json::from_value(value).unwrap();
+ let actual = diagnostics.to_string();
+ assert_eq!(strip_ansi_codes(&actual), "TS2584 [ERROR]: Cannot find name \'console\'. Do you need to change your target library? Try changing the `lib` compiler option to include \'dom\'.\nconsole.log(\"a\");\n~~~~~~~\n at test.ts:1:1");
+ }
+
+ #[test]
+ fn test_diagnostics_related_info() {
+ let value = json!([
+ {
+ "start": {
+ "line": 7,
+ "character": 0
+ },
+ "end": {
+ "line": 7,
+ "character": 7
+ },
+ "fileName": "test.ts",
+ "messageText": "Cannot find name 'foo_Bar'. Did you mean 'foo_bar'?",
+ "sourceLine": "foo_Bar();",
+ "relatedInformation": [
+ {
+ "start": {
+ "line": 3,
+ "character": 9
+ },
+ "end": {
+ "line": 3,
+ "character": 16
+ },
+ "fileName": "test.ts",
+ "messageText": "'foo_bar' is declared here.",
+ "sourceLine": "function foo_bar() {",
+ "category": 3,
+ "code": 2728
+ }
+ ],
+ "category": 1,
+ "code": 2552
+ }
+ ]);
+ let diagnostics: Diagnostics = serde_json::from_value(value).unwrap();
+ let actual = diagnostics.to_string();
+ assert_eq!(strip_ansi_codes(&actual), "TS2552 [ERROR]: Cannot find name \'foo_Bar\'. Did you mean \'foo_bar\'?\nfoo_Bar();\n~~~~~~~\n at test.ts:8:1\n\n \'foo_bar\' is declared here.\n function foo_bar() {\n ~~~~~~~\n at test.ts:4:10");
+ }
+}
diff --git a/cli/tsc/dts/lib.d.ts b/cli/tsc/dts/lib.d.ts
new file mode 100644
index 000000000..9152c4dfc
--- /dev/null
+++ b/cli/tsc/dts/lib.d.ts
@@ -0,0 +1,24 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es5" />
+/// <reference lib="dom" />
+/// <reference lib="webworker.importscripts" />
+/// <reference lib="scripthost" />
diff --git a/cli/tsc/dts/lib.deno.ns.d.ts b/cli/tsc/dts/lib.deno.ns.d.ts
new file mode 100644
index 000000000..1049bf643
--- /dev/null
+++ b/cli/tsc/dts/lib.deno.ns.d.ts
@@ -0,0 +1,5217 @@
+// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
+
+/// <reference no-default-lib="true" />
+/// <reference lib="esnext" />
+/// <reference lib="deno.net" />
+
+/** Deno provides extra properties on `import.meta`. These are included here
+ * to ensure that these are still available when using the Deno namespace in
+ * conjunction with other type libs, like `dom`.
+ *
+ * @category ES Modules
+ */
+declare interface ImportMeta {
+ /** A string representation of the fully qualified module URL. When the
+ * module is loaded locally, the value will be a file URL (e.g.
+ * `file:///path/module.ts`).
+ *
+ * You can also parse the string as a URL to determine more information about
+ * how the current module was loaded. For example to determine if a module was
+ * local or not:
+ *
+ * ```ts
+ * const url = new URL(import.meta.url);
+ * if (url.protocol === "file:") {
+ * console.log("this module was loaded locally");
+ * }
+ * ```
+ */
+ url: string;
+
+ /** A flag that indicates if the current module is the main module that was
+ * called when starting the program under Deno.
+ *
+ * ```ts
+ * if (import.meta.main) {
+ * // this was loaded as the main module, maybe do some bootstrapping
+ * }
+ * ```
+ */
+ main: boolean;
+
+ /** A function that returns resolved specifier as if it would be imported
+ * using `import(specifier)`.
+ *
+ * ```ts
+ * console.log(import.meta.resolve("./foo.js"));
+ * // file:///dev/foo.js
+ * ```
+ */
+ resolve(specifier: string): string;
+}
+
+/** Deno supports [User Timing Level 3](https://w3c.github.io/user-timing)
+ * which is not widely supported yet in other runtimes.
+ *
+ * Check out the
+ * [Performance API](https://developer.mozilla.org/en-US/docs/Web/API/Performance)
+ * documentation on MDN for further information about how to use the API.
+ *
+ * @category Performance
+ */
+declare interface Performance {
+ /** Stores a timestamp with the associated name (a "mark"). */
+ mark(markName: string, options?: PerformanceMarkOptions): PerformanceMark;
+
+ /** Stores the `DOMHighResTimeStamp` duration between two marks along with the
+ * associated name (a "measure"). */
+ measure(
+ measureName: string,
+ options?: PerformanceMeasureOptions,
+ ): PerformanceMeasure;
+}
+
+/**
+ * Options which are used in conjunction with `performance.mark`. Check out the
+ * MDN
+ * [`performance.mark()`](https://developer.mozilla.org/en-US/docs/Web/API/Performance/mark#markoptions)
+ * documentation for more details.
+ *
+ * @category Performance
+ */
+declare interface PerformanceMarkOptions {
+ /** Metadata to be included in the mark. */
+ // deno-lint-ignore no-explicit-any
+ detail?: any;
+
+ /** Timestamp to be used as the mark time. */
+ startTime?: number;
+}
+
+/**
+ * Options which are used in conjunction with `performance.measure`. Check out the
+ * MDN
+ * [`performance.mark()`](https://developer.mozilla.org/en-US/docs/Web/API/Performance/measure#measureoptions)
+ * documentation for more details.
+ *
+ * @category Performance
+ */
+declare interface PerformanceMeasureOptions {
+ /** Metadata to be included in the measure. */
+ // deno-lint-ignore no-explicit-any
+ detail?: any;
+
+ /** Timestamp to be used as the start time or string to be used as start
+ * mark. */
+ start?: string | number;
+
+ /** Duration between the start and end times. */
+ duration?: number;
+
+ /** Timestamp to be used as the end time or string to be used as end mark. */
+ end?: string | number;
+}
+
+/** The global namespace where Deno specific, non-standard APIs are located. */
+declare namespace Deno {
+ /** A set of error constructors that are raised by Deno APIs.
+ *
+ * Can be used to provide more specific handling of failures within code
+ * which is using Deno APIs. For example, handling attempting to open a file
+ * which does not exist:
+ *
+ * ```ts
+ * try {
+ * const file = await Deno.open("./some/file.txt");
+ * } catch (error) {
+ * if (error instanceof Deno.errors.NotFound) {
+ * console.error("the file was not found");
+ * } else {
+ * // otherwise re-throw
+ * throw error;
+ * }
+ * }
+ * ```
+ *
+ * @category Errors
+ */
+ export namespace errors {
+ /**
+ * Raised when the underlying operating system indicates that the file
+ * was not found.
+ *
+ * @category Errors */
+ export class NotFound extends Error {}
+ /**
+ * Raised when the underlying operating system indicates the current user
+ * which the Deno process is running under does not have the appropriate
+ * permissions to a file or resource, or the user _did not_ provide required
+ * `--allow-*` flag.
+ *
+ * @category Errors */
+ export class PermissionDenied extends Error {}
+ /**
+ * Raised when the underlying operating system reports that a connection to
+ * a resource is refused.
+ *
+ * @category Errors */
+ export class ConnectionRefused extends Error {}
+ /**
+ * Raised when the underlying operating system reports that a connection has
+ * been reset. With network servers, it can be a _normal_ occurrence where a
+ * client will abort a connection instead of properly shutting it down.
+ *
+ * @category Errors */
+ export class ConnectionReset extends Error {}
+ /**
+ * Raised when the underlying operating system reports an `ECONNABORTED`
+ * error.
+ *
+ * @category Errors */
+ export class ConnectionAborted extends Error {}
+ /**
+ * Raised when the underlying operating system reports an `ENOTCONN` error.
+ *
+ * @category Errors */
+ export class NotConnected extends Error {}
+ /**
+ * Raised when attempting to open a server listener on an address and port
+ * that already has a listener.
+ *
+ * @category Errors */
+ export class AddrInUse extends Error {}
+ /**
+ * Raised when the underlying operating system reports an `EADDRNOTAVAIL`
+ * error.
+ *
+ * @category Errors */
+ export class AddrNotAvailable extends Error {}
+ /**
+ * Raised when trying to write to a resource and a broken pipe error occurs.
+ * This can happen when trying to write directly to `stdout` or `stderr`
+ * and the operating system is unable to pipe the output for a reason
+ * external to the Deno runtime.
+ *
+ * @category Errors */
+ export class BrokenPipe extends Error {}
+ /**
+ * Raised when trying to create a resource, like a file, that already
+ * exits.
+ *
+ * @category Errors */
+ export class AlreadyExists extends Error {}
+ /**
+ * Raised when an operation to returns data that is invalid for the
+ * operation being performed.
+ *
+ * @category Errors */
+ export class InvalidData extends Error {}
+ /**
+ * Raised when the underlying operating system reports that an I/O operation
+ * has timed out (`ETIMEDOUT`).
+ *
+ * @category Errors */
+ export class TimedOut extends Error {}
+ /**
+ * Raised when the underlying operating system reports an `EINTR` error. In
+ * many cases, this underlying IO error will be handled internally within
+ * Deno, or result in an @{link BadResource} error instead.
+ *
+ * @category Errors */
+ export class Interrupted extends Error {}
+ /**
+ * Raised when expecting to write to a IO buffer resulted in zero bytes
+ * being written.
+ *
+ * @category Errors */
+ export class WriteZero extends Error {}
+ /**
+ * Raised when attempting to read bytes from a resource, but the EOF was
+ * unexpectedly encountered.
+ *
+ * @category Errors */
+ export class UnexpectedEof extends Error {}
+ /**
+ * The underlying IO resource is invalid or closed, and so the operation
+ * could not be performed.
+ *
+ * @category Errors */
+ export class BadResource extends Error {}
+ /**
+ * Raised in situations where when attempting to load a dynamic import,
+ * too many redirects were encountered.
+ *
+ * @category Errors */
+ export class Http extends Error {}
+ /**
+ * Raised when the underlying IO resource is not available because it is
+ * being awaited on in another block of code.
+ *
+ * @category Errors */
+ export class Busy extends Error {}
+ /**
+ * Raised when the underlying Deno API is asked to perform a function that
+ * is not currently supported.
+ *
+ * @category Errors */
+ export class NotSupported extends Error {}
+ }
+
+ /** The current process ID of this instance of the Deno CLI.
+ *
+ * ```ts
+ * console.log(Deno.pid);
+ * ```
+ *
+ * @category Runtime Environment
+ */
+ export const pid: number;
+
+ /**
+ * The process ID of parent process of this instance of the Deno CLI.
+ *
+ * ```ts
+ * console.log(Deno.ppid);
+ * ```
+ *
+ * @category Runtime Environment
+ */
+ export const ppid: number;
+
+ /** @category Runtime Environment */
+ export interface MemoryUsage {
+ /** The number of bytes of the current Deno's process resident set size,
+ * which is the amount of memory occupied in main memory (RAM). */
+ rss: number;
+ /** The total size of the heap for V8, in bytes. */
+ heapTotal: number;
+ /** The amount of the heap used for V8, in bytes. */
+ heapUsed: number;
+ /** Memory, in bytes, associated with JavaScript objects outside of the
+ * JavaScript isolate. */
+ external: number;
+ }
+
+ /**
+ * Returns an object describing the memory usage of the Deno process and the
+ * V8 subsystem measured in bytes.
+ *
+ * @category Runtime Environment
+ */
+ export function memoryUsage(): MemoryUsage;
+
+ /**
+ * Get the `hostname` of the machine the Deno process is running on.
+ *
+ * ```ts
+ * console.log(Deno.hostname());
+ * ```
+ *
+ * Requires `allow-sys` permission.
+ *
+ * @tags allow-sys
+ * @category Runtime Environment
+ */
+ export function hostname(): string;
+
+ /**
+ * Returns an array containing the 1, 5, and 15 minute load averages. The
+ * load average is a measure of CPU and IO utilization of the last one, five,
+ * and 15 minute periods expressed as a fractional number. Zero means there
+ * is no load. On Windows, the three values are always the same and represent
+ * the current load, not the 1, 5 and 15 minute load averages.
+ *
+ * ```ts
+ * console.log(Deno.loadavg()); // e.g. [ 0.71, 0.44, 0.44 ]
+ * ```
+ *
+ * Requires `allow-sys` permission.
+ *
+ * @tags allow-sys
+ * @category Observability
+ */
+ export function loadavg(): number[];
+
+ /**
+ * The information for a network interface returned from a call to
+ * {@linkcode Deno.networkInterfaces}.
+ *
+ * @category Network
+ */
+ export interface NetworkInterfaceInfo {
+ /** The network interface name. */
+ name: string;
+ /** The IP protocol version. */
+ family: "IPv4" | "IPv6";
+ /** The IP address bound to the interface. */
+ address: string;
+ /** The netmask applied to the interface. */
+ netmask: string;
+ /** The IPv6 scope id or `null`. */
+ scopeid: number | null;
+ /** The CIDR range. */
+ cidr: string;
+ /** The MAC address. */
+ mac: string;
+ }
+
+ /**
+ * Returns an array of the network interface information.
+ *
+ * ```ts
+ * console.log(Deno.networkInterfaces());
+ * ```
+ *
+ * Requires `allow-sys` permission.
+ *
+ * @tags allow-sys
+ * @category Network
+ */
+ export function networkInterfaces(): NetworkInterfaceInfo[];
+
+ /**
+ * Displays the total amount of free and used physical and swap memory in the
+ * system, as well as the buffers and caches used by the kernel.
+ *
+ * This is similar to the `free` command in Linux
+ *
+ * ```ts
+ * console.log(Deno.systemMemoryInfo());
+ * ```
+ *
+ * Requires `allow-sys` permission.
+ *
+ * @tags allow-sys
+ * @category Runtime Environment
+ */
+ export function systemMemoryInfo(): SystemMemoryInfo;
+
+ /**
+ * Information returned from a call to {@linkcode Deno.systemMemoryInfo}.
+ *
+ * @category Runtime Environment
+ */
+ export interface SystemMemoryInfo {
+ /** Total installed memory in bytes. */
+ total: number;
+ /** Unused memory in bytes. */
+ free: number;
+ /** Estimation of how much memory, in bytes, is available for starting new
+ * applications, without swapping. Unlike the data provided by the cache or
+ * free fields, this field takes into account page cache and also that not
+ * all reclaimable memory will be reclaimed due to items being in use.
+ */
+ available: number;
+ /** Memory used by kernel buffers. */
+ buffers: number;
+ /** Memory used by the page cache and slabs. */
+ cached: number;
+ /** Total swap memory. */
+ swapTotal: number;
+ /** Unused swap memory. */
+ swapFree: number;
+ }
+
+ /** Reflects the `NO_COLOR` environment variable at program start.
+ *
+ * When the value is `true`, the Deno CLI will attempt to not send color codes
+ * to `stderr` or `stdout` and other command line programs should also attempt
+ * to respect this value.
+ *
+ * See: https://no-color.org/
+ *
+ * @category Runtime Environment
+ */
+ export const noColor: boolean;
+
+ /**
+ * Returns the release version of the Operating System.
+ *
+ * ```ts
+ * console.log(Deno.osRelease());
+ * ```
+ *
+ * Requires `allow-sys` permission.
+ * Under consideration to possibly move to Deno.build or Deno.versions and if
+ * it should depend sys-info, which may not be desirable.
+ *
+ * @tags allow-sys
+ * @category Runtime Environment
+ */
+ export function osRelease(): string;
+
+ /**
+ * Options which define the permissions within a test or worker context.
+ *
+ * `"inherit"` ensures that all permissions of the parent process will be
+ * applied to the test context. `"none"` ensures the test context has no
+ * permissions. A `PermissionOptionsObject` provides a more specific
+ * set of permissions to the test context.
+ *
+ * @category Permissions */
+ export type PermissionOptions =
+ | "inherit"
+ | "none"
+ | PermissionOptionsObject;
+
+ /**
+ * A set of options which can define the permissions within a test or worker
+ * context at a highly specific level.
+ *
+ * @category Permissions */
+ export interface PermissionOptionsObject {
+ /** Specifies if the `env` permission should be requested or revoked.
+ * If set to `"inherit"`, the current `env` permission will be inherited.
+ * If set to `true`, the global `env` permission will be requested.
+ * If set to `false`, the global `env` permission will be revoked.
+ *
+ * Defaults to `false`.
+ */
+ env?: "inherit" | boolean | string[];
+
+ /** Specifies if the `sys` permission should be requested or revoked.
+ * If set to `"inherit"`, the current `sys` permission will be inherited.
+ * If set to `true`, the global `sys` permission will be requested.
+ * If set to `false`, the global `sys` permission will be revoked.
+ *
+ * Defaults to `false`.
+ */
+ sys?: "inherit" | boolean | string[];
+
+ /** Specifies if the `hrtime` permission should be requested or revoked.
+ * If set to `"inherit"`, the current `hrtime` permission will be inherited.
+ * If set to `true`, the global `hrtime` permission will be requested.
+ * If set to `false`, the global `hrtime` permission will be revoked.
+ *
+ * Defaults to `false`.
+ */
+ hrtime?: "inherit" | boolean;
+
+ /** Specifies if the `net` permission should be requested or revoked.
+ * if set to `"inherit"`, the current `net` permission will be inherited.
+ * if set to `true`, the global `net` permission will be requested.
+ * if set to `false`, the global `net` permission will be revoked.
+ * if set to `string[]`, the `net` permission will be requested with the
+ * specified host strings with the format `"<host>[:<port>]`.
+ *
+ * Defaults to `false`.
+ *
+ * Examples:
+ *
+ * ```ts
+ * import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
+ *
+ * Deno.test({
+ * name: "inherit",
+ * permissions: {
+ * net: "inherit",
+ * },
+ * async fn() {
+ * const status = await Deno.permissions.query({ name: "net" })
+ * assertEquals(status.state, "granted");
+ * },
+ * });
+ * ```
+ *
+ * ```ts
+ * import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
+ *
+ * Deno.test({
+ * name: "true",
+ * permissions: {
+ * net: true,
+ * },
+ * async fn() {
+ * const status = await Deno.permissions.query({ name: "net" });
+ * assertEquals(status.state, "granted");
+ * },
+ * });
+ * ```
+ *
+ * ```ts
+ * import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
+ *
+ * Deno.test({
+ * name: "false",
+ * permissions: {
+ * net: false,
+ * },
+ * async fn() {
+ * const status = await Deno.permissions.query({ name: "net" });
+ * assertEquals(status.state, "denied");
+ * },
+ * });
+ * ```
+ *
+ * ```ts
+ * import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
+ *
+ * Deno.test({
+ * name: "localhost:8080",
+ * permissions: {
+ * net: ["localhost:8080"],
+ * },
+ * async fn() {
+ * const status = await Deno.permissions.query({ name: "net", host: "localhost:8080" });
+ * assertEquals(status.state, "granted");
+ * },
+ * });
+ * ```
+ */
+ net?: "inherit" | boolean | string[];
+
+ /** Specifies if the `ffi` permission should be requested or revoked.
+ * If set to `"inherit"`, the current `ffi` permission will be inherited.
+ * If set to `true`, the global `ffi` permission will be requested.
+ * If set to `false`, the global `ffi` permission will be revoked.
+ *
+ * Defaults to `false`.
+ */
+ ffi?: "inherit" | boolean | Array<string | URL>;
+
+ /** Specifies if the `read` permission should be requested or revoked.
+ * If set to `"inherit"`, the current `read` permission will be inherited.
+ * If set to `true`, the global `read` permission will be requested.
+ * If set to `false`, the global `read` permission will be revoked.
+ * If set to `Array<string | URL>`, the `read` permission will be requested with the
+ * specified file paths.
+ *
+ * Defaults to `false`.
+ */
+ read?: "inherit" | boolean | Array<string | URL>;
+
+ /** Specifies if the `run` permission should be requested or revoked.
+ * If set to `"inherit"`, the current `run` permission will be inherited.
+ * If set to `true`, the global `run` permission will be requested.
+ * If set to `false`, the global `run` permission will be revoked.
+ *
+ * Defaults to `false`.
+ */
+ run?: "inherit" | boolean | Array<string | URL>;
+
+ /** Specifies if the `write` permission should be requested or revoked.
+ * If set to `"inherit"`, the current `write` permission will be inherited.
+ * If set to `true`, the global `write` permission will be requested.
+ * If set to `false`, the global `write` permission will be revoked.
+ * If set to `Array<string | URL>`, the `write` permission will be requested with the
+ * specified file paths.
+ *
+ * Defaults to `false`.
+ */
+ write?: "inherit" | boolean | Array<string | URL>;
+ }
+
+ /**
+ * Context that is passed to a testing function, which can be used to either
+ * gain information about the current test, or register additional test
+ * steps within the current test.
+ *
+ * @category Testing */
+ export interface TestContext {
+ /** The current test name. */
+ name: string;
+ /** The string URL of the current test. */
+ origin: string;
+ /** If the current test is a step of another test, the parent test context
+ * will be set here. */
+ parent?: TestContext;
+
+ /** Run a sub step of the parent test or step. Returns a promise
+ * that resolves to a boolean signifying if the step completed successfully.
+ *
+ * The returned promise never rejects unless the arguments are invalid.
+ *
+ * If the test was ignored the promise returns `false`.
+ *
+ * ```ts
+ * Deno.test({
+ * name: "a parent test",
+ * async fn(t) {
+ * console.log("before the step");
+ * await t.step({
+ * name: "step 1",
+ * fn(t) {
+ * console.log("current step:", t.name);
+ * }
+ * });
+ * console.log("after the step");
+ * }
+ * });
+ * ```
+ */
+ step(definition: TestStepDefinition): Promise<boolean>;
+
+ /** Run a sub step of the parent test or step. Returns a promise
+ * that resolves to a boolean signifying if the step completed successfully.
+ *
+ * The returned promise never rejects unless the arguments are invalid.
+ *
+ * If the test was ignored the promise returns `false`.
+ *
+ * ```ts
+ * Deno.test(
+ * "a parent test",
+ * async (t) => {
+ * console.log("before the step");
+ * await t.step(
+ * "step 1",
+ * (t) => {
+ * console.log("current step:", t.name);
+ * }
+ * );
+ * console.log("after the step");
+ * }
+ * );
+ * ```
+ */
+ step(
+ name: string,
+ fn: (t: TestContext) => void | Promise<void>,
+ ): Promise<boolean>;
+ }
+
+ /** @category Testing */
+ export interface TestStepDefinition {
+ /** The test function that will be tested when this step is executed. The
+ * function can take an argument which will provide information about the
+ * current step's context. */
+ fn: (t: TestContext) => void | Promise<void>;
+ /** The name of the step. */
+ name: string;
+ /** If truthy the current test step will be ignored.
+ *
+ * This is a quick way to skip over a step, but also can be used for
+ * conditional logic, like determining if an environment feature is present.
+ */
+ ignore?: boolean;
+ /** Check that the number of async completed operations after the test step
+ * is the same as number of dispatched operations. This ensures that the
+ * code tested does not start async operations which it then does
+ * not await. This helps in preventing logic errors and memory leaks
+ * in the application code.
+ *
+ * Defaults to the parent test or step's value. */
+ sanitizeOps?: boolean;
+ /** Ensure the test step does not "leak" resources - like open files or
+ * network connections - by ensuring the open resources at the start of the
+ * step match the open resources at the end of the step.
+ *
+ * Defaults to the parent test or step's value. */
+ sanitizeResources?: boolean;
+ /** Ensure the test step does not prematurely cause the process to exit,
+ * for example via a call to {@linkcode Deno.exit}.
+ *
+ * Defaults to the parent test or step's value. */
+ sanitizeExit?: boolean;
+ }
+
+ /** @category Testing */
+ export interface TestDefinition {
+ fn: (t: TestContext) => void | Promise<void>;
+ /** The name of the test. */
+ name: string;
+ /** If truthy the current test step will be ignored.
+ *
+ * It is a quick way to skip over a step, but also can be used for
+ * conditional logic, like determining if an environment feature is present.
+ */
+ ignore?: boolean;
+ /** If at least one test has `only` set to `true`, only run tests that have
+ * `only` set to `true` and fail the test suite. */
+ only?: boolean;
+ /** Check that the number of async completed operations after the test step
+ * is the same as number of dispatched operations. This ensures that the
+ * code tested does not start async operations which it then does
+ * not await. This helps in preventing logic errors and memory leaks
+ * in the application code.
+ *
+ * Defaults to `true`. */
+ sanitizeOps?: boolean;
+ /** Ensure the test step does not "leak" resources - like open files or
+ * network connections - by ensuring the open resources at the start of the
+ * test match the open resources at the end of the test.
+ *
+ * Defaults to `true`. */
+ sanitizeResources?: boolean;
+ /** Ensure the test case does not prematurely cause the process to exit,
+ * for example via a call to {@linkcode Deno.exit}.
+ *
+ * Defaults to `true`. */
+ sanitizeExit?: boolean;
+ /** Specifies the permissions that should be used to run the test.
+ *
+ * Set this to "inherit" to keep the calling runtime permissions, set this
+ * to "none" to revoke all permissions, or set a more specific set of
+ * permissions using a {@linkcode PermissionOptionsObject}.
+ *
+ * Defaults to `"inherit"`. */
+ permissions?: PermissionOptions;
+ }
+
+ /** Register a test which will be run when `deno test` is used on the command
+ * line and the containing module looks like a test module.
+ *
+ * `fn` can be async if required.
+ *
+ * ```ts
+ * import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
+ *
+ * Deno.test({
+ * name: "example test",
+ * fn() {
+ * assertEquals("world", "world");
+ * },
+ * });
+ *
+ * Deno.test({
+ * name: "example ignored test",
+ * ignore: Deno.build.os === "windows",
+ * fn() {
+ * // This test is ignored only on Windows machines
+ * },
+ * });
+ *
+ * Deno.test({
+ * name: "example async test",
+ * async fn() {
+ * const decoder = new TextDecoder("utf-8");
+ * const data = await Deno.readFile("hello_world.txt");
+ * assertEquals(decoder.decode(data), "Hello world");
+ * }
+ * });
+ * ```
+ *
+ * @category Testing
+ */
+ export function test(t: TestDefinition): void;
+
+ /** Register a test which will be run when `deno test` is used on the command
+ * line and the containing module looks like a test module.
+ *
+ * `fn` can be async if required.
+ *
+ * ```ts
+ * import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
+ *
+ * Deno.test("My test description", () => {
+ * assertEquals("hello", "hello");
+ * });
+ *
+ * Deno.test("My async test description", async () => {
+ * const decoder = new TextDecoder("utf-8");
+ * const data = await Deno.readFile("hello_world.txt");
+ * assertEquals(decoder.decode(data), "Hello world");
+ * });
+ * ```
+ *
+ * @category Testing
+ */
+ export function test(
+ name: string,
+ fn: (t: TestContext) => void | Promise<void>,
+ ): void;
+
+ /** Register a test which will be run when `deno test` is used on the command
+ * line and the containing module looks like a test module.
+ *
+ * `fn` can be async if required. Declared function must have a name.
+ *
+ * ```ts
+ * import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
+ *
+ * Deno.test(function myTestName() {
+ * assertEquals("hello", "hello");
+ * });
+ *
+ * Deno.test(async function myOtherTestName() {
+ * const decoder = new TextDecoder("utf-8");
+ * const data = await Deno.readFile("hello_world.txt");
+ * assertEquals(decoder.decode(data), "Hello world");
+ * });
+ * ```
+ *
+ * @category Testing
+ */
+ export function test(fn: (t: TestContext) => void | Promise<void>): void;
+
+ /** Register a test which will be run when `deno test` is used on the command
+ * line and the containing module looks like a test module.
+ *
+ * `fn` can be async if required.
+ *
+ * ```ts
+ * import {assert, fail, assertEquals} from "https://deno.land/std/testing/asserts.ts";
+ *
+ * Deno.test("My test description", { permissions: { read: true } }, (): void => {
+ * assertEquals("hello", "hello");
+ * });
+ *
+ * Deno.test("My async test description", { permissions: { read: false } }, async (): Promise<void> => {
+ * const decoder = new TextDecoder("utf-8");
+ * const data = await Deno.readFile("hello_world.txt");
+ * assertEquals(decoder.decode(data), "Hello world");
+ * });
+ * ```
+ *
+ * @category Testing
+ */
+ export function test(
+ name: string,
+ options: Omit<TestDefinition, "fn" | "name">,
+ fn: (t: TestContext) => void | Promise<void>,
+ ): void;
+
+ /** Register a test which will be run when `deno test` is used on the command
+ * line and the containing module looks like a test module.
+ *
+ * `fn` can be async if required.
+ *
+ * ```ts
+ * import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
+ *
+ * Deno.test(
+ * {
+ * name: "My test description",
+ * permissions: { read: true },
+ * },
+ * () => {
+ * assertEquals("hello", "hello");
+ * },
+ * );
+ *
+ * Deno.test(
+ * {
+ * name: "My async test description",
+ * permissions: { read: false },
+ * },
+ * async () => {
+ * const decoder = new TextDecoder("utf-8");
+ * const data = await Deno.readFile("hello_world.txt");
+ * assertEquals(decoder.decode(data), "Hello world");
+ * },
+ * );
+ * ```
+ *
+ * @category Testing
+ */
+ export function test(
+ options: Omit<TestDefinition, "fn">,
+ fn: (t: TestContext) => void | Promise<void>,
+ ): void;
+
+ /** Register a test which will be run when `deno test` is used on the command
+ * line and the containing module looks like a test module.
+ *
+ * `fn` can be async if required. Declared function must have a name.
+ *
+ * ```ts
+ * import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
+ *
+ * Deno.test(
+ * { permissions: { read: true } },
+ * function myTestName() {
+ * assertEquals("hello", "hello");
+ * },
+ * );
+ *
+ * Deno.test(
+ * { permissions: { read: false } },
+ * async function myOtherTestName() {
+ * const decoder = new TextDecoder("utf-8");
+ * const data = await Deno.readFile("hello_world.txt");
+ * assertEquals(decoder.decode(data), "Hello world");
+ * },
+ * );
+ * ```
+ *
+ * @category Testing
+ */
+ export function test(
+ options: Omit<TestDefinition, "fn" | "name">,
+ fn: (t: TestContext) => void | Promise<void>,
+ ): void;
+
+ /**
+ * The interface for defining a benchmark test using {@linkcode Deno.bench}.
+ *
+ * @category Testing
+ */
+ export interface BenchDefinition {
+ /** The test function which will be benchmarked. */
+ fn: () => void | Promise<void>;
+ /** The name of the test, which will be used in displaying the results. */
+ name: string;
+ /** If truthy, the benchmark test will be ignored/skipped. */
+ ignore?: boolean;
+ /** Group name for the benchmark.
+ *
+ * Grouped benchmarks produce a group time summary, where the difference
+ * in performance between each test of the group is compared. */
+ group?: string;
+ /** Benchmark should be used as the baseline for other benchmarks.
+ *
+ * If there are multiple baselines in a group, the first one is used as the
+ * baseline. */
+ baseline?: boolean;
+ /** If at least one bench has `only` set to true, only run benches that have
+ * `only` set to `true` and fail the bench suite. */
+ only?: boolean;
+ /** Ensure the bench case does not prematurely cause the process to exit,
+ * for example via a call to {@linkcode Deno.exit}. Defaults to `true`. */
+ sanitizeExit?: boolean;
+ /** Specifies the permissions that should be used to run the bench.
+ *
+ * Set this to `"inherit"` to keep the calling thread's permissions.
+ *
+ * Set this to `"none"` to revoke all permissions.
+ *
+ * Defaults to "inherit".
+ */
+ permissions?: PermissionOptions;
+ }
+
+ /**
+ * Register a benchmark test which will be run when `deno bench` is used on
+ * the command line and the containing module looks like a bench module.
+ *
+ * If the test function (`fn`) returns a promise or is async, the test runner
+ * will await resolution to consider the test complete.
+ *
+ * ```ts
+ * import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
+ *
+ * Deno.bench({
+ * name: "example test",
+ * fn() {
+ * assertEquals("world", "world");
+ * },
+ * });
+ *
+ * Deno.bench({
+ * name: "example ignored test",
+ * ignore: Deno.build.os === "windows",
+ * fn() {
+ * // This test is ignored only on Windows machines
+ * },
+ * });
+ *
+ * Deno.bench({
+ * name: "example async test",
+ * async fn() {
+ * const decoder = new TextDecoder("utf-8");
+ * const data = await Deno.readFile("hello_world.txt");
+ * assertEquals(decoder.decode(data), "Hello world");
+ * }
+ * });
+ * ```
+ *
+ * @category Testing
+ */
+ export function bench(t: BenchDefinition): void;
+
+ /**
+ * Register a benchmark test which will be run when `deno bench` is used on
+ * the command line and the containing module looks like a bench module.
+ *
+ * If the test function (`fn`) returns a promise or is async, the test runner
+ * will await resolution to consider the test complete.
+ *
+ * ```ts
+ * import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
+ *
+ * Deno.bench("My test description", () => {
+ * assertEquals("hello", "hello");
+ * });
+ *
+ * Deno.bench("My async test description", async () => {
+ * const decoder = new TextDecoder("utf-8");
+ * const data = await Deno.readFile("hello_world.txt");
+ * assertEquals(decoder.decode(data), "Hello world");
+ * });
+ * ```
+ *
+ * @category Testing
+ */
+ export function bench(
+ name: string,
+ fn: () => void | Promise<void>,
+ ): void;
+
+ /**
+ * Register a benchmark test which will be run when `deno bench` is used on
+ * the command line and the containing module looks like a bench module.
+ *
+ * If the test function (`fn`) returns a promise or is async, the test runner
+ * will await resolution to consider the test complete.
+ *
+ * ```ts
+ * import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
+ *
+ * Deno.bench(function myTestName() {
+ * assertEquals("hello", "hello");
+ * });
+ *
+ * Deno.bench(async function myOtherTestName() {
+ * const decoder = new TextDecoder("utf-8");
+ * const data = await Deno.readFile("hello_world.txt");
+ * assertEquals(decoder.decode(data), "Hello world");
+ * });
+ * ```
+ *
+ * @category Testing
+ */
+ export function bench(fn: () => void | Promise<void>): void;
+
+ /**
+ * Register a benchmark test which will be run when `deno bench` is used on
+ * the command line and the containing module looks like a bench module.
+ *
+ * If the test function (`fn`) returns a promise or is async, the test runner
+ * will await resolution to consider the test complete.
+ *
+ * ```ts
+ * import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
+ *
+ * Deno.bench(
+ * "My test description",
+ * { permissions: { read: true } },
+ * () => {
+ * assertEquals("hello", "hello");
+ * }
+ * );
+ *
+ * Deno.bench(
+ * "My async test description",
+ * { permissions: { read: false } },
+ * async () => {
+ * const decoder = new TextDecoder("utf-8");
+ * const data = await Deno.readFile("hello_world.txt");
+ * assertEquals(decoder.decode(data), "Hello world");
+ * }
+ * );
+ * ```
+ *
+ * @category Testing
+ */
+ export function bench(
+ name: string,
+ options: Omit<BenchDefinition, "fn" | "name">,
+ fn: () => void | Promise<void>,
+ ): void;
+
+ /**
+ * Register a benchmark test which will be run when `deno bench` is used on
+ * the command line and the containing module looks like a bench module.
+ *
+ * If the test function (`fn`) returns a promise or is async, the test runner
+ * will await resolution to consider the test complete.
+ *
+ * ```ts
+ * import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
+ *
+ * Deno.bench(
+ * { name: "My test description", permissions: { read: true } },
+ * () => {
+ * assertEquals("hello", "hello");
+ * }
+ * );
+ *
+ * Deno.bench(
+ * { name: "My async test description", permissions: { read: false } },
+ * async () => {
+ * const decoder = new TextDecoder("utf-8");
+ * const data = await Deno.readFile("hello_world.txt");
+ * assertEquals(decoder.decode(data), "Hello world");
+ * }
+ * );
+ * ```
+ *
+ * @category Testing
+ */
+ export function bench(
+ options: Omit<BenchDefinition, "fn">,
+ fn: () => void | Promise<void>,
+ ): void;
+
+ /**
+ * Register a benchmark test which will be run when `deno bench` is used on
+ * the command line and the containing module looks like a bench module.
+ *
+ * If the test function (`fn`) returns a promise or is async, the test runner
+ * will await resolution to consider the test complete.
+ *
+ * ```ts
+ * import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
+ *
+ * Deno.bench(
+ * { permissions: { read: true } },
+ * function myTestName() {
+ * assertEquals("hello", "hello");
+ * }
+ * );
+ *
+ * Deno.bench(
+ * { permissions: { read: false } },
+ * async function myOtherTestName() {
+ * const decoder = new TextDecoder("utf-8");
+ * const data = await Deno.readFile("hello_world.txt");
+ * assertEquals(decoder.decode(data), "Hello world");
+ * }
+ * );
+ * ```
+ *
+ * @category Testing
+ */
+ export function bench(
+ options: Omit<BenchDefinition, "fn" | "name">,
+ fn: () => void | Promise<void>,
+ ): void;
+
+ /** Exit the Deno process with optional exit code.
+ *
+ * If no exit code is supplied then Deno will exit with return code of `0`.
+ *
+ * In worker contexts this is an alias to `self.close();`.
+ *
+ * ```ts
+ * Deno.exit(5);
+ * ```
+ *
+ * @category Runtime Environment
+ */
+ export function exit(code?: number): never;
+
+ /** An interface containing methods to interact with the process environment
+ * variables.
+ *
+ * @tags allow-env
+ * @category Runtime Environment
+ */
+ export interface Env {
+ /** Retrieve the value of an environment variable.
+ *
+ * Returns `undefined` if the supplied environment variable is not defined.
+ *
+ * ```ts
+ * console.log(Deno.env.get("HOME")); // e.g. outputs "/home/alice"
+ * console.log(Deno.env.get("MADE_UP_VAR")); // outputs "undefined"
+ * ```
+ *
+ * Requires `allow-env` permission.
+ *
+ * @tags allow-env
+ */
+ get(key: string): string | undefined;
+
+ /** Set the value of an environment variable.
+ *
+ * ```ts
+ * Deno.env.set("SOME_VAR", "Value");
+ * Deno.env.get("SOME_VAR"); // outputs "Value"
+ * ```
+ *
+ * Requires `allow-env` permission.
+ *
+ * @tags allow-env
+ */
+ set(key: string, value: string): void;
+
+ /** Delete the value of an environment variable.
+ *
+ * ```ts
+ * Deno.env.set("SOME_VAR", "Value");
+ * Deno.env.delete("SOME_VAR"); // outputs "undefined"
+ * ```
+ *
+ * Requires `allow-env` permission.
+ *
+ * @tags allow-env
+ */
+ delete(key: string): void;
+
+ /** Returns a snapshot of the environment variables at invocation as a
+ * simple object of keys and values.
+ *
+ * ```ts
+ * Deno.env.set("TEST_VAR", "A");
+ * const myEnv = Deno.env.toObject();
+ * console.log(myEnv.SHELL);
+ * Deno.env.set("TEST_VAR", "B");
+ * console.log(myEnv.TEST_VAR); // outputs "A"
+ * ```
+ *
+ * Requires `allow-env` permission.
+ *
+ * @tags allow-env
+ */
+ toObject(): { [index: string]: string };
+ }
+
+ /** An interface containing methods to interact with the process environment
+ * variables.
+ *
+ * @tags allow-env
+ * @category Runtime Environment
+ */
+ export const env: Env;
+
+ /**
+ * Returns the path to the current deno executable.
+ *
+ * ```ts
+ * console.log(Deno.execPath()); // e.g. "/home/alice/.local/bin/deno"
+ * ```
+ *
+ * Requires `allow-read` permission.
+ *
+ * @tags allow-read
+ * @category Runtime Environment
+ */
+ export function execPath(): string;
+
+ /**
+ * Change the current working directory to the specified path.
+ *
+ * ```ts
+ * Deno.chdir("/home/userA");
+ * Deno.chdir("../userB");
+ * Deno.chdir("C:\\Program Files (x86)\\Java");
+ * ```
+ *
+ * Throws {@linkcode Deno.errors.NotFound} if directory not found.
+ *
+ * Throws {@linkcode Deno.errors.PermissionDenied} if the user does not have
+ * operating system file access rights.
+ *
+ * Requires `allow-read` permission.
+ *
+ * @tags allow-read
+ * @category Runtime Environment
+ */
+ export function chdir(directory: string | URL): void;
+
+ /**
+ * Return a string representing the current working directory.
+ *
+ * If the current directory can be reached via multiple paths (due to symbolic
+ * links), `cwd()` may return any one of them.
+ *
+ * ```ts
+ * const currentWorkingDirectory = Deno.cwd();
+ * ```
+ *
+ * Throws {@linkcode Deno.errors.NotFound} if directory not available.
+ *
+ * Requires `allow-read` permission.
+ *
+ * @tags allow-read
+ * @category Runtime Environment
+ */
+ export function cwd(): string;
+
+ /**
+ * Creates `newpath` as a hard link to `oldpath`.
+ *
+ * ```ts
+ * await Deno.link("old/name", "new/name");
+ * ```
+ *
+ * Requires `allow-read` and `allow-write` permissions.
+ *
+ * @tags allow-read, allow-write
+ * @category File System
+ */
+ export function link(oldpath: string, newpath: string): Promise<void>;
+
+ /**
+ * Synchronously creates `newpath` as a hard link to `oldpath`.
+ *
+ * ```ts
+ * Deno.linkSync("old/name", "new/name");
+ * ```
+ *
+ * Requires `allow-read` and `allow-write` permissions.
+ *
+ * @tags allow-read, allow-write
+ * @category File System
+ */
+ export function linkSync(oldpath: string, newpath: string): void;
+
+ /**
+ * A enum which defines the seek mode for IO related APIs that support
+ * seeking.
+ *
+ * @category I/O */
+ export enum SeekMode {
+ /* Seek from the start of the file/resource. */
+ Start = 0,
+ /* Seek from the current position within the file/resource. */
+ Current = 1,
+ /* Seek from the end of the current file/resource. */
+ End = 2,
+ }
+
+ /**
+ * An abstract interface which when implemented provides an interface to read
+ * bytes into an array buffer asynchronously.
+ *
+ * @category I/O */
+ export interface Reader {
+ /** Reads up to `p.byteLength` bytes into `p`. It resolves to the number of
+ * bytes read (`0` < `n` <= `p.byteLength`) and rejects if any error
+ * encountered. Even if `read()` resolves to `n` < `p.byteLength`, it may
+ * use all of `p` as scratch space during the call. If some data is
+ * available but not `p.byteLength` bytes, `read()` conventionally resolves
+ * to what is available instead of waiting for more.
+ *
+ * When `read()` encounters end-of-file condition, it resolves to EOF
+ * (`null`).
+ *
+ * When `read()` encounters an error, it rejects with an error.
+ *
+ * Callers should always process the `n` > `0` bytes returned before
+ * considering the EOF (`null`). Doing so correctly handles I/O errors that
+ * happen after reading some bytes and also both of the allowed EOF
+ * behaviors.
+ *
+ * Implementations should not retain a reference to `p`.
+ *
+ * Use
+ * [`itereateReader`](https://deno.land/std/streams/conversion.ts?s=iterateReader)
+ * from
+ * [`std/streams/conversion.ts`](https://deno.land/std/streams/conversion.ts)
+ * to turn a `Reader` into an {@linkcode AsyncIterator}.
+ */
+ read(p: Uint8Array): Promise<number | null>;
+ }
+
+ /**
+ * An abstract interface which when implemented provides an interface to read
+ * bytes into an array buffer synchronously.
+ *
+ * @category I/O */
+ export interface ReaderSync {
+ /** Reads up to `p.byteLength` bytes into `p`. It resolves to the number
+ * of bytes read (`0` < `n` <= `p.byteLength`) and rejects if any error
+ * encountered. Even if `readSync()` returns `n` < `p.byteLength`, it may use
+ * all of `p` as scratch space during the call. If some data is available
+ * but not `p.byteLength` bytes, `readSync()` conventionally returns what is
+ * available instead of waiting for more.
+ *
+ * When `readSync()` encounters end-of-file condition, it returns EOF
+ * (`null`).
+ *
+ * When `readSync()` encounters an error, it throws with an error.
+ *
+ * Callers should always process the `n` > `0` bytes returned before
+ * considering the EOF (`null`). Doing so correctly handles I/O errors that
+ * happen after reading some bytes and also both of the allowed EOF
+ * behaviors.
+ *
+ * Implementations should not retain a reference to `p`.
+ *
+ * Use
+ * [`itereateReaderSync`](https://deno.land/std/streams/conversion.ts?s=iterateReaderSync)
+ * from from
+ * [`std/streams/conversion.ts`](https://deno.land/std/streams/conversion.ts)
+ * to turn a `ReaderSync` into an {@linkcode Iterator}.
+ */
+ readSync(p: Uint8Array): number | null;
+ }
+
+ /**
+ * An abstract interface which when implemented provides an interface to write
+ * bytes from an array buffer to a file/resource asynchronously.
+ *
+ * @category I/O */
+ export interface Writer {
+ /** Writes `p.byteLength` bytes from `p` to the underlying data stream. It
+ * resolves to the number of bytes written from `p` (`0` <= `n` <=
+ * `p.byteLength`) or reject with the error encountered that caused the
+ * write to stop early. `write()` must reject with a non-null error if
+ * would resolve to `n` < `p.byteLength`. `write()` must not modify the
+ * slice data, even temporarily.
+ *
+ * Implementations should not retain a reference to `p`.
+ */
+ write(p: Uint8Array): Promise<number>;
+ }
+
+ /**
+ * An abstract interface which when implemented provides an interface to write
+ * bytes from an array buffer to a file/resource synchronously.
+ *
+ * @category I/O */
+ export interface WriterSync {
+ /** Writes `p.byteLength` bytes from `p` to the underlying data
+ * stream. It returns the number of bytes written from `p` (`0` <= `n`
+ * <= `p.byteLength`) and any error encountered that caused the write to
+ * stop early. `writeSync()` must throw a non-null error if it returns `n` <
+ * `p.byteLength`. `writeSync()` must not modify the slice data, even
+ * temporarily.
+ *
+ * Implementations should not retain a reference to `p`.
+ */
+ writeSync(p: Uint8Array): number;
+ }
+
+ /**
+ * An abstract interface which when implemented provides an interface to close
+ * files/resources that were previously opened.
+ *
+ * @category I/O */
+ export interface Closer {
+ /** Closes the resource, "freeing" the backing file/resource. */
+ close(): void;
+ }
+
+ /**
+ * An abstract interface which when implemented provides an interface to seek
+ * within an open file/resource asynchronously.
+ *
+ * @category I/O */
+ export interface Seeker {
+ /** Seek sets the offset for the next `read()` or `write()` to offset,
+ * interpreted according to `whence`: `Start` means relative to the
+ * start of the file, `Current` means relative to the current offset,
+ * and `End` means relative to the end. Seek resolves to the new offset
+ * relative to the start of the file.
+ *
+ * Seeking to an offset before the start of the file is an error. Seeking to
+ * any positive offset is legal, but the behavior of subsequent I/O
+ * operations on the underlying object is implementation-dependent.
+ *
+ * It resolves with the updated offset.
+ */
+ seek(offset: number, whence: SeekMode): Promise<number>;
+ }
+
+ /**
+ * An abstract interface which when implemented provides an interface to seek
+ * within an open file/resource synchronously.
+ *
+ * @category I/O */
+ export interface SeekerSync {
+ /** Seek sets the offset for the next `readSync()` or `writeSync()` to
+ * offset, interpreted according to `whence`: `Start` means relative
+ * to the start of the file, `Current` means relative to the current
+ * offset, and `End` means relative to the end.
+ *
+ * Seeking to an offset before the start of the file is an error. Seeking to
+ * any positive offset is legal, but the behavior of subsequent I/O
+ * operations on the underlying object is implementation-dependent.
+ *
+ * It returns the updated offset.
+ */
+ seekSync(offset: number, whence: SeekMode): number;
+ }
+
+ /**
+ * Copies from `src` to `dst` until either EOF (`null`) is read from `src` or
+ * an error occurs. It resolves to the number of bytes copied or rejects with
+ * the first error encountered while copying.
+ *
+ * @deprecated Use
+ * [`copy`](https://deno.land/std/streams/conversion.ts?s=copy) from
+ * [`std/streams/conversion.ts`](https://deno.land/std/streams/conversion.ts)
+ * instead. `Deno.copy` will be removed in the future.
+ *
+ * @category I/O
+ *
+ * @param src The source to copy from
+ * @param dst The destination to copy to
+ * @param options Can be used to tune size of the buffer. Default size is 32kB
+ */
+ export function copy(
+ src: Reader,
+ dst: Writer,
+ options?: { bufSize?: number },
+ ): Promise<number>;
+
+ /**
+ * Turns a Reader, `r`, into an async iterator.
+ *
+ * @deprecated Use
+ * [`iterateReader`](https://deno.land/std/streams/conversion.ts?s=iterateReader)
+ * from
+ * [`std/streams/conversion.ts`](https://deno.land/std/streams/conversion.ts)
+ * instead. `Deno.iter` will be removed in the future.
+ *
+ * @category I/O
+ */
+ export function iter(
+ r: Reader,
+ options?: { bufSize?: number },
+ ): AsyncIterableIterator<Uint8Array>;
+
+ /**
+ * Turns a ReaderSync, `r`, into an iterator.
+ *
+ * @deprecated Use
+ * [`iterateReaderSync`](https://deno.land/std/streams/conversion.ts?s=iterateReaderSync)
+ * from
+ * [`std/streams/conversion.ts`](https://deno.land/std/streams/conversion.ts)
+ * instead. `Deno.iterSync` will be removed in the future.
+ *
+ * @category I/O
+ */
+ export function iterSync(
+ r: ReaderSync,
+ options?: {
+ bufSize?: number;
+ },
+ ): IterableIterator<Uint8Array>;
+
+ /** Open a file and resolve to an instance of {@linkcode Deno.FsFile}. The
+ * file does not need to previously exist if using the `create` or `createNew`
+ * open options. It is the caller's responsibility to close the file when
+ * finished with it.
+ *
+ * ```ts
+ * const file = await Deno.open("/foo/bar.txt", { read: true, write: true });
+ * // Do work with file
+ * Deno.close(file.rid);
+ * ```
+ *
+ * Requires `allow-read` and/or `allow-write` permissions depending on
+ * options.
+ *
+ * @tags allow-read, allow-write
+ * @category File System
+ */
+ export function open(
+ path: string | URL,
+ options?: OpenOptions,
+ ): Promise<FsFile>;
+
+ /** Synchronously open a file and return an instance of
+ * {@linkcode Deno.FsFile}. The file does not need to previously exist if
+ * using the `create` or `createNew` open options. It is the caller's
+ * responsibility to close the file when finished with it.
+ *
+ * ```ts
+ * const file = Deno.openSync("/foo/bar.txt", { read: true, write: true });
+ * // Do work with file
+ * Deno.close(file.rid);
+ * ```
+ *
+ * Requires `allow-read` and/or `allow-write` permissions depending on
+ * options.
+ *
+ * @tags allow-read, allow-write
+ * @category File System
+ */
+ export function openSync(path: string | URL, options?: OpenOptions): FsFile;
+
+ /** Creates a file if none exists or truncates an existing file and resolves to
+ * an instance of {@linkcode Deno.FsFile}.
+ *
+ * ```ts
+ * const file = await Deno.create("/foo/bar.txt");
+ * ```
+ *
+ * Requires `allow-read` and `allow-write` permissions.
+ *
+ * @tags allow-read, allow-write
+ * @category File System
+ */
+ export function create(path: string | URL): Promise<FsFile>;
+
+ /** Creates a file if none exists or truncates an existing file and returns
+ * an instance of {@linkcode Deno.FsFile}.
+ *
+ * ```ts
+ * const file = Deno.createSync("/foo/bar.txt");
+ * ```
+ *
+ * Requires `allow-read` and `allow-write` permissions.
+ *
+ * @tags allow-read, allow-write
+ * @category File System
+ */
+ export function createSync(path: string | URL): FsFile;
+
+ /** Read from a resource ID (`rid`) into an array buffer (`buffer`).
+ *
+ * Resolves to either the number of bytes read during the operation or EOF
+ * (`null`) if there was nothing more to read.
+ *
+ * It is possible for a read to successfully return with `0` bytes. This does
+ * not indicate EOF.
+ *
+ * This function is one of the lowest level APIs and most users should not
+ * work with this directly, but rather use
+ * [`readAll()`](https://deno.land/std/streams/conversion.ts?s=readAll) from
+ * [`std/streams/conversion.ts`](https://deno.land/std/streams/conversion.ts)
+ * instead.
+ *
+ * **It is not guaranteed that the full buffer will be read in a single call.**
+ *
+ * ```ts
+ * // if "/foo/bar.txt" contains the text "hello world":
+ * const file = await Deno.open("/foo/bar.txt");
+ * const buf = new Uint8Array(100);
+ * const numberOfBytesRead = await Deno.read(file.rid, buf); // 11 bytes
+ * const text = new TextDecoder().decode(buf); // "hello world"
+ * Deno.close(file.rid);
+ * ```
+ *
+ * @category I/O
+ */
+ export function read(rid: number, buffer: Uint8Array): Promise<number | null>;
+
+ /** Synchronously read from a resource ID (`rid`) into an array buffer
+ * (`buffer`).
+ *
+ * Returns either the number of bytes read during the operation or EOF
+ * (`null`) if there was nothing more to read.
+ *
+ * It is possible for a read to successfully return with `0` bytes. This does
+ * not indicate EOF.
+ *
+ * This function is one of the lowest level APIs and most users should not
+ * work with this directly, but rather use
+ * [`readAllSync()`](https://deno.land/std/streams/conversion.ts?s=readAllSync)
+ * from
+ * [`std/streams/conversion.ts`](https://deno.land/std/streams/conversion.ts)
+ * instead.
+ *
+ * **It is not guaranteed that the full buffer will be read in a single
+ * call.**
+ *
+ * ```ts
+ * // if "/foo/bar.txt" contains the text "hello world":
+ * const file = Deno.openSync("/foo/bar.txt");
+ * const buf = new Uint8Array(100);
+ * const numberOfBytesRead = Deno.readSync(file.rid, buf); // 11 bytes
+ * const text = new TextDecoder().decode(buf); // "hello world"
+ * Deno.close(file.rid);
+ * ```
+ *
+ * @category I/O
+ */
+ export function readSync(rid: number, buffer: Uint8Array): number | null;
+
+ /** Write to the resource ID (`rid`) the contents of the array buffer (`data`).
+ *
+ * Resolves to the number of bytes written. This function is one of the lowest
+ * level APIs and most users should not work with this directly, but rather use
+ * [`writeAll()`](https://deno.land/std/streams/conversion.ts?s=writeAll) from
+ * [`std/streams/conversion.ts`](https://deno.land/std/streams/conversion.ts)
+ * instead.
+ *
+ * **It is not guaranteed that the full buffer will be written in a single
+ * call.**
+ *
+ * ```ts
+ * const encoder = new TextEncoder();
+ * const data = encoder.encode("Hello world");
+ * const file = await Deno.open("/foo/bar.txt", { write: true });
+ * const bytesWritten = await Deno.write(file.rid, data); // 11
+ * Deno.close(file.rid);
+ * ```
+ *
+ * @category I/O
+ */
+ export function write(rid: number, data: Uint8Array): Promise<number>;
+
+ /** Synchronously write to the resource ID (`rid`) the contents of the array
+ * buffer (`data`).
+ *
+ * Returns the number of bytes written. This function is one of the lowest
+ * level APIs and most users should not work with this directly, but rather
+ * use
+ * [`writeAllSync()`](https://deno.land/std/streams/conversion.ts?s=writeAllSync)
+ * from
+ * [`std/streams/conversion.ts`](https://deno.land/std/streams/conversion.ts)
+ * instead.
+ *
+ * **It is not guaranteed that the full buffer will be written in a single
+ * call.**
+ *
+ * ```ts
+ * const encoder = new TextEncoder();
+ * const data = encoder.encode("Hello world");
+ * const file = Deno.openSync("/foo/bar.txt", { write: true });
+ * const bytesWritten = Deno.writeSync(file.rid, data); // 11
+ * Deno.close(file.rid);
+ * ```
+ *
+ * @category I/O
+ */
+ export function writeSync(rid: number, data: Uint8Array): number;
+
+ /** Seek a resource ID (`rid`) to the given `offset` under mode given by `whence`.
+ * The call resolves to the new position within the resource (bytes from the start).
+ *
+ * ```ts
+ * // Given file.rid pointing to file with "Hello world", which is 11 bytes long:
+ * const file = await Deno.open(
+ * "hello.txt",
+ * { read: true, write: true, truncate: true, create: true },
+ * );
+ * await Deno.write(file.rid, new TextEncoder().encode("Hello world"));
+ *
+ * // advance cursor 6 bytes
+ * const cursorPosition = await Deno.seek(file.rid, 6, Deno.SeekMode.Start);
+ * console.log(cursorPosition); // 6
+ * const buf = new Uint8Array(100);
+ * await file.read(buf);
+ * console.log(new TextDecoder().decode(buf)); // "world"
+ * file.close();
+ * ```
+ *
+ * The seek modes work as follows:
+ *
+ * ```ts
+ * // Given file.rid pointing to file with "Hello world", which is 11 bytes long:
+ * const file = await Deno.open(
+ * "hello.txt",
+ * { read: true, write: true, truncate: true, create: true },
+ * );
+ * await Deno.write(file.rid, new TextEncoder().encode("Hello world"));
+ *
+ * // Seek 6 bytes from the start of the file
+ * console.log(await Deno.seek(file.rid, 6, Deno.SeekMode.Start)); // "6"
+ * // Seek 2 more bytes from the current position
+ * console.log(await Deno.seek(file.rid, 2, Deno.SeekMode.Current)); // "8"
+ * // Seek backwards 2 bytes from the end of the file
+ * console.log(await Deno.seek(file.rid, -2, Deno.SeekMode.End)); // "9" (e.g. 11-2)
+ * file.close();
+ * ```
+ *
+ * @category I/O
+ */
+ export function seek(
+ rid: number,
+ offset: number,
+ whence: SeekMode,
+ ): Promise<number>;
+
+ /** Synchronously seek a resource ID (`rid`) to the given `offset` under mode
+ * given by `whence`. The new position within the resource (bytes from the
+ * start) is returned.
+ *
+ * ```ts
+ * const file = Deno.openSync(
+ * "hello.txt",
+ * { read: true, write: true, truncate: true, create: true },
+ * );
+ * Deno.writeSync(file.rid, new TextEncoder().encode("Hello world"));
+ *
+ * // advance cursor 6 bytes
+ * const cursorPosition = Deno.seekSync(file.rid, 6, Deno.SeekMode.Start);
+ * console.log(cursorPosition); // 6
+ * const buf = new Uint8Array(100);
+ * file.readSync(buf);
+ * console.log(new TextDecoder().decode(buf)); // "world"
+ * file.close();
+ * ```
+ *
+ * The seek modes work as follows:
+ *
+ * ```ts
+ * // Given file.rid pointing to file with "Hello world", which is 11 bytes long:
+ * const file = Deno.openSync(
+ * "hello.txt",
+ * { read: true, write: true, truncate: true, create: true },
+ * );
+ * Deno.writeSync(file.rid, new TextEncoder().encode("Hello world"));
+ *
+ * // Seek 6 bytes from the start of the file
+ * console.log(Deno.seekSync(file.rid, 6, Deno.SeekMode.Start)); // "6"
+ * // Seek 2 more bytes from the current position
+ * console.log(Deno.seekSync(file.rid, 2, Deno.SeekMode.Current)); // "8"
+ * // Seek backwards 2 bytes from the end of the file
+ * console.log(Deno.seekSync(file.rid, -2, Deno.SeekMode.End)); // "9" (e.g. 11-2)
+ * file.close();
+ * ```
+ *
+ * @category I/O
+ */
+ export function seekSync(
+ rid: number,
+ offset: number,
+ whence: SeekMode,
+ ): number;
+
+ /**
+ * Flushes any pending data and metadata operations of the given file stream
+ * to disk.
+ *
+ * ```ts
+ * const file = await Deno.open(
+ * "my_file.txt",
+ * { read: true, write: true, create: true },
+ * );
+ * await Deno.write(file.rid, new TextEncoder().encode("Hello World"));
+ * await Deno.ftruncate(file.rid, 1);
+ * await Deno.fsync(file.rid);
+ * console.log(new TextDecoder().decode(await Deno.readFile("my_file.txt"))); // H
+ * ```
+ *
+ * @category I/O
+ */
+ export function fsync(rid: number): Promise<void>;
+
+ /**
+ * Synchronously flushes any pending data and metadata operations of the given
+ * file stream to disk.
+ *
+ * ```ts
+ * const file = Deno.openSync(
+ * "my_file.txt",
+ * { read: true, write: true, create: true },
+ * );
+ * Deno.writeSync(file.rid, new TextEncoder().encode("Hello World"));
+ * Deno.ftruncateSync(file.rid, 1);
+ * Deno.fsyncSync(file.rid);
+ * console.log(new TextDecoder().decode(Deno.readFileSync("my_file.txt"))); // H
+ * ```
+ *
+ * @category I/O
+ */
+ export function fsyncSync(rid: number): void;
+
+ /**
+ * Flushes any pending data operations of the given file stream to disk.
+ * ```ts
+ * const file = await Deno.open(
+ * "my_file.txt",
+ * { read: true, write: true, create: true },
+ * );
+ * await Deno.write(file.rid, new TextEncoder().encode("Hello World"));
+ * await Deno.fdatasync(file.rid);
+ * console.log(new TextDecoder().decode(await Deno.readFile("my_file.txt"))); // Hello World
+ * ```
+ *
+ * @category I/O
+ */
+ export function fdatasync(rid: number): Promise<void>;
+
+ /**
+ * Synchronously flushes any pending data operations of the given file stream
+ * to disk.
+ *
+ * ```ts
+ * const file = Deno.openSync(
+ * "my_file.txt",
+ * { read: true, write: true, create: true },
+ * );
+ * Deno.writeSync(file.rid, new TextEncoder().encode("Hello World"));
+ * Deno.fdatasyncSync(file.rid);
+ * console.log(new TextDecoder().decode(Deno.readFileSync("my_file.txt"))); // Hello World
+ * ```
+ *
+ * @category I/O
+ */
+ export function fdatasyncSync(rid: number): void;
+
+ /** Close the given resource ID (`rid`) which has been previously opened, such
+ * as via opening or creating a file. Closing a file when you are finished
+ * with it is important to avoid leaking resources.
+ *
+ * ```ts
+ * const file = await Deno.open("my_file.txt");
+ * // do work with "file" object
+ * Deno.close(file.rid);
+ * ```
+ *
+ * @category I/O
+ */
+ export function close(rid: number): void;
+
+ /** The Deno abstraction for reading and writing files.
+ *
+ * This is the most straight forward way of handling files within Deno and is
+ * recommended over using the discreet functions within the `Deno` namespace.
+ *
+ * ```ts
+ * const file = await Deno.open("/foo/bar.txt", { read: true });
+ * const fileInfo = await file.stat();
+ * if (fileInfo.isFile) {
+ * const buf = new Uint8Array(100);
+ * const numberOfBytesRead = await file.read(buf); // 11 bytes
+ * const text = new TextDecoder().decode(buf); // "hello world"
+ * }
+ * file.close();
+ * ```
+ *
+ * @category File System
+ */
+ export class FsFile
+ implements
+ Reader,
+ ReaderSync,
+ Writer,
+ WriterSync,
+ Seeker,
+ SeekerSync,
+ Closer {
+ /** The resource ID associated with the file instance. The resource ID
+ * should be considered an opaque reference to resource. */
+ readonly rid: number;
+ /** A {@linkcode ReadableStream} instance representing to the byte contents
+ * of the file. This makes it easy to interoperate with other web streams
+ * based APIs.
+ *
+ * ```ts
+ * const file = await Deno.open("my_file.txt", { read: true });
+ * const decoder = new TextDecoder();
+ * for await (const chunk of file.readable) {
+ * console.log(decoder.decode(chunk));
+ * }
+ * file.close();
+ * ```
+ */
+ readonly readable: ReadableStream<Uint8Array>;
+ /** A {@linkcode WritableStream} instance to write the contents of the
+ * file. This makes it easy to interoperate with other web streams based
+ * APIs.
+ *
+ * ```ts
+ * const items = ["hello", "world"];
+ * const file = await Deno.open("my_file.txt", { write: true });
+ * const encoder = new TextEncoder();
+ * const writer = file.writable.getWriter();
+ * for (const item of items) {
+ * await writer.write(encoder.encode(item));
+ * }
+ * file.close();
+ * ```
+ */
+ readonly writable: WritableStream<Uint8Array>;
+ /** The constructor which takes a resource ID. Generally `FsFile` should
+ * not be constructed directly. Instead use {@linkcode Deno.open} or
+ * {@linkcode Deno.openSync} to create a new instance of `FsFile`. */
+ constructor(rid: number);
+ /** Write the contents of the array buffer (`p`) to the file.
+ *
+ * Resolves to the number of bytes written.
+ *
+ * **It is not guaranteed that the full buffer will be written in a single
+ * call.**
+ *
+ * ```ts
+ * const encoder = new TextEncoder();
+ * const data = encoder.encode("Hello world");
+ * const file = await Deno.open("/foo/bar.txt", { write: true });
+ * const bytesWritten = await file.write(data); // 11
+ * file.close();
+ * ```
+ *
+ * @category I/O
+ */
+ write(p: Uint8Array): Promise<number>;
+ /** Synchronously write the contents of the array buffer (`p`) to the file.
+ *
+ * Returns the number of bytes written.
+ *
+ * **It is not guaranteed that the full buffer will be written in a single
+ * call.**
+ *
+ * ```ts
+ * const encoder = new TextEncoder();
+ * const data = encoder.encode("Hello world");
+ * const file = Deno.openSync("/foo/bar.txt", { write: true });
+ * const bytesWritten = file.writeSync(data); // 11
+ * file.close();
+ * ```
+ */
+ writeSync(p: Uint8Array): number;
+ /** Truncates (or extends) the file to reach the specified `len`. If `len`
+ * is not specified, then the entire file contents are truncated.
+ *
+ * ### Truncate the entire file
+ *
+ * ```ts
+ * const file = await Deno.open("my_file.txt", { write: true });
+ * await file.truncate();
+ * file.close();
+ * ```
+ *
+ * ### Truncate part of the file
+ *
+ * ```ts
+ * // if "my_file.txt" contains the text "hello world":
+ * const file = await Deno.open("my_file.txt", { write: true });
+ * await file.truncate(7);
+ * const buf = new Uint8Array(100);
+ * await file.read(buf);
+ * const text = new TextDecoder().decode(buf); // "hello w"
+ * file.close();
+ * ```
+ */
+ truncate(len?: number): Promise<void>;
+ /** Synchronously truncates (or extends) the file to reach the specified
+ * `len`. If `len` is not specified, then the entire file contents are
+ * truncated.
+ *
+ * ### Truncate the entire file
+ *
+ * ```ts
+ * const file = Deno.openSync("my_file.txt", { write: true });
+ * file.truncateSync();
+ * file.close();
+ * ```
+ *
+ * ### Truncate part of the file
+ *
+ * ```ts
+ * // if "my_file.txt" contains the text "hello world":
+ * const file = Deno.openSync("my_file.txt", { write: true });
+ * file.truncateSync(7);
+ * const buf = new Uint8Array(100);
+ * file.readSync(buf);
+ * const text = new TextDecoder().decode(buf); // "hello w"
+ * file.close();
+ * ```
+ */
+ truncateSync(len?: number): void;
+ /** Read the file into an array buffer (`p`).
+ *
+ * Resolves to either the number of bytes read during the operation or EOF
+ * (`null`) if there was nothing more to read.
+ *
+ * It is possible for a read to successfully return with `0` bytes. This
+ * does not indicate EOF.
+ *
+ * **It is not guaranteed that the full buffer will be read in a single
+ * call.**
+ *
+ * ```ts
+ * // if "/foo/bar.txt" contains the text "hello world":
+ * const file = await Deno.open("/foo/bar.txt");
+ * const buf = new Uint8Array(100);
+ * const numberOfBytesRead = await file.read(buf); // 11 bytes
+ * const text = new TextDecoder().decode(buf); // "hello world"
+ * file.close();
+ * ```
+ */
+ read(p: Uint8Array): Promise<number | null>;
+ /** Synchronously read from the file into an array buffer (`p`).
+ *
+ * Returns either the number of bytes read during the operation or EOF
+ * (`null`) if there was nothing more to read.
+ *
+ * It is possible for a read to successfully return with `0` bytes. This
+ * does not indicate EOF.
+ *
+ * **It is not guaranteed that the full buffer will be read in a single
+ * call.**
+ *
+ * ```ts
+ * // if "/foo/bar.txt" contains the text "hello world":
+ * const file = Deno.openSync("/foo/bar.txt");
+ * const buf = new Uint8Array(100);
+ * const numberOfBytesRead = file.readSync(buf); // 11 bytes
+ * const text = new TextDecoder().decode(buf); // "hello world"
+ * file.close();
+ * ```
+ */
+ readSync(p: Uint8Array): number | null;
+ /** Seek to the given `offset` under mode given by `whence`. The call
+ * resolves to the new position within the resource (bytes from the start).
+ *
+ * ```ts
+ * // Given file pointing to file with "Hello world", which is 11 bytes long:
+ * const file = await Deno.open(
+ * "hello.txt",
+ * { read: true, write: true, truncate: true, create: true },
+ * );
+ * await file.write(new TextEncoder().encode("Hello world"));
+ *
+ * // advance cursor 6 bytes
+ * const cursorPosition = await file.seek(6, Deno.SeekMode.Start);
+ * console.log(cursorPosition); // 6
+ * const buf = new Uint8Array(100);
+ * await file.read(buf);
+ * console.log(new TextDecoder().decode(buf)); // "world"
+ * file.close();
+ * ```
+ *
+ * The seek modes work as follows:
+ *
+ * ```ts
+ * // Given file.rid pointing to file with "Hello world", which is 11 bytes long:
+ * const file = await Deno.open(
+ * "hello.txt",
+ * { read: true, write: true, truncate: true, create: true },
+ * );
+ * await file.write(new TextEncoder().encode("Hello world"));
+ *
+ * // Seek 6 bytes from the start of the file
+ * console.log(await file.seek(6, Deno.SeekMode.Start)); // "6"
+ * // Seek 2 more bytes from the current position
+ * console.log(await file.seek(2, Deno.SeekMode.Current)); // "8"
+ * // Seek backwards 2 bytes from the end of the file
+ * console.log(await file.seek(-2, Deno.SeekMode.End)); // "9" (e.g. 11-2)
+ * ```
+ */
+ seek(offset: number, whence: SeekMode): Promise<number>;
+ /** Synchronously seek to the given `offset` under mode given by `whence`.
+ * The new position within the resource (bytes from the start) is returned.
+ *
+ * ```ts
+ * const file = Deno.openSync(
+ * "hello.txt",
+ * { read: true, write: true, truncate: true, create: true },
+ * );
+ * file.writeSync(new TextEncoder().encode("Hello world"));
+ *
+ * // advance cursor 6 bytes
+ * const cursorPosition = file.seekSync(6, Deno.SeekMode.Start);
+ * console.log(cursorPosition); // 6
+ * const buf = new Uint8Array(100);
+ * file.readSync(buf);
+ * console.log(new TextDecoder().decode(buf)); // "world"
+ * file.close();
+ * ```
+ *
+ * The seek modes work as follows:
+ *
+ * ```ts
+ * // Given file.rid pointing to file with "Hello world", which is 11 bytes long:
+ * const file = Deno.openSync(
+ * "hello.txt",
+ * { read: true, write: true, truncate: true, create: true },
+ * );
+ * file.writeSync(new TextEncoder().encode("Hello world"));
+ *
+ * // Seek 6 bytes from the start of the file
+ * console.log(file.seekSync(6, Deno.SeekMode.Start)); // "6"
+ * // Seek 2 more bytes from the current position
+ * console.log(file.seekSync(2, Deno.SeekMode.Current)); // "8"
+ * // Seek backwards 2 bytes from the end of the file
+ * console.log(file.seekSync(-2, Deno.SeekMode.End)); // "9" (e.g. 11-2)
+ * file.close();
+ * ```
+ */
+ seekSync(offset: number, whence: SeekMode): number;
+ /** Resolves to a {@linkcode Deno.FileInfo} for the file.
+ *
+ * ```ts
+ * import { assert } from "https://deno.land/std/testing/asserts.ts";
+ *
+ * const file = await Deno.open("hello.txt");
+ * const fileInfo = await file.stat();
+ * assert(fileInfo.isFile);
+ * file.close();
+ * ```
+ */
+ stat(): Promise<FileInfo>;
+ /** Synchronously returns a {@linkcode Deno.FileInfo} for the file.
+ *
+ * ```ts
+ * import { assert } from "https://deno.land/std/testing/asserts.ts";
+ *
+ * const file = Deno.openSync("hello.txt")
+ * const fileInfo = file.statSync();
+ * assert(fileInfo.isFile);
+ * file.close();
+ * ```
+ */
+ statSync(): FileInfo;
+ /** Close the file. Closing a file when you are finished with it is
+ * important to avoid leaking resources.
+ *
+ * ```ts
+ * const file = await Deno.open("my_file.txt");
+ * // do work with "file" object
+ * file.close();
+ * ```
+ */
+ close(): void;
+ }
+
+ /**
+ * The Deno abstraction for reading and writing files.
+ *
+ * @deprecated Use {@linkcode Deno.FsFile} instead. `Deno.File` will be
+ * removed in the future.
+ * @category File System
+ */
+ export const File: typeof FsFile;
+
+ /** Gets the size of the console as columns/rows.
+ *
+ * ```ts
+ * const { columns, rows } = Deno.consoleSize();
+ * ```
+ *
+ * @category I/O
+ */
+ export function consoleSize(): {
+ columns: number;
+ rows: number;
+ };
+
+ /** @category I/O */
+ export interface SetRawOptions {
+ /**
+ * The `cbreak` option can be used to indicate that characters that
+ * correspond to a signal should still be generated. When disabling raw
+ * mode, this option is ignored. This functionality currently only works on
+ * Linux and Mac OS.
+ */
+ cbreak: boolean;
+ }
+
+ /** A reference to `stdin` which can be used to read directly from `stdin`.
+ * It implements the Deno specific {@linkcode Reader}, {@linkcode ReaderSync},
+ * and {@linkcode Closer} interfaces as well as provides a
+ * {@linkcode ReadableStream} interface.
+ *
+ * ### Reading chunks from the readable stream
+ *
+ * ```ts
+ * const decoder = new TextDecoder();
+ * for await (const chunk of Deno.stdin.readable) {
+ * const text = decoder.decode(chunk);
+ * // do something with the text
+ * }
+ * ```
+ *
+ * @category I/O
+ */
+ export const stdin: Reader & ReaderSync & Closer & {
+ /** The resource ID assigned to `stdin`. This can be used with the discreet
+ * I/O functions in the `Deno` namespace. */
+ readonly rid: number;
+ /** A readable stream interface to `stdin`. */
+ readonly readable: ReadableStream<Uint8Array>;
+ /**
+ * Set TTY to be under raw mode or not. In raw mode, characters are read and
+ * returned as is, without being processed. All special processing of
+ * characters by the terminal is disabled, including echoing input
+ * characters. Reading from a TTY device in raw mode is faster than reading
+ * from a TTY device in canonical mode.
+ *
+ * ```ts
+ * Deno.stdin.setRaw(true, { cbreak: true });
+ * ```
+ *
+ * @category I/O
+ */
+ setRaw(mode: boolean, options?: SetRawOptions): void;
+ };
+ /** A reference to `stdout` which can be used to write directly to `stdout`.
+ * It implements the Deno specific {@linkcode Writer}, {@linkcode WriterSync},
+ * and {@linkcode Closer} interfaces as well as provides a
+ * {@linkcode WritableStream} interface.
+ *
+ * These are low level constructs, and the {@linkcode console} interface is a
+ * more straight forward way to interact with `stdout` and `stderr`.
+ *
+ * @category I/O
+ */
+ export const stdout: Writer & WriterSync & Closer & {
+ /** The resource ID assigned to `stdout`. This can be used with the discreet
+ * I/O functions in the `Deno` namespace. */
+ readonly rid: number;
+ /** A writable stream interface to `stdout`. */
+ readonly writable: WritableStream<Uint8Array>;
+ };
+ /** A reference to `stderr` which can be used to write directly to `stderr`.
+ * It implements the Deno specific {@linkcode Writer}, {@linkcode WriterSync},
+ * and {@linkcode Closer} interfaces as well as provides a
+ * {@linkcode WritableStream} interface.
+ *
+ * These are low level constructs, and the {@linkcode console} interface is a
+ * more straight forward way to interact with `stdout` and `stderr`.
+ *
+ * @category I/O
+ */
+ export const stderr: Writer & WriterSync & Closer & {
+ /** The resource ID assigned to `stderr`. This can be used with the discreet
+ * I/O functions in the `Deno` namespace. */
+ readonly rid: number;
+ /** A writable stream interface to `stderr`. */
+ readonly writable: WritableStream<Uint8Array>;
+ };
+
+ /**
+ * Options which can be set when doing {@linkcode Deno.open} and
+ * {@linkcode Deno.openSync}.
+ *
+ * @category File System */
+ export interface OpenOptions {
+ /** Defaults to `true`. Sets the option for read access. This option, when `true`, means that
+ * the file should be read-able if opened. */
+ read?: boolean;
+ /** Defaults to `false`. Sets the option for write access. This option, when `true`, means that
+ * the file should be write-able if opened. If the file already exists,
+ * any write calls on it will overwrite its contents, by default without
+ * truncating it. */
+ write?: boolean;
+ /** Defaults to `false`. Sets the option for the append mode. This option, when `true`, means
+ * that writes will append to a file instead of overwriting previous
+ * contents.
+ *
+ * Note that setting `{ write: true, append: true }` has the same effect as
+ * setting only `{ append: true }`. */
+ append?: boolean;
+ /** Defaults to `false`. Sets the option for truncating a previous file. If a file is
+ * successfully opened with this option set it will truncate the file to `0`
+ * size if it already exists. The file must be opened with write access
+ * for truncate to work. */
+ truncate?: boolean;
+ /** Defaults to `false`. Sets the option to allow creating a new file, if one doesn't already
+ * exist at the specified path. Requires write or append access to be
+ * used. */
+ create?: boolean;
+ /** Defaults to `false`. If set to `true`, no file, directory, or symlink is
+ * allowed to exist at the target location. Requires write or append
+ * access to be used. When createNew is set to `true`, create and truncate
+ * are ignored. */
+ createNew?: boolean;
+ /** Permissions to use if creating the file (defaults to `0o666`, before
+ * the process's umask).
+ *
+ * Ignored on Windows. */
+ mode?: number;
+ }
+
+ /**
+ * Options which can be set when using {@linkcode Deno.readFile} or
+ * {@linkcode Deno.readFileSync}.
+ *
+ * @category File System */
+ export interface ReadFileOptions {
+ /**
+ * An abort signal to allow cancellation of the file read operation.
+ * If the signal becomes aborted the readFile operation will be stopped
+ * and the promise returned will be rejected with an AbortError.
+ */
+ signal?: AbortSignal;
+ }
+
+ /**
+ * Check if a given resource id (`rid`) is a TTY (a terminal).
+ *
+ * ```ts
+ * // This example is system and context specific
+ * const nonTTYRid = Deno.openSync("my_file.txt").rid;
+ * const ttyRid = Deno.openSync("/dev/tty6").rid;
+ * console.log(Deno.isatty(nonTTYRid)); // false
+ * console.log(Deno.isatty(ttyRid)); // true
+ * Deno.close(nonTTYRid);
+ * Deno.close(ttyRid);
+ * ```
+ *
+ * @category I/O
+ */
+ export function isatty(rid: number): boolean;
+
+ /**
+ * A variable-sized buffer of bytes with `read()` and `write()` methods.
+ *
+ * @deprecated Use [`Buffer`](https://deno.land/std/io/buffer.ts?s=Buffer)
+ * from [`std/io/buffer.ts`](https://deno.land/std/io/buffer.ts) instead.
+ * `Deno.Buffer` will be removed in the future.
+ *
+ * @category I/O
+ */
+ export class Buffer implements Reader, ReaderSync, Writer, WriterSync {
+ constructor(ab?: ArrayBuffer);
+ /** Returns a slice holding the unread portion of the buffer.
+ *
+ * The slice is valid for use only until the next buffer modification (that
+ * is, only until the next call to a method like `read()`, `write()`,
+ * `reset()`, or `truncate()`). If `options.copy` is false the slice aliases the buffer content at
+ * least until the next buffer modification, so immediate changes to the
+ * slice will affect the result of future reads.
+ * @param options Defaults to `{ copy: true }`
+ */
+ bytes(options?: { copy?: boolean }): Uint8Array;
+ /** Returns whether the unread portion of the buffer is empty. */
+ empty(): boolean;
+ /** A read only number of bytes of the unread portion of the buffer. */
+ readonly length: number;
+ /** The read only capacity of the buffer's underlying byte slice, that is,
+ * the total space allocated for the buffer's data. */
+ readonly capacity: number;
+ /** Discards all but the first `n` unread bytes from the buffer but
+ * continues to use the same allocated storage. It throws if `n` is
+ * negative or greater than the length of the buffer. */
+ truncate(n: number): void;
+ /** Resets the buffer to be empty, but it retains the underlying storage for
+ * use by future writes. `.reset()` is the same as `.truncate(0)`. */
+ reset(): void;
+ /** Reads the next `p.length` bytes from the buffer or until the buffer is
+ * drained. Returns the number of bytes read. If the buffer has no data to
+ * return, the return is EOF (`null`). */
+ readSync(p: Uint8Array): number | null;
+ /** Reads the next `p.length` bytes from the buffer or until the buffer is
+ * drained. Resolves to the number of bytes read. If the buffer has no
+ * data to return, resolves to EOF (`null`).
+ *
+ * NOTE: This methods reads bytes synchronously; it's provided for
+ * compatibility with `Reader` interfaces.
+ */
+ read(p: Uint8Array): Promise<number | null>;
+ writeSync(p: Uint8Array): number;
+ /** NOTE: This methods writes bytes synchronously; it's provided for
+ * compatibility with `Writer` interface. */
+ write(p: Uint8Array): Promise<number>;
+ /** Grows the buffer's capacity, if necessary, to guarantee space for
+ * another `n` bytes. After `.grow(n)`, at least `n` bytes can be written to
+ * the buffer without another allocation. If `n` is negative, `.grow()` will
+ * throw. If the buffer can't grow it will throw an error.
+ *
+ * Based on Go Lang's
+ * [Buffer.Grow](https://golang.org/pkg/bytes/#Buffer.Grow). */
+ grow(n: number): void;
+ /** Reads data from `r` until EOF (`null`) and appends it to the buffer,
+ * growing the buffer as needed. It resolves to the number of bytes read.
+ * If the buffer becomes too large, `.readFrom()` will reject with an error.
+ *
+ * Based on Go Lang's
+ * [Buffer.ReadFrom](https://golang.org/pkg/bytes/#Buffer.ReadFrom). */
+ readFrom(r: Reader): Promise<number>;
+ /** Reads data from `r` until EOF (`null`) and appends it to the buffer,
+ * growing the buffer as needed. It returns the number of bytes read. If the
+ * buffer becomes too large, `.readFromSync()` will throw an error.
+ *
+ * Based on Go Lang's
+ * [Buffer.ReadFrom](https://golang.org/pkg/bytes/#Buffer.ReadFrom). */
+ readFromSync(r: ReaderSync): number;
+ }
+
+ /**
+ * Read Reader `r` until EOF (`null`) and resolve to the content as
+ * Uint8Array`.
+ *
+ * @deprecated Use
+ * [`readAll`](https://deno.land/std/streams/conversion.ts?s=readAll) from
+ * [`std/streams/conversion.ts`](https://deno.land/std/streams/conversion.ts)
+ * instead. `Deno.readAll` will be removed in the future.
+ *
+ * @category I/O
+ */
+ export function readAll(r: Reader): Promise<Uint8Array>;
+
+ /**
+ * Synchronously reads Reader `r` until EOF (`null`) and returns the content
+ * as `Uint8Array`.
+ *
+ * @deprecated Use
+ * [`readAllSync`](https://deno.land/std/streams/conversion.ts?s=readAllSync)
+ * from
+ * [`std/streams/conversion.ts`](https://deno.land/std/streams/conversion.ts)
+ * instead. `Deno.readAllSync` will be removed in the future.
+ *
+ * @category I/O
+ */
+ export function readAllSync(r: ReaderSync): Uint8Array;
+
+ /**
+ * Write all the content of the array buffer (`arr`) to the writer (`w`).
+ *
+ * @deprecated Use
+ * [`writeAll`](https://deno.land/std/streams/conversion.ts?s=writeAll) from
+ * [`std/streams/conversion.ts`](https://deno.land/std/streams/conversion.ts)
+ * instead. `Deno.writeAll` will be removed in the future.
+ *
+ * @category I/O
+ */
+ export function writeAll(w: Writer, arr: Uint8Array): Promise<void>;
+
+ /**
+ * Synchronously write all the content of the array buffer (`arr`) to the
+ * writer (`w`).
+ *
+ * @deprecated Use
+ * [`writeAllSync`](https://deno.land/std/streams/conversion.ts?s=writeAllSync)
+ * from
+ * [`std/streams/conversion.ts`](https://deno.land/std/streams/conversion.ts)
+ * instead. `Deno.writeAllSync` will be removed in the future.
+ *
+ * @category I/O
+ */
+ export function writeAllSync(w: WriterSync, arr: Uint8Array): void;
+
+ /**
+ * Options which can be set when using {@linkcode Deno.mkdir} and
+ * {@linkcode Deno.mkdirSync}.
+ *
+ * @category File System */
+ export interface MkdirOptions {
+ /** Defaults to `false`. If set to `true`, means that any intermediate
+ * directories will also be created (as with the shell command `mkdir -p`).
+ *
+ * Intermediate directories are created with the same permissions.
+ *
+ * When recursive is set to `true`, succeeds silently (without changing any
+ * permissions) if a directory already exists at the path, or if the path
+ * is a symlink to an existing directory. */
+ recursive?: boolean;
+ /** Permissions to use when creating the directory (defaults to `0o777`,
+ * before the process's umask).
+ *
+ * Ignored on Windows. */
+ mode?: number;
+ }
+
+ /** Creates a new directory with the specified path.
+ *
+ * ```ts
+ * await Deno.mkdir("new_dir");
+ * await Deno.mkdir("nested/directories", { recursive: true });
+ * await Deno.mkdir("restricted_access_dir", { mode: 0o700 });
+ * ```
+ *
+ * Defaults to throwing error if the directory already exists.
+ *
+ * Requires `allow-write` permission.
+ *
+ * @tags allow-write
+ * @category File System
+ */
+ export function mkdir(
+ path: string | URL,
+ options?: MkdirOptions,
+ ): Promise<void>;
+
+ /** Synchronously creates a new directory with the specified path.
+ *
+ * ```ts
+ * Deno.mkdirSync("new_dir");
+ * Deno.mkdirSync("nested/directories", { recursive: true });
+ * Deno.mkdirSync("restricted_access_dir", { mode: 0o700 });
+ * ```
+ *
+ * Defaults to throwing error if the directory already exists.
+ *
+ * Requires `allow-write` permission.
+ *
+ * @tags allow-write
+ * @category File System
+ */
+ export function mkdirSync(path: string | URL, options?: MkdirOptions): void;
+
+ /**
+ * Options which can be set when using {@linkcode Deno.makeTempDir},
+ * {@linkcode Deno.makeTempDirSync}, {@linkcode Deno.makeTempFile}, and
+ * {@linkcode Deno.makeTempFileSync}.
+ *
+ * @category File System */
+ export interface MakeTempOptions {
+ /** Directory where the temporary directory should be created (defaults to
+ * the env variable `TMPDIR`, or the system's default, usually `/tmp`).
+ *
+ * Note that if the passed `dir` is relative, the path returned by
+ * `makeTempFile()` and `makeTempDir()` will also be relative. Be mindful of
+ * this when changing working directory. */
+ dir?: string;
+ /** String that should precede the random portion of the temporary
+ * directory's name. */
+ prefix?: string;
+ /** String that should follow the random portion of the temporary
+ * directory's name. */
+ suffix?: string;
+ }
+
+ /** Creates a new temporary directory in the default directory for temporary
+ * files, unless `dir` is specified. Other optional options include
+ * prefixing and suffixing the directory name with `prefix` and `suffix`
+ * respectively.
+ *
+ * This call resolves to the full path to the newly created directory.
+ *
+ * Multiple programs calling this function simultaneously will create different
+ * directories. It is the caller's responsibility to remove the directory when
+ * no longer needed.
+ *
+ * ```ts
+ * const tempDirName0 = await Deno.makeTempDir(); // e.g. /tmp/2894ea76
+ * const tempDirName1 = await Deno.makeTempDir({ prefix: 'my_temp' }); // e.g. /tmp/my_temp339c944d
+ * ```
+ *
+ * Requires `allow-write` permission.
+ *
+ * @tags allow-write
+ * @category File System
+ */
+ // TODO(ry) Doesn't check permissions.
+ export function makeTempDir(options?: MakeTempOptions): Promise<string>;
+
+ /** Synchronously creates a new temporary directory in the default directory
+ * for temporary files, unless `dir` is specified. Other optional options
+ * include prefixing and suffixing the directory name with `prefix` and
+ * `suffix` respectively.
+ *
+ * The full path to the newly created directory is returned.
+ *
+ * Multiple programs calling this function simultaneously will create different
+ * directories. It is the caller's responsibility to remove the directory when
+ * no longer needed.
+ *
+ * ```ts
+ * const tempDirName0 = Deno.makeTempDirSync(); // e.g. /tmp/2894ea76
+ * const tempDirName1 = Deno.makeTempDirSync({ prefix: 'my_temp' }); // e.g. /tmp/my_temp339c944d
+ * ```
+ *
+ * Requires `allow-write` permission.
+ *
+ * @tags allow-write
+ * @category File System
+ */
+ // TODO(ry) Doesn't check permissions.
+ export function makeTempDirSync(options?: MakeTempOptions): string;
+
+ /** Creates a new temporary file in the default directory for temporary
+ * files, unless `dir` is specified.
+ *
+ * Other options include prefixing and suffixing the directory name with
+ * `prefix` and `suffix` respectively.
+ *
+ * This call resolves to the full path to the newly created file.
+ *
+ * Multiple programs calling this function simultaneously will create
+ * different files. It is the caller's responsibility to remove the file when
+ * no longer needed.
+ *
+ * ```ts
+ * const tmpFileName0 = await Deno.makeTempFile(); // e.g. /tmp/419e0bf2
+ * const tmpFileName1 = await Deno.makeTempFile({ prefix: 'my_temp' }); // e.g. /tmp/my_temp754d3098
+ * ```
+ *
+ * Requires `allow-write` permission.
+ *
+ * @tags allow-write
+ * @category File System
+ */
+ export function makeTempFile(options?: MakeTempOptions): Promise<string>;
+
+ /** Synchronously creates a new temporary file in the default directory for
+ * temporary files, unless `dir` is specified.
+ *
+ * Other options include prefixing and suffixing the directory name with
+ * `prefix` and `suffix` respectively.
+ *
+ * The full path to the newly created file is returned.
+ *
+ * Multiple programs calling this function simultaneously will create
+ * different files. It is the caller's responsibility to remove the file when
+ * no longer needed.
+ *
+ * ```ts
+ * const tempFileName0 = Deno.makeTempFileSync(); // e.g. /tmp/419e0bf2
+ * const tempFileName1 = Deno.makeTempFileSync({ prefix: 'my_temp' }); // e.g. /tmp/my_temp754d3098
+ * ```
+ *
+ * Requires `allow-write` permission.
+ *
+ * @tags allow-write
+ * @category File System
+ */
+ export function makeTempFileSync(options?: MakeTempOptions): string;
+
+ /** Changes the permission of a specific file/directory of specified path.
+ * Ignores the process's umask.
+ *
+ * ```ts
+ * await Deno.chmod("/path/to/file", 0o666);
+ * ```
+ *
+ * The mode is a sequence of 3 octal numbers. The first/left-most number
+ * specifies the permissions for the owner. The second number specifies the
+ * permissions for the group. The last/right-most number specifies the
+ * permissions for others. For example, with a mode of 0o764, the owner (7)
+ * can read/write/execute, the group (6) can read/write and everyone else (4)
+ * can read only.
+ *
+ * | Number | Description |
+ * | ------ | ----------- |
+ * | 7 | read, write, and execute |
+ * | 6 | read and write |
+ * | 5 | read and execute |
+ * | 4 | read only |
+ * | 3 | write and execute |
+ * | 2 | write only |
+ * | 1 | execute only |
+ * | 0 | no permission |
+ *
+ * NOTE: This API currently throws on Windows
+ *
+ * Requires `allow-write` permission.
+ *
+ * @tags allow-write
+ * @category File System
+ */
+ export function chmod(path: string | URL, mode: number): Promise<void>;
+
+ /** Synchronously changes the permission of a specific file/directory of
+ * specified path. Ignores the process's umask.
+ *
+ * ```ts
+ * Deno.chmodSync("/path/to/file", 0o666);
+ * ```
+ *
+ * For a full description, see {@linkcode Deno.chmod}.
+ *
+ * NOTE: This API currently throws on Windows
+ *
+ * Requires `allow-write` permission.
+ *
+ * @tags allow-write
+ * @category File System
+ */
+ export function chmodSync(path: string | URL, mode: number): void;
+
+ /** Change owner of a regular file or directory.
+ *
+ * This functionality is not available on Windows.
+ *
+ * ```ts
+ * await Deno.chown("myFile.txt", 1000, 1002);
+ * ```
+ *
+ * Requires `allow-write` permission.
+ *
+ * Throws Error (not implemented) if executed on Windows.
+ *
+ * @tags allow-write
+ * @category File System
+ *
+ * @param path path to the file
+ * @param uid user id (UID) of the new owner, or `null` for no change
+ * @param gid group id (GID) of the new owner, or `null` for no change
+ */
+ export function chown(
+ path: string | URL,
+ uid: number | null,
+ gid: number | null,
+ ): Promise<void>;
+
+ /** Synchronously change owner of a regular file or directory.
+ *
+ * This functionality is not available on Windows.
+ *
+ * ```ts
+ * Deno.chownSync("myFile.txt", 1000, 1002);
+ * ```
+ *
+ * Requires `allow-write` permission.
+ *
+ * Throws Error (not implemented) if executed on Windows.
+ *
+ * @tags allow-write
+ * @category File System
+ *
+ * @param path path to the file
+ * @param uid user id (UID) of the new owner, or `null` for no change
+ * @param gid group id (GID) of the new owner, or `null` for no change
+ */
+ export function chownSync(
+ path: string | URL,
+ uid: number | null,
+ gid: number | null,
+ ): void;
+
+ /**
+ * Options which can be set when using {@linkcode Deno.remove} and
+ * {@linkcode Deno.removeSync}.
+ *
+ * @category File System */
+ export interface RemoveOptions {
+ /** Defaults to `false`. If set to `true`, path will be removed even if
+ * it's a non-empty directory. */
+ recursive?: boolean;
+ }
+
+ /** Removes the named file or directory.
+ *
+ * ```ts
+ * await Deno.remove("/path/to/empty_dir/or/file");
+ * await Deno.remove("/path/to/populated_dir/or/file", { recursive: true });
+ * ```
+ *
+ * Throws error if permission denied, path not found, or path is a non-empty
+ * directory and the `recursive` option isn't set to `true`.
+ *
+ * Requires `allow-write` permission.
+ *
+ * @tags allow-write
+ * @category File System
+ */
+ export function remove(
+ path: string | URL,
+ options?: RemoveOptions,
+ ): Promise<void>;
+
+ /** Synchronously removes the named file or directory.
+ *
+ * ```ts
+ * Deno.removeSync("/path/to/empty_dir/or/file");
+ * Deno.removeSync("/path/to/populated_dir/or/file", { recursive: true });
+ * ```
+ *
+ * Throws error if permission denied, path not found, or path is a non-empty
+ * directory and the `recursive` option isn't set to `true`.
+ *
+ * Requires `allow-write` permission.
+ *
+ * @tags allow-write
+ * @category File System
+ */
+ export function removeSync(path: string | URL, options?: RemoveOptions): void;
+
+ /** Synchronously renames (moves) `oldpath` to `newpath`. Paths may be files or
+ * directories. If `newpath` already exists and is not a directory,
+ * `renameSync()` replaces it. OS-specific restrictions may apply when
+ * `oldpath` and `newpath` are in different directories.
+ *
+ * ```ts
+ * Deno.renameSync("old/path", "new/path");
+ * ```
+ *
+ * On Unix-like OSes, this operation does not follow symlinks at either path.
+ *
+ * It varies between platforms when the operation throws errors, and if so what
+ * they are. It's always an error to rename anything to a non-empty directory.
+ *
+ * Requires `allow-read` and `allow-write` permissions.
+ *
+ * @tags allow-read, allow-write
+ * @category File System
+ */
+ export function renameSync(
+ oldpath: string | URL,
+ newpath: string | URL,
+ ): void;
+
+ /** Renames (moves) `oldpath` to `newpath`. Paths may be files or directories.
+ * If `newpath` already exists and is not a directory, `rename()` replaces it.
+ * OS-specific restrictions may apply when `oldpath` and `newpath` are in
+ * different directories.
+ *
+ * ```ts
+ * await Deno.rename("old/path", "new/path");
+ * ```
+ *
+ * On Unix-like OSes, this operation does not follow symlinks at either path.
+ *
+ * It varies between platforms when the operation throws errors, and if so
+ * what they are. It's always an error to rename anything to a non-empty
+ * directory.
+ *
+ * Requires `allow-read` and `allow-write` permissions.
+ *
+ * @tags allow-read, allow-write
+ * @category File System
+ */
+ export function rename(
+ oldpath: string | URL,
+ newpath: string | URL,
+ ): Promise<void>;
+
+ /** Asynchronously reads and returns the entire contents of a file as an UTF-8
+ * decoded string. Reading a directory throws an error.
+ *
+ * ```ts
+ * const data = await Deno.readTextFile("hello.txt");
+ * console.log(data);
+ * ```
+ *
+ * Requires `allow-read` permission.
+ *
+ * @tags allow-read
+ * @category File System
+ */
+ export function readTextFile(
+ path: string | URL,
+ options?: ReadFileOptions,
+ ): Promise<string>;
+
+ /** Synchronously reads and returns the entire contents of a file as an UTF-8
+ * decoded string. Reading a directory throws an error.
+ *
+ * ```ts
+ * const data = Deno.readTextFileSync("hello.txt");
+ * console.log(data);
+ * ```
+ *
+ * Requires `allow-read` permission.
+ *
+ * @tags allow-read
+ * @category File System
+ */
+ export function readTextFileSync(path: string | URL): string;
+
+ /** Reads and resolves to the entire contents of a file as an array of bytes.
+ * `TextDecoder` can be used to transform the bytes to string if required.
+ * Reading a directory returns an empty data array.
+ *
+ * ```ts
+ * const decoder = new TextDecoder("utf-8");
+ * const data = await Deno.readFile("hello.txt");
+ * console.log(decoder.decode(data));
+ * ```
+ *
+ * Requires `allow-read` permission.
+ *
+ * @tags allow-read
+ * @category File System
+ */
+ export function readFile(
+ path: string | URL,
+ options?: ReadFileOptions,
+ ): Promise<Uint8Array>;
+
+ /** Synchronously reads and returns the entire contents of a file as an array
+ * of bytes. `TextDecoder` can be used to transform the bytes to string if
+ * required. Reading a directory returns an empty data array.
+ *
+ * ```ts
+ * const decoder = new TextDecoder("utf-8");
+ * const data = Deno.readFileSync("hello.txt");
+ * console.log(decoder.decode(data));
+ * ```
+ *
+ * Requires `allow-read` permission.
+ *
+ * @tags allow-read
+ * @category File System
+ */
+ export function readFileSync(path: string | URL): Uint8Array;
+
+ /** Provides information about a file and is returned by
+ * {@linkcode Deno.stat}, {@linkcode Deno.lstat}, {@linkcode Deno.statSync},
+ * and {@linkcode Deno.lstatSync} or from calling `stat()` and `statSync()`
+ * on an {@linkcode Deno.FsFile} instance.
+ *
+ * @category File System
+ */
+ export interface FileInfo {
+ /** True if this is info for a regular file. Mutually exclusive to
+ * `FileInfo.isDirectory` and `FileInfo.isSymlink`. */
+ isFile: boolean;
+ /** True if this is info for a regular directory. Mutually exclusive to
+ * `FileInfo.isFile` and `FileInfo.isSymlink`. */
+ isDirectory: boolean;
+ /** True if this is info for a symlink. Mutually exclusive to
+ * `FileInfo.isFile` and `FileInfo.isDirectory`. */
+ isSymlink: boolean;
+ /** The size of the file, in bytes. */
+ size: number;
+ /** The last modification time of the file. This corresponds to the `mtime`
+ * field from `stat` on Linux/Mac OS and `ftLastWriteTime` on Windows. This
+ * may not be available on all platforms. */
+ mtime: Date | null;
+ /** The last access time of the file. This corresponds to the `atime`
+ * field from `stat` on Unix and `ftLastAccessTime` on Windows. This may not
+ * be available on all platforms. */
+ atime: Date | null;
+ /** The creation time of the file. This corresponds to the `birthtime`
+ * field from `stat` on Mac/BSD and `ftCreationTime` on Windows. This may
+ * not be available on all platforms. */
+ birthtime: Date | null;
+ /** ID of the device containing the file.
+ *
+ * _Linux/Mac OS only._ */
+ dev: number | null;
+ /** Inode number.
+ *
+ * _Linux/Mac OS only._ */
+ ino: number | null;
+ /** **UNSTABLE**: Match behavior with Go on Windows for `mode`.
+ *
+ * The underlying raw `st_mode` bits that contain the standard Unix
+ * permissions for this file/directory. */
+ mode: number | null;
+ /** Number of hard links pointing to this file.
+ *
+ * _Linux/Mac OS only._ */
+ nlink: number | null;
+ /** User ID of the owner of this file.
+ *
+ * _Linux/Mac OS only._ */
+ uid: number | null;
+ /** Group ID of the owner of this file.
+ *
+ * _Linux/Mac OS only._ */
+ gid: number | null;
+ /** Device ID of this file.
+ *
+ * _Linux/Mac OS only._ */
+ rdev: number | null;
+ /** Blocksize for filesystem I/O.
+ *
+ * _Linux/Mac OS only._ */
+ blksize: number | null;
+ /** Number of blocks allocated to the file, in 512-byte units.
+ *
+ * _Linux/Mac OS only._ */
+ blocks: number | null;
+ }
+
+ /** Resolves to the absolute normalized path, with symbolic links resolved.
+ *
+ * ```ts
+ * // e.g. given /home/alice/file.txt and current directory /home/alice
+ * await Deno.symlink("file.txt", "symlink_file.txt");
+ * const realPath = await Deno.realPath("./file.txt");
+ * const realSymLinkPath = await Deno.realPath("./symlink_file.txt");
+ * console.log(realPath); // outputs "/home/alice/file.txt"
+ * console.log(realSymLinkPath); // outputs "/home/alice/file.txt"
+ * ```
+ *
+ * Requires `allow-read` permission for the target path.
+ *
+ * Also requires `allow-read` permission for the `CWD` if the target path is
+ * relative.
+ *
+ * @tags allow-read
+ * @category File System
+ */
+ export function realPath(path: string | URL): Promise<string>;
+
+ /** Synchronously returns absolute normalized path, with symbolic links
+ * resolved.
+ *
+ * ```ts
+ * // e.g. given /home/alice/file.txt and current directory /home/alice
+ * Deno.symlinkSync("file.txt", "symlink_file.txt");
+ * const realPath = Deno.realPathSync("./file.txt");
+ * const realSymLinkPath = Deno.realPathSync("./symlink_file.txt");
+ * console.log(realPath); // outputs "/home/alice/file.txt"
+ * console.log(realSymLinkPath); // outputs "/home/alice/file.txt"
+ * ```
+ *
+ * Requires `allow-read` permission for the target path.
+ *
+ * Also requires `allow-read` permission for the `CWD` if the target path is
+ * relative.
+ *
+ * @tags allow-read
+ * @category File System
+ */
+ export function realPathSync(path: string | URL): string;
+
+ /**
+ * Information about a directory entry returned from {@linkcode Deno.readDir}
+ * and {@linkcode Deno.readDirSync}.
+ *
+ * @category File System */
+ export interface DirEntry {
+ /** The file name of the entry. It is just the entity name and does not
+ * include the full path. */
+ name: string;
+ /** True if this is info for a regular file. Mutually exclusive to
+ * `DirEntry.isDirectory` and `DirEntry.isSymlink`. */
+ isFile: boolean;
+ /** True if this is info for a regular directory. Mutually exclusive to
+ * `DirEntry.isFile` and `DirEntry.isSymlink`. */
+ isDirectory: boolean;
+ /** True if this is info for a symlink. Mutually exclusive to
+ * `DirEntry.isFile` and `DirEntry.isDirectory`. */
+ isSymlink: boolean;
+ }
+
+ /** Reads the directory given by `path` and returns an async iterable of
+ * {@linkcode Deno.DirEntry}.
+ *
+ * ```ts
+ * for await (const dirEntry of Deno.readDir("/")) {
+ * console.log(dirEntry.name);
+ * }
+ * ```
+ *
+ * Throws error if `path` is not a directory.
+ *
+ * Requires `allow-read` permission.
+ *
+ * @tags allow-read
+ * @category File System
+ */
+ export function readDir(path: string | URL): AsyncIterable<DirEntry>;
+
+ /** Synchronously reads the directory given by `path` and returns an iterable
+ * of `Deno.DirEntry`.
+ *
+ * ```ts
+ * for (const dirEntry of Deno.readDirSync("/")) {
+ * console.log(dirEntry.name);
+ * }
+ * ```
+ *
+ * Throws error if `path` is not a directory.
+ *
+ * Requires `allow-read` permission.
+ *
+ * @tags allow-read
+ * @category File System
+ */
+ export function readDirSync(path: string | URL): Iterable<DirEntry>;
+
+ /** Copies the contents and permissions of one file to another specified path,
+ * by default creating a new file if needed, else overwriting. Fails if target
+ * path is a directory or is unwritable.
+ *
+ * ```ts
+ * await Deno.copyFile("from.txt", "to.txt");
+ * ```
+ *
+ * Requires `allow-read` permission on `fromPath`.
+ *
+ * Requires `allow-write` permission on `toPath`.
+ *
+ * @tags allow-read, allow-write
+ * @category File System
+ */
+ export function copyFile(
+ fromPath: string | URL,
+ toPath: string | URL,
+ ): Promise<void>;
+
+ /** Synchronously copies the contents and permissions of one file to another
+ * specified path, by default creating a new file if needed, else overwriting.
+ * Fails if target path is a directory or is unwritable.
+ *
+ * ```ts
+ * Deno.copyFileSync("from.txt", "to.txt");
+ * ```
+ *
+ * Requires `allow-read` permission on `fromPath`.
+ *
+ * Requires `allow-write` permission on `toPath`.
+ *
+ * @tags allow-read, allow-write
+ * @category File System
+ */
+ export function copyFileSync(
+ fromPath: string | URL,
+ toPath: string | URL,
+ ): void;
+
+ /** Resolves to the full path destination of the named symbolic link.
+ *
+ * ```ts
+ * await Deno.symlink("./test.txt", "./test_link.txt");
+ * const target = await Deno.readLink("./test_link.txt"); // full path of ./test.txt
+ * ```
+ *
+ * Throws TypeError if called with a hard link.
+ *
+ * Requires `allow-read` permission.
+ *
+ * @tags allow-read
+ * @category File System
+ */
+ export function readLink(path: string | URL): Promise<string>;
+
+ /** Synchronously returns the full path destination of the named symbolic
+ * link.
+ *
+ * ```ts
+ * Deno.symlinkSync("./test.txt", "./test_link.txt");
+ * const target = Deno.readLinkSync("./test_link.txt"); // full path of ./test.txt
+ * ```
+ *
+ * Throws TypeError if called with a hard link.
+ *
+ * Requires `allow-read` permission.
+ *
+ * @tags allow-read
+ * @category File System
+ */
+ export function readLinkSync(path: string | URL): string;
+
+ /** Resolves to a {@linkcode Deno.FileInfo} for the specified `path`. If
+ * `path` is a symlink, information for the symlink will be returned instead
+ * of what it points to.
+ *
+ * ```ts
+ * import { assert } from "https://deno.land/std/testing/asserts.ts";
+ * const fileInfo = await Deno.lstat("hello.txt");
+ * assert(fileInfo.isFile);
+ * ```
+ *
+ * Requires `allow-read` permission.
+ *
+ * @tags allow-read
+ * @category File System
+ */
+ export function lstat(path: string | URL): Promise<FileInfo>;
+
+ /** Synchronously returns a {@linkcode Deno.FileInfo} for the specified
+ * `path`. If `path` is a symlink, information for the symlink will be
+ * returned instead of what it points to.
+ *
+ * ```ts
+ * import { assert } from "https://deno.land/std/testing/asserts.ts";
+ * const fileInfo = Deno.lstatSync("hello.txt");
+ * assert(fileInfo.isFile);
+ * ```
+ *
+ * Requires `allow-read` permission.
+ *
+ * @tags allow-read
+ * @category File System
+ */
+ export function lstatSync(path: string | URL): FileInfo;
+
+ /** Resolves to a {@linkcode Deno.FileInfo} for the specified `path`. Will
+ * always follow symlinks.
+ *
+ * ```ts
+ * import { assert } from "https://deno.land/std/testing/asserts.ts";
+ * const fileInfo = await Deno.stat("hello.txt");
+ * assert(fileInfo.isFile);
+ * ```
+ *
+ * Requires `allow-read` permission.
+ *
+ * @tags allow-read
+ * @category File System
+ */
+ export function stat(path: string | URL): Promise<FileInfo>;
+
+ /** Synchronously returns a {@linkcode Deno.FileInfo} for the specified
+ * `path`. Will always follow symlinks.
+ *
+ * ```ts
+ * import { assert } from "https://deno.land/std/testing/asserts.ts";
+ * const fileInfo = Deno.statSync("hello.txt");
+ * assert(fileInfo.isFile);
+ * ```
+ *
+ * Requires `allow-read` permission.
+ *
+ * @tags allow-read
+ * @category File System
+ */
+ export function statSync(path: string | URL): FileInfo;
+
+ /** Options for writing to a file.
+ *
+ * @category File System
+ */
+ export interface WriteFileOptions {
+ /** Defaults to `false`. If set to `true`, will append to a file instead of
+ * overwriting previous contents. */
+ append?: boolean;
+ /** Sets the option to allow creating a new file, if one doesn't already
+ * exist at the specified path (defaults to `true`). */
+ create?: boolean;
+ /** Permissions always applied to file. */
+ mode?: number;
+ /** An abort signal to allow cancellation of the file write operation.
+ *
+ * If the signal becomes aborted the write file operation will be stopped
+ * and the promise returned will be rejected with an {@linkcode AbortError}.
+ */
+ signal?: AbortSignal;
+ }
+
+ /** Write `data` to the given `path`, by default creating a new file if
+ * needed, else overwriting.
+ *
+ * ```ts
+ * const encoder = new TextEncoder();
+ * const data = encoder.encode("Hello world\n");
+ * await Deno.writeFile("hello1.txt", data); // overwrite "hello1.txt" or create it
+ * await Deno.writeFile("hello2.txt", data, { create: false }); // only works if "hello2.txt" exists
+ * await Deno.writeFile("hello3.txt", data, { mode: 0o777 }); // set permissions on new file
+ * await Deno.writeFile("hello4.txt", data, { append: true }); // add data to the end of the file
+ * ```
+ *
+ * Requires `allow-write` permission, and `allow-read` if `options.create` is
+ * `false`.
+ *
+ * @tags allow-read, allow-write
+ * @category File System
+ */
+ export function writeFile(
+ path: string | URL,
+ data: Uint8Array,
+ options?: WriteFileOptions,
+ ): Promise<void>;
+
+ /** Synchronously write `data` to the given `path`, by default creating a new
+ * file if needed, else overwriting.
+ *
+ * ```ts
+ * const encoder = new TextEncoder();
+ * const data = encoder.encode("Hello world\n");
+ * Deno.writeFileSync("hello1.txt", data); // overwrite "hello1.txt" or create it
+ * Deno.writeFileSync("hello2.txt", data, { create: false }); // only works if "hello2.txt" exists
+ * Deno.writeFileSync("hello3.txt", data, { mode: 0o777 }); // set permissions on new file
+ * Deno.writeFileSync("hello4.txt", data, { append: true }); // add data to the end of the file
+ * ```
+ *
+ * Requires `allow-write` permission, and `allow-read` if `options.create` is
+ * `false`.
+ *
+ * @tags allow-read, allow-write
+ * @category File System
+ */
+ export function writeFileSync(
+ path: string | URL,
+ data: Uint8Array,
+ options?: WriteFileOptions,
+ ): void;
+
+ /** Write string `data` to the given `path`, by default creating a new file if
+ * needed, else overwriting.
+ *
+ * ```ts
+ * await Deno.writeTextFile("hello1.txt", "Hello world\n"); // overwrite "hello1.txt" or create it
+ * ```
+ *
+ * Requires `allow-write` permission, and `allow-read` if `options.create` is
+ * `false`.
+ *
+ * @tags allow-read, allow-write
+ * @category File System
+ */
+ export function writeTextFile(
+ path: string | URL,
+ data: string,
+ options?: WriteFileOptions,
+ ): Promise<void>;
+
+ /** Synchronously write string `data` to the given `path`, by default creating
+ * a new file if needed, else overwriting.
+ *
+ * ```ts
+ * Deno.writeTextFileSync("hello1.txt", "Hello world\n"); // overwrite "hello1.txt" or create it
+ * ```
+ *
+ * Requires `allow-write` permission, and `allow-read` if `options.create` is
+ * `false`.
+ *
+ * @tags allow-read, allow-write
+ * @category File System
+ */
+ export function writeTextFileSync(
+ path: string | URL,
+ data: string,
+ options?: WriteFileOptions,
+ ): void;
+
+ /** Truncates (or extends) the specified file, to reach the specified `len`.
+ * If `len` is not specified then the entire file contents are truncated.
+ *
+ * ### Truncate the entire file
+ * ```ts
+ * await Deno.truncate("my_file.txt");
+ * ```
+ *
+ * ### Truncate part of the file
+ *
+ * ```
+ * const file = await Deno.makeTempFile();
+ * await Deno.writeFile(file, new TextEncoder().encode("Hello World"));
+ * await Deno.truncate(file, 7);
+ * const data = await Deno.readFile(file);
+ * console.log(new TextDecoder().decode(data)); // "Hello W"
+ * ```
+ *
+ * Requires `allow-write` permission.
+ *
+ * @tags allow-write
+ * @category File System
+ */
+ export function truncate(name: string, len?: number): Promise<void>;
+
+ /** Synchronously truncates (or extends) the specified file, to reach the
+ * specified `len`. If `len` is not specified then the entire file contents
+ * are truncated.
+ *
+ * ### Truncate the entire file
+ *
+ * ```ts
+ * Deno.truncateSync("my_file.txt");
+ * ```
+ *
+ * ### Truncate part of the file
+ *
+ * ```ts
+ * const file = Deno.makeTempFileSync();
+ * Deno.writeFileSync(file, new TextEncoder().encode("Hello World"));
+ * Deno.truncateSync(file, 7);
+ * const data = Deno.readFileSync(file);
+ * console.log(new TextDecoder().decode(data));
+ * ```
+ *
+ * Requires `allow-write` permission.
+ *
+ * @tags allow-write
+ * @category File System
+ */
+ export function truncateSync(name: string, len?: number): void;
+
+ /** @category Observability */
+ export interface OpMetrics {
+ opsDispatched: number;
+ opsDispatchedSync: number;
+ opsDispatchedAsync: number;
+ opsDispatchedAsyncUnref: number;
+ opsCompleted: number;
+ opsCompletedSync: number;
+ opsCompletedAsync: number;
+ opsCompletedAsyncUnref: number;
+ bytesSentControl: number;
+ bytesSentData: number;
+ bytesReceived: number;
+ }
+
+ /** @category Observability */
+ export interface Metrics extends OpMetrics {
+ ops: Record<string, OpMetrics>;
+ }
+
+ /** Receive metrics from the privileged side of Deno. This is primarily used
+ * in the development of Deno. _Ops_, also called _bindings_, are the
+ * go-between between Deno JavaScript sandbox and the rest of Deno.
+ *
+ * ```shell
+ * > console.table(Deno.metrics())
+ * ┌─────────────────────────┬────────┐
+ * │ (index) │ Values │
+ * ├─────────────────────────┼────────┤
+ * │ opsDispatched │ 3 │
+ * │ opsDispatchedSync │ 2 │
+ * │ opsDispatchedAsync │ 1 │
+ * │ opsDispatchedAsyncUnref │ 0 │
+ * │ opsCompleted │ 3 │
+ * │ opsCompletedSync │ 2 │
+ * │ opsCompletedAsync │ 1 │
+ * │ opsCompletedAsyncUnref │ 0 │
+ * │ bytesSentControl │ 73 │
+ * │ bytesSentData │ 0 │
+ * │ bytesReceived │ 375 │
+ * └─────────────────────────┴────────┘
+ * ```
+ *
+ * @category Observability
+ */
+ export function metrics(): Metrics;
+
+ /**
+ * A map of open resources that Deno is tracking. The key is the resource ID
+ * (_rid_) and the value is its representation.
+ *
+ * @category Observability */
+ interface ResourceMap {
+ [rid: number]: unknown;
+ }
+
+ /** Returns a map of open resource IDs (_rid_) along with their string
+ * representations. This is an internal API and as such resource
+ * representation has `unknown` type; that means it can change any time and
+ * should not be depended upon.
+ *
+ * ```ts
+ * console.log(Deno.resources());
+ * // { 0: "stdin", 1: "stdout", 2: "stderr" }
+ * Deno.openSync('../test.file');
+ * console.log(Deno.resources());
+ * // { 0: "stdin", 1: "stdout", 2: "stderr", 3: "fsFile" }
+ * ```
+ *
+ * @category Observability
+ */
+ export function resources(): ResourceMap;
+
+ /**
+ * Additional information for FsEvent objects with the "other" kind.
+ *
+ * - `"rescan"`: rescan notices indicate either a lapse in the events or a
+ * change in the filesystem such that events received so far can no longer
+ * be relied on to represent the state of the filesystem now. An
+ * application that simply reacts to file changes may not care about this.
+ * An application that keeps an in-memory representation of the filesystem
+ * will need to care, and will need to refresh that representation directly
+ * from the filesystem.
+ *
+ * @category File System
+ */
+ export type FsEventFlag = "rescan";
+
+ /**
+ * Represents a unique file system event yielded by a
+ * {@linkcode Deno.FsWatcher}.
+ *
+ * @category File System */
+ export interface FsEvent {
+ /** The kind/type of the file system event. */
+ kind: "any" | "access" | "create" | "modify" | "remove" | "other";
+ /** An array of paths that are associated with the file system event. */
+ paths: string[];
+ /** Any additional flags associated with the event. */
+ flag?: FsEventFlag;
+ }
+
+ /**
+ * Returned by {@linkcode Deno.watchFs}. It is an async iterator yielding up
+ * system events. To stop watching the file system by calling `.close()`
+ * method.
+ *
+ * @category File System
+ */
+ export interface FsWatcher extends AsyncIterable<FsEvent> {
+ /** The resource id. */
+ readonly rid: number;
+ /** Stops watching the file system and closes the watcher resource. */
+ close(): void;
+ /**
+ * Stops watching the file system and closes the watcher resource.
+ *
+ * @deprecated Will be removed in the future.
+ */
+ return?(value?: any): Promise<IteratorResult<FsEvent>>;
+ [Symbol.asyncIterator](): AsyncIterableIterator<FsEvent>;
+ }
+
+ /** Watch for file system events against one or more `paths`, which can be
+ * files or directories. These paths must exist already. One user action (e.g.
+ * `touch test.file`) can generate multiple file system events. Likewise,
+ * one user action can result in multiple file paths in one event (e.g. `mv
+ * old_name.txt new_name.txt`).
+ *
+ * The recursive option is `true` by default and, for directories, will watch
+ * the specified directory and all sub directories.
+ *
+ * Note that the exact ordering of the events can vary between operating
+ * systems.
+ *
+ * ```ts
+ * const watcher = Deno.watchFs("/");
+ * for await (const event of watcher) {
+ * console.log(">>>> event", event);
+ * // { kind: "create", paths: [ "/foo.txt" ] }
+ * }
+ * ```
+ *
+ * Call `watcher.close()` to stop watching.
+ *
+ * ```ts
+ * const watcher = Deno.watchFs("/");
+ *
+ * setTimeout(() => {
+ * watcher.close();
+ * }, 5000);
+ *
+ * for await (const event of watcher) {
+ * console.log(">>>> event", event);
+ * }
+ * ```
+ *
+ * Requires `allow-read` permission.
+ *
+ * @tags allow-read
+ * @category File System
+ */
+ export function watchFs(
+ paths: string | string[],
+ options?: { recursive: boolean },
+ ): FsWatcher;
+
+ /** Options which can be used with {@linkcode Deno.run}.
+ *
+ * @category Sub Process */
+ export interface RunOptions {
+ /** Arguments to pass.
+ *
+ * _Note_: the first element needs to be a path to the executable that is
+ * being run. */
+ cmd: readonly string[] | [string | URL, ...string[]];
+ /** The current working directory that should be used when running the
+ * sub-process. */
+ cwd?: string;
+ /** Any environment variables to be set when running the sub-process. */
+ env?: Record<string, string>;
+ /** By default subprocess inherits `stdout` of parent process. To change
+ * this this option can be set to a resource ID (_rid_) of an open file,
+ * `"inherit"`, `"piped"`, or `"null"`:
+ *
+ * - _number_: the resource ID of an open file/resource. This allows you to
+ * write to a file.
+ * - `"inherit"`: The default if unspecified. The subprocess inherits from the
+ * parent.
+ * - `"piped"`: A new pipe should be arranged to connect the parent and child
+ * sub-process.
+ * - `"null"`: This stream will be ignored. This is the equivalent of attaching
+ * the stream to `/dev/null`.
+ */
+ stdout?: "inherit" | "piped" | "null" | number;
+ /** By default subprocess inherits `stderr` of parent process. To change
+ * this this option can be set to a resource ID (_rid_) of an open file,
+ * `"inherit"`, `"piped"`, or `"null"`:
+ *
+ * - _number_: the resource ID of an open file/resource. This allows you to
+ * write to a file.
+ * - `"inherit"`: The default if unspecified. The subprocess inherits from the
+ * parent.
+ * - `"piped"`: A new pipe should be arranged to connect the parent and child
+ * sub-process.
+ * - `"null"`: This stream will be ignored. This is the equivalent of attaching
+ * the stream to `/dev/null`.
+ */
+ stderr?: "inherit" | "piped" | "null" | number;
+ /** By default subprocess inherits `stdin` of parent process. To change
+ * this this option can be set to a resource ID (_rid_) of an open file,
+ * `"inherit"`, `"piped"`, or `"null"`:
+ *
+ * - _number_: the resource ID of an open file/resource. This allows you to
+ * read from a file.
+ * - `"inherit"`: The default if unspecified. The subprocess inherits from the
+ * parent.
+ * - `"piped"`: A new pipe should be arranged to connect the parent and child
+ * sub-process.
+ * - `"null"`: This stream will be ignored. This is the equivalent of attaching
+ * the stream to `/dev/null`.
+ */
+ stdin?: "inherit" | "piped" | "null" | number;
+ }
+
+ /** The status resolved from the `.status()` method of a
+ * {@linkcode Deno.Process} instance.
+ *
+ * If `success` is `true`, then `code` will be `0`, but if `success` is
+ * `false`, the sub-process exit code will be set in `code`.
+ *
+ * @category Sub Process */
+ export type ProcessStatus =
+ | {
+ success: true;
+ code: 0;
+ signal?: undefined;
+ }
+ | {
+ success: false;
+ code: number;
+ signal?: number;
+ };
+
+ /**
+ * Represents an instance of a sub process that is returned from
+ * {@linkcode Deno.run} which can be used to manage the sub-process.
+ *
+ * @category Sub Process */
+ export class Process<T extends RunOptions = RunOptions> {
+ /** The resource ID of the sub-process. */
+ readonly rid: number;
+ /** The operating system's process ID for the sub-process. */
+ readonly pid: number;
+ /** A reference to the sub-processes `stdin`, which allows interacting with
+ * the sub-process at a low level. */
+ readonly stdin: T["stdin"] extends "piped" ? Writer & Closer & {
+ writable: WritableStream<Uint8Array>;
+ }
+ : (Writer & Closer & { writable: WritableStream<Uint8Array> }) | null;
+ /** A reference to the sub-processes `stdout`, which allows interacting with
+ * the sub-process at a low level. */
+ readonly stdout: T["stdout"] extends "piped" ? Reader & Closer & {
+ readable: ReadableStream<Uint8Array>;
+ }
+ : (Reader & Closer & { readable: ReadableStream<Uint8Array> }) | null;
+ /** A reference to the sub-processes `stderr`, which allows interacting with
+ * the sub-process at a low level. */
+ readonly stderr: T["stderr"] extends "piped" ? Reader & Closer & {
+ readable: ReadableStream<Uint8Array>;
+ }
+ : (Reader & Closer & { readable: ReadableStream<Uint8Array> }) | null;
+ /** Wait for the process to exit and return its exit status.
+ *
+ * Calling this function multiple times will return the same status.
+ *
+ * The `stdin` reference to the process will be closed before waiting to
+ * avoid a deadlock.
+ *
+ * If `stdout` and/or `stderr` were set to `"piped"`, they must be closed
+ * manually before the process can exit.
+ *
+ * To run process to completion and collect output from both `stdout` and
+ * `stderr` use:
+ *
+ * ```ts
+ * const p = Deno.run({ cmd: [ "echo", "hello world" ], stderr: 'piped', stdout: 'piped' });
+ * const [status, stdout, stderr] = await Promise.all([
+ * p.status(),
+ * p.output(),
+ * p.stderrOutput()
+ * ]);
+ * p.close();
+ * ```
+ */
+ status(): Promise<ProcessStatus>;
+ /** Buffer the stdout until EOF and return it as `Uint8Array`.
+ *
+ * You must set `stdout` to `"piped"` when creating the process.
+ *
+ * This calls `close()` on stdout after its done. */
+ output(): Promise<Uint8Array>;
+ /** Buffer the stderr until EOF and return it as `Uint8Array`.
+ *
+ * You must set `stderr` to `"piped"` when creating the process.
+ *
+ * This calls `close()` on stderr after its done. */
+ stderrOutput(): Promise<Uint8Array>;
+ /** Clean up resources associated with the sub-process instance. */
+ close(): void;
+ /** Send a signal to process.
+ * Default signal is `"SIGTERM"`.
+ *
+ * ```ts
+ * const p = Deno.run({ cmd: [ "sleep", "20" ]});
+ * p.kill("SIGTERM");
+ * p.close();
+ * ```
+ */
+ kill(signo?: Signal): void;
+ }
+
+ /** Operating signals which can be listened for or sent to sub-processes. What
+ * signals and what their standard behaviors are OS dependent.
+ *
+ * @category Runtime Environment */
+ export type Signal =
+ | "SIGABRT"
+ | "SIGALRM"
+ | "SIGBREAK"
+ | "SIGBUS"
+ | "SIGCHLD"
+ | "SIGCONT"
+ | "SIGEMT"
+ | "SIGFPE"
+ | "SIGHUP"
+ | "SIGILL"
+ | "SIGINFO"
+ | "SIGINT"
+ | "SIGIO"
+ | "SIGKILL"
+ | "SIGPIPE"
+ | "SIGPROF"
+ | "SIGPWR"
+ | "SIGQUIT"
+ | "SIGSEGV"
+ | "SIGSTKFLT"
+ | "SIGSTOP"
+ | "SIGSYS"
+ | "SIGTERM"
+ | "SIGTRAP"
+ | "SIGTSTP"
+ | "SIGTTIN"
+ | "SIGTTOU"
+ | "SIGURG"
+ | "SIGUSR1"
+ | "SIGUSR2"
+ | "SIGVTALRM"
+ | "SIGWINCH"
+ | "SIGXCPU"
+ | "SIGXFSZ";
+
+ /** Registers the given function as a listener of the given signal event.
+ *
+ * ```ts
+ * Deno.addSignalListener(
+ * "SIGTERM",
+ * () => {
+ * console.log("SIGTERM!")
+ * }
+ * );
+ * ```
+ *
+ * _Note_: On Windows only `"SIGINT"` (CTRL+C) and `"SIGBREAK"` (CTRL+Break)
+ * are supported.
+ *
+ * @category Runtime Environment
+ */
+ export function addSignalListener(signal: Signal, handler: () => void): void;
+
+ /** Removes the given signal listener that has been registered with
+ * {@linkcode Deno.addSignalListener}.
+ *
+ * ```ts
+ * const listener = () => {
+ * console.log("SIGTERM!")
+ * };
+ * Deno.addSignalListener("SIGTERM", listener);
+ * Deno.removeSignalListener("SIGTERM", listener);
+ * ```
+ *
+ * _Note_: On Windows only `"SIGINT"` (CTRL+C) and `"SIGBREAK"` (CTRL+Break)
+ * are supported.
+ *
+ * @category Runtime Environment
+ */
+ export function removeSignalListener(
+ signal: Signal,
+ handler: () => void,
+ ): void;
+
+ /** Spawns new subprocess. RunOptions must contain at a minimum the `opt.cmd`,
+ * an array of program arguments, the first of which is the binary.
+ *
+ * ```ts
+ * const p = Deno.run({
+ * cmd: ["curl", "https://example.com"],
+ * });
+ * const status = await p.status();
+ * ```
+ *
+ * Subprocess uses same working directory as parent process unless `opt.cwd`
+ * is specified.
+ *
+ * Environmental variables from parent process can be cleared using `opt.clearEnv`.
+ * Doesn't guarantee that only `opt.env` variables are present,
+ * as the OS may set environmental variables for processes.
+ *
+ * Environmental variables for subprocess can be specified using `opt.env`
+ * mapping.
+ *
+ * `opt.uid` sets the child process’s user ID. This translates to a setuid call
+ * in the child process. Failure in the setuid call will cause the spawn to fail.
+ *
+ * `opt.gid` is similar to `opt.uid`, but sets the group ID of the child process.
+ * This has the same semantics as the uid field.
+ *
+ * By default subprocess inherits stdio of parent process. To change
+ * this this, `opt.stdin`, `opt.stdout`, and `opt.stderr` can be set
+ * independently to a resource ID (_rid_) of an open file, `"inherit"`,
+ * `"piped"`, or `"null"`:
+ *
+ * - _number_: the resource ID of an open file/resource. This allows you to
+ * read or write to a file.
+ * - `"inherit"`: The default if unspecified. The subprocess inherits from the
+ * parent.
+ * - `"piped"`: A new pipe should be arranged to connect the parent and child
+ * sub-process.
+ * - `"null"`: This stream will be ignored. This is the equivalent of attaching
+ * the stream to `/dev/null`.
+ *
+ * Details of the spawned process are returned as an instance of
+ * {@linkcode Deno.Process}.
+ *
+ * Requires `allow-run` permission.
+ *
+ * @tags allow-run
+ * @category Sub Process
+ */
+ export function run<T extends RunOptions = RunOptions>(opt: T): Process<T>;
+
+ /** Option which can be specified when performing {@linkcode Deno.inspect}.
+ *
+ * @category Console and Debugging */
+ export interface InspectOptions {
+ /** Stylize output with ANSI colors. Defaults to `false`. */
+ colors?: boolean;
+ /** Try to fit more than one entry of a collection on the same line.
+ * Defaults to `true`. */
+ compact?: boolean;
+ /** Traversal depth for nested objects. Defaults to `4`. */
+ depth?: number;
+ /** The maximum number of iterable entries to print. Defaults to `100`. */
+ iterableLimit?: number;
+ /** Show a Proxy's target and handler. Defaults to `false`. */
+ showProxy?: boolean;
+ /** Sort Object, Set and Map entries by key. Defaults to `false`. */
+ sorted?: boolean;
+ /** Add a trailing comma for multiline collections. Defaults to `false`. */
+ trailingComma?: boolean;
+ /*** Evaluate the result of calling getters. Defaults to `false`. */
+ getters?: boolean;
+ /** Show an object's non-enumerable properties. Defaults to `false`. */
+ showHidden?: boolean;
+ /** The maximum length of a string before it is truncated with an
+ * ellipsis. */
+ strAbbreviateSize?: number;
+ }
+
+ /** Converts the input into a string that has the same format as printed by
+ * `console.log()`.
+ *
+ * ```ts
+ * const obj = {
+ * a: 10,
+ * b: "hello",
+ * };
+ * const objAsString = Deno.inspect(obj); // { a: 10, b: "hello" }
+ * console.log(obj); // prints same value as objAsString, e.g. { a: 10, b: "hello" }
+ * ```
+ *
+ * A custom inspect functions can be registered on objects, via the symbol
+ * `Symbol.for("Deno.customInspect")`, to control and customize the output
+ * of `inspect()` or when using `console` logging:
+ *
+ * ```ts
+ * class A {
+ * x = 10;
+ * y = "hello";
+ * [Symbol.for("Deno.customInspect")]() {
+ * return `x=${this.x}, y=${this.y}`;
+ * }
+ * }
+ *
+ * const inStringFormat = Deno.inspect(new A()); // "x=10, y=hello"
+ * console.log(inStringFormat); // prints "x=10, y=hello"
+ * ```
+ *
+ * A depth can be specified by using the `depth` option:
+ *
+ * ```ts
+ * Deno.inspect({a: {b: {c: {d: 'hello'}}}}, {depth: 2}); // { a: { b: [Object] } }
+ * ```
+ *
+ * @category Console and Debugging
+ */
+ export function inspect(value: unknown, options?: InspectOptions): string;
+
+ /** The name of a privileged feature which needs permission.
+ *
+ * @category Permissions
+ */
+ export type PermissionName =
+ | "run"
+ | "read"
+ | "write"
+ | "net"
+ | "env"
+ | "sys"
+ | "ffi"
+ | "hrtime";
+
+ /** The current status of the permission:
+ *
+ * - `"granted"` - the permission has been granted.
+ * - `"denied"` - the permission has been explicitly denied.
+ * - `"prompt"` - the permission has not explicitly granted nor denied.
+ *
+ * @category Permissions
+ */
+ export type PermissionState = "granted" | "denied" | "prompt";
+
+ /** The permission descriptor for the `allow-run` permission, which controls
+ * access to what sub-processes can be executed by Deno. The option `command`
+ * allows scoping the permission to a specific executable.
+ *
+ * **Warning, in practice, `allow-run` is effectively the same as `allow-all`
+ * in the sense that malicious code could execute any arbitrary code on the
+ * host.**
+ *
+ * @category Permissions */
+ export interface RunPermissionDescriptor {
+ name: "run";
+ /** The `allow-run` permission can be scoped to a specific executable,
+ * which would be relative to the start-up CWD of the Deno CLI. */
+ command?: string | URL;
+ }
+
+ /** The permission descriptor for the `allow-read` permissions, which controls
+ * access to reading resources from the local host. The option `path` allows
+ * scoping the permission to a specific path (and if the path is a directory
+ * any sub paths).
+ *
+ * Permission granted under `allow-read` only allows runtime code to attempt
+ * to read, the underlying operating system may apply additional permissions.
+ *
+ * @category Permissions */
+ export interface ReadPermissionDescriptor {
+ name: "read";
+ /** The `allow-read` permission can be scoped to a specific path (and if
+ * the path is a directory, any sub paths). */
+ path?: string | URL;
+ }
+
+ /** The permission descriptor for the `allow-write` permissions, which
+ * controls access to writing to resources from the local host. The option
+ * `path` allow scoping the permission to a specific path (and if the path is
+ * a directory any sub paths).
+ *
+ * Permission granted under `allow-write` only allows runtime code to attempt
+ * to write, the underlying operating system may apply additional permissions.
+ *
+ * @category Permissions */
+ export interface WritePermissionDescriptor {
+ name: "write";
+ /** The `allow-write` permission can be scoped to a specific path (and if
+ * the path is a directory, any sub paths). */
+ path?: string | URL;
+ }
+
+ /** The permission descriptor for the `allow-net` permissions, which controls
+ * access to opening network ports and connecting to remote hosts via the
+ * network. The option `host` allows scoping the permission for outbound
+ * connection to a specific host and port.
+ *
+ * @category Permissions */
+ export interface NetPermissionDescriptor {
+ name: "net";
+ /** Optional host string of the form `"<hostname>[:<port>]"`. Examples:
+ *
+ * "github.com"
+ * "deno.land:8080"
+ */
+ host?: string;
+ }
+
+ /** The permission descriptor for the `allow-env` permissions, which controls
+ * access to being able to read and write to the process environment variables
+ * as well as access other information about the environment. The option
+ * `variable` allows scoping the permission to a specific environment
+ * variable.
+ *
+ * @category Permissions */
+ export interface EnvPermissionDescriptor {
+ name: "env";
+ /** Optional environment variable name (e.g. `PATH`). */
+ variable?: string;
+ }
+
+ /** The permission descriptor for the `allow-sys` permissions, which controls
+ * access to sensitive host system information, which malicious code might
+ * attempt to exploit. The option `kind` allows scoping the permission to a
+ * specific piece of information.
+ *
+ * @category Permissions */
+ export interface SysPermissionDescriptor {
+ name: "sys";
+ /** The specific information to scope the permission to. */
+ kind?:
+ | "loadavg"
+ | "hostname"
+ | "systemMemoryInfo"
+ | "networkInterfaces"
+ | "osRelease"
+ | "uid"
+ | "gid";
+ }
+
+ /** The permission descriptor for the `allow-ffi` permissions, which controls
+ * access to loading _foreign_ code and interfacing with it via the
+ * [Foreign Function Interface API](https://deno.land/manual/runtime/ffi_api)
+ * available in Deno. The option `path` allows scoping the permission to a
+ * specific path on the host.
+ *
+ * @category Permissions */
+ export interface FfiPermissionDescriptor {
+ name: "ffi";
+ /** Optional path on the local host to scope the permission to. */
+ path?: string | URL;
+ }
+
+ /** The permission descriptor for the `allow-hrtime` permission, which
+ * controls if the runtime code has access to high resolution time. High
+ * resolution time is consider sensitive information, because it can be used
+ * by malicious code to gain information about the host that it might
+ * otherwise have access to.
+ *
+ * @category Permissions */
+ export interface HrtimePermissionDescriptor {
+ name: "hrtime";
+ }
+
+ /** Permission descriptors which define a permission and can be queried,
+ * requested, or revoked.
+ *
+ * View the specifics of the individual descriptors for more information about
+ * each permission kind.
+ *
+ * @category Permissions
+ */
+ export type PermissionDescriptor =
+ | RunPermissionDescriptor
+ | ReadPermissionDescriptor
+ | WritePermissionDescriptor
+ | NetPermissionDescriptor
+ | EnvPermissionDescriptor
+ | SysPermissionDescriptor
+ | FfiPermissionDescriptor
+ | HrtimePermissionDescriptor;
+
+ /** The interface which defines what event types are supported by
+ * {@linkcode PermissionStatus} instances.
+ *
+ * @category Permissions */
+ export interface PermissionStatusEventMap {
+ "change": Event;
+ }
+
+ /** An {@linkcode EventTarget} returned from the {@linkcode Deno.permissions}
+ * API which can provide updates to any state changes of the permission.
+ *
+ * @category Permissions */
+ export class PermissionStatus extends EventTarget {
+ // deno-lint-ignore no-explicit-any
+ onchange: ((this: PermissionStatus, ev: Event) => any) | null;
+ readonly state: PermissionState;
+ addEventListener<K extends keyof PermissionStatusEventMap>(
+ type: K,
+ listener: (
+ this: PermissionStatus,
+ ev: PermissionStatusEventMap[K],
+ ) => any,
+ options?: boolean | AddEventListenerOptions,
+ ): void;
+ addEventListener(
+ type: string,
+ listener: EventListenerOrEventListenerObject,
+ options?: boolean | AddEventListenerOptions,
+ ): void;
+ removeEventListener<K extends keyof PermissionStatusEventMap>(
+ type: K,
+ listener: (
+ this: PermissionStatus,
+ ev: PermissionStatusEventMap[K],
+ ) => any,
+ options?: boolean | EventListenerOptions,
+ ): void;
+ removeEventListener(
+ type: string,
+ listener: EventListenerOrEventListenerObject,
+ options?: boolean | EventListenerOptions,
+ ): void;
+ }
+
+ /**
+ * Deno's permission management API.
+ *
+ * The class which provides the interface for the {@linkcode Deno.permissions}
+ * global instance and is based on the web platform
+ * [Permissions API](https://developer.mozilla.org/en-US/docs/Web/API/Permissions_API),
+ * though some proposed parts of the API which are useful in a server side
+ * runtime context were removed or abandoned in the web platform specification
+ * which is why it was chosen to locate it in the {@linkcode Deno} namespace
+ * instead.
+ *
+ * By default, if the `stdin`/`stdout` is TTY for the Deno CLI (meaning it can
+ * send and receive text), then the CLI will prompt the user to grant
+ * permission when an un-granted permission is requested. This behavior can
+ * be changed by using the `--no-prompt` command at startup. When prompting
+ * the CLI will request the narrowest permission possible, potentially making
+ * it annoying to the user. The permissions APIs allow the code author to
+ * request a wider set of permissions at one time in order to provide a better
+ * user experience.
+ *
+ * @category Permissions */
+ export class Permissions {
+ /** Resolves to the current status of a permission.
+ *
+ * Note, if the permission is already granted, `request()` will not prompt
+ * the user again, therefore `query()` is only necessary if you are going
+ * to react differently existing permissions without wanting to modify them
+ * or prompt the user to modify them.
+ *
+ * ```ts
+ * const status = await Deno.permissions.query({ name: "read", path: "/etc" });
+ * console.log(status.state);
+ * ```
+ */
+ query(desc: PermissionDescriptor): Promise<PermissionStatus>;
+
+ /** Revokes a permission, and resolves to the state of the permission.
+ *
+ * ```ts
+ * import { assert } from "https://deno.land/std/testing/asserts.ts";
+ *
+ * const status = await Deno.permissions.revoke({ name: "run" });
+ * assert(status.state !== "granted")
+ * ```
+ */
+ revoke(desc: PermissionDescriptor): Promise<PermissionStatus>;
+
+ /** Requests the permission, and resolves to the state of the permission.
+ *
+ * If the permission is already granted, the user will not be prompted to
+ * grant the permission again.
+ *
+ * ```ts
+ * const status = await Deno.permissions.request({ name: "env" });
+ * if (status.state === "granted") {
+ * console.log("'env' permission is granted.");
+ * } else {
+ * console.log("'env' permission is denied.");
+ * }
+ * ```
+ */
+ request(desc: PermissionDescriptor): Promise<PermissionStatus>;
+ }
+
+ /** Deno's permission management API.
+ *
+ * It is a singleton instance of the {@linkcode Permissions} object and is
+ * based on the web platform
+ * [Permissions API](https://developer.mozilla.org/en-US/docs/Web/API/Permissions_API),
+ * though some proposed parts of the API which are useful in a server side
+ * runtime context were removed or abandoned in the web platform specification
+ * which is why it was chosen to locate it in the {@linkcode Deno} namespace
+ * instead.
+ *
+ * By default, if the `stdin`/`stdout` is TTY for the Deno CLI (meaning it can
+ * send and receive text), then the CLI will prompt the user to grant
+ * permission when an un-granted permission is requested. This behavior can
+ * be changed by using the `--no-prompt` command at startup. When prompting
+ * the CLI will request the narrowest permission possible, potentially making
+ * it annoying to the user. The permissions APIs allow the code author to
+ * request a wider set of permissions at one time in order to provide a better
+ * user experience.
+ *
+ * Requesting already granted permissions will not prompt the user and will
+ * return that the permission was granted.
+ *
+ * ### Querying
+ *
+ * ```ts
+ * const status = await Deno.permissions.query({ name: "read", path: "/etc" });
+ * console.log(status.state);
+ * ```
+ *
+ * ### Revoking
+ *
+ * ```ts
+ * import { assert } from "https://deno.land/std/testing/asserts.ts";
+ *
+ * const status = await Deno.permissions.revoke({ name: "run" });
+ * assert(status.state !== "granted")
+ * ```
+ *
+ * ### Requesting
+ *
+ * ```ts
+ * const status = await Deno.permissions.request({ name: "env" });
+ * if (status.state === "granted") {
+ * console.log("'env' permission is granted.");
+ * } else {
+ * console.log("'env' permission is denied.");
+ * }
+ * ```
+ *
+ * @category Permissions
+ */
+ export const permissions: Permissions;
+
+ /** Information related to the build of the current Deno runtime.
+ *
+ * Users are discouraged from code branching based on this information, as
+ * assumptions about what is available in what build environment might change
+ * over time. Developers should specifically sniff out the features they
+ * intend to use.
+ *
+ * The intended use for the information is for logging and debugging purposes.
+ *
+ * @category Runtime Environment
+ */
+ export const build: {
+ /** The [LLVM](https://llvm.org/) target triple, which is the combination
+ * of `${arch}-${vendor}-${os}` and represent the specific build target that
+ * the current runtime was built for. */
+ target: string;
+ /** Instruction set architecture that the Deno CLI was built for. */
+ arch: "x86_64" | "aarch64";
+ /** The operating system that the Deno CLI was built for. `"darwin"` is
+ * also known as OSX or MacOS. */
+ os: "darwin" | "linux" | "windows";
+ /** The computer vendor that the Deno CLI was built for. */
+ vendor: string;
+ /** Optional environment flags that were set for this build of Deno CLI. */
+ env?: string;
+ };
+
+ /** Version information related to the current Deno CLI runtime environment.
+ *
+ * Users are discouraged from code branching based on this information, as
+ * assumptions about what is available in what build environment might change
+ * over time. Developers should specifically sniff out the features they
+ * intend to use.
+ *
+ * The intended use for the information is for logging and debugging purposes.
+ *
+ * @category Runtime Environment
+ */
+ export const version: {
+ /** Deno CLI's version. For example: `"1.26.0"`. */
+ deno: string;
+ /** The V8 version used by Deno. For example: `"10.7.100.0"`.
+ *
+ * V8 is the underlying JavaScript runtime platform that Deno is built on
+ * top of. */
+ v8: string;
+ /** The TypeScript version used by Deno. For example: `"4.8.3"`.
+ *
+ * A version of the TypeScript type checker and language server is built-in
+ * to the Deno CLI. */
+ typescript: string;
+ };
+
+ /** Returns the script arguments to the program.
+ *
+ * Give the following command line invocation of Deno:
+ *
+ * ```sh
+ * deno run --allow-read https://deno.land/std/examples/cat.ts /etc/passwd
+ * ```
+ *
+ * Then `Deno.args` will contain:
+ *
+ * ```
+ * [ "/etc/passwd" ]
+ * ```
+ *
+ * If you are looking for a structured way to parse arguments, there is the
+ * [`std/flags`](https://deno.land/std/flags) module as part of the Deno
+ * standard library.
+ *
+ * @category Runtime Environment
+ */
+ export const args: string[];
+
+ /**
+ * A symbol which can be used as a key for a custom method which will be
+ * called when `Deno.inspect()` is called, or when the object is logged to
+ * the console.
+ *
+ * @deprecated This symbol is deprecated since 1.9. Use
+ * `Symbol.for("Deno.customInspect")` instead.
+ *
+ * @category Console and Debugging
+ */
+ export const customInspect: unique symbol;
+
+ /** The URL of the entrypoint module entered from the command-line. It
+ * requires read permission to the CWD.
+ *
+ * Also see {@linkcode ImportMeta} for other related information.
+ *
+ * @tags allow-read
+ * @category Runtime Environment
+ */
+ export const mainModule: string;
+
+ /** Options that can be used with {@linkcode symlink} and
+ * {@linkcode symlinkSync}.
+ *
+ * @category File System */
+ export interface SymlinkOptions {
+ /** If the symbolic link should be either a file or directory. This option
+ * only applies to Windows and is ignored on other operating systems. */
+ type: "file" | "dir";
+ }
+
+ /**
+ * Creates `newpath` as a symbolic link to `oldpath`.
+ *
+ * The `options.type` parameter can be set to `"file"` or `"dir"`. This
+ * argument is only available on Windows and ignored on other platforms.
+ *
+ * ```ts
+ * await Deno.symlink("old/name", "new/name");
+ * ```
+ *
+ * Requires full `allow-read` and `allow-write` permissions.
+ *
+ * @tags allow-read, allow-write
+ * @category File System
+ */
+ export function symlink(
+ oldpath: string | URL,
+ newpath: string | URL,
+ options?: SymlinkOptions,
+ ): Promise<void>;
+
+ /**
+ * Creates `newpath` as a symbolic link to `oldpath`.
+ *
+ * The `options.type` parameter can be set to `"file"` or `"dir"`. This
+ * argument is only available on Windows and ignored on other platforms.
+ *
+ * ```ts
+ * Deno.symlinkSync("old/name", "new/name");
+ * ```
+ *
+ * Requires full `allow-read` and `allow-write` permissions.
+ *
+ * @tags allow-read, allow-write
+ * @category File System
+ */
+ export function symlinkSync(
+ oldpath: string | URL,
+ newpath: string | URL,
+ options?: SymlinkOptions,
+ ): void;
+
+ /**
+ * Truncates or extends the specified file stream, to reach the specified
+ * `len`.
+ *
+ * If `len` is not specified then the entire file contents are truncated as if
+ * `len` was set to `0`.
+ *
+ * If the file previously was larger than this new length, the extra data is
+ * lost.
+ *
+ * If the file previously was shorter, it is extended, and the extended part
+ * reads as null bytes ('\0').
+ *
+ * ### Truncate the entire file
+ *
+ * ```ts
+ * const file = await Deno.open(
+ * "my_file.txt",
+ * { read: true, write: true, create: true }
+ * );
+ * await Deno.ftruncate(file.rid);
+ * ```
+ *
+ * ### Truncate part of the file
+ *
+ * ```ts
+ * const file = await Deno.open(
+ * "my_file.txt",
+ * { read: true, write: true, create: true }
+ * );
+ * await Deno.write(file.rid, new TextEncoder().encode("Hello World"));
+ * await Deno.ftruncate(file.rid, 7);
+ * const data = new Uint8Array(32);
+ * await Deno.read(file.rid, data);
+ * console.log(new TextDecoder().decode(data)); // Hello W
+ * ```
+ *
+ * @category File System
+ */
+ export function ftruncate(rid: number, len?: number): Promise<void>;
+
+ /**
+ * Synchronously truncates or extends the specified file stream, to reach the
+ * specified `len`.
+ *
+ * If `len` is not specified then the entire file contents are truncated as if
+ * `len` was set to `0`.
+ *
+ * If the file previously was larger than this new length, the extra data is
+ * lost.
+ *
+ * If the file previously was shorter, it is extended, and the extended part
+ * reads as null bytes ('\0').
+ *
+ * ### Truncate the entire file
+ *
+ * ```ts
+ * const file = Deno.openSync(
+ * "my_file.txt",
+ * { read: true, write: true, truncate: true, create: true }
+ * );
+ * Deno.ftruncateSync(file.rid);
+ * ```
+ *
+ * ### Truncate part of the file
+ *
+ * ```ts
+ * const file = Deno.openSync(
+ * "my_file.txt",
+ * { read: true, write: true, create: true }
+ * );
+ * Deno.writeSync(file.rid, new TextEncoder().encode("Hello World"));
+ * Deno.ftruncateSync(file.rid, 7);
+ * Deno.seekSync(file.rid, 0, Deno.SeekMode.Start);
+ * const data = new Uint8Array(32);
+ * Deno.readSync(file.rid, data);
+ * console.log(new TextDecoder().decode(data)); // Hello W
+ * ```
+ *
+ * @category File System
+ */
+ export function ftruncateSync(rid: number, len?: number): void;
+
+ /**
+ * Synchronously changes the access (`atime`) and modification (`mtime`) times
+ * of a file stream resource referenced by `rid`. Given times are either in
+ * seconds (UNIX epoch time) or as `Date` objects.
+ *
+ * ```ts
+ * const file = Deno.openSync("file.txt", { create: true, write: true });
+ * Deno.futimeSync(file.rid, 1556495550, new Date());
+ * ```
+ *
+ * @category File System
+ */
+ export function futimeSync(
+ rid: number,
+ atime: number | Date,
+ mtime: number | Date,
+ ): void;
+
+ /**
+ * Changes the access (`atime`) and modification (`mtime`) times of a file
+ * stream resource referenced by `rid`. Given times are either in seconds
+ * (UNIX epoch time) or as `Date` objects.
+ *
+ * ```ts
+ * const file = await Deno.open("file.txt", { create: true, write: true });
+ * await Deno.futime(file.rid, 1556495550, new Date());
+ * ```
+ *
+ * @category File System
+ */
+ export function futime(
+ rid: number,
+ atime: number | Date,
+ mtime: number | Date,
+ ): Promise<void>;
+
+ /**
+ * Returns a `Deno.FileInfo` for the given file stream.
+ *
+ * ```ts
+ * import { assert } from "https://deno.land/std/testing/asserts.ts";
+ *
+ * const file = await Deno.open("file.txt", { read: true });
+ * const fileInfo = await Deno.fstat(file.rid);
+ * assert(fileInfo.isFile);
+ * ```
+ *
+ * @category File System
+ */
+ export function fstat(rid: number): Promise<FileInfo>;
+
+ /**
+ * Synchronously returns a {@linkcode Deno.FileInfo} for the given file
+ * stream.
+ *
+ * ```ts
+ * import { assert } from "https://deno.land/std/testing/asserts.ts";
+ *
+ * const file = Deno.openSync("file.txt", { read: true });
+ * const fileInfo = Deno.fstatSync(file.rid);
+ * assert(fileInfo.isFile);
+ * ```
+ *
+ * @category File System
+ */
+ export function fstatSync(rid: number): FileInfo;
+
+ /**
+ * Synchronously changes the access (`atime`) and modification (`mtime`) times
+ * of a file system object referenced by `path`. Given times are either in
+ * seconds (UNIX epoch time) or as `Date` objects.
+ *
+ * ```ts
+ * Deno.utimeSync("myfile.txt", 1556495550, new Date());
+ * ```
+ *
+ * Requires `allow-write` permission.
+ *
+ * @tags allow-write
+ * @category File System
+ */
+ export function utimeSync(
+ path: string | URL,
+ atime: number | Date,
+ mtime: number | Date,
+ ): void;
+
+ /**
+ * Changes the access (`atime`) and modification (`mtime`) times of a file
+ * system object referenced by `path`. Given times are either in seconds
+ * (UNIX epoch time) or as `Date` objects.
+ *
+ * ```ts
+ * await Deno.utime("myfile.txt", 1556495550, new Date());
+ * ```
+ *
+ * Requires `allow-write` permission.
+ *
+ * @tags allow-write
+ * @category File System
+ */
+ export function utime(
+ path: string | URL,
+ atime: number | Date,
+ mtime: number | Date,
+ ): Promise<void>;
+
+ /** The event yielded from an {@linkcode HttpConn} which represents an HTTP
+ * request from a remote client.
+ *
+ * @category HTTP Server */
+ export interface RequestEvent {
+ /** The request from the client in the form of the web platform
+ * {@linkcode Request}. */
+ readonly request: Request;
+ /** The method to be used to respond to the event. The response needs to
+ * either be an instance of {@linkcode Response} or a promise that resolves
+ * with an instance of `Response`.
+ *
+ * When the response is successfully processed then the promise returned
+ * will be resolved. If there are any issues with sending the response,
+ * the promise will be rejected. */
+ respondWith(r: Response | PromiseLike<Response>): Promise<void>;
+ }
+
+ /** The async iterable that is returned from {@linkcode Deno.serveHttp} which
+ * yields up {@linkcode RequestEvent} events, representing individual
+ * requests on the HTTP server connection.
+ *
+ * @category HTTP Server */
+ export interface HttpConn extends AsyncIterable<RequestEvent> {
+ /** The resource ID associated with this connection. Generally users do not
+ * need to be aware of this identifier. */
+ readonly rid: number;
+
+ /** An alternative to the async iterable interface which provides promises
+ * which resolve with either a {@linkcode RequestEvent} when there is
+ * another request or `null` when the client has closed the connection. */
+ nextRequest(): Promise<RequestEvent | null>;
+ /** Initiate a server side closure of the connection, indicating to the
+ * client that you refuse to accept any more requests on this connection.
+ *
+ * Typically the client closes the connection, which will result in the
+ * async iterable terminating or the `nextRequest()` method returning
+ * `null`. */
+ close(): void;
+ }
+
+ /**
+ * Provides an interface to handle HTTP request and responses over TCP or TLS
+ * connections. The method returns an {@linkcode HttpConn} which yields up
+ * {@linkcode RequestEvent} events, which utilize the web platform standard
+ * {@linkcode Request} and {@linkcode Response} objects to handle the request.
+ *
+ * ```ts
+ * const conn = Deno.listen({ port: 80 });
+ * const httpConn = Deno.serveHttp(await conn.accept());
+ * const e = await httpConn.nextRequest();
+ * if (e) {
+ * e.respondWith(new Response("Hello World"));
+ * }
+ * ```
+ *
+ * Alternatively, you can also use the async iterator approach:
+ *
+ * ```ts
+ * async function handleHttp(conn: Deno.Conn) {
+ * for await (const e of Deno.serveHttp(conn)) {
+ * e.respondWith(new Response("Hello World"));
+ * }
+ * }
+ *
+ * for await (const conn of Deno.listen({ port: 80 })) {
+ * handleHttp(conn);
+ * }
+ * ```
+ *
+ * If `httpConn.nextRequest()` encounters an error or returns `null` then the
+ * underlying {@linkcode HttpConn} resource is closed automatically.
+ *
+ * Also see the experimental Flash HTTP server {@linkcode Deno.serve} which
+ * provides a ground up rewrite of handling of HTTP requests and responses
+ * within the Deno CLI.
+ *
+ * Note that this function *consumes* the given connection passed to it, thus
+ * the original connection will be unusable after calling this. Additionally,
+ * you need to ensure that the connection is not being used elsewhere when
+ * calling this function in order for the connection to be consumed properly.
+ *
+ * For instance, if there is a `Promise` that is waiting for read operation on
+ * the connection to complete, it is considered that the connection is being
+ * used elsewhere. In such a case, this function will fail.
+ *
+ * @category HTTP Server
+ */
+ export function serveHttp(conn: Conn): HttpConn;
+
+ /** The object that is returned from a {@linkcode Deno.upgradeWebSocket}
+ * request.
+ *
+ * @category Web Sockets */
+ export interface WebSocketUpgrade {
+ /** The response object that represents the HTTP response to the client,
+ * which should be used to the {@linkcode RequestEvent} `.respondWith()` for
+ * the upgrade to be successful. */
+ response: Response;
+ /** The {@linkcode WebSocket} interface to communicate to the client via a
+ * web socket. */
+ socket: WebSocket;
+ }
+
+ /** Options which can be set when performing a
+ * {@linkcode Deno.upgradeWebSocket} upgrade of a {@linkcode Request}
+ *
+ * @category Web Sockets */
+ export interface UpgradeWebSocketOptions {
+ /** Sets the `.protocol` property on the client side web socket to the
+ * value provided here, which should be one of the strings specified in the
+ * `protocols` parameter when requesting the web socket. This is intended
+ * for clients and servers to specify sub-protocols to use to communicate to
+ * each other. */
+ protocol?: string;
+ /** If the client does not respond to this frame with a
+ * `pong` within the timeout specified, the connection is deemed
+ * unhealthy and is closed. The `close` and `error` event will be emitted.
+ *
+ * The default is 120 seconds. Set to `0` to disable timeouts. */
+ idleTimeout?: number;
+ }
+
+ /**
+ * Upgrade an incoming HTTP request to a WebSocket.
+ *
+ * Given a {@linkcode Request}, returns a pair of {@linkcode WebSocket} and
+ * {@linkcode Response} instances. The original request must be responded to
+ * with the returned response for the websocket upgrade to be successful.
+ *
+ * ```ts
+ * const conn = Deno.listen({ port: 80 });
+ * const httpConn = Deno.serveHttp(await conn.accept());
+ * const e = await httpConn.nextRequest();
+ * if (e) {
+ * const { socket, response } = Deno.upgradeWebSocket(e.request);
+ * socket.onopen = () => {
+ * socket.send("Hello World!");
+ * };
+ * socket.onmessage = (e) => {
+ * console.log(e.data);
+ * socket.close();
+ * };
+ * socket.onclose = () => console.log("WebSocket has been closed.");
+ * socket.onerror = (e) => console.error("WebSocket error:", e);
+ * e.respondWith(response);
+ * }
+ * ```
+ *
+ * If the request body is disturbed (read from) before the upgrade is
+ * completed, upgrading fails.
+ *
+ * This operation does not yet consume the request or open the websocket. This
+ * only happens once the returned response has been passed to `respondWith()`.
+ *
+ * @category Web Sockets
+ */
+ export function upgradeWebSocket(
+ request: Request,
+ options?: UpgradeWebSocketOptions,
+ ): WebSocketUpgrade;
+
+ /** Send a signal to process under given `pid`. The value and meaning of the
+ * `signal` to the process is operating system and process dependant.
+ * {@linkcode Signal} provides the most common signals. Default signal
+ * is `"SIGTERM"`.
+ *
+ * The term `kill` is adopted from the UNIX-like command line command `kill`
+ * which also signals processes.
+ *
+ * If `pid` is negative, the signal will be sent to the process group
+ * identified by `pid`. An error will be thrown if a negative `pid` is used on
+ * Windows.
+ *
+ * ```ts
+ * const p = Deno.run({
+ * cmd: ["sleep", "10000"]
+ * });
+ *
+ * Deno.kill(p.pid, "SIGINT");
+ * ```
+ *
+ * Requires `allow-run` permission.
+ *
+ * @tags allow-run
+ * @category Sub Process
+ */
+ export function kill(pid: number, signo?: Signal): void;
+
+ /** The type of the resource record to resolve via DNS using
+ * {@linkcode Deno.resolveDns}.
+ *
+ * Only the listed types are supported currently.
+ *
+ * @category Network
+ */
+ export type RecordType =
+ | "A"
+ | "AAAA"
+ | "ANAME"
+ | "CAA"
+ | "CNAME"
+ | "MX"
+ | "NAPTR"
+ | "NS"
+ | "PTR"
+ | "SOA"
+ | "SRV"
+ | "TXT";
+
+ /**
+ * Options which can be set when using {@linkcode Deno.resolveDns}.
+ *
+ * @category Network */
+ export interface ResolveDnsOptions {
+ /** The name server to be used for lookups.
+ *
+ * If not specified, defaults to the system configuration. For example
+ * `/etc/resolv.conf` on Unix-like systems. */
+ nameServer?: {
+ /** The IP address of the name server. */
+ ipAddr: string;
+ /** The port number the query will be sent to.
+ *
+ * If not specified, defaults to `53`. */
+ port?: number;
+ };
+ }
+
+ /** If {@linkcode Deno.resolveDns} is called with `"CAA"` record type
+ * specified, it will resolve with an array of objects with this interface.
+ *
+ * @category Network
+ */
+ export interface CAARecord {
+ /** If `true`, indicates that the corresponding property tag **must** be
+ * understood if the semantics of the CAA record are to be correctly
+ * interpreted by an issuer.
+ *
+ * Issuers **must not** issue certificates for a domain if the relevant CAA
+ * Resource Record set contains unknown property tags that have `critical`
+ * set. */
+ critical: boolean;
+ /** An string that represents the identifier of the property represented by
+ * the record. */
+ tag: string;
+ /** The value associated with the tag. */
+ value: string;
+ }
+
+ /** If {@linkcode Deno.resolveDns} is called with `"MX"` record type
+ * specified, it will return an array of objects with this interface.
+ *
+ * @category Network */
+ export interface MXRecord {
+ /** A priority value, which is a relative value compared to the other
+ * preferences of MX records for the domain. */
+ preference: number;
+ /** The server that mail should be delivered to. */
+ exchange: string;
+ }
+
+ /** If {@linkcode Deno.resolveDns} is called with `"NAPTR"` record type
+ * specified, it will return an array of objects with this interface.
+ *
+ * @category Network */
+ export interface NAPTRRecord {
+ order: number;
+ preference: number;
+ flags: string;
+ services: string;
+ regexp: string;
+ replacement: string;
+ }
+
+ /** If {@linkcode Deno.resolveDns} is called with `"SOA"` record type
+ * specified, it will return an array of objects with this interface.
+ *
+ * @category Network */
+ export interface SOARecord {
+ mname: string;
+ rname: string;
+ serial: number;
+ refresh: number;
+ retry: number;
+ expire: number;
+ minimum: number;
+ }
+
+ /** If {@linkcode Deno.resolveDns} is called with `"SRV"` record type
+ * specified, it will return an array of objects with this interface.
+ *
+ * @category Network
+ */
+ export interface SRVRecord {
+ priority: number;
+ weight: number;
+ port: number;
+ target: string;
+ }
+
+ /**
+ * Performs DNS resolution against the given query, returning resolved
+ * records.
+ *
+ * Fails in the cases such as:
+ *
+ * - the query is in invalid format.
+ * - the options have an invalid parameter. For example `nameServer.port` is
+ * beyond the range of 16-bit unsigned integer.
+ * - the request timed out.
+ *
+ * ```ts
+ * const a = await Deno.resolveDns("example.com", "A");
+ *
+ * const aaaa = await Deno.resolveDns("example.com", "AAAA", {
+ * nameServer: { ipAddr: "8.8.8.8", port: 53 },
+ * });
+ * ```
+ *
+ * Requires `allow-net` permission.
+ *
+ * @tags allow-net
+ * @category Network
+ */
+ export function resolveDns(
+ query: string,
+ recordType: "A" | "AAAA" | "ANAME" | "CNAME" | "NS" | "PTR",
+ options?: ResolveDnsOptions,
+ ): Promise<string[]>;
+
+ /**
+ * Performs DNS resolution against the given query, returning resolved
+ * records.
+ *
+ * Fails in the cases such as:
+ *
+ * - the query is in invalid format.
+ * - the options have an invalid parameter. For example `nameServer.port` is
+ * beyond the range of 16-bit unsigned integer.
+ * - the request timed out.
+ *
+ * ```ts
+ * const a = await Deno.resolveDns("example.com", "A");
+ *
+ * const aaaa = await Deno.resolveDns("example.com", "AAAA", {
+ * nameServer: { ipAddr: "8.8.8.8", port: 53 },
+ * });
+ * ```
+ *
+ * Requires `allow-net` permission.
+ *
+ * @tags allow-net
+ * @category Network
+ */
+ export function resolveDns(
+ query: string,
+ recordType: "CAA",
+ options?: ResolveDnsOptions,
+ ): Promise<CAARecord[]>;
+
+ /**
+ * Performs DNS resolution against the given query, returning resolved
+ * records.
+ *
+ * Fails in the cases such as:
+ *
+ * - the query is in invalid format.
+ * - the options have an invalid parameter. For example `nameServer.port` is
+ * beyond the range of 16-bit unsigned integer.
+ * - the request timed out.
+ *
+ * ```ts
+ * const a = await Deno.resolveDns("example.com", "A");
+ *
+ * const aaaa = await Deno.resolveDns("example.com", "AAAA", {
+ * nameServer: { ipAddr: "8.8.8.8", port: 53 },
+ * });
+ * ```
+ *
+ * Requires `allow-net` permission.
+ *
+ * @tags allow-net
+ * @category Network
+ */
+ export function resolveDns(
+ query: string,
+ recordType: "MX",
+ options?: ResolveDnsOptions,
+ ): Promise<MXRecord[]>;
+
+ /**
+ * Performs DNS resolution against the given query, returning resolved
+ * records.
+ *
+ * Fails in the cases such as:
+ *
+ * - the query is in invalid format.
+ * - the options have an invalid parameter. For example `nameServer.port` is
+ * beyond the range of 16-bit unsigned integer.
+ * - the request timed out.
+ *
+ * ```ts
+ * const a = await Deno.resolveDns("example.com", "A");
+ *
+ * const aaaa = await Deno.resolveDns("example.com", "AAAA", {
+ * nameServer: { ipAddr: "8.8.8.8", port: 53 },
+ * });
+ * ```
+ *
+ * Requires `allow-net` permission.
+ *
+ * @tags allow-net
+ * @category Network
+ */
+ export function resolveDns(
+ query: string,
+ recordType: "NAPTR",
+ options?: ResolveDnsOptions,
+ ): Promise<NAPTRRecord[]>;
+
+ /**
+ * Performs DNS resolution against the given query, returning resolved
+ * records.
+ *
+ * Fails in the cases such as:
+ *
+ * - the query is in invalid format.
+ * - the options have an invalid parameter. For example `nameServer.port` is
+ * beyond the range of 16-bit unsigned integer.
+ * - the request timed out.
+ *
+ * ```ts
+ * const a = await Deno.resolveDns("example.com", "A");
+ *
+ * const aaaa = await Deno.resolveDns("example.com", "AAAA", {
+ * nameServer: { ipAddr: "8.8.8.8", port: 53 },
+ * });
+ * ```
+ *
+ * Requires `allow-net` permission.
+ *
+ * @tags allow-net
+ * @category Network
+ */
+ export function resolveDns(
+ query: string,
+ recordType: "SOA",
+ options?: ResolveDnsOptions,
+ ): Promise<SOARecord[]>;
+
+ /**
+ * Performs DNS resolution against the given query, returning resolved
+ * records.
+ *
+ * Fails in the cases such as:
+ *
+ * - the query is in invalid format.
+ * - the options have an invalid parameter. For example `nameServer.port` is
+ * beyond the range of 16-bit unsigned integer.
+ * - the request timed out.
+ *
+ * ```ts
+ * const a = await Deno.resolveDns("example.com", "A");
+ *
+ * const aaaa = await Deno.resolveDns("example.com", "AAAA", {
+ * nameServer: { ipAddr: "8.8.8.8", port: 53 },
+ * });
+ * ```
+ *
+ * Requires `allow-net` permission.
+ *
+ * @tags allow-net
+ * @category Network
+ */
+ export function resolveDns(
+ query: string,
+ recordType: "SRV",
+ options?: ResolveDnsOptions,
+ ): Promise<SRVRecord[]>;
+
+ /**
+ * Performs DNS resolution against the given query, returning resolved
+ * records.
+ *
+ * Fails in the cases such as:
+ *
+ * - the query is in invalid format.
+ * - the options have an invalid parameter. For example `nameServer.port` is
+ * beyond the range of 16-bit unsigned integer.
+ * - the request timed out.
+ *
+ * ```ts
+ * const a = await Deno.resolveDns("example.com", "A");
+ *
+ * const aaaa = await Deno.resolveDns("example.com", "AAAA", {
+ * nameServer: { ipAddr: "8.8.8.8", port: 53 },
+ * });
+ * ```
+ *
+ * Requires `allow-net` permission.
+ *
+ * @tags allow-net
+ * @category Network
+ */
+ export function resolveDns(
+ query: string,
+ recordType: "TXT",
+ options?: ResolveDnsOptions,
+ ): Promise<string[][]>;
+
+ /**
+ * Performs DNS resolution against the given query, returning resolved
+ * records.
+ *
+ * Fails in the cases such as:
+ *
+ * - the query is in invalid format.
+ * - the options have an invalid parameter. For example `nameServer.port` is
+ * beyond the range of 16-bit unsigned integer.
+ * - the request timed out.
+ *
+ * ```ts
+ * const a = await Deno.resolveDns("example.com", "A");
+ *
+ * const aaaa = await Deno.resolveDns("example.com", "AAAA", {
+ * nameServer: { ipAddr: "8.8.8.8", port: 53 },
+ * });
+ * ```
+ *
+ * Requires `allow-net` permission.
+ *
+ * @tags allow-net
+ * @category Network
+ */
+ export function resolveDns(
+ query: string,
+ recordType: RecordType,
+ options?: ResolveDnsOptions,
+ ): Promise<
+ | string[]
+ | CAARecord[]
+ | MXRecord[]
+ | NAPTRRecord[]
+ | SOARecord[]
+ | SRVRecord[]
+ | string[][]
+ >;
+
+ /**
+ * Make the timer of the given `id` block the event loop from finishing.
+ *
+ * @category Timers
+ */
+ export function refTimer(id: number): void;
+
+ /**
+ * Make the timer of the given `id` not block the event loop from finishing.
+ *
+ * @category Timers
+ */
+ export function unrefTimer(id: number): void;
+
+ /**
+ * Returns the user id of the process on POSIX platforms. Returns null on Windows.
+ *
+ * ```ts
+ * console.log(Deno.uid());
+ * ```
+ *
+ * Requires `allow-sys` permission.
+ *
+ * @tags allow-sys
+ * @category Runtime Environment
+ */
+ export function uid(): number | null;
+
+ /**
+ * Returns the group id of the process on POSIX platforms. Returns null on windows.
+ *
+ * ```ts
+ * console.log(Deno.gid());
+ * ```
+ *
+ * Requires `allow-sys` permission.
+ *
+ * @tags allow-sys
+ * @category Runtime Environment
+ */
+ export function gid(): number | null;
+}
diff --git a/cli/tsc/dts/lib.deno.shared_globals.d.ts b/cli/tsc/dts/lib.deno.shared_globals.d.ts
new file mode 100644
index 000000000..5b30c0a87
--- /dev/null
+++ b/cli/tsc/dts/lib.deno.shared_globals.d.ts
@@ -0,0 +1,684 @@
+// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
+
+// Documentation partially adapted from [MDN](https://developer.mozilla.org/),
+// by Mozilla Contributors, which is licensed under CC-BY-SA 2.5.
+
+/// <reference no-default-lib="true" />
+/// <reference lib="esnext" />
+/// <reference lib="deno.console" />
+/// <reference lib="deno.url" />
+/// <reference lib="deno.web" />
+/// <reference lib="deno.fetch" />
+/// <reference lib="deno.websocket" />
+/// <reference lib="deno.crypto" />
+/// <reference lib="deno.broadcast_channel" />
+
+/** @category WebAssembly */
+declare namespace WebAssembly {
+ /**
+ * The `WebAssembly.CompileError` object indicates an error during WebAssembly decoding or validation.
+ *
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/CompileError)
+ *
+ * @category WebAssembly
+ */
+ export class CompileError extends Error {
+ /** Creates a new `WebAssembly.CompileError` object. */
+ constructor(message?: string, options?: ErrorOptions);
+ }
+
+ /**
+ * A `WebAssembly.Global` object represents a global variable instance, accessible from
+ * both JavaScript and importable/exportable across one or more `WebAssembly.Module`
+ * instances. This allows dynamic linking of multiple modules.
+ *
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Global)
+ *
+ * @category WebAssembly
+ */
+ export class Global {
+ /** Creates a new `Global` object. */
+ constructor(descriptor: GlobalDescriptor, v?: any);
+
+ /**
+ * The value contained inside the global variable — this can be used to directly set
+ * and get the global's value.
+ */
+ value: any;
+
+ /** Old-style method that returns the value contained inside the global variable. */
+ valueOf(): any;
+ }
+
+ /**
+ * A `WebAssembly.Instance` object is a stateful, executable instance of a `WebAssembly.Module`.
+ * Instance objects contain all the Exported WebAssembly functions that allow calling into
+ * WebAssembly code from JavaScript.
+ *
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Instance)
+ *
+ * @category WebAssembly
+ */
+ export class Instance {
+ /** Creates a new Instance object. */
+ constructor(module: Module, importObject?: Imports);
+
+ /**
+ * Returns an object containing as its members all the functions exported from the
+ * WebAssembly module instance, to allow them to be accessed and used by JavaScript.
+ * Read-only.
+ */
+ readonly exports: Exports;
+ }
+
+ /**
+ * The `WebAssembly.LinkError` object indicates an error during module instantiation
+ * (besides traps from the start function).
+ *
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/LinkError)
+ *
+ * @category WebAssembly
+ */
+ export class LinkError extends Error {
+ /** Creates a new WebAssembly.LinkError object. */
+ constructor(message?: string, options?: ErrorOptions);
+ }
+
+ /**
+ * The `WebAssembly.Memory` object is a resizable `ArrayBuffer` or `SharedArrayBuffer` that
+ * holds the raw bytes of memory accessed by a WebAssembly Instance.
+ *
+ * A memory created by JavaScript or in WebAssembly code will be accessible and mutable
+ * from both JavaScript and WebAssembly.
+ *
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Memory)
+ *
+ * @category WebAssembly
+ */
+ export class Memory {
+ /** Creates a new `Memory` object. */
+ constructor(descriptor: MemoryDescriptor);
+
+ /** An accessor property that returns the buffer contained in the memory. */
+ readonly buffer: ArrayBuffer | SharedArrayBuffer;
+
+ /**
+ * Increases the size of the memory instance by a specified number of WebAssembly
+ * pages (each one is 64KB in size).
+ */
+ grow(delta: number): number;
+ }
+
+ /**
+ * A `WebAssembly.Module` object contains stateless WebAssembly code that has already been compiled
+ * by the browser — this can be efficiently shared with Workers, and instantiated multiple times.
+ *
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Module)
+ *
+ * @category WebAssembly
+ */
+ export class Module {
+ /** Creates a new `Module` object. */
+ constructor(bytes: BufferSource);
+
+ /**
+ * Given a `Module` and string, returns a copy of the contents of all custom sections in the
+ * module with the given string name.
+ */
+ static customSections(
+ moduleObject: Module,
+ sectionName: string,
+ ): ArrayBuffer[];
+
+ /** Given a `Module`, returns an array containing descriptions of all the declared exports. */
+ static exports(moduleObject: Module): ModuleExportDescriptor[];
+
+ /** Given a `Module`, returns an array containing descriptions of all the declared imports. */
+ static imports(moduleObject: Module): ModuleImportDescriptor[];
+ }
+
+ /**
+ * The `WebAssembly.RuntimeError` object is the error type that is thrown whenever WebAssembly
+ * specifies a trap.
+ *
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/RuntimeError)
+ *
+ * @category WebAssembly
+ */
+ export class RuntimeError extends Error {
+ /** Creates a new `WebAssembly.RuntimeError` object. */
+ constructor(message?: string, options?: ErrorOptions);
+ }
+
+ /**
+ * The `WebAssembly.Table()` object is a JavaScript wrapper object — an array-like structure
+ * representing a WebAssembly Table, which stores function references. A table created by
+ * JavaScript or in WebAssembly code will be accessible and mutable from both JavaScript
+ * and WebAssembly.
+ *
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Table)
+ *
+ * @category WebAssembly
+ */
+ export class Table {
+ /** Creates a new `Table` object. */
+ constructor(descriptor: TableDescriptor);
+
+ /** Returns the length of the table, i.e. the number of elements. */
+ readonly length: number;
+
+ /** Accessor function — gets the element stored at a given index. */
+ get(index: number): Function | null;
+
+ /** Increases the size of the `Table` instance by a specified number of elements. */
+ grow(delta: number): number;
+
+ /** Sets an element stored at a given index to a given value. */
+ set(index: number, value: Function | null): void;
+ }
+
+ /** The `GlobalDescriptor` describes the options you can pass to
+ * `new WebAssembly.Global()`.
+ *
+ * @category WebAssembly
+ */
+ export interface GlobalDescriptor {
+ mutable?: boolean;
+ value: ValueType;
+ }
+
+ /** The `MemoryDescriptor` describes the options you can pass to
+ * `new WebAssembly.Memory()`.
+ *
+ * @category WebAssembly
+ */
+ export interface MemoryDescriptor {
+ initial: number;
+ maximum?: number;
+ shared?: boolean;
+ }
+
+ /** A `ModuleExportDescriptor` is the description of a declared export in a
+ * `WebAssembly.Module`.
+ *
+ * @category WebAssembly
+ */
+ export interface ModuleExportDescriptor {
+ kind: ImportExportKind;
+ name: string;
+ }
+
+ /** A `ModuleImportDescriptor` is the description of a declared import in a
+ * `WebAssembly.Module`.
+ *
+ * @category WebAssembly
+ */
+ export interface ModuleImportDescriptor {
+ kind: ImportExportKind;
+ module: string;
+ name: string;
+ }
+
+ /** The `TableDescriptor` describes the options you can pass to
+ * `new WebAssembly.Table()`.
+ *
+ * @category WebAssembly
+ */
+ export interface TableDescriptor {
+ element: TableKind;
+ initial: number;
+ maximum?: number;
+ }
+
+ /** The value returned from `WebAssembly.instantiate`.
+ *
+ * @category WebAssembly
+ */
+ export interface WebAssemblyInstantiatedSource {
+ /* A `WebAssembly.Instance` object that contains all the exported WebAssembly functions. */
+ instance: Instance;
+
+ /**
+ * A `WebAssembly.Module` object representing the compiled WebAssembly module.
+ * This `Module` can be instantiated again, or shared via postMessage().
+ */
+ module: Module;
+ }
+
+ /** @category WebAssembly */
+ export type ImportExportKind = "function" | "global" | "memory" | "table";
+ /** @category WebAssembly */
+ export type TableKind = "anyfunc";
+ /** @category WebAssembly */
+ export type ValueType = "f32" | "f64" | "i32" | "i64";
+ /** @category WebAssembly */
+ export type ExportValue = Function | Global | Memory | Table;
+ /** @category WebAssembly */
+ export type Exports = Record<string, ExportValue>;
+ /** @category WebAssembly */
+ export type ImportValue = ExportValue | number;
+ /** @category WebAssembly */
+ export type ModuleImports = Record<string, ImportValue>;
+ /** @category WebAssembly */
+ export type Imports = Record<string, ModuleImports>;
+
+ /**
+ * The `WebAssembly.compile()` function compiles WebAssembly binary code into a
+ * `WebAssembly.Module` object. This function is useful if it is necessary to compile
+ * a module before it can be instantiated (otherwise, the `WebAssembly.instantiate()`
+ * function should be used).
+ *
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/compile)
+ *
+ * @category WebAssembly
+ */
+ export function compile(bytes: BufferSource): Promise<Module>;
+
+ /**
+ * The `WebAssembly.compileStreaming()` function compiles a `WebAssembly.Module`
+ * directly from a streamed underlying source. This function is useful if it is
+ * necessary to a compile a module before it can be instantiated (otherwise, the
+ * `WebAssembly.instantiateStreaming()` function should be used).
+ *
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/compileStreaming)
+ *
+ * @category WebAssembly
+ */
+ export function compileStreaming(
+ source: Response | Promise<Response>,
+ ): Promise<Module>;
+
+ /**
+ * The WebAssembly.instantiate() function allows you to compile and instantiate
+ * WebAssembly code.
+ *
+ * This overload takes the WebAssembly binary code, in the form of a typed
+ * array or ArrayBuffer, and performs both compilation and instantiation in one step.
+ * The returned Promise resolves to both a compiled WebAssembly.Module and its first
+ * WebAssembly.Instance.
+ *
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/instantiate)
+ *
+ * @category WebAssembly
+ */
+ export function instantiate(
+ bytes: BufferSource,
+ importObject?: Imports,
+ ): Promise<WebAssemblyInstantiatedSource>;
+
+ /**
+ * The WebAssembly.instantiate() function allows you to compile and instantiate
+ * WebAssembly code.
+ *
+ * This overload takes an already-compiled WebAssembly.Module and returns
+ * a Promise that resolves to an Instance of that Module. This overload is useful
+ * if the Module has already been compiled.
+ *
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/instantiate)
+ *
+ * @category WebAssembly
+ */
+ export function instantiate(
+ moduleObject: Module,
+ importObject?: Imports,
+ ): Promise<Instance>;
+
+ /**
+ * The `WebAssembly.instantiateStreaming()` function compiles and instantiates a
+ * WebAssembly module directly from a streamed underlying source. This is the most
+ * efficient, optimized way to load wasm code.
+ *
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/instantiateStreaming)
+ *
+ * @category WebAssembly
+ */
+ export function instantiateStreaming(
+ response: Response | PromiseLike<Response>,
+ importObject?: Imports,
+ ): Promise<WebAssemblyInstantiatedSource>;
+
+ /**
+ * The `WebAssembly.validate()` function validates a given typed array of
+ * WebAssembly binary code, returning whether the bytes form a valid wasm
+ * module (`true`) or not (`false`).
+ *
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/validate)
+ *
+ * @category WebAssembly
+ */
+ export function validate(bytes: BufferSource): boolean;
+}
+
+/** Sets a timer which executes a function once after the timer expires. Returns
+ * an id which may be used to cancel the timeout.
+ *
+ * ```ts
+ * setTimeout(() => { console.log('hello'); }, 500);
+ * ```
+ *
+ * @category Timers
+ */
+declare function setTimeout(
+ /** callback function to execute when timer expires */
+ cb: (...args: any[]) => void,
+ /** delay in ms */
+ delay?: number,
+ /** arguments passed to callback function */
+ ...args: any[]
+): number;
+
+/** Repeatedly calls a function , with a fixed time delay between each call.
+ *
+ * ```ts
+ * // Outputs 'hello' to the console every 500ms
+ * setInterval(() => { console.log('hello'); }, 500);
+ * ```
+ *
+ * @category Timers
+ */
+declare function setInterval(
+ /** callback function to execute when timer expires */
+ cb: (...args: any[]) => void,
+ /** delay in ms */
+ delay?: number,
+ /** arguments passed to callback function */
+ ...args: any[]
+): number;
+
+/** Cancels a timed, repeating action which was previously started by a call
+ * to `setInterval()`
+ *
+ * ```ts
+ * const id = setInterval(() => {console.log('hello');}, 500);
+ * // ...
+ * clearInterval(id);
+ * ```
+ *
+ * @category Timers
+ */
+declare function clearInterval(id?: number): void;
+
+/** Cancels a scheduled action initiated by `setTimeout()`
+ *
+ * ```ts
+ * const id = setTimeout(() => {console.log('hello');}, 500);
+ * // ...
+ * clearTimeout(id);
+ * ```
+ *
+ * @category Timers
+ */
+declare function clearTimeout(id?: number): void;
+
+/** @category Scheduling */
+interface VoidFunction {
+ (): void;
+}
+
+/** A microtask is a short function which is executed after the function or
+ * module which created it exits and only if the JavaScript execution stack is
+ * empty, but before returning control to the event loop being used to drive the
+ * script's execution environment. This event loop may be either the main event
+ * loop or the event loop driving a web worker.
+ *
+ * ```ts
+ * queueMicrotask(() => { console.log('This event loop stack is complete'); });
+ * ```
+ *
+ * @category Scheduling
+ */
+declare function queueMicrotask(func: VoidFunction): void;
+
+/** Dispatches an event in the global scope, synchronously invoking any
+ * registered event listeners for this event in the appropriate order. Returns
+ * false if event is cancelable and at least one of the event handlers which
+ * handled this event called Event.preventDefault(). Otherwise it returns true.
+ *
+ * ```ts
+ * dispatchEvent(new Event('unload'));
+ * ```
+ *
+ * @category DOM Events
+ */
+declare function dispatchEvent(event: Event): boolean;
+
+/** @category DOM APIs */
+interface DOMStringList {
+ /** Returns the number of strings in strings. */
+ readonly length: number;
+ /** Returns true if strings contains string, and false otherwise. */
+ contains(string: string): boolean;
+ /** Returns the string with index index from strings. */
+ item(index: number): string | null;
+ [index: number]: string;
+}
+
+/** @category Typed Arrays */
+type BufferSource = ArrayBufferView | ArrayBuffer;
+
+/** @category Console and Debugging */
+declare var console: Console;
+
+/** @category DOM Events */
+interface ErrorEventInit extends EventInit {
+ message?: string;
+ filename?: string;
+ lineno?: number;
+ colno?: number;
+ error?: any;
+}
+
+/** @category DOM Events */
+declare class ErrorEvent extends Event {
+ readonly message: string;
+ readonly filename: string;
+ readonly lineno: number;
+ readonly colno: number;
+ readonly error: any;
+ constructor(type: string, eventInitDict?: ErrorEventInit);
+}
+
+/** @category Observability */
+interface PromiseRejectionEventInit extends EventInit {
+ promise: Promise<any>;
+ reason?: any;
+}
+
+/** @category Observability */
+declare class PromiseRejectionEvent extends Event {
+ readonly promise: Promise<any>;
+ readonly reason: any;
+ constructor(type: string, eventInitDict?: PromiseRejectionEventInit);
+}
+
+/** @category Web Workers */
+interface AbstractWorkerEventMap {
+ "error": ErrorEvent;
+}
+
+/** @category Web Workers */
+interface WorkerEventMap extends AbstractWorkerEventMap {
+ "message": MessageEvent;
+ "messageerror": MessageEvent;
+}
+
+/** @category Web Workers */
+interface WorkerOptions {
+ type?: "classic" | "module";
+ name?: string;
+}
+
+/** @category Web Workers */
+declare class Worker extends EventTarget {
+ onerror?: (e: ErrorEvent) => void;
+ onmessage?: (e: MessageEvent) => void;
+ onmessageerror?: (e: MessageEvent) => void;
+ constructor(
+ specifier: string | URL,
+ options?: WorkerOptions,
+ );
+ postMessage(message: any, transfer: Transferable[]): void;
+ postMessage(message: any, options?: StructuredSerializeOptions): void;
+ addEventListener<K extends keyof WorkerEventMap>(
+ type: K,
+ listener: (this: Worker, ev: WorkerEventMap[K]) => any,
+ options?: boolean | AddEventListenerOptions,
+ ): void;
+ addEventListener(
+ type: string,
+ listener: EventListenerOrEventListenerObject,
+ options?: boolean | AddEventListenerOptions,
+ ): void;
+ removeEventListener<K extends keyof WorkerEventMap>(
+ type: K,
+ listener: (this: Worker, ev: WorkerEventMap[K]) => any,
+ options?: boolean | EventListenerOptions,
+ ): void;
+ removeEventListener(
+ type: string,
+ listener: EventListenerOrEventListenerObject,
+ options?: boolean | EventListenerOptions,
+ ): void;
+ terminate(): void;
+}
+
+/** @category Performance */
+declare type PerformanceEntryList = PerformanceEntry[];
+
+/** @category Performance */
+declare class Performance extends EventTarget {
+ /** Returns a timestamp representing the start of the performance measurement. */
+ readonly timeOrigin: number;
+ constructor();
+
+ /** Removes the stored timestamp with the associated name. */
+ clearMarks(markName?: string): void;
+
+ /** Removes stored timestamp with the associated name. */
+ clearMeasures(measureName?: string): void;
+
+ getEntries(): PerformanceEntryList;
+ getEntriesByName(name: string, type?: string): PerformanceEntryList;
+ getEntriesByType(type: string): PerformanceEntryList;
+
+ /** Stores a timestamp with the associated name (a "mark"). */
+ mark(markName: string, options?: PerformanceMarkOptions): PerformanceMark;
+
+ /** Stores the `DOMHighResTimeStamp` duration between two marks along with the
+ * associated name (a "measure"). */
+ measure(
+ measureName: string,
+ options?: PerformanceMeasureOptions,
+ ): PerformanceMeasure;
+ /** Stores the `DOMHighResTimeStamp` duration between two marks along with the
+ * associated name (a "measure"). */
+ measure(
+ measureName: string,
+ startMark?: string,
+ endMark?: string,
+ ): PerformanceMeasure;
+
+ /** Returns a current time from Deno's start in milliseconds.
+ *
+ * Use the permission flag `--allow-hrtime` return a precise value.
+ *
+ * ```ts
+ * const t = performance.now();
+ * console.log(`${t} ms since start!`);
+ * ```
+ *
+ * @tags allow-hrtime
+ */
+ now(): number;
+
+ /** Returns a JSON representation of the performance object. */
+ toJSON(): any;
+}
+
+/** @category Performance */
+declare var performance: Performance;
+
+/** @category Performance */
+declare interface PerformanceMarkOptions {
+ /** Metadata to be included in the mark. */
+ detail?: any;
+
+ /** Timestamp to be used as the mark time. */
+ startTime?: number;
+}
+
+declare interface PerformanceMeasureOptions {
+ /** Metadata to be included in the measure. */
+ detail?: any;
+
+ /** Timestamp to be used as the start time or string to be used as start
+ * mark. */
+ start?: string | number;
+
+ /** Duration between the start and end times. */
+ duration?: number;
+
+ /** Timestamp to be used as the end time or string to be used as end mark. */
+ end?: string | number;
+}
+
+/** Encapsulates a single performance metric that is part of the performance
+ * timeline. A performance entry can be directly created by making a performance
+ * mark or measure (for example by calling the `.mark()` method) at an explicit
+ * point in an application.
+ *
+ * @category Performance
+ */
+declare class PerformanceEntry {
+ readonly duration: number;
+ readonly entryType: string;
+ readonly name: string;
+ readonly startTime: number;
+ toJSON(): any;
+}
+
+/** `PerformanceMark` is an abstract interface for `PerformanceEntry` objects
+ * with an entryType of `"mark"`. Entries of this type are created by calling
+ * `performance.mark()` to add a named `DOMHighResTimeStamp` (the mark) to the
+ * performance timeline.
+ *
+ * @category Performance
+ */
+declare class PerformanceMark extends PerformanceEntry {
+ readonly detail: any;
+ readonly entryType: "mark";
+ constructor(name: string, options?: PerformanceMarkOptions);
+}
+
+/** `PerformanceMeasure` is an abstract interface for `PerformanceEntry` objects
+ * with an entryType of `"measure"`. Entries of this type are created by calling
+ * `performance.measure()` to add a named `DOMHighResTimeStamp` (the measure)
+ * between two marks to the performance timeline.
+ *
+ * @category Performance
+ */
+declare class PerformanceMeasure extends PerformanceEntry {
+ readonly detail: any;
+ readonly entryType: "measure";
+}
+
+/** @category DOM Events */
+declare interface CustomEventInit<T = any> extends EventInit {
+ detail?: T;
+}
+
+/** @category DOM Events */
+declare class CustomEvent<T = any> extends Event {
+ constructor(typeArg: string, eventInitDict?: CustomEventInit<T>);
+ /** Returns any custom data event was created with. Typically used for
+ * synthetic events. */
+ readonly detail: T;
+}
+
+/** @category DOM APIs */
+interface ErrorConstructor {
+ /** See https://v8.dev/docs/stack-trace-api#stack-trace-collection-for-custom-exceptions. */
+ captureStackTrace(error: Object, constructor?: Function): void;
+ // TODO(nayeemrmn): Support `Error.prepareStackTrace()`. We currently use this
+ // internally in a way that makes it unavailable for users.
+}
diff --git a/cli/tsc/dts/lib.deno.unstable.d.ts b/cli/tsc/dts/lib.deno.unstable.d.ts
new file mode 100644
index 000000000..eaa40abc5
--- /dev/null
+++ b/cli/tsc/dts/lib.deno.unstable.d.ts
@@ -0,0 +1,1911 @@
+// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
+
+/// <reference no-default-lib="true" />
+/// <reference lib="deno.ns" />
+
+declare namespace Deno {
+ export {}; // stop default export type behavior
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Retrieve the process umask. If `mask` is provided, sets the process umask.
+ * This call always returns what the umask was before the call.
+ *
+ * ```ts
+ * console.log(Deno.umask()); // e.g. 18 (0o022)
+ * const prevUmaskValue = Deno.umask(0o077); // e.g. 18 (0o022)
+ * console.log(Deno.umask()); // e.g. 63 (0o077)
+ * ```
+ *
+ * This API is under consideration to determine if permissions are required to
+ * call it.
+ *
+ * *Note*: This API is not implemented on Windows
+ *
+ * @category File System
+ */
+ export function umask(mask?: number): number;
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * All plain number types for interfacing with foreign functions.
+ *
+ * @category FFI
+ */
+ type NativeNumberType =
+ | "u8"
+ | "i8"
+ | "u16"
+ | "i16"
+ | "u32"
+ | "i32"
+ | "f32"
+ | "f64";
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * All BigInt number types for interfacing with foreign functions.
+ *
+ * @category FFI
+ */
+ type NativeBigIntType =
+ | "u64"
+ | "i64"
+ | "usize"
+ | "isize";
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * The native boolean type for interfacing to foreign functions.
+ *
+ * @category FFI
+ */
+ type NativeBooleanType = "bool";
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * The native pointer type for interfacing to foreign functions.
+ *
+ * @category FFI
+ */
+ type NativePointerType = "pointer";
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * The native buffer type for interfacing to foreign functions.
+ *
+ * @category FFI
+ */
+ type NativeBufferType = "buffer";
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * The native function type for interfacing with foreign functions.
+ *
+ * @category FFI
+ */
+ type NativeFunctionType = "function";
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * The native void type for interfacing with foreign functions.
+ *
+ * @category FFI
+ */
+ type NativeVoidType = "void";
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * All supported types for interfacing with foreign functions.
+ *
+ * @category FFI
+ */
+ export type NativeType =
+ | NativeNumberType
+ | NativeBigIntType
+ | NativeBooleanType
+ | NativePointerType
+ | NativeBufferType
+ | NativeFunctionType;
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * @category FFI
+ */
+ export type NativeResultType = NativeType | NativeVoidType;
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * A utility type conversion for foreign symbol parameters and unsafe callback
+ * return types.
+ *
+ * @category FFI
+ */
+ type ToNativeTypeMap =
+ & Record<NativeNumberType, number>
+ & Record<NativeBigIntType, PointerValue>
+ & Record<NativeBooleanType, boolean>
+ & Record<NativePointerType, PointerValue | null>
+ & Record<NativeFunctionType, PointerValue | null>
+ & Record<NativeBufferType, BufferSource | null>;
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Type conversion for foreign symbol parameters and unsafe callback return
+ * types.
+ *
+ * @category FFI
+ */
+ type ToNativeType<T extends NativeType = NativeType> = ToNativeTypeMap[T];
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * A utility type for conversion for unsafe callback return types.
+ *
+ * @category FFI
+ */
+ type ToNativeResultTypeMap = ToNativeTypeMap & Record<NativeVoidType, void>;
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Type conversion for unsafe callback return types.
+ *
+ * @category FFI
+ */
+ type ToNativeResultType<T extends NativeResultType = NativeResultType> =
+ ToNativeResultTypeMap[T];
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * A utility type for conversion of parameter types of foreign functions.
+ *
+ * @category FFI
+ */
+ type ToNativeParameterTypes<T extends readonly NativeType[]> =
+ //
+ [(T[number])[]] extends [T] ? ToNativeType<T[number]>[]
+ : [readonly (T[number])[]] extends [T]
+ ? readonly ToNativeType<T[number]>[]
+ : T extends readonly [...NativeType[]] ? {
+ [K in keyof T]: ToNativeType<T[K]>;
+ }
+ : never;
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * A utility type for conversion of foreign symbol return types and unsafe
+ * callback parameters.
+ *
+ * @category FFI
+ */
+ type FromNativeTypeMap =
+ & Record<NativeNumberType, number>
+ & Record<NativeBigIntType, PointerValue>
+ & Record<NativeBooleanType, boolean>
+ & Record<NativePointerType, PointerValue>
+ & Record<NativeBufferType, PointerValue>
+ & Record<NativeFunctionType, PointerValue>;
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Type conversion for foreign symbol return types and unsafe callback
+ * parameters.
+ *
+ * @category FFI
+ */
+ type FromNativeType<T extends NativeType = NativeType> = FromNativeTypeMap[T];
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * A utility type for conversion for foreign symbol return types.
+ *
+ * @category FFI
+ */
+ type FromNativeResultTypeMap =
+ & FromNativeTypeMap
+ & Record<NativeVoidType, void>;
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Type conversion for foreign symbol return types.
+ *
+ * @category FFI
+ */
+ type FromNativeResultType<T extends NativeResultType = NativeResultType> =
+ FromNativeResultTypeMap[T];
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * @category FFI
+ */
+ type FromNativeParameterTypes<
+ T extends readonly NativeType[],
+ > =
+ //
+ [(T[number])[]] extends [T] ? FromNativeType<T[number]>[]
+ : [readonly (T[number])[]] extends [T]
+ ? readonly FromNativeType<T[number]>[]
+ : T extends readonly [...NativeType[]] ? {
+ [K in keyof T]: FromNativeType<T[K]>;
+ }
+ : never;
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * The interface for a foreign function as defined by its parameter and result
+ * types.
+ *
+ * @category FFI
+ */
+ export interface ForeignFunction<
+ Parameters extends readonly NativeType[] = readonly NativeType[],
+ Result extends NativeResultType = NativeResultType,
+ NonBlocking extends boolean = boolean,
+ > {
+ /** Name of the symbol.
+ *
+ * Defaults to the key name in symbols object. */
+ name?: string;
+ /** The parameters of the foreign function. */
+ parameters: Parameters;
+ /** The result (return value) of the foreign function. */
+ result: Result;
+ /** When `true`, function calls will run on a dedicated blocking thread and
+ * will return a `Promise` resolving to the `result`. */
+ nonblocking?: NonBlocking;
+ /** When `true`, function calls can safely callback into JavaScript or
+ * trigger a garbage collection event.
+ *
+ * Default is `false`. */
+ callback?: boolean;
+ }
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * @category FFI
+ */
+ export interface ForeignStatic<Type extends NativeType = NativeType> {
+ /** Name of the symbol, defaults to the key name in symbols object. */
+ name?: string;
+ /** The type of the foreign static value. */
+ type: Type;
+ }
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * A foreign library interface descriptor.
+ *
+ * @category FFI
+ */
+ export interface ForeignLibraryInterface {
+ [name: string]: ForeignFunction | ForeignStatic;
+ }
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * A utility type that infers a foreign symbol.
+ *
+ * @category FFI
+ */
+ type StaticForeignSymbol<T extends ForeignFunction | ForeignStatic> =
+ T extends ForeignFunction ? FromForeignFunction<T>
+ : T extends ForeignStatic ? FromNativeType<T["type"]>
+ : never;
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * @category FFI
+ */
+ type FromForeignFunction<T extends ForeignFunction> = T["parameters"] extends
+ readonly [] ? () => StaticForeignSymbolReturnType<T>
+ : (
+ ...args: ToNativeParameterTypes<T["parameters"]>
+ ) => StaticForeignSymbolReturnType<T>;
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * @category FFI
+ */
+ type StaticForeignSymbolReturnType<T extends ForeignFunction> =
+ ConditionalAsync<T["nonblocking"], FromNativeResultType<T["result"]>>;
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * @category FFI
+ */
+ type ConditionalAsync<IsAsync extends boolean | undefined, T> =
+ IsAsync extends true ? Promise<T> : T;
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * A utility type that infers a foreign library interface.
+ *
+ * @category FFI
+ */
+ type StaticForeignLibraryInterface<T extends ForeignLibraryInterface> = {
+ [K in keyof T]: StaticForeignSymbol<T[K]>;
+ };
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Pointer type depends on the architecture and actual pointer value.
+ *
+ * On a 32 bit host system all pointer values are plain numbers. On a 64 bit
+ * host system pointer values are represented as numbers if the value is below
+ * `Number.MAX_SAFE_INTEGER`, otherwise they are provided as bigints.
+ *
+ * @category FFI
+ */
+ export type PointerValue = number | bigint;
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * An unsafe pointer to a memory location for passing and returning pointers
+ * to and from the FFI.
+ *
+ * @category FFI
+ */
+ export class UnsafePointer {
+ /** Return the direct memory pointer to the typed array in memory. */
+ static of(value: Deno.UnsafeCallback | BufferSource): PointerValue;
+ }
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * An unsafe pointer view to a memory location as specified by the `pointer`
+ * value. The `UnsafePointerView` API follows the standard built in interface
+ * {@linkcode DataView} for accessing the underlying types at an memory
+ * location (numbers, strings and raw bytes).
+ *
+ * @category FFI
+ */
+ export class UnsafePointerView {
+ constructor(pointer: PointerValue);
+
+ pointer: PointerValue;
+
+ /** Gets a boolean at the specified byte offset from the pointer. */
+ getBool(offset?: number): boolean;
+ /** Gets an unsigned 8-bit integer at the specified byte offset from the
+ * pointer. */
+ getUint8(offset?: number): number;
+ /** Gets a signed 8-bit integer at the specified byte offset from the
+ * pointer. */
+ getInt8(offset?: number): number;
+ /** Gets an unsigned 16-bit integer at the specified byte offset from the
+ * pointer. */
+ getUint16(offset?: number): number;
+ /** Gets a signed 16-bit integer at the specified byte offset from the
+ * pointer. */
+ getInt16(offset?: number): number;
+ /** Gets an unsigned 32-bit integer at the specified byte offset from the
+ * pointer. */
+ getUint32(offset?: number): number;
+ /** Gets a signed 32-bit integer at the specified byte offset from the
+ * pointer. */
+ getInt32(offset?: number): number;
+ /** Gets an unsigned 64-bit integer at the specified byte offset from the
+ * pointer. */
+ getBigUint64(offset?: number): PointerValue;
+ /** Gets a signed 64-bit integer at the specified byte offset from the
+ * pointer. */
+ getBigInt64(offset?: number): PointerValue;
+ /** Gets a signed 32-bit float at the specified byte offset from the
+ * pointer. */
+ getFloat32(offset?: number): number;
+ /** Gets a signed 64-bit float at the specified byte offset from the
+ * pointer. */
+ getFloat64(offset?: number): number;
+ /** Gets a C string (`null` terminated string) at the specified byte offset
+ * from the pointer. */
+ getCString(offset?: number): string;
+ /** Gets a C string (`null` terminated string) at the specified byte offset
+ * from the specified pointer. */
+ static getCString(pointer: PointerValue, offset?: number): string;
+ /** Gets an `ArrayBuffer` of length `byteLength` at the specified byte
+ * offset from the pointer. */
+ getArrayBuffer(byteLength: number, offset?: number): ArrayBuffer;
+ /** Gets an `ArrayBuffer` of length `byteLength` at the specified byte
+ * offset from the specified pointer. */
+ static getArrayBuffer(
+ pointer: PointerValue,
+ byteLength: number,
+ offset?: number,
+ ): ArrayBuffer;
+ /** Copies the memory of the pointer into a typed array.
+ *
+ * Length is determined from the typed array's `byteLength`.
+ *
+ * Also takes optional byte offset from the pointer. */
+ copyInto(destination: BufferSource, offset?: number): void;
+ /** Copies the memory of the specified pointer into a typed array.
+ *
+ * Length is determined from the typed array's `byteLength`.
+ *
+ * Also takes optional byte offset from the pointer. */
+ static copyInto(
+ pointer: PointerValue,
+ destination: BufferSource,
+ offset?: number,
+ ): void;
+ }
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * An unsafe pointer to a function, for calling functions that are not present
+ * as symbols.
+ *
+ * @category FFI
+ */
+ export class UnsafeFnPointer<Fn extends ForeignFunction> {
+ /** The pointer to the function. */
+ pointer: PointerValue;
+ /** The definition of the function. */
+ definition: Fn;
+
+ constructor(pointer: PointerValue, definition: Fn);
+
+ /** Call the foreign function. */
+ call: FromForeignFunction<Fn>;
+ }
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Definition of a unsafe callback function.
+ *
+ * @category FFI
+ */
+ export interface UnsafeCallbackDefinition<
+ Parameters extends readonly NativeType[] = readonly NativeType[],
+ Result extends NativeResultType = NativeResultType,
+ > {
+ /** The parameters of the callbacks. */
+ parameters: Parameters;
+ /** The current result of the callback. */
+ result: Result;
+ }
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * An unsafe callback function.
+ *
+ * @category FFI
+ */
+ type UnsafeCallbackFunction<
+ Parameters extends readonly NativeType[] = readonly NativeType[],
+ Result extends NativeResultType = NativeResultType,
+ > = Parameters extends readonly [] ? () => ToNativeResultType<Result> : (
+ ...args: FromNativeParameterTypes<Parameters>
+ ) => ToNativeResultType<Result>;
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * An unsafe function pointer for passing JavaScript functions as C function
+ * pointers to foreign function calls.
+ *
+ * The function pointer remains valid until the `close()` method is called.
+ *
+ * The callback can be explicitly referenced via `ref()` and dereferenced via
+ * `deref()` to stop Deno's process from exiting.
+ *
+ * @category FFI
+ */
+ export class UnsafeCallback<
+ Definition extends UnsafeCallbackDefinition = UnsafeCallbackDefinition,
+ > {
+ constructor(
+ definition: Definition,
+ callback: UnsafeCallbackFunction<
+ Definition["parameters"],
+ Definition["result"]
+ >,
+ );
+
+ /** The pointer to the unsafe callback. */
+ pointer: PointerValue;
+ /** The definition of the unsafe callback. */
+ definition: Definition;
+ /** The callback function. */
+ callback: UnsafeCallbackFunction<
+ Definition["parameters"],
+ Definition["result"]
+ >;
+
+ /**
+ * Adds one to this callback's reference counting and returns the new
+ * reference count.
+ *
+ * If the callback's reference count is non-zero, it will keep Deno's
+ * process from exiting.
+ */
+ ref(): number;
+
+ /**
+ * Removes one from this callback's reference counting and returns the new
+ * reference count.
+ *
+ * If the callback's reference counter is zero, it will no longer keep
+ * Deno's process from exiting.
+ */
+ unref(): number;
+
+ /**
+ * Removes the C function pointer associated with this instance.
+ *
+ * Continuing to use the instance after calling this object will lead to
+ * errors and crashes.
+ *
+ * Calling this method will also immediately set the callback's reference
+ * counting to zero and it will no longer keep Deno's process from exiting.
+ */
+ close(): void;
+ }
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * A dynamic library resource. Use {@linkcode Deno.dlopen} to load a dynamic
+ * library and return this interface.
+ *
+ * @category FFI
+ */
+ export interface DynamicLibrary<S extends ForeignLibraryInterface> {
+ /** All of the registered library along with functions for calling them. */
+ symbols: StaticForeignLibraryInterface<S>;
+ /** Removes the pointers associated with the library symbols.
+ *
+ * Continuing to use symbols that are part of the library will lead to
+ * errors and crashes.
+ *
+ * Calling this method will also immediately set any references to zero and
+ * will no longer keep Deno's process from exiting.
+ */
+ close(): void;
+ }
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Opens an external dynamic library and registers symbols, making foreign
+ * functions available to be called.
+ *
+ * Requires `allow-ffi` permission. Loading foreign dynamic libraries can in
+ * theory bypass all of the sandbox permissions. While it is a separate
+ * permission users should acknowledge in practice that is effectively the
+ * same as running with the `allow-all` permission.
+ *
+ * An example, given a C library which exports a foreign function named
+ * `add()`:
+ *
+ * ```ts
+ * // Determine library extension based on
+ * // your OS.
+ * let libSuffix = "";
+ * switch (Deno.build.os) {
+ * case "windows":
+ * libSuffix = "dll";
+ * break;
+ * case "darwin":
+ * libSuffix = "dylib";
+ * break;
+ * default:
+ * libSuffix = "so";
+ * break;
+ * }
+ *
+ * const libName = `./libadd.${libSuffix}`;
+ * // Open library and define exported symbols
+ * const dylib = Deno.dlopen(
+ * libName,
+ * {
+ * "add": { parameters: ["isize", "isize"], result: "isize" },
+ * } as const,
+ * );
+ *
+ * // Call the symbol `add`
+ * const result = dylib.symbols.add(35, 34); // 69
+ *
+ * console.log(`Result from external addition of 35 and 34: ${result}`);
+ * ```
+ *
+ * @tags allow-ffi
+ * @category FFI
+ */
+ export function dlopen<S extends ForeignLibraryInterface>(
+ filename: string | URL,
+ symbols: S,
+ ): DynamicLibrary<S>;
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * These are unstable options which can be used with {@linkcode Deno.run}.
+ *
+ * @category Sub Process
+ */
+ interface UnstableRunOptions extends RunOptions {
+ /** If `true`, clears the environment variables before executing the
+ * sub-process. Defaults to `false`. */
+ clearEnv?: boolean;
+ /** For POSIX systems, sets the group ID for the sub process. */
+ gid?: number;
+ /** For POSIX systems, sets the user ID for the sub process. */
+ uid?: number;
+ }
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Spawns new subprocess. RunOptions must contain at a minimum the `opt.cmd`,
+ * an array of program arguments, the first of which is the binary.
+ *
+ * ```ts
+ * const p = Deno.run({
+ * cmd: ["curl", "https://example.com"],
+ * });
+ * const status = await p.status();
+ * ```
+ *
+ * Subprocess uses same working directory as parent process unless `opt.cwd`
+ * is specified.
+ *
+ * Environmental variables from parent process can be cleared using `opt.clearEnv`.
+ * Doesn't guarantee that only `opt.env` variables are present,
+ * as the OS may set environmental variables for processes.
+ *
+ * Environmental variables for subprocess can be specified using `opt.env`
+ * mapping.
+ *
+ * `opt.uid` sets the child process’s user ID. This translates to a setuid call
+ * in the child process. Failure in the setuid call will cause the spawn to fail.
+ *
+ * `opt.gid` is similar to `opt.uid`, but sets the group ID of the child process.
+ * This has the same semantics as the uid field.
+ *
+ * By default subprocess inherits stdio of parent process. To change
+ * this this, `opt.stdin`, `opt.stdout`, and `opt.stderr` can be set
+ * independently to a resource ID (_rid_) of an open file, `"inherit"`,
+ * `"piped"`, or `"null"`:
+ *
+ * - _number_: the resource ID of an open file/resource. This allows you to
+ * read or write to a file.
+ * - `"inherit"`: The default if unspecified. The subprocess inherits from the
+ * parent.
+ * - `"piped"`: A new pipe should be arranged to connect the parent and child
+ * sub-process.
+ * - `"null"`: This stream will be ignored. This is the equivalent of attaching
+ * the stream to `/dev/null`.
+ *
+ * Details of the spawned process are returned as an instance of
+ * {@linkcode Deno.Process}.
+ *
+ * Requires `allow-run` permission.
+ *
+ * @tags allow-run
+ * @category Sub Process
+ */
+ export function run<T extends UnstableRunOptions = UnstableRunOptions>(
+ opt: T,
+ ): Process<T>;
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * A custom `HttpClient` for use with {@linkcode fetch} function. This is
+ * designed to allow custom certificates or proxies to be used with `fetch()`.
+ *
+ * ```ts
+ * const caCert = await Deno.readTextFile("./ca.pem");
+ * const client = Deno.createHttpClient({ caCerts: [ caCert ] });
+ * const req = await fetch("https://myserver.com", { client });
+ * ```
+ *
+ * @category Fetch API
+ */
+ export interface HttpClient {
+ /** The resource ID associated with the client. */
+ rid: number;
+ /** Close the HTTP client. */
+ close(): void;
+ }
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * The options used when creating a {@linkcode Deno.HttpClient}.
+ *
+ * @category Fetch API
+ */
+ export interface CreateHttpClientOptions {
+ /** A list of root certificates that will be used in addition to the
+ * default root certificates to verify the peer's certificate.
+ *
+ * Must be in PEM format. */
+ caCerts?: string[];
+ /** A HTTP proxy to use for new connections. */
+ proxy?: Proxy;
+ /** PEM formatted client certificate chain. */
+ certChain?: string;
+ /** PEM formatted (RSA or PKCS8) private key of client certificate. */
+ privateKey?: string;
+ }
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * The definition of a proxy when specifying
+ * {@linkcode Deno.CreateHttpClientOptions}.
+ *
+ * @category Fetch API
+ */
+ export interface Proxy {
+ /** The string URL of the proxy server to use. */
+ url: string;
+ /** The basic auth credentials to be used against the proxy server. */
+ basicAuth?: BasicAuth;
+ }
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Basic authentication credentials to be used with a {@linkcode Deno.Proxy}
+ * server when specifying {@linkcode Deno.CreateHttpClientOptions}.
+ *
+ * @category Fetch API
+ */
+ export interface BasicAuth {
+ /** The username to be used against the proxy server. */
+ username: string;
+ /** The password to be used against the proxy server. */
+ password: string;
+ }
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Create a custom HttpClient for to use with {@linkcode fetch}. This is an
+ * extension of the web platform Fetch API which allows Deno to use custom
+ * TLS certificates and connect via a proxy while using `fetch()`.
+ *
+ * ```ts
+ * const caCert = await Deno.readTextFile("./ca.pem");
+ * const client = Deno.createHttpClient({ caCerts: [ caCert ] });
+ * const response = await fetch("https://myserver.com", { client });
+ * ```
+ *
+ * ```ts
+ * const client = Deno.createHttpClient({
+ * proxy: { url: "http://myproxy.com:8080" }
+ * });
+ * const response = await fetch("https://myserver.com", { client });
+ * ```
+ *
+ * @category Fetch API
+ */
+ export function createHttpClient(
+ options: CreateHttpClientOptions,
+ ): HttpClient;
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * A generic transport listener for message-oriented protocols.
+ *
+ * @category Network
+ */
+ export interface DatagramConn extends AsyncIterable<[Uint8Array, Addr]> {
+ /** Waits for and resolves to the next message to the instance.
+ *
+ * Messages are received in the format of a tuple containing the data array
+ * and the address information.
+ */
+ receive(p?: Uint8Array): Promise<[Uint8Array, Addr]>;
+ /** Sends a message to the target via the connection. The method resolves
+ * with the number of bytes sent. */
+ send(p: Uint8Array, addr: Addr): Promise<number>;
+ /** Close closes the socket. Any pending message promises will be rejected
+ * with errors. */
+ close(): void;
+ /** Return the address of the instance. */
+ readonly addr: Addr;
+ [Symbol.asyncIterator](): AsyncIterableIterator<[Uint8Array, Addr]>;
+ }
+
+ /**
+ * @category Network
+ */
+ export interface TcpListenOptions extends ListenOptions {
+ /** When `true` the SO_REUSEPORT flag will be set on the listener. This
+ * allows multiple processes to listen on the same address and port.
+ *
+ * On Linux this will cause the kernel to distribute incoming connections
+ * across the different processes that are listening on the same address and
+ * port.
+ *
+ * This flag is only supported on Linux. It is silently ignored on other
+ * platforms. Defaults to `false`. */
+ reusePort?: boolean;
+ }
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Unstable options which can be set when opening a Unix listener via
+ * {@linkcode Deno.listen} or {@linkcode Deno.listenDatagram}.
+ *
+ * @category Network
+ */
+ export interface UnixListenOptions {
+ /** A path to the Unix Socket. */
+ path: string;
+ }
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Unstable options which can be set when opening a datagram listener via
+ * {@linkcode Deno.listenDatagram}.
+ *
+ * @category Network
+ */
+ export interface UdpListenOptions extends ListenOptions {
+ /** When `true` the specified address will be reused, even if another
+ * process has already bound a socket on it. This effectively steals the
+ * socket from the listener.
+ *
+ * Defaults to `false`. */
+ reuseAddress?: boolean;
+ }
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Listen announces on the local transport address.
+ *
+ * ```ts
+ * const listener = Deno.listen({ path: "/foo/bar.sock", transport: "unix" })
+ * ```
+ *
+ * Requires `allow-read` and `allow-write` permission.
+ *
+ * @tags allow-read, allow-write
+ * @category Network
+ */
+ export function listen(
+ options: UnixListenOptions & { transport: "unix" },
+ ): Listener;
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Listen announces on the local transport address.
+ *
+ * ```ts
+ * const listener1 = Deno.listenDatagram({
+ * port: 80,
+ * transport: "udp"
+ * });
+ * const listener2 = Deno.listenDatagram({
+ * hostname: "golang.org",
+ * port: 80,
+ * transport: "udp"
+ * });
+ * ```
+ *
+ * Requires `allow-net` permission.
+ *
+ * @tags allow-net
+ * @category Network
+ */
+ export function listenDatagram(
+ options: UdpListenOptions & { transport: "udp" },
+ ): DatagramConn;
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Listen announces on the local transport address.
+ *
+ * ```ts
+ * const listener = Deno.listenDatagram({
+ * path: "/foo/bar.sock",
+ * transport: "unixpacket"
+ * });
+ * ```
+ *
+ * Requires `allow-read` and `allow-write` permission.
+ *
+ * @tags allow-read, allow-write
+ * @category Network
+ */
+ export function listenDatagram(
+ options: UnixListenOptions & { transport: "unixpacket" },
+ ): DatagramConn;
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * @category Network
+ */
+ export interface UnixConnectOptions {
+ transport: "unix";
+ path: string;
+ }
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Connects to the hostname (default is "127.0.0.1") and port on the named
+ * transport (default is "tcp"), and resolves to the connection (`Conn`).
+ *
+ * ```ts
+ * const conn1 = await Deno.connect({ port: 80 });
+ * const conn2 = await Deno.connect({ hostname: "192.0.2.1", port: 80 });
+ * const conn3 = await Deno.connect({ hostname: "[2001:db8::1]", port: 80 });
+ * const conn4 = await Deno.connect({ hostname: "golang.org", port: 80, transport: "tcp" });
+ * const conn5 = await Deno.connect({ path: "/foo/bar.sock", transport: "unix" });
+ * ```
+ *
+ * Requires `allow-net` permission for "tcp" and `allow-read` for "unix".
+ *
+ * @tags allow-net, allow-read
+ * @category Network
+ */
+ export function connect(options: ConnectOptions): Promise<TcpConn>;
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Connects to the hostname (default is "127.0.0.1") and port on the named
+ * transport (default is "tcp"), and resolves to the connection (`Conn`).
+ *
+ * ```ts
+ * const conn1 = await Deno.connect({ port: 80 });
+ * const conn2 = await Deno.connect({ hostname: "192.0.2.1", port: 80 });
+ * const conn3 = await Deno.connect({ hostname: "[2001:db8::1]", port: 80 });
+ * const conn4 = await Deno.connect({ hostname: "golang.org", port: 80, transport: "tcp" });
+ * const conn5 = await Deno.connect({ path: "/foo/bar.sock", transport: "unix" });
+ * ```
+ *
+ * Requires `allow-net` permission for "tcp" and `allow-read` for "unix".
+ *
+ * @tags allow-net, allow-read
+ * @category Network
+ */
+ export function connect(options: UnixConnectOptions): Promise<UnixConn>;
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * @category Network
+ */
+ export interface ConnectTlsOptions {
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * PEM formatted client certificate chain.
+ */
+ certChain?: string;
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * PEM formatted (RSA or PKCS8) private key of client certificate.
+ */
+ privateKey?: string;
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Application-Layer Protocol Negotiation (ALPN) protocols supported by
+ * the client. If not specified, no ALPN extension will be included in the
+ * TLS handshake.
+ */
+ alpnProtocols?: string[];
+ }
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * @category Network
+ */
+ export interface TlsHandshakeInfo {
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Contains the ALPN protocol selected during negotiation with the server.
+ * If no ALPN protocol selected, returns `null`.
+ */
+ alpnProtocol: string | null;
+ }
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * @category Network
+ */
+ export interface TlsConn extends Conn {
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Runs the client or server handshake protocol to completion if that has
+ * not happened yet. Calling this method is optional; the TLS handshake
+ * will be completed automatically as soon as data is sent or received.
+ */
+ handshake(): Promise<TlsHandshakeInfo>;
+ }
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Create a TLS connection with an attached client certificate.
+ *
+ * ```ts
+ * const conn = await Deno.connectTls({
+ * hostname: "deno.land",
+ * port: 443,
+ * certChain: "---- BEGIN CERTIFICATE ----\n ...",
+ * privateKey: "---- BEGIN PRIVATE KEY ----\n ...",
+ * });
+ * ```
+ *
+ * Requires `allow-net` permission.
+ *
+ * @tags allow-net
+ * @category Network
+ */
+ export function connectTls(options: ConnectTlsOptions): Promise<TlsConn>;
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * @category Network
+ */
+ export interface ListenTlsOptions {
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Application-Layer Protocol Negotiation (ALPN) protocols to announce to
+ * the client. If not specified, no ALPN extension will be included in the
+ * TLS handshake.
+ */
+ alpnProtocols?: string[];
+ }
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * @category Network
+ */
+ export interface StartTlsOptions {
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Application-Layer Protocol Negotiation (ALPN) protocols to announce to
+ * the client. If not specified, no ALPN extension will be included in the
+ * TLS handshake.
+ */
+ alpnProtocols?: string[];
+ }
+
+ /** @category Network */
+ export interface Listener extends AsyncIterable<Conn> {
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Make the listener block the event loop from finishing.
+ *
+ * Note: the listener blocks the event loop from finishing by default.
+ * This method is only meaningful after `.unref()` is called.
+ */
+ ref(): void;
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Make the listener not block the event loop from finishing.
+ */
+ unref(): void;
+ }
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Acquire an advisory file-system lock for the provided file. `exclusive`
+ * defaults to `false`.
+ *
+ * @category File System
+ */
+ export function flock(rid: number, exclusive?: boolean): Promise<void>;
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Acquire an advisory file-system lock synchronously for the provided file.
+ * `exclusive` defaults to `false`.
+ *
+ * @category File System
+ */
+ export function flockSync(rid: number, exclusive?: boolean): void;
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Release an advisory file-system lock for the provided file.
+ *
+ * @category File System
+ */
+ export function funlock(rid: number): Promise<void>;
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Release an advisory file-system lock for the provided file synchronously.
+ *
+ * @category File System
+ */
+ export function funlockSync(rid: number): void;
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * A handler for HTTP requests. Consumes a request and returns a response.
+ *
+ * If a handler throws, the server calling the handler will assume the impact
+ * of the error is isolated to the individual request. It will catch the error
+ * and if necessary will close the underlying connection.
+ *
+ * @category HTTP Server
+ */
+ export type ServeHandler = (request: Request) => Response | Promise<Response>;
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Options which can be set when calling {@linkcode Deno.serve}.
+ *
+ * @category HTTP Server
+ */
+ export interface ServeOptions extends Partial<Deno.ListenOptions> {
+ /** An {@linkcode AbortSignal} to close the server and all connections. */
+ signal?: AbortSignal;
+
+ /** Sets `SO_REUSEPORT` on POSIX systems. */
+ reusePort?: boolean;
+
+ /** The handler to invoke when route handlers throw an error. */
+ onError?: (error: unknown) => Response | Promise<Response>;
+
+ /** The callback which is called when the server starts listening. */
+ onListen?: (params: { hostname: string; port: number }) => void;
+ }
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Additional options which are used when opening a TLS (HTTPS) server.
+ *
+ * @category HTTP Server
+ */
+ export interface ServeTlsOptions extends ServeOptions {
+ /** Server private key in PEM format */
+ cert: string;
+
+ /** Cert chain in PEM format */
+ key: string;
+ }
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * @category HTTP Server
+ */
+ export interface ServeInit {
+ /** The handler to invoke to process each incoming request. */
+ handler: ServeHandler;
+ }
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Serves HTTP requests with the given handler.
+ *
+ * You can specify an object with a port and hostname option, which is the
+ * address to listen on. The default is port `9000` on hostname `"127.0.0.1"`.
+ *
+ * The below example serves with the port `9000`.
+ *
+ * ```ts
+ * Deno.serve((_req) => new Response("Hello, world"));
+ * ```
+ *
+ * You can change the address to listen on using the `hostname` and `port`
+ * options. The below example serves on port `3000`.
+ *
+ * ```ts
+ * Deno.serve({ port: 3000 }, (_req) => new Response("Hello, world"));
+ * ```
+ *
+ * You can stop the server with an {@linkcode AbortSignal}. The abort signal
+ * needs to be passed as the `signal` option in the options bag. The server
+ * aborts when the abort signal is aborted. To wait for the server to close,
+ * await the promise returned from the `Deno.serve` API.
+ *
+ * ```ts
+ * const ac = new AbortController();
+ *
+ * Deno.serve({ signal: ac.signal }, (_req) => new Response("Hello, world"))
+ * .then(() => console.log("Server closed"));
+ *
+ * console.log("Closing server...");
+ * ac.abort();
+ * ```
+ *
+ * By default `Deno.serve` prints the message
+ * `Listening on http://<hostname>:<port>/` on listening. If you like to
+ * change this behavior, you can specify a custom `onListen` callback.
+ *
+ * ```ts
+ * Deno.serve({
+ * onListen({ port, hostname }) {
+ * console.log(`Server started at http://${hostname}:${port}`);
+ * // ... more info specific to your server ..
+ * },
+ * handler: (_req) => new Response("Hello, world"),
+ * });
+ * ```
+ *
+ * To enable TLS you must specify the `key` and `cert` options.
+ *
+ * ```ts
+ * const cert = "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----\n";
+ * const key = "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n";
+ * Deno.serve({ cert, key }, (_req) => new Response("Hello, world"));
+ * ```
+ *
+ * @category HTTP Server
+ */
+ export function serve(
+ handler: ServeHandler,
+ options?: ServeOptions | ServeTlsOptions,
+ ): Promise<void>;
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Serves HTTP requests with the given handler.
+ *
+ * You can specify an object with a port and hostname option, which is the
+ * address to listen on. The default is port `9000` on hostname `"127.0.0.1"`.
+ *
+ * The below example serves with the port `9000`.
+ *
+ * ```ts
+ * Deno.serve((_req) => new Response("Hello, world"));
+ * ```
+ *
+ * You can change the address to listen on using the `hostname` and `port`
+ * options. The below example serves on port `3000`.
+ *
+ * ```ts
+ * Deno.serve({ port: 3000 }, (_req) => new Response("Hello, world"));
+ * ```
+ *
+ * You can stop the server with an {@linkcode AbortSignal}. The abort signal
+ * needs to be passed as the `signal` option in the options bag. The server
+ * aborts when the abort signal is aborted. To wait for the server to close,
+ * await the promise returned from the `Deno.serve` API.
+ *
+ * ```ts
+ * const ac = new AbortController();
+ *
+ * Deno.serve({ signal: ac.signal }, (_req) => new Response("Hello, world"))
+ * .then(() => console.log("Server closed"));
+ *
+ * console.log("Closing server...");
+ * ac.abort();
+ * ```
+ *
+ * By default `Deno.serve` prints the message
+ * `Listening on http://<hostname>:<port>/` on listening. If you like to
+ * change this behavior, you can specify a custom `onListen` callback.
+ *
+ * ```ts
+ * Deno.serve({
+ * onListen({ port, hostname }) {
+ * console.log(`Server started at http://${hostname}:${port}`);
+ * // ... more info specific to your server ..
+ * },
+ * handler: (_req) => new Response("Hello, world"),
+ * });
+ * ```
+ *
+ * To enable TLS you must specify the `key` and `cert` options.
+ *
+ * ```ts
+ * const cert = "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----\n";
+ * const key = "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n";
+ * Deno.serve({ cert, key }, (_req) => new Response("Hello, world"));
+ * ```
+ *
+ * @category HTTP Server
+ */
+ export function serve(
+ options: ServeOptions | ServeTlsOptions,
+ handler: ServeHandler,
+ ): Promise<void>;
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Serves HTTP requests with the given handler.
+ *
+ * You can specify an object with a port and hostname option, which is the
+ * address to listen on. The default is port `9000` on hostname `"127.0.0.1"`.
+ *
+ * The below example serves with the port `9000`.
+ *
+ * ```ts
+ * Deno.serve((_req) => new Response("Hello, world"));
+ * ```
+ *
+ * You can change the address to listen on using the `hostname` and `port`
+ * options. The below example serves on port `3000`.
+ *
+ * ```ts
+ * Deno.serve({ port: 3000 }, (_req) => new Response("Hello, world"));
+ * ```
+ *
+ * You can stop the server with an {@linkcode AbortSignal}. The abort signal
+ * needs to be passed as the `signal` option in the options bag. The server
+ * aborts when the abort signal is aborted. To wait for the server to close,
+ * await the promise returned from the `Deno.serve` API.
+ *
+ * ```ts
+ * const ac = new AbortController();
+ *
+ * Deno.serve({ signal: ac.signal }, (_req) => new Response("Hello, world"))
+ * .then(() => console.log("Server closed"));
+ *
+ * console.log("Closing server...");
+ * ac.abort();
+ * ```
+ *
+ * By default `Deno.serve` prints the message
+ * `Listening on http://<hostname>:<port>/` on listening. If you like to
+ * change this behavior, you can specify a custom `onListen` callback.
+ *
+ * ```ts
+ * Deno.serve({
+ * onListen({ port, hostname }) {
+ * console.log(`Server started at http://${hostname}:${port}`);
+ * // ... more info specific to your server ..
+ * },
+ * handler: (_req) => new Response("Hello, world"),
+ * });
+ * ```
+ *
+ * To enable TLS you must specify the `key` and `cert` options.
+ *
+ * ```ts
+ * const cert = "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----\n";
+ * const key = "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n";
+ * Deno.serve({ cert, key }, (_req) => new Response("Hello, world"));
+ * ```
+ *
+ * @category HTTP Server
+ */
+ export function serve(
+ options: ServeInit & (ServeOptions | ServeTlsOptions),
+ ): Promise<void>;
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Allows "hijacking" the connection that the request is associated with. This
+ * can be used to implement protocols that build on top of HTTP (eg.
+ * {@linkcode WebSocket}).
+ *
+ * The returned promise returns underlying connection and first packet
+ * received. The promise shouldn't be awaited before responding to the
+ * `request`, otherwise event loop might deadlock.
+ *
+ * ```ts
+ * function handler(req: Request): Response {
+ * Deno.upgradeHttp(req).then(([conn, firstPacket]) => {
+ * // ...
+ * });
+ * return new Response(null, { status: 101 });
+ * }
+ * ```
+ *
+ * This method can only be called on requests originating the
+ * {@linkcode Deno.serveHttp} server.
+ *
+ * @category HTTP Server
+ */
+ export function upgradeHttp(
+ request: Request,
+ ): Promise<[Deno.Conn, Uint8Array]>;
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Allows "hijacking" the connection that the request is associated with.
+ * This can be used to implement protocols that build on top of HTTP (eg.
+ * {@linkcode WebSocket}).
+ *
+ * Unlike {@linkcode Deno.upgradeHttp} this function does not require that you
+ * respond to the request with a {@linkcode Response} object. Instead this
+ * function returns the underlying connection and first packet received
+ * immediately, and then the caller is responsible for writing the response to
+ * the connection.
+ *
+ * This method can only be called on requests originating the
+ * {@linkcode Deno.serve} server.
+ *
+ * @category HTTP Server
+ */
+ export function upgradeHttpRaw(request: Request): [Deno.Conn, Uint8Array];
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * @deprecated Use the Deno.Command API instead.
+ *
+ * Options which can be set when calling {@linkcode Deno.spawn},
+ * {@linkcode Deno.spawnSync}, and {@linkcode Deno.spawnChild}.
+ *
+ * @category Sub Process
+ */
+ export interface SpawnOptions {
+ /** Arguments to pass to the process. */
+ args?: string[];
+ /**
+ * The working directory of the process.
+ *
+ * If not specified, the `cwd` of the parent process is used.
+ */
+ cwd?: string | URL;
+ /**
+ * Clear environmental variables from parent process.
+ *
+ * Doesn't guarantee that only `env` variables are present, as the OS may
+ * set environmental variables for processes.
+ */
+ clearEnv?: boolean;
+ /** Environmental variables to pass to the subprocess. */
+ env?: Record<string, string>;
+ /**
+ * Sets the child process’s user ID. This translates to a setuid call in the
+ * child process. Failure in the set uid call will cause the spawn to fail.
+ */
+ uid?: number;
+ /** Similar to `uid`, but sets the group ID of the child process. */
+ gid?: number;
+ /**
+ * An {@linkcode AbortSignal} that allows closing the process using the
+ * corresponding {@linkcode AbortController} by sending the process a
+ * SIGTERM signal.
+ *
+ * Not supported in {@linkcode Deno.spawnSync}.
+ */
+ signal?: AbortSignal;
+
+ /** How `stdin` of the spawned process should be handled.
+ *
+ * Defaults to `"null"`. */
+ stdin?: "piped" | "inherit" | "null";
+ /** How `stdout` of the spawned process should be handled.
+ *
+ * Defaults to `"piped"`. */
+ stdout?: "piped" | "inherit" | "null";
+ /** How `stderr` of the spawned process should be handled.
+ *
+ * Defaults to "piped". */
+ stderr?: "piped" | "inherit" | "null";
+
+ /** Skips quoting and escaping of the arguments on windows. This option
+ * is ignored on non-windows platforms. Defaults to `false`. */
+ windowsRawArguments?: boolean;
+ }
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * @deprecated Use the Deno.Command API instead.
+ *
+ * Spawns a child process.
+ *
+ * If any stdio options are not set to `"piped"`, accessing the corresponding
+ * field on the `Child` or its `SpawnOutput` will throw a `TypeError`.
+ *
+ * If `stdin` is set to `"piped"`, the `stdin` {@linkcode WritableStream}
+ * needs to be closed manually.
+ *
+ * ```ts
+ * const child = Deno.spawnChild(Deno.execPath(), {
+ * args: [
+ * "eval",
+ * "console.log('Hello World')",
+ * ],
+ * stdin: "piped",
+ * });
+ *
+ * // open a file and pipe the subprocess output to it.
+ * child.stdout.pipeTo(Deno.openSync("output").writable);
+ *
+ * // manually close stdin
+ * child.stdin.close();
+ * const status = await child.status;
+ * ```
+ *
+ * @category Sub Process
+ */
+ export function spawnChild(
+ command: string | URL,
+ options?: SpawnOptions,
+ ): Child;
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * @deprecated Use the Deno.Command API instead.
+ *
+ * The interface for handling a child process returned from
+ * {@linkcode Deno.spawnChild}.
+ *
+ * @category Sub Process
+ */
+ export class Child {
+ get stdin(): WritableStream<Uint8Array>;
+ get stdout(): ReadableStream<Uint8Array>;
+ get stderr(): ReadableStream<Uint8Array>;
+ readonly pid: number;
+ /** Get the status of the child. */
+ readonly status: Promise<ChildStatus>;
+
+ /** Waits for the child to exit completely, returning all its output and
+ * status. */
+ output(): Promise<SpawnOutput>;
+ /** Kills the process with given {@linkcode Deno.Signal}. Defaults to
+ * `"SIGTERM"`. */
+ kill(signo?: Signal): void;
+
+ /** Ensure that the status of the child process prevents the Deno process
+ * from exiting. */
+ ref(): void;
+ /** Ensure that the status of the child process does not block the Deno
+ * process from exiting. */
+ unref(): void;
+ }
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * @deprecated Use the Deno.Command API instead.
+ *
+ * Executes a subprocess, waiting for it to finish and collecting all of its
+ * output.
+ *
+ * Will throw an error if `stdin: "piped"` is passed.
+ *
+ * If options `stdout` or `stderr` are not set to `"piped"`, accessing the
+ * corresponding field on `SpawnOutput` will throw a `TypeError`.
+ *
+ * ```ts
+ * const { code, stdout, stderr } = await Deno.spawn(Deno.execPath(), {
+ * args: [
+ * "eval",
+ * "console.log('hello'); console.error('world')",
+ * ],
+ * });
+ * console.assert(code === 0);
+ * console.assert("hello\n" === new TextDecoder().decode(stdout));
+ * console.assert("world\n" === new TextDecoder().decode(stderr));
+ * ```
+ *
+ * @category Sub Process
+ */
+ export function spawn(
+ command: string | URL,
+ options?: SpawnOptions,
+ ): Promise<SpawnOutput>;
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * @deprecated Use the Deno.Command API instead.
+ *
+ * Synchronously executes a subprocess, waiting for it to finish and
+ * collecting all of its output.
+ *
+ * Will throw an error if `stdin: "piped"` is passed.
+ *
+ * If options `stdout` or `stderr` are not set to `"piped"`, accessing the
+ * corresponding field on `SpawnOutput` will throw a `TypeError`.
+ *
+ * ```ts
+ * const { code, stdout, stderr } = Deno.spawnSync(Deno.execPath(), {
+ * args: [
+ * "eval",
+ * "console.log('hello'); console.error('world')",
+ * ],
+ * });
+ * console.assert(code === 0);
+ * console.assert("hello\n" === new TextDecoder().decode(stdout));
+ * console.assert("world\n" === new TextDecoder().decode(stderr));
+ * ```
+ *
+ * @category Sub Process
+ */
+ export function spawnSync(
+ command: string | URL,
+ options?: SpawnOptions,
+ ): SpawnOutput;
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * @deprecated Use the Deno.Command API instead.
+ *
+ * @category Sub Process
+ */
+ export interface ChildStatus {
+ /** If the child process exits with a 0 status code, `success` will be set
+ * to `true`, otherwise `false`. */
+ success: boolean;
+ /** The exit code of the child process. */
+ code: number;
+ /** The signal associated with the child process, present if
+ * {@linkcode Deno.spawn} was called. */
+ signal: Signal | null;
+ }
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * @deprecated Use the Deno.Command API instead.
+ *
+ * The interface returned from calling {@linkcode Deno.spawn} or
+ * {@linkcode Deno.spawnSync} which represents the result of spawning the
+ * child process.
+ *
+ * @category Sub Process
+ */
+ export interface SpawnOutput extends ChildStatus {
+ /** The buffered output from the child processes `stdout`. */
+ readonly stdout: Uint8Array;
+ /** The buffered output from the child processes `stderr`. */
+ readonly stderr: Uint8Array;
+ }
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Create a child process.
+ *
+ * If any stdio options are not set to `"piped"`, accessing the corresponding
+ * field on the `Command` or its `CommandOutput` will throw a `TypeError`.
+ *
+ * If `stdin` is set to `"piped"`, the `stdin` {@linkcode WritableStream}
+ * needs to be closed manually.
+ *
+ * ```ts
+ * const command = new Deno.Command(Deno.execPath(), {
+ * args: [
+ * "eval",
+ * "console.log('Hello World')",
+ * ],
+ * stdin: "piped",
+ * });
+ * command.spawn();
+ *
+ * // open a file and pipe the subprocess output to it.
+ * command.stdout.pipeTo(Deno.openSync("output").writable);
+ *
+ * // manually close stdin
+ * command.stdin.close();
+ * const status = await command.status;
+ * ```
+ *
+ * ```ts
+ * const command = new Deno.Command(Deno.execPath(), {
+ * args: [
+ * "eval",
+ * "console.log('hello'); console.error('world')",
+ * ],
+ * });
+ * const { code, stdout, stderr } = await command.output();
+ * console.assert(code === 0);
+ * console.assert("hello\n" === new TextDecoder().decode(stdout));
+ * console.assert("world\n" === new TextDecoder().decode(stderr));
+ * ```
+ *
+ * ```ts
+ * const command = new Deno.Command(Deno.execPath(), {
+ * args: [
+ * "eval",
+ * "console.log('hello'); console.error('world')",
+ * ],
+ * });
+ * const { code, stdout, stderr } = command.outputSync();
+ * console.assert(code === 0);
+ * console.assert("hello\n" === new TextDecoder().decode(stdout));
+ * console.assert("world\n" === new TextDecoder().decode(stderr));
+ * ```
+ *
+ * @category Sub Process
+ */
+ export class Command {
+ get stdin(): WritableStream<Uint8Array>;
+ get stdout(): ReadableStream<Uint8Array>;
+ get stderr(): ReadableStream<Uint8Array>;
+ readonly pid: number;
+ /** Get the status of the child process. */
+ readonly status: Promise<CommandStatus>;
+
+ constructor(command: string | URL, options?: CommandOptions);
+ /**
+ * Executes the {@linkcode Deno.Command}, waiting for it to finish and
+ * collecting all of its output.
+ * If `spawn()` was called, calling this function will collect the remaining
+ * output.
+ *
+ * Will throw an error if `stdin: "piped"` is set.
+ *
+ * If options `stdout` or `stderr` are not set to `"piped"`, accessing the
+ * corresponding field on {@linkcode Deno.CommandOutput} will throw a `TypeError`.
+ */
+ output(): Promise<CommandOutput>;
+ /**
+ * Synchronously executes the {@linkcode Deno.Command}, waiting for it to
+ * finish and collecting all of its output.
+ *
+ * Will throw an error if `stdin: "piped"` is set.
+ *
+ * If options `stdout` or `stderr` are not set to `"piped"`, accessing the
+ * corresponding field on {@linkcode Deno.CommandOutput} will throw a `TypeError`.
+ */
+ outputSync(): CommandOutput;
+ /**
+ * Spawns a streamable subprocess, allowing to use the other methods.
+ */
+ spawn(): void;
+
+ /** Kills the process with given {@linkcode Deno.Signal}. Defaults to
+ * `"SIGTERM"`. */
+ kill(signo?: Signal): void;
+
+ /** Ensure that the status of the child process prevents the Deno process
+ * from exiting. */
+ ref(): void;
+ /** Ensure that the status of the child process does not block the Deno
+ * process from exiting. */
+ unref(): void;
+ }
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Options which can be set when calling {@linkcode Deno.command}.
+ *
+ * @category Sub Process
+ */
+ export interface CommandOptions {
+ /** Arguments to pass to the process. */
+ args?: string[];
+ /**
+ * The working directory of the process.
+ *
+ * If not specified, the `cwd` of the parent process is used.
+ */
+ cwd?: string | URL;
+ /**
+ * Clear environmental variables from parent process.
+ *
+ * Doesn't guarantee that only `env` variables are present, as the OS may
+ * set environmental variables for processes.
+ */
+ clearEnv?: boolean;
+ /** Environmental variables to pass to the subprocess. */
+ env?: Record<string, string>;
+ /**
+ * Sets the child process’s user ID. This translates to a setuid call in the
+ * child process. Failure in the set uid call will cause the spawn to fail.
+ */
+ uid?: number;
+ /** Similar to `uid`, but sets the group ID of the child process. */
+ gid?: number;
+ /**
+ * An {@linkcode AbortSignal} that allows closing the process using the
+ * corresponding {@linkcode AbortController} by sending the process a
+ * SIGTERM signal.
+ *
+ * Ignored by {@linkcode Command.outputSync}.
+ */
+ signal?: AbortSignal;
+
+ /** How `stdin` of the spawned process should be handled.
+ *
+ * Defaults to `"null"`. */
+ stdin?: "piped" | "inherit" | "null";
+ /** How `stdout` of the spawned process should be handled.
+ *
+ * Defaults to `"piped"`. */
+ stdout?: "piped" | "inherit" | "null";
+ /** How `stderr` of the spawned process should be handled.
+ *
+ * Defaults to "piped". */
+ stderr?: "piped" | "inherit" | "null";
+
+ /** Skips quoting and escaping of the arguments on Windows. This option
+ * is ignored on non-windows platforms. Defaults to `false`. */
+ windowsRawArguments?: boolean;
+ }
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * @category Sub Process
+ */
+ export interface CommandStatus {
+ /** If the child process exits with a 0 status code, `success` will be set
+ * to `true`, otherwise `false`. */
+ success: boolean;
+ /** The exit code of the child process. */
+ code: number;
+ /** The signal associated with the child process. */
+ signal: Signal | null;
+ }
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * The interface returned from calling {@linkcode Command.output} or
+ * {@linkcode Command.outputSync} which represents the result of spawning the
+ * child process.
+ *
+ * @category Sub Process
+ */
+ export interface CommandOutput extends CommandStatus {
+ /** The buffered output from the child process' `stdout`. */
+ readonly stdout: Uint8Array;
+ /** The buffered output from the child process' `stderr`. */
+ readonly stderr: Uint8Array;
+ }
+}
+
+/** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * The [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)
+ * which also supports setting a {@linkcode Deno.HttpClient} which provides a
+ * way to connect via proxies and use custom TLS certificates.
+ *
+ * @tags allow-net, allow-read
+ * @category Fetch API
+ */
+declare function fetch(
+ input: Request | URL | string,
+ init?: RequestInit & { client: Deno.HttpClient },
+): Promise<Response>;
+
+/** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * @category Web Workers
+ */
+declare interface WorkerOptions {
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Configure permissions options to change the level of access the worker will
+ * have. By default it will have no permissions. Note that the permissions
+ * of a worker can't be extended beyond its parent's permissions reach.
+ *
+ * - `"inherit"` will take the permissions of the thread the worker is created
+ * in.
+ * - `"none"` will use the default behavior and have no permission
+ * - A list of routes can be provided that are relative to the file the worker
+ * is created in to limit the access of the worker (read/write permissions
+ * only)
+ *
+ * Example:
+ *
+ * ```ts
+ * // mod.ts
+ * const worker = new Worker(
+ * new URL("deno_worker.ts", import.meta.url).href, {
+ * type: "module",
+ * deno: {
+ * permissions: {
+ * read: true,
+ * },
+ * },
+ * }
+ * );
+ * ```
+ */
+ deno?: {
+ /** Set to `"none"` to disable all the permissions in the worker. */
+ permissions?: Deno.PermissionOptions;
+ };
+}
+
+/** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * @category Web Sockets
+ */
+declare interface WebSocketStreamOptions {
+ protocols?: string[];
+ signal?: AbortSignal;
+ headers?: HeadersInit;
+}
+
+/** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * @category Web Sockets
+ */
+declare interface WebSocketConnection {
+ readable: ReadableStream<string | Uint8Array>;
+ writable: WritableStream<string | Uint8Array>;
+ extensions: string;
+ protocol: string;
+}
+
+/** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * @category Web Sockets
+ */
+declare interface WebSocketCloseInfo {
+ code?: number;
+ reason?: string;
+}
+
+/** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * @tags allow-net
+ * @category Web Sockets
+ */
+declare class WebSocketStream {
+ constructor(url: string, options?: WebSocketStreamOptions);
+ url: string;
+ connection: Promise<WebSocketConnection>;
+ closed: Promise<WebSocketCloseInfo>;
+ close(closeInfo?: WebSocketCloseInfo): void;
+}
diff --git a/cli/tsc/dts/lib.deno.window.d.ts b/cli/tsc/dts/lib.deno.window.d.ts
new file mode 100644
index 000000000..4ce288a4d
--- /dev/null
+++ b/cli/tsc/dts/lib.deno.window.d.ts
@@ -0,0 +1,270 @@
+// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
+
+/// <reference no-default-lib="true" />
+/// <reference lib="deno.ns" />
+/// <reference lib="deno.shared_globals" />
+/// <reference lib="deno.webgpu" />
+/// <reference lib="deno.webstorage" />
+/// <reference lib="esnext" />
+/// <reference lib="deno.cache" />
+
+/** @category Web APIs */
+interface WindowEventMap {
+ "error": ErrorEvent;
+ "unhandledrejection": PromiseRejectionEvent;
+}
+
+/** @category Web APIs */
+declare class Window extends EventTarget {
+ new(): Window;
+ readonly window: Window & typeof globalThis;
+ readonly self: Window & typeof globalThis;
+ onerror: ((this: Window, ev: ErrorEvent) => any) | null;
+ onload: ((this: Window, ev: Event) => any) | null;
+ onbeforeunload: ((this: Window, ev: Event) => any) | null;
+ onunload: ((this: Window, ev: Event) => any) | null;
+ onunhandledrejection:
+ | ((this: Window, ev: PromiseRejectionEvent) => any)
+ | null;
+ close: () => void;
+ readonly closed: boolean;
+ alert: (message?: string) => void;
+ confirm: (message?: string) => boolean;
+ prompt: (message?: string, defaultValue?: string) => string | null;
+ Deno: typeof Deno;
+ Navigator: typeof Navigator;
+ navigator: Navigator;
+ Location: typeof Location;
+ location: Location;
+ localStorage: Storage;
+ sessionStorage: Storage;
+ caches: CacheStorage;
+
+ addEventListener<K extends keyof WindowEventMap>(
+ type: K,
+ listener: (
+ this: Window,
+ ev: WindowEventMap[K],
+ ) => any,
+ options?: boolean | AddEventListenerOptions,
+ ): void;
+ addEventListener(
+ type: string,
+ listener: EventListenerOrEventListenerObject,
+ options?: boolean | AddEventListenerOptions,
+ ): void;
+ removeEventListener<K extends keyof WindowEventMap>(
+ type: K,
+ listener: (
+ this: Window,
+ ev: WindowEventMap[K],
+ ) => any,
+ options?: boolean | EventListenerOptions,
+ ): void;
+ removeEventListener(
+ type: string,
+ listener: EventListenerOrEventListenerObject,
+ options?: boolean | EventListenerOptions,
+ ): void;
+}
+
+/** @category Web APIs */
+declare var window: Window & typeof globalThis;
+/** @category Web APIs */
+declare var self: Window & typeof globalThis;
+/** @category DOM Events */
+declare var onerror: ((this: Window, ev: ErrorEvent) => any) | null;
+/** @category DOM Events */
+declare var onload: ((this: Window, ev: Event) => any) | null;
+/** @category DOM Events */
+declare var onbeforeunload: ((this: Window, ev: Event) => any) | null;
+/** @category DOM Events */
+declare var onunload: ((this: Window, ev: Event) => any) | null;
+/** @category Observability */
+declare var onunhandledrejection:
+ | ((this: Window, ev: PromiseRejectionEvent) => any)
+ | null;
+/** @category Web Storage API */
+declare var localStorage: Storage;
+/** @category Web Storage API */
+declare var sessionStorage: Storage;
+/** @category Cache API */
+declare var caches: CacheStorage;
+
+/** @category Web APIs */
+declare class Navigator {
+ constructor();
+ readonly gpu: GPU;
+ readonly hardwareConcurrency: number;
+ readonly userAgent: string;
+ readonly language: string;
+ readonly languages: string[];
+}
+
+/** @category Web APIs */
+declare var navigator: Navigator;
+
+/**
+ * Shows the given message and waits for the enter key pressed.
+ *
+ * If the stdin is not interactive, it does nothing.
+ *
+ * @category Web APIs
+ *
+ * @param message
+ */
+declare function alert(message?: string): void;
+
+/**
+ * Shows the given message and waits for the answer. Returns the user's answer as boolean.
+ *
+ * Only `y` and `Y` are considered as true.
+ *
+ * If the stdin is not interactive, it returns false.
+ *
+ * @category Web APIs
+ *
+ * @param message
+ */
+declare function confirm(message?: string): boolean;
+
+/**
+ * Shows the given message and waits for the user's input. Returns the user's input as string.
+ *
+ * If the default value is given and the user inputs the empty string, then it returns the given
+ * default value.
+ *
+ * If the default value is not given and the user inputs the empty string, it returns null.
+ *
+ * If the stdin is not interactive, it returns null.
+ *
+ * @category Web APIs
+ *
+ * @param message
+ * @param defaultValue
+ */
+declare function prompt(message?: string, defaultValue?: string): string | null;
+
+/** Registers an event listener in the global scope, which will be called
+ * synchronously whenever the event `type` is dispatched.
+ *
+ * ```ts
+ * addEventListener('unload', () => { console.log('All finished!'); });
+ * ...
+ * dispatchEvent(new Event('unload'));
+ * ```
+ *
+ * @category DOM Events
+ */
+declare function addEventListener<
+ K extends keyof WindowEventMap,
+>(
+ type: K,
+ listener: (this: Window, ev: WindowEventMap[K]) => any,
+ options?: boolean | AddEventListenerOptions,
+): void;
+/** @category DOM Events */
+declare function addEventListener(
+ type: string,
+ listener: EventListenerOrEventListenerObject,
+ options?: boolean | AddEventListenerOptions,
+): void;
+
+/** Remove a previously registered event listener from the global scope
+ *
+ * ```ts
+ * const listener = () => { console.log('hello'); };
+ * addEventListener('load', listener);
+ * removeEventListener('load', listener);
+ * ```
+ *
+ * @category DOM Events
+ */
+declare function removeEventListener<
+ K extends keyof WindowEventMap,
+>(
+ type: K,
+ listener: (this: Window, ev: WindowEventMap[K]) => any,
+ options?: boolean | EventListenerOptions,
+): void;
+declare function removeEventListener(
+ type: string,
+ listener: EventListenerOrEventListenerObject,
+ options?: boolean | EventListenerOptions,
+): void;
+
+// TODO(nayeemrmn): Move this to `extensions/web` where its implementation is.
+// The types there must first be split into window, worker and global types.
+/** The location (URL) of the object it is linked to. Changes done on it are
+ * reflected on the object it relates to. Accessible via
+ * `globalThis.location`.
+ *
+ * @category Web APIs
+ */
+declare class Location {
+ constructor();
+ /** Returns a DOMStringList object listing the origins of the ancestor
+ * browsing contexts, from the parent browsing context to the top-level
+ * browsing context.
+ *
+ * Always empty in Deno. */
+ readonly ancestorOrigins: DOMStringList;
+ /** Returns the Location object's URL's fragment (includes leading "#" if
+ * non-empty).
+ *
+ * Cannot be set in Deno. */
+ hash: string;
+ /** Returns the Location object's URL's host and port (if different from the
+ * default port for the scheme).
+ *
+ * Cannot be set in Deno. */
+ host: string;
+ /** Returns the Location object's URL's host.
+ *
+ * Cannot be set in Deno. */
+ hostname: string;
+ /** Returns the Location object's URL.
+ *
+ * Cannot be set in Deno. */
+ href: string;
+ toString(): string;
+ /** Returns the Location object's URL's origin. */
+ readonly origin: string;
+ /** Returns the Location object's URL's path.
+ *
+ * Cannot be set in Deno. */
+ pathname: string;
+ /** Returns the Location object's URL's port.
+ *
+ * Cannot be set in Deno. */
+ port: string;
+ /** Returns the Location object's URL's scheme.
+ *
+ * Cannot be set in Deno. */
+ protocol: string;
+ /** Returns the Location object's URL's query (includes leading "?" if
+ * non-empty).
+ *
+ * Cannot be set in Deno. */
+ search: string;
+ /** Navigates to the given URL.
+ *
+ * Cannot be set in Deno. */
+ assign(url: string): void;
+ /** Reloads the current page.
+ *
+ * Disabled in Deno. */
+ reload(): void;
+ /** @deprecated */
+ reload(forcedReload: boolean): void;
+ /** Removes the current page from the session history and navigates to the
+ * given URL.
+ *
+ * Disabled in Deno. */
+ replace(url: string): void;
+}
+
+// TODO(nayeemrmn): Move this to `extensions/web` where its implementation is.
+// The types there must first be split into window, worker and global types.
+/** @category Web APIs */
+declare var location: Location;
diff --git a/cli/tsc/dts/lib.deno.worker.d.ts b/cli/tsc/dts/lib.deno.worker.d.ts
new file mode 100644
index 000000000..d274d4c05
--- /dev/null
+++ b/cli/tsc/dts/lib.deno.worker.d.ts
@@ -0,0 +1,208 @@
+// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
+
+/// <reference no-default-lib="true" />
+/// <reference lib="deno.ns" />
+/// <reference lib="deno.shared_globals" />
+/// <reference lib="deno.webgpu" />
+/// <reference lib="esnext" />
+/// <reference lib="deno.cache" />
+
+/** @category Web Workers */
+interface WorkerGlobalScopeEventMap {
+ "error": ErrorEvent;
+ "unhandledrejection": PromiseRejectionEvent;
+}
+
+/** @category Web Workers */
+declare class WorkerGlobalScope extends EventTarget {
+ readonly location: WorkerLocation;
+ readonly navigator: WorkerNavigator;
+ onerror: ((this: WorkerGlobalScope, ev: ErrorEvent) => any) | null;
+ onunhandledrejection:
+ | ((this: WorkerGlobalScope, ev: PromiseRejectionEvent) => any)
+ | null;
+
+ readonly self: WorkerGlobalScope & typeof globalThis;
+
+ addEventListener<K extends keyof WorkerGlobalScopeEventMap>(
+ type: K,
+ listener: (
+ this: WorkerGlobalScope,
+ ev: WorkerGlobalScopeEventMap[K],
+ ) => any,
+ options?: boolean | AddEventListenerOptions,
+ ): void;
+ addEventListener(
+ type: string,
+ listener: EventListenerOrEventListenerObject,
+ options?: boolean | AddEventListenerOptions,
+ ): void;
+ removeEventListener<K extends keyof WorkerGlobalScopeEventMap>(
+ type: K,
+ listener: (
+ this: WorkerGlobalScope,
+ ev: WorkerGlobalScopeEventMap[K],
+ ) => any,
+ options?: boolean | EventListenerOptions,
+ ): void;
+ removeEventListener(
+ type: string,
+ listener: EventListenerOrEventListenerObject,
+ options?: boolean | EventListenerOptions,
+ ): void;
+
+ Deno: typeof Deno;
+ caches: CacheStorage;
+}
+
+/** @category Web APIs */
+declare class WorkerNavigator {
+ constructor();
+ readonly gpu: GPU;
+ readonly hardwareConcurrency: number;
+ readonly userAgent: string;
+ readonly language: string;
+ readonly languages: string[];
+}
+
+/** @category Web APIs */
+declare var navigator: WorkerNavigator;
+
+/** @category Web Workers */
+interface DedicatedWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap {
+ "message": MessageEvent;
+ "messageerror": MessageEvent;
+}
+
+/** @category Web APIs */
+declare class DedicatedWorkerGlobalScope extends WorkerGlobalScope {
+ readonly name: string;
+ onmessage:
+ | ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any)
+ | null;
+ onmessageerror:
+ | ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any)
+ | null;
+ close(): void;
+ postMessage(message: any, transfer: Transferable[]): void;
+ postMessage(message: any, options?: StructuredSerializeOptions): void;
+ addEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(
+ type: K,
+ listener: (
+ this: DedicatedWorkerGlobalScope,
+ ev: DedicatedWorkerGlobalScopeEventMap[K],
+ ) => any,
+ options?: boolean | AddEventListenerOptions,
+ ): void;
+ addEventListener(
+ type: string,
+ listener: EventListenerOrEventListenerObject,
+ options?: boolean | AddEventListenerOptions,
+ ): void;
+ removeEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(
+ type: K,
+ listener: (
+ this: DedicatedWorkerGlobalScope,
+ ev: DedicatedWorkerGlobalScopeEventMap[K],
+ ) => any,
+ options?: boolean | EventListenerOptions,
+ ): void;
+ removeEventListener(
+ type: string,
+ listener: EventListenerOrEventListenerObject,
+ options?: boolean | EventListenerOptions,
+ ): void;
+}
+
+/** @category Web Workers */
+declare var name: string;
+/** @category Web Workers */
+declare var onmessage:
+ | ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any)
+ | null;
+/** @category Web Workers */
+declare var onmessageerror:
+ | ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any)
+ | null;
+/** @category Web Workers */
+declare function close(): void;
+/** @category Web Workers */
+declare function postMessage(message: any, transfer: Transferable[]): void;
+/** @category Web Workers */
+declare function postMessage(
+ message: any,
+ options?: StructuredSerializeOptions,
+): void;
+/** @category Web APIs */
+declare var navigator: WorkerNavigator;
+/** @category Web APIs */
+declare var onerror:
+ | ((this: DedicatedWorkerGlobalScope, ev: ErrorEvent) => any)
+ | null;
+/** @category Observability */
+declare var onunhandledrejection:
+ | ((this: DedicatedWorkerGlobalScope, ev: PromiseRejectionEvent) => any)
+ | null;
+/** @category Web Workers */
+declare var self: WorkerGlobalScope & typeof globalThis;
+/** @category DOM Events */
+declare function addEventListener<
+ K extends keyof DedicatedWorkerGlobalScopeEventMap,
+>(
+ type: K,
+ listener: (
+ this: DedicatedWorkerGlobalScope,
+ ev: DedicatedWorkerGlobalScopeEventMap[K],
+ ) => any,
+ options?: boolean | AddEventListenerOptions,
+): void;
+/** @category DOM Events */
+declare function addEventListener(
+ type: string,
+ listener: EventListenerOrEventListenerObject,
+ options?: boolean | AddEventListenerOptions,
+): void;
+/** @category DOM Events */
+declare function removeEventListener<
+ K extends keyof DedicatedWorkerGlobalScopeEventMap,
+>(
+ type: K,
+ listener: (
+ this: DedicatedWorkerGlobalScope,
+ ev: DedicatedWorkerGlobalScopeEventMap[K],
+ ) => any,
+ options?: boolean | EventListenerOptions,
+): void;
+/** @category DOM Events */
+declare function removeEventListener(
+ type: string,
+ listener: EventListenerOrEventListenerObject,
+ options?: boolean | EventListenerOptions,
+): void;
+
+// TODO(nayeemrmn): Move this to `extensions/web` where its implementation is.
+// The types there must first be split into window, worker and global types.
+/** The absolute location of the script executed by the Worker. Such an object
+ * is initialized for each worker and is available via the
+ * WorkerGlobalScope.location property obtained by calling self.location.
+ *
+ * @category Web APIs
+ */
+declare class WorkerLocation {
+ constructor();
+ readonly hash: string;
+ readonly host: string;
+ readonly hostname: string;
+ readonly href: string;
+ toString(): string;
+ readonly origin: string;
+ readonly pathname: string;
+ readonly port: string;
+ readonly protocol: string;
+ readonly search: string;
+}
+
+// TODO(nayeemrmn): Move this to `extensions/web` where its implementation is.
+// The types there must first be split into window, worker and global types.
+/** @category Web APIs */
+declare var location: WorkerLocation;
diff --git a/cli/tsc/dts/lib.deno_webgpu.d.ts b/cli/tsc/dts/lib.deno_webgpu.d.ts
new file mode 100644
index 000000000..32f142768
--- /dev/null
+++ b/cli/tsc/dts/lib.deno_webgpu.d.ts
@@ -0,0 +1,1322 @@
+// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
+
+// deno-lint-ignore-file no-explicit-any no-empty-interface
+
+/// <reference no-default-lib="true" />
+/// <reference lib="esnext" />
+
+/** @category WebGPU */
+interface GPUObjectBase {
+ label: string;
+}
+
+/** @category WebGPU */
+declare interface GPUObjectDescriptorBase {
+ label?: string;
+}
+
+/** @category WebGPU */
+declare class GPUSupportedLimits {
+ maxTextureDimension1D?: number;
+ maxTextureDimension2D?: number;
+ maxTextureDimension3D?: number;
+ maxTextureArrayLayers?: number;
+ maxBindGroups?: number;
+ maxDynamicUniformBuffersPerPipelineLayout?: number;
+ maxDynamicStorageBuffersPerPipelineLayout?: number;
+ maxSampledTexturesPerShaderStage?: number;
+ maxSamplersPerShaderStage?: number;
+ maxStorageBuffersPerShaderStage?: number;
+ maxStorageTexturesPerShaderStage?: number;
+ maxUniformBuffersPerShaderStage?: number;
+ maxUniformBufferBindingSize?: number;
+ maxStorageBufferBindingSize?: number;
+ minUniformBufferOffsetAlignment?: number;
+ minStorageBufferOffsetAlignment?: number;
+ maxVertexBuffers?: number;
+ maxVertexAttributes?: number;
+ maxVertexBufferArrayStride?: number;
+ maxInterStageShaderComponents?: number;
+ maxComputeWorkgroupStorageSize?: number;
+ maxComputeInvocationsPerWorkgroup?: number;
+ maxComputeWorkgroupSizeX?: number;
+ maxComputeWorkgroupSizeY?: number;
+ maxComputeWorkgroupSizeZ?: number;
+ maxComputeWorkgroupsPerDimension?: number;
+}
+
+/** @category WebGPU */
+declare class GPUSupportedFeatures {
+ forEach(
+ callbackfn: (
+ value: GPUFeatureName,
+ value2: GPUFeatureName,
+ set: Set<GPUFeatureName>,
+ ) => void,
+ thisArg?: any,
+ ): void;
+ has(value: GPUFeatureName): boolean;
+ size: number;
+ [
+ Symbol
+ .iterator
+ ](): IterableIterator<GPUFeatureName>;
+ entries(): IterableIterator<[GPUFeatureName, GPUFeatureName]>;
+ keys(): IterableIterator<GPUFeatureName>;
+ values(): IterableIterator<GPUFeatureName>;
+}
+
+/** @category WebGPU */
+declare class GPUAdapterInfo {
+ readonly vendor: string;
+ readonly architecture: string;
+ readonly device: string;
+ readonly description: string;
+}
+
+/** @category WebGPU */
+declare class GPU {
+ requestAdapter(
+ options?: GPURequestAdapterOptions,
+ ): Promise<GPUAdapter | null>;
+}
+
+/** @category WebGPU */
+declare interface GPURequestAdapterOptions {
+ powerPreference?: GPUPowerPreference;
+ forceFallbackAdapter?: boolean;
+}
+
+/** @category WebGPU */
+declare type GPUPowerPreference = "low-power" | "high-performance";
+
+/** @category WebGPU */
+declare class GPUAdapter {
+ readonly features: GPUSupportedFeatures;
+ readonly limits: GPUSupportedLimits;
+ readonly isFallbackAdapter: boolean;
+
+ requestDevice(descriptor?: GPUDeviceDescriptor): Promise<GPUDevice>;
+ requestAdapterInfo(unmaskHints?: string[]): Promise<GPUAdapterInfo>;
+}
+
+/** @category WebGPU */
+declare interface GPUDeviceDescriptor extends GPUObjectDescriptorBase {
+ requiredFeatures?: GPUFeatureName[];
+ requiredLimits?: Record<string, number>;
+}
+
+/** @category WebGPU */
+declare type GPUFeatureName =
+ | "depth-clip-control"
+ | "depth24unorm-stencil8"
+ | "depth32float-stencil8"
+ | "pipeline-statistics-query"
+ | "texture-compression-bc"
+ | "texture-compression-etc2"
+ | "texture-compression-astc"
+ | "timestamp-query"
+ | "indirect-first-instance"
+ | "shader-f16"
+ // extended from spec
+ | "mappable-primary-buffers"
+ | "sampled-texture-binding-array"
+ | "sampled-texture-array-dynamic-indexing"
+ | "sampled-texture-array-non-uniform-indexing"
+ | "unsized-binding-array"
+ | "multi-draw-indirect"
+ | "multi-draw-indirect-count"
+ | "push-constants"
+ | "address-mode-clamp-to-border"
+ | "texture-adapter-specific-format-features"
+ | "shader-float64"
+ | "vertex-attribute-64bit";
+
+/** @category WebGPU */
+declare class GPUDevice extends EventTarget implements GPUObjectBase {
+ label: string;
+
+ readonly lost: Promise<GPUDeviceLostInfo>;
+ pushErrorScope(filter: GPUErrorFilter): undefined;
+ popErrorScope(): Promise<GPUError | null>;
+ onuncapturederror:
+ | ((this: GPUDevice, ev: GPUUncapturedErrorEvent) => any)
+ | null;
+
+ readonly features: GPUSupportedFeatures;
+ readonly limits: GPUSupportedLimits;
+ readonly queue: GPUQueue;
+
+ destroy(): undefined;
+
+ createBuffer(descriptor: GPUBufferDescriptor): GPUBuffer;
+ createTexture(descriptor: GPUTextureDescriptor): GPUTexture;
+ createSampler(descriptor?: GPUSamplerDescriptor): GPUSampler;
+
+ createBindGroupLayout(
+ descriptor: GPUBindGroupLayoutDescriptor,
+ ): GPUBindGroupLayout;
+ createPipelineLayout(
+ descriptor: GPUPipelineLayoutDescriptor,
+ ): GPUPipelineLayout;
+ createBindGroup(descriptor: GPUBindGroupDescriptor): GPUBindGroup;
+
+ createShaderModule(descriptor: GPUShaderModuleDescriptor): GPUShaderModule;
+ createComputePipeline(
+ descriptor: GPUComputePipelineDescriptor,
+ ): GPUComputePipeline;
+ createRenderPipeline(
+ descriptor: GPURenderPipelineDescriptor,
+ ): GPURenderPipeline;
+ createComputePipelineAsync(
+ descriptor: GPUComputePipelineDescriptor,
+ ): Promise<GPUComputePipeline>;
+ createRenderPipelineAsync(
+ descriptor: GPURenderPipelineDescriptor,
+ ): Promise<GPURenderPipeline>;
+
+ createCommandEncoder(
+ descriptor?: GPUCommandEncoderDescriptor,
+ ): GPUCommandEncoder;
+ createRenderBundleEncoder(
+ descriptor: GPURenderBundleEncoderDescriptor,
+ ): GPURenderBundleEncoder;
+
+ createQuerySet(descriptor: GPUQuerySetDescriptor): GPUQuerySet;
+}
+
+/** @category WebGPU */
+declare class GPUBuffer implements GPUObjectBase {
+ label: string;
+
+ mapAsync(
+ mode: GPUMapModeFlags,
+ offset?: number,
+ size?: number,
+ ): Promise<undefined>;
+ getMappedRange(offset?: number, size?: number): ArrayBuffer;
+ unmap(): undefined;
+
+ destroy(): undefined;
+}
+
+/** @category WebGPU */
+declare interface GPUBufferDescriptor extends GPUObjectDescriptorBase {
+ size: number;
+ usage: GPUBufferUsageFlags;
+ mappedAtCreation?: boolean;
+}
+
+/** @category WebGPU */
+declare type GPUBufferUsageFlags = number;
+
+/** @category WebGPU */
+declare class GPUBufferUsage {
+ static MAP_READ: 0x0001;
+ static MAP_WRITE: 0x0002;
+ static COPY_SRC: 0x0004;
+ static COPY_DST: 0x0008;
+ static INDEX: 0x0010;
+ static VERTEX: 0x0020;
+ static UNIFORM: 0x0040;
+ static STORAGE: 0x0080;
+ static INDIRECT: 0x0100;
+ static QUERY_RESOLVE: 0x0200;
+}
+
+/** @category WebGPU */
+declare type GPUMapModeFlags = number;
+
+/** @category WebGPU */
+declare class GPUMapMode {
+ static READ: 0x0001;
+ static WRITE: 0x0002;
+}
+
+/** @category WebGPU */
+declare class GPUTexture implements GPUObjectBase {
+ label: string;
+
+ createView(descriptor?: GPUTextureViewDescriptor): GPUTextureView;
+ destroy(): undefined;
+}
+
+/** @category WebGPU */
+declare interface GPUTextureDescriptor extends GPUObjectDescriptorBase {
+ size: GPUExtent3D;
+ mipLevelCount?: number;
+ sampleCount?: number;
+ dimension?: GPUTextureDimension;
+ format: GPUTextureFormat;
+ usage: GPUTextureUsageFlags;
+}
+
+/** @category WebGPU */
+declare type GPUTextureDimension = "1d" | "2d" | "3d";
+
+/** @category WebGPU */
+declare type GPUTextureUsageFlags = number;
+
+/** @category WebGPU */
+declare class GPUTextureUsage {
+ static COPY_SRC: 0x01;
+ static COPY_DST: 0x02;
+ static TEXTURE_BINDING: 0x04;
+ static STORAGE_BINDING: 0x08;
+ static RENDER_ATTACHMENT: 0x10;
+}
+
+/** @category WebGPU */
+declare class GPUTextureView implements GPUObjectBase {
+ label: string;
+}
+
+/** @category WebGPU */
+declare interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
+ format?: GPUTextureFormat;
+ dimension?: GPUTextureViewDimension;
+ aspect?: GPUTextureAspect;
+ baseMipLevel?: number;
+ mipLevelCount?: number;
+ baseArrayLayer?: number;
+ arrayLayerCount?: number;
+}
+
+/** @category WebGPU */
+declare type GPUTextureViewDimension =
+ | "1d"
+ | "2d"
+ | "2d-array"
+ | "cube"
+ | "cube-array"
+ | "3d";
+
+/** @category WebGPU */
+declare type GPUTextureAspect = "all" | "stencil-only" | "depth-only";
+
+/** @category WebGPU */
+declare type GPUTextureFormat =
+ | "r8unorm"
+ | "r8snorm"
+ | "r8uint"
+ | "r8sint"
+ | "r16uint"
+ | "r16sint"
+ | "r16float"
+ | "rg8unorm"
+ | "rg8snorm"
+ | "rg8uint"
+ | "rg8sint"
+ | "r32uint"
+ | "r32sint"
+ | "r32float"
+ | "rg16uint"
+ | "rg16sint"
+ | "rg16float"
+ | "rgba8unorm"
+ | "rgba8unorm-srgb"
+ | "rgba8snorm"
+ | "rgba8uint"
+ | "rgba8sint"
+ | "bgra8unorm"
+ | "bgra8unorm-srgb"
+ | "rgb9e5ufloat"
+ | "rgb10a2unorm"
+ | "rg11b10ufloat"
+ | "rg32uint"
+ | "rg32sint"
+ | "rg32float"
+ | "rgba16uint"
+ | "rgba16sint"
+ | "rgba16float"
+ | "rgba32uint"
+ | "rgba32sint"
+ | "rgba32float"
+ | "stencil8"
+ | "depth16unorm"
+ | "depth24plus"
+ | "depth24plus-stencil8"
+ | "depth32float"
+ | "depth24unorm-stencil8"
+ | "depth32float-stencil8"
+ | "bc1-rgba-unorm"
+ | "bc1-rgba-unorm-srgb"
+ | "bc2-rgba-unorm"
+ | "bc2-rgba-unorm-srgb"
+ | "bc3-rgba-unorm"
+ | "bc3-rgba-unorm-srgb"
+ | "bc4-r-unorm"
+ | "bc4-r-snorm"
+ | "bc5-rg-unorm"
+ | "bc5-rg-snorm"
+ | "bc6h-rgb-ufloat"
+ | "bc6h-rgb-float"
+ | "bc7-rgba-unorm"
+ | "bc7-rgba-unorm-srgb"
+ | "etc2-rgb8unorm"
+ | "etc2-rgb8unorm-srgb"
+ | "etc2-rgb8a1unorm"
+ | "etc2-rgb8a1unorm-srgb"
+ | "etc2-rgba8unorm"
+ | "etc2-rgba8unorm-srgb"
+ | "eac-r11unorm"
+ | "eac-r11snorm"
+ | "eac-rg11unorm"
+ | "eac-rg11snorm"
+ | "astc-4x4-unorm"
+ | "astc-4x4-unorm-srgb"
+ | "astc-5x4-unorm"
+ | "astc-5x4-unorm-srgb"
+ | "astc-5x5-unorm"
+ | "astc-5x5-unorm-srgb"
+ | "astc-6x5-unorm"
+ | "astc-6x5-unorm-srgb"
+ | "astc-6x6-unorm"
+ | "astc-6x6-unorm-srgb"
+ | "astc-8x5-unorm"
+ | "astc-8x5-unorm-srgb"
+ | "astc-8x6-unorm"
+ | "astc-8x6-unorm-srgb"
+ | "astc-8x8-unorm"
+ | "astc-8x8-unorm-srgb"
+ | "astc-10x5-unorm"
+ | "astc-10x5-unorm-srgb"
+ | "astc-10x6-unorm"
+ | "astc-10x6-unorm-srgb"
+ | "astc-10x8-unorm"
+ | "astc-10x8-unorm-srgb"
+ | "astc-10x10-unorm"
+ | "astc-10x10-unorm-srgb"
+ | "astc-12x10-unorm"
+ | "astc-12x10-unorm-srgb"
+ | "astc-12x12-unorm"
+ | "astc-12x12-unorm-srgb";
+
+/** @category WebGPU */
+declare class GPUSampler implements GPUObjectBase {
+ label: string;
+}
+
+/** @category WebGPU */
+declare interface GPUSamplerDescriptor extends GPUObjectDescriptorBase {
+ addressModeU?: GPUAddressMode;
+ addressModeV?: GPUAddressMode;
+ addressModeW?: GPUAddressMode;
+ magFilter?: GPUFilterMode;
+ minFilter?: GPUFilterMode;
+ mipmapFilter?: GPUMipmapFilterMode;
+ lodMinClamp?: number;
+ lodMaxClamp?: number;
+ compare?: GPUCompareFunction;
+ maxAnisotropy?: number;
+}
+
+/** @category WebGPU */
+declare type GPUAddressMode = "clamp-to-edge" | "repeat" | "mirror-repeat";
+
+/** @category WebGPU */
+declare type GPUFilterMode = "nearest" | "linear";
+
+/** @category WebGPU */
+declare type GPUMipmapFilterMode = "nearest" | "linear";
+
+/** @category WebGPU */
+declare type GPUCompareFunction =
+ | "never"
+ | "less"
+ | "equal"
+ | "less-equal"
+ | "greater"
+ | "not-equal"
+ | "greater-equal"
+ | "always";
+
+/** @category WebGPU */
+declare class GPUBindGroupLayout implements GPUObjectBase {
+ label: string;
+}
+
+/** @category WebGPU */
+declare interface GPUBindGroupLayoutDescriptor extends GPUObjectDescriptorBase {
+ entries: GPUBindGroupLayoutEntry[];
+}
+
+/** @category WebGPU */
+declare interface GPUBindGroupLayoutEntry {
+ binding: number;
+ visibility: GPUShaderStageFlags;
+
+ buffer?: GPUBufferBindingLayout;
+ sampler?: GPUSamplerBindingLayout;
+ texture?: GPUTextureBindingLayout;
+ storageTexture?: GPUStorageTextureBindingLayout;
+}
+
+/** @category WebGPU */
+declare type GPUShaderStageFlags = number;
+
+/** @category WebGPU */
+declare class GPUShaderStage {
+ static VERTEX: 0x1;
+ static FRAGMENT: 0x2;
+ static COMPUTE: 0x4;
+}
+
+/** @category WebGPU */
+declare interface GPUBufferBindingLayout {
+ type?: GPUBufferBindingType;
+ hasDynamicOffset?: boolean;
+ minBindingSize?: number;
+}
+
+/** @category WebGPU */
+declare type GPUBufferBindingType = "uniform" | "storage" | "read-only-storage";
+
+/** @category WebGPU */
+declare interface GPUSamplerBindingLayout {
+ type?: GPUSamplerBindingType;
+}
+
+/** @category WebGPU */
+declare type GPUSamplerBindingType =
+ | "filtering"
+ | "non-filtering"
+ | "comparison";
+
+/** @category WebGPU */
+declare interface GPUTextureBindingLayout {
+ sampleType?: GPUTextureSampleType;
+ viewDimension?: GPUTextureViewDimension;
+ multisampled?: boolean;
+}
+
+/** @category WebGPU */
+declare type GPUTextureSampleType =
+ | "float"
+ | "unfilterable-float"
+ | "depth"
+ | "sint"
+ | "uint";
+
+/** @category WebGPU */
+declare type GPUStorageTextureAccess = "write-only";
+
+/** @category WebGPU */
+declare interface GPUStorageTextureBindingLayout {
+ access: GPUStorageTextureAccess;
+ format: GPUTextureFormat;
+ viewDimension?: GPUTextureViewDimension;
+}
+
+/** @category WebGPU */
+declare class GPUBindGroup implements GPUObjectBase {
+ label: string;
+}
+
+/** @category WebGPU */
+declare interface GPUBindGroupDescriptor extends GPUObjectDescriptorBase {
+ layout: GPUBindGroupLayout;
+ entries: GPUBindGroupEntry[];
+}
+
+/** @category WebGPU */
+declare type GPUBindingResource =
+ | GPUSampler
+ | GPUTextureView
+ | GPUBufferBinding;
+
+/** @category WebGPU */
+declare interface GPUBindGroupEntry {
+ binding: number;
+ resource: GPUBindingResource;
+}
+
+/** @category WebGPU */
+declare interface GPUBufferBinding {
+ buffer: GPUBuffer;
+ offset?: number;
+ size?: number;
+}
+
+/** @category WebGPU */
+declare class GPUPipelineLayout implements GPUObjectBase {
+ label: string;
+}
+
+/** @category WebGPU */
+declare interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase {
+ bindGroupLayouts: GPUBindGroupLayout[];
+}
+
+/** @category WebGPU */
+declare type GPUCompilationMessageType = "error" | "warning" | "info";
+
+/** @category WebGPU */
+declare interface GPUCompilationMessage {
+ readonly message: string;
+ readonly type: GPUCompilationMessageType;
+ readonly lineNum: number;
+ readonly linePos: number;
+}
+
+/** @category WebGPU */
+declare interface GPUCompilationInfo {
+ readonly messages: ReadonlyArray<GPUCompilationMessage>;
+}
+
+/** @category WebGPU */
+declare class GPUShaderModule implements GPUObjectBase {
+ label: string;
+
+ compilationInfo(): Promise<GPUCompilationInfo>;
+}
+
+/** @category WebGPU */
+declare interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase {
+ code: string;
+ sourceMap?: any;
+}
+
+/** @category WebGPU */
+declare type GPUAutoLayoutMode = "auto";
+
+/** @category WebGPU */
+declare interface GPUPipelineDescriptorBase extends GPUObjectDescriptorBase {
+ layout: GPUPipelineLayout | GPUAutoLayoutMode;
+}
+
+/** @category WebGPU */
+declare interface GPUPipelineBase {
+ getBindGroupLayout(index: number): GPUBindGroupLayout;
+}
+
+/** @category WebGPU */
+declare interface GPUProgrammableStage {
+ module: GPUShaderModule;
+ entryPoint: string;
+}
+
+/** @category WebGPU */
+declare class GPUComputePipeline implements GPUObjectBase, GPUPipelineBase {
+ label: string;
+
+ getBindGroupLayout(index: number): GPUBindGroupLayout;
+}
+
+/** @category WebGPU */
+declare interface GPUComputePipelineDescriptor
+ extends GPUPipelineDescriptorBase {
+ compute: GPUProgrammableStage;
+}
+
+/** @category WebGPU */
+declare class GPURenderPipeline implements GPUObjectBase, GPUPipelineBase {
+ label: string;
+
+ getBindGroupLayout(index: number): GPUBindGroupLayout;
+}
+
+/** @category WebGPU */
+declare interface GPURenderPipelineDescriptor
+ extends GPUPipelineDescriptorBase {
+ vertex: GPUVertexState;
+ primitive?: GPUPrimitiveState;
+ depthStencil?: GPUDepthStencilState;
+ multisample?: GPUMultisampleState;
+ fragment?: GPUFragmentState;
+}
+
+/** @category WebGPU */
+declare interface GPUPrimitiveState {
+ topology?: GPUPrimitiveTopology;
+ stripIndexFormat?: GPUIndexFormat;
+ frontFace?: GPUFrontFace;
+ cullMode?: GPUCullMode;
+ unclippedDepth?: boolean;
+}
+
+/** @category WebGPU */
+declare type GPUPrimitiveTopology =
+ | "point-list"
+ | "line-list"
+ | "line-strip"
+ | "triangle-list"
+ | "triangle-strip";
+
+/** @category WebGPU */
+declare type GPUFrontFace = "ccw" | "cw";
+
+/** @category WebGPU */
+declare type GPUCullMode = "none" | "front" | "back";
+
+/** @category WebGPU */
+declare interface GPUMultisampleState {
+ count?: number;
+ mask?: number;
+ alphaToCoverageEnabled?: boolean;
+}
+
+/** @category WebGPU */
+declare interface GPUFragmentState extends GPUProgrammableStage {
+ targets: (GPUColorTargetState | null)[];
+}
+
+/** @category WebGPU */
+declare interface GPUColorTargetState {
+ format: GPUTextureFormat;
+
+ blend?: GPUBlendState;
+ writeMask?: GPUColorWriteFlags;
+}
+
+/** @category WebGPU */
+declare interface GPUBlendState {
+ color: GPUBlendComponent;
+ alpha: GPUBlendComponent;
+}
+
+/** @category WebGPU */
+declare type GPUColorWriteFlags = number;
+
+/** @category WebGPU */
+declare class GPUColorWrite {
+ static RED: 0x1;
+ static GREEN: 0x2;
+ static BLUE: 0x4;
+ static ALPHA: 0x8;
+ static ALL: 0xF;
+}
+
+/** @category WebGPU */
+declare interface GPUBlendComponent {
+ operation?: GPUBlendOperation;
+ srcFactor?: GPUBlendFactor;
+ dstFactor?: GPUBlendFactor;
+}
+
+/** @category WebGPU */
+declare type GPUBlendFactor =
+ | "zero"
+ | "one"
+ | "src"
+ | "one-minus-src"
+ | "src-alpha"
+ | "one-minus-src-alpha"
+ | "dst"
+ | "one-minus-dst"
+ | "dst-alpha"
+ | "one-minus-dst-alpha"
+ | "src-alpha-saturated"
+ | "constant"
+ | "one-minus-constant";
+
+/** @category WebGPU */
+declare type GPUBlendOperation =
+ | "add"
+ | "subtract"
+ | "reverse-subtract"
+ | "min"
+ | "max";
+
+/** @category WebGPU */
+declare interface GPUDepthStencilState {
+ format: GPUTextureFormat;
+
+ depthWriteEnabled?: boolean;
+ depthCompare?: GPUCompareFunction;
+
+ stencilFront?: GPUStencilFaceState;
+ stencilBack?: GPUStencilFaceState;
+
+ stencilReadMask?: number;
+ stencilWriteMask?: number;
+
+ depthBias?: number;
+ depthBiasSlopeScale?: number;
+ depthBiasClamp?: number;
+}
+
+/** @category WebGPU */
+declare interface GPUStencilFaceState {
+ compare?: GPUCompareFunction;
+ failOp?: GPUStencilOperation;
+ depthFailOp?: GPUStencilOperation;
+ passOp?: GPUStencilOperation;
+}
+
+/** @category WebGPU */
+declare type GPUStencilOperation =
+ | "keep"
+ | "zero"
+ | "replace"
+ | "invert"
+ | "increment-clamp"
+ | "decrement-clamp"
+ | "increment-wrap"
+ | "decrement-wrap";
+
+/** @category WebGPU */
+declare type GPUIndexFormat = "uint16" | "uint32";
+
+/** @category WebGPU */
+declare type GPUVertexFormat =
+ | "uint8x2"
+ | "uint8x4"
+ | "sint8x2"
+ | "sint8x4"
+ | "unorm8x2"
+ | "unorm8x4"
+ | "snorm8x2"
+ | "snorm8x4"
+ | "uint16x2"
+ | "uint16x4"
+ | "sint16x2"
+ | "sint16x4"
+ | "unorm16x2"
+ | "unorm16x4"
+ | "snorm16x2"
+ | "snorm16x4"
+ | "float16x2"
+ | "float16x4"
+ | "float32"
+ | "float32x2"
+ | "float32x3"
+ | "float32x4"
+ | "uint32"
+ | "uint32x2"
+ | "uint32x3"
+ | "uint32x4"
+ | "sint32"
+ | "sint32x2"
+ | "sint32x3"
+ | "sint32x4";
+
+/** @category WebGPU */
+declare type GPUVertexStepMode = "vertex" | "instance";
+
+/** @category WebGPU */
+declare interface GPUVertexState extends GPUProgrammableStage {
+ buffers?: (GPUVertexBufferLayout | null)[];
+}
+
+/** @category WebGPU */
+declare interface GPUVertexBufferLayout {
+ arrayStride: number;
+ stepMode?: GPUVertexStepMode;
+ attributes: GPUVertexAttribute[];
+}
+
+/** @category WebGPU */
+declare interface GPUVertexAttribute {
+ format: GPUVertexFormat;
+ offset: number;
+
+ shaderLocation: number;
+}
+
+/** @category WebGPU */
+declare class GPUCommandBuffer implements GPUObjectBase {
+ label: string;
+}
+
+/** @category WebGPU */
+declare interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase {}
+
+/** @category WebGPU */
+declare class GPUCommandEncoder implements GPUObjectBase {
+ label: string;
+
+ beginRenderPass(descriptor: GPURenderPassDescriptor): GPURenderPassEncoder;
+ beginComputePass(
+ descriptor?: GPUComputePassDescriptor,
+ ): GPUComputePassEncoder;
+
+ copyBufferToBuffer(
+ source: GPUBuffer,
+ sourceOffset: number,
+ destination: GPUBuffer,
+ destinationOffset: number,
+ size: number,
+ ): undefined;
+
+ copyBufferToTexture(
+ source: GPUImageCopyBuffer,
+ destination: GPUImageCopyTexture,
+ copySize: GPUExtent3D,
+ ): undefined;
+
+ copyTextureToBuffer(
+ source: GPUImageCopyTexture,
+ destination: GPUImageCopyBuffer,
+ copySize: GPUExtent3D,
+ ): undefined;
+
+ copyTextureToTexture(
+ source: GPUImageCopyTexture,
+ destination: GPUImageCopyTexture,
+ copySize: GPUExtent3D,
+ ): undefined;
+
+ clearBuffer(
+ destination: GPUBuffer,
+ destinationOffset?: number,
+ size?: number,
+ ): undefined;
+
+ pushDebugGroup(groupLabel: string): undefined;
+ popDebugGroup(): undefined;
+ insertDebugMarker(markerLabel: string): undefined;
+
+ writeTimestamp(querySet: GPUQuerySet, queryIndex: number): undefined;
+
+ resolveQuerySet(
+ querySet: GPUQuerySet,
+ firstQuery: number,
+ queryCount: number,
+ destination: GPUBuffer,
+ destinationOffset: number,
+ ): undefined;
+
+ finish(descriptor?: GPUCommandBufferDescriptor): GPUCommandBuffer;
+}
+
+/** @category WebGPU */
+declare interface GPUCommandEncoderDescriptor extends GPUObjectDescriptorBase {}
+
+/** @category WebGPU */
+declare interface GPUImageDataLayout {
+ offset?: number;
+ bytesPerRow?: number;
+ rowsPerImage?: number;
+}
+
+/** @category WebGPU */
+declare interface GPUImageCopyBuffer extends GPUImageDataLayout {
+ buffer: GPUBuffer;
+}
+
+/** @category WebGPU */
+declare interface GPUImageCopyTexture {
+ texture: GPUTexture;
+ mipLevel?: number;
+ origin?: GPUOrigin3D;
+ aspect?: GPUTextureAspect;
+}
+
+/** @category WebGPU */
+interface GPUProgrammablePassEncoder {
+ setBindGroup(
+ index: number,
+ bindGroup: GPUBindGroup,
+ dynamicOffsets?: number[],
+ ): undefined;
+
+ setBindGroup(
+ index: number,
+ bindGroup: GPUBindGroup,
+ dynamicOffsetsData: Uint32Array,
+ dynamicOffsetsDataStart: number,
+ dynamicOffsetsDataLength: number,
+ ): undefined;
+
+ pushDebugGroup(groupLabel: string): undefined;
+ popDebugGroup(): undefined;
+ insertDebugMarker(markerLabel: string): undefined;
+}
+
+/** @category WebGPU */
+declare class GPUComputePassEncoder
+ implements GPUObjectBase, GPUProgrammablePassEncoder {
+ label: string;
+ setBindGroup(
+ index: number,
+ bindGroup: GPUBindGroup,
+ dynamicOffsets?: number[],
+ ): undefined;
+ setBindGroup(
+ index: number,
+ bindGroup: GPUBindGroup,
+ dynamicOffsetsData: Uint32Array,
+ dynamicOffsetsDataStart: number,
+ dynamicOffsetsDataLength: number,
+ ): undefined;
+ pushDebugGroup(groupLabel: string): undefined;
+ popDebugGroup(): undefined;
+ insertDebugMarker(markerLabel: string): undefined;
+ setPipeline(pipeline: GPUComputePipeline): undefined;
+ dispatchWorkgroups(x: number, y?: number, z?: number): undefined;
+ dispatchWorkgroupsIndirect(
+ indirectBuffer: GPUBuffer,
+ indirectOffset: number,
+ ): undefined;
+
+ beginPipelineStatisticsQuery(
+ querySet: GPUQuerySet,
+ queryIndex: number,
+ ): undefined;
+ endPipelineStatisticsQuery(): undefined;
+
+ writeTimestamp(querySet: GPUQuerySet, queryIndex: number): undefined;
+
+ end(): undefined;
+}
+
+/** @category WebGPU */
+declare interface GPUComputePassDescriptor extends GPUObjectDescriptorBase {}
+
+/** @category WebGPU */
+interface GPURenderEncoderBase {
+ setPipeline(pipeline: GPURenderPipeline): undefined;
+
+ setIndexBuffer(
+ buffer: GPUBuffer,
+ indexFormat: GPUIndexFormat,
+ offset?: number,
+ size?: number,
+ ): undefined;
+ setVertexBuffer(
+ slot: number,
+ buffer: GPUBuffer,
+ offset?: number,
+ size?: number,
+ ): undefined;
+
+ draw(
+ vertexCount: number,
+ instanceCount?: number,
+ firstVertex?: number,
+ firstInstance?: number,
+ ): undefined;
+ drawIndexed(
+ indexCount: number,
+ instanceCount?: number,
+ firstIndex?: number,
+ baseVertex?: number,
+ firstInstance?: number,
+ ): undefined;
+
+ drawIndirect(indirectBuffer: GPUBuffer, indirectOffset: number): undefined;
+ drawIndexedIndirect(
+ indirectBuffer: GPUBuffer,
+ indirectOffset: number,
+ ): undefined;
+}
+
+/** @category WebGPU */
+declare class GPURenderPassEncoder
+ implements GPUObjectBase, GPUProgrammablePassEncoder, GPURenderEncoderBase {
+ label: string;
+ setBindGroup(
+ index: number,
+ bindGroup: GPUBindGroup,
+ dynamicOffsets?: number[],
+ ): undefined;
+ setBindGroup(
+ index: number,
+ bindGroup: GPUBindGroup,
+ dynamicOffsetsData: Uint32Array,
+ dynamicOffsetsDataStart: number,
+ dynamicOffsetsDataLength: number,
+ ): undefined;
+ pushDebugGroup(groupLabel: string): undefined;
+ popDebugGroup(): undefined;
+ insertDebugMarker(markerLabel: string): undefined;
+ setPipeline(pipeline: GPURenderPipeline): undefined;
+ setIndexBuffer(
+ buffer: GPUBuffer,
+ indexFormat: GPUIndexFormat,
+ offset?: number,
+ size?: number,
+ ): undefined;
+ setVertexBuffer(
+ slot: number,
+ buffer: GPUBuffer,
+ offset?: number,
+ size?: number,
+ ): undefined;
+ draw(
+ vertexCount: number,
+ instanceCount?: number,
+ firstVertex?: number,
+ firstInstance?: number,
+ ): undefined;
+ drawIndexed(
+ indexCount: number,
+ instanceCount?: number,
+ firstIndex?: number,
+ baseVertex?: number,
+ firstInstance?: number,
+ ): undefined;
+ drawIndirect(indirectBuffer: GPUBuffer, indirectOffset: number): undefined;
+ drawIndexedIndirect(
+ indirectBuffer: GPUBuffer,
+ indirectOffset: number,
+ ): undefined;
+
+ setViewport(
+ x: number,
+ y: number,
+ width: number,
+ height: number,
+ minDepth: number,
+ maxDepth: number,
+ ): undefined;
+
+ setScissorRect(
+ x: number,
+ y: number,
+ width: number,
+ height: number,
+ ): undefined;
+
+ setBlendConstant(color: GPUColor): undefined;
+ setStencilReference(reference: number): undefined;
+
+ beginOcclusionQuery(queryIndex: number): undefined;
+ endOcclusionQuery(): undefined;
+
+ beginPipelineStatisticsQuery(
+ querySet: GPUQuerySet,
+ queryIndex: number,
+ ): undefined;
+ endPipelineStatisticsQuery(): undefined;
+
+ writeTimestamp(querySet: GPUQuerySet, queryIndex: number): undefined;
+
+ executeBundles(bundles: GPURenderBundle[]): undefined;
+ end(): undefined;
+}
+
+/** @category WebGPU */
+declare interface GPURenderPassDescriptor extends GPUObjectDescriptorBase {
+ colorAttachments: (GPURenderPassColorAttachment | null)[];
+ depthStencilAttachment?: GPURenderPassDepthStencilAttachment;
+ occlusionQuerySet?: GPUQuerySet;
+}
+
+/** @category WebGPU */
+declare interface GPURenderPassColorAttachment {
+ view: GPUTextureView;
+ resolveTarget?: GPUTextureView;
+
+ clearValue?: GPUColor;
+ loadOp: GPULoadOp;
+ storeOp: GPUStoreOp;
+}
+
+/** @category WebGPU */
+declare interface GPURenderPassDepthStencilAttachment {
+ view: GPUTextureView;
+
+ depthClearValue?: number;
+ depthLoadOp?: GPULoadOp;
+ depthStoreOp?: GPUStoreOp;
+ depthReadOnly?: boolean;
+
+ stencilClearValue?: number;
+ stencilLoadOp?: GPULoadOp;
+ stencilStoreOp?: GPUStoreOp;
+ stencilReadOnly?: boolean;
+}
+
+/** @category WebGPU */
+declare type GPULoadOp = "load" | "clear";
+
+/** @category WebGPU */
+declare type GPUStoreOp = "store" | "discard";
+
+/** @category WebGPU */
+declare class GPURenderBundle implements GPUObjectBase {
+ label: string;
+}
+
+/** @category WebGPU */
+declare interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {}
+
+/** @category WebGPU */
+declare class GPURenderBundleEncoder
+ implements GPUObjectBase, GPUProgrammablePassEncoder, GPURenderEncoderBase {
+ label: string;
+ draw(
+ vertexCount: number,
+ instanceCount?: number,
+ firstVertex?: number,
+ firstInstance?: number,
+ ): undefined;
+ drawIndexed(
+ indexCount: number,
+ instanceCount?: number,
+ firstIndex?: number,
+ baseVertex?: number,
+ firstInstance?: number,
+ ): undefined;
+ drawIndexedIndirect(
+ indirectBuffer: GPUBuffer,
+ indirectOffset: number,
+ ): undefined;
+ drawIndirect(indirectBuffer: GPUBuffer, indirectOffset: number): undefined;
+ insertDebugMarker(markerLabel: string): undefined;
+ popDebugGroup(): undefined;
+ pushDebugGroup(groupLabel: string): undefined;
+ setBindGroup(
+ index: number,
+ bindGroup: GPUBindGroup,
+ dynamicOffsets?: number[],
+ ): undefined;
+ setBindGroup(
+ index: number,
+ bindGroup: GPUBindGroup,
+ dynamicOffsetsData: Uint32Array,
+ dynamicOffsetsDataStart: number,
+ dynamicOffsetsDataLength: number,
+ ): undefined;
+ setIndexBuffer(
+ buffer: GPUBuffer,
+ indexFormat: GPUIndexFormat,
+ offset?: number,
+ size?: number,
+ ): undefined;
+ setPipeline(pipeline: GPURenderPipeline): undefined;
+ setVertexBuffer(
+ slot: number,
+ buffer: GPUBuffer,
+ offset?: number,
+ size?: number,
+ ): undefined;
+
+ finish(descriptor?: GPURenderBundleDescriptor): GPURenderBundle;
+}
+
+/** @category WebGPU */
+declare interface GPURenderPassLayout extends GPUObjectDescriptorBase {
+ colorFormats: (GPUTextureFormat | null)[];
+ depthStencilFormat?: GPUTextureFormat;
+ sampleCount?: number;
+}
+
+/** @category WebGPU */
+declare interface GPURenderBundleEncoderDescriptor extends GPURenderPassLayout {
+ depthReadOnly?: boolean;
+ stencilReadOnly?: boolean;
+}
+
+/** @category WebGPU */
+declare class GPUQueue implements GPUObjectBase {
+ label: string;
+
+ submit(commandBuffers: GPUCommandBuffer[]): undefined;
+
+ onSubmittedWorkDone(): Promise<undefined>;
+
+ writeBuffer(
+ buffer: GPUBuffer,
+ bufferOffset: number,
+ data: BufferSource,
+ dataOffset?: number,
+ size?: number,
+ ): undefined;
+
+ writeTexture(
+ destination: GPUImageCopyTexture,
+ data: BufferSource,
+ dataLayout: GPUImageDataLayout,
+ size: GPUExtent3D,
+ ): undefined;
+}
+
+/** @category WebGPU */
+declare class GPUQuerySet implements GPUObjectBase {
+ label: string;
+
+ destroy(): undefined;
+}
+
+/** @category WebGPU */
+declare interface GPUQuerySetDescriptor extends GPUObjectDescriptorBase {
+ type: GPUQueryType;
+ count: number;
+ pipelineStatistics?: GPUPipelineStatisticName[];
+}
+
+/** @category WebGPU */
+declare type GPUQueryType = "occlusion" | "pipeline-statistics" | "timestamp";
+
+/** @category WebGPU */
+declare type GPUPipelineStatisticName =
+ | "vertex-shader-invocations"
+ | "clipper-invocations"
+ | "clipper-primitives-out"
+ | "fragment-shader-invocations"
+ | "compute-shader-invocations";
+
+/** @category WebGPU */
+declare type GPUDeviceLostReason = "destroyed";
+
+/** @category WebGPU */
+declare interface GPUDeviceLostInfo {
+ readonly reason: GPUDeviceLostReason | undefined;
+ readonly message: string;
+}
+
+/** @category WebGPU */
+declare class GPUError {
+ readonly message: string;
+}
+
+/** @category WebGPU */
+declare type GPUErrorFilter = "out-of-memory" | "validation";
+
+/** @category WebGPU */
+declare class GPUOutOfMemoryError extends GPUError {
+ constructor(message: string);
+}
+
+/** @category WebGPU */
+declare class GPUValidationError extends GPUError {
+ constructor(message: string);
+}
+
+/** @category WebGPU */
+declare class GPUUncapturedErrorEvent extends Event {
+ constructor(
+ type: string,
+ gpuUncapturedErrorEventInitDict: GPUUncapturedErrorEventInit,
+ );
+ readonly error: GPUError;
+}
+
+/** @category WebGPU */
+declare interface GPUUncapturedErrorEventInit extends EventInit {
+ error?: GPUError;
+}
+
+/** @category WebGPU */
+declare interface GPUColorDict {
+ r: number;
+ g: number;
+ b: number;
+ a: number;
+}
+
+/** @category WebGPU */
+declare type GPUColor = number[] | GPUColorDict;
+
+/** @category WebGPU */
+declare interface GPUOrigin3DDict {
+ x?: number;
+ y?: number;
+ z?: number;
+}
+
+/** @category WebGPU */
+declare type GPUOrigin3D = number[] | GPUOrigin3DDict;
+
+/** @category WebGPU */
+declare interface GPUExtent3DDict {
+ width: number;
+ height?: number;
+ depthOrArrayLayers?: number;
+}
+
+/** @category WebGPU */
+declare type GPUExtent3D = number[] | GPUExtent3DDict;
diff --git a/cli/tsc/dts/lib.dom.asynciterable.d.ts b/cli/tsc/dts/lib.dom.asynciterable.d.ts
new file mode 100644
index 000000000..27f9f3ede
--- /dev/null
+++ b/cli/tsc/dts/lib.dom.asynciterable.d.ts
@@ -0,0 +1,9 @@
+// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
+
+/// <reference no-default-lib="true"/>
+
+interface ReadableStream<R = any> {
+ [Symbol.asyncIterator](options?: {
+ preventCancel?: boolean;
+ }): AsyncIterableIterator<R>;
+}
diff --git a/cli/tsc/dts/lib.dom.d.ts b/cli/tsc/dts/lib.dom.d.ts
new file mode 100644
index 000000000..6f9964efc
--- /dev/null
+++ b/cli/tsc/dts/lib.dom.d.ts
@@ -0,0 +1,18269 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+/// <reference lib="dom.extras" />
+
+
+/////////////////////////////
+/// Window APIs
+/////////////////////////////
+
+interface AddEventListenerOptions extends EventListenerOptions {
+ once?: boolean;
+ passive?: boolean;
+ signal?: AbortSignal;
+}
+
+interface AesCbcParams extends Algorithm {
+ iv: BufferSource;
+}
+
+interface AesCtrParams extends Algorithm {
+ counter: BufferSource;
+ length: number;
+}
+
+interface AesDerivedKeyParams extends Algorithm {
+ length: number;
+}
+
+interface AesGcmParams extends Algorithm {
+ additionalData?: BufferSource;
+ iv: BufferSource;
+ tagLength?: number;
+}
+
+interface AesKeyAlgorithm extends KeyAlgorithm {
+ length: number;
+}
+
+interface AesKeyGenParams extends Algorithm {
+ length: number;
+}
+
+interface Algorithm {
+ name: string;
+}
+
+interface AnalyserOptions extends AudioNodeOptions {
+ fftSize?: number;
+ maxDecibels?: number;
+ minDecibels?: number;
+ smoothingTimeConstant?: number;
+}
+
+interface AnimationEventInit extends EventInit {
+ animationName?: string;
+ elapsedTime?: number;
+ pseudoElement?: string;
+}
+
+interface AnimationPlaybackEventInit extends EventInit {
+ currentTime?: CSSNumberish | null;
+ timelineTime?: CSSNumberish | null;
+}
+
+interface AssignedNodesOptions {
+ flatten?: boolean;
+}
+
+interface AudioBufferOptions {
+ length: number;
+ numberOfChannels?: number;
+ sampleRate: number;
+}
+
+interface AudioBufferSourceOptions {
+ buffer?: AudioBuffer | null;
+ detune?: number;
+ loop?: boolean;
+ loopEnd?: number;
+ loopStart?: number;
+ playbackRate?: number;
+}
+
+interface AudioConfiguration {
+ bitrate?: number;
+ channels?: string;
+ contentType: string;
+ samplerate?: number;
+ spatialRendering?: boolean;
+}
+
+interface AudioContextOptions {
+ latencyHint?: AudioContextLatencyCategory | number;
+ sampleRate?: number;
+}
+
+interface AudioNodeOptions {
+ channelCount?: number;
+ channelCountMode?: ChannelCountMode;
+ channelInterpretation?: ChannelInterpretation;
+}
+
+interface AudioProcessingEventInit extends EventInit {
+ inputBuffer: AudioBuffer;
+ outputBuffer: AudioBuffer;
+ playbackTime: number;
+}
+
+interface AudioTimestamp {
+ contextTime?: number;
+ performanceTime?: DOMHighResTimeStamp;
+}
+
+interface AudioWorkletNodeOptions extends AudioNodeOptions {
+ numberOfInputs?: number;
+ numberOfOutputs?: number;
+ outputChannelCount?: number[];
+ parameterData?: Record<string, number>;
+ processorOptions?: any;
+}
+
+interface AuthenticationExtensionsClientInputs {
+ appid?: string;
+ appidExclude?: string;
+ credProps?: boolean;
+ uvm?: boolean;
+}
+
+interface AuthenticationExtensionsClientOutputs {
+ appid?: boolean;
+ credProps?: CredentialPropertiesOutput;
+ uvm?: UvmEntries;
+}
+
+interface AuthenticatorSelectionCriteria {
+ authenticatorAttachment?: AuthenticatorAttachment;
+ requireResidentKey?: boolean;
+ residentKey?: ResidentKeyRequirement;
+ userVerification?: UserVerificationRequirement;
+}
+
+interface BiquadFilterOptions extends AudioNodeOptions {
+ Q?: number;
+ detune?: number;
+ frequency?: number;
+ gain?: number;
+ type?: BiquadFilterType;
+}
+
+interface BlobEventInit {
+ data: Blob;
+ timecode?: DOMHighResTimeStamp;
+}
+
+interface BlobPropertyBag {
+ endings?: EndingType;
+ type?: string;
+}
+
+interface CSSStyleSheetInit {
+ baseURL?: string;
+ disabled?: boolean;
+ media?: MediaList | string;
+}
+
+interface CacheQueryOptions {
+ ignoreMethod?: boolean;
+ ignoreSearch?: boolean;
+ ignoreVary?: boolean;
+}
+
+interface CanvasRenderingContext2DSettings {
+ alpha?: boolean;
+ colorSpace?: PredefinedColorSpace;
+ desynchronized?: boolean;
+ willReadFrequently?: boolean;
+}
+
+interface ChannelMergerOptions extends AudioNodeOptions {
+ numberOfInputs?: number;
+}
+
+interface ChannelSplitterOptions extends AudioNodeOptions {
+ numberOfOutputs?: number;
+}
+
+interface ClientQueryOptions {
+ includeUncontrolled?: boolean;
+ type?: ClientTypes;
+}
+
+interface ClipboardEventInit extends EventInit {
+ clipboardData?: DataTransfer | null;
+}
+
+interface ClipboardItemOptions {
+ presentationStyle?: PresentationStyle;
+}
+
+interface CloseEventInit extends EventInit {
+ code?: number;
+ reason?: string;
+ wasClean?: boolean;
+}
+
+interface CompositionEventInit extends UIEventInit {
+ data?: string;
+}
+
+interface ComputedEffectTiming extends EffectTiming {
+ activeDuration?: CSSNumberish;
+ currentIteration?: number | null;
+ endTime?: CSSNumberish;
+ localTime?: CSSNumberish | null;
+ progress?: number | null;
+ startTime?: CSSNumberish;
+}
+
+interface ComputedKeyframe {
+ composite: CompositeOperationOrAuto;
+ computedOffset: number;
+ easing: string;
+ offset: number | null;
+ [property: string]: string | number | null | undefined;
+}
+
+interface ConstantSourceOptions {
+ offset?: number;
+}
+
+interface ConstrainBooleanParameters {
+ exact?: boolean;
+ ideal?: boolean;
+}
+
+interface ConstrainDOMStringParameters {
+ exact?: string | string[];
+ ideal?: string | string[];
+}
+
+interface ConstrainDoubleRange extends DoubleRange {
+ exact?: number;
+ ideal?: number;
+}
+
+interface ConstrainULongRange extends ULongRange {
+ exact?: number;
+ ideal?: number;
+}
+
+interface ConvolverOptions extends AudioNodeOptions {
+ buffer?: AudioBuffer | null;
+ disableNormalization?: boolean;
+}
+
+interface CredentialCreationOptions {
+ publicKey?: PublicKeyCredentialCreationOptions;
+ signal?: AbortSignal;
+}
+
+interface CredentialPropertiesOutput {
+ rk?: boolean;
+}
+
+interface CredentialRequestOptions {
+ mediation?: CredentialMediationRequirement;
+ publicKey?: PublicKeyCredentialRequestOptions;
+ signal?: AbortSignal;
+}
+
+interface CryptoKeyPair {
+ privateKey: CryptoKey;
+ publicKey: CryptoKey;
+}
+
+interface CustomEventInit<T = any> extends EventInit {
+ detail?: T;
+}
+
+interface DOMMatrix2DInit {
+ a?: number;
+ b?: number;
+ c?: number;
+ d?: number;
+ e?: number;
+ f?: number;
+ m11?: number;
+ m12?: number;
+ m21?: number;
+ m22?: number;
+ m41?: number;
+ m42?: number;
+}
+
+interface DOMMatrixInit extends DOMMatrix2DInit {
+ is2D?: boolean;
+ m13?: number;
+ m14?: number;
+ m23?: number;
+ m24?: number;
+ m31?: number;
+ m32?: number;
+ m33?: number;
+ m34?: number;
+ m43?: number;
+ m44?: number;
+}
+
+interface DOMPointInit {
+ w?: number;
+ x?: number;
+ y?: number;
+ z?: number;
+}
+
+interface DOMQuadInit {
+ p1?: DOMPointInit;
+ p2?: DOMPointInit;
+ p3?: DOMPointInit;
+ p4?: DOMPointInit;
+}
+
+interface DOMRectInit {
+ height?: number;
+ width?: number;
+ x?: number;
+ y?: number;
+}
+
+interface DelayOptions extends AudioNodeOptions {
+ delayTime?: number;
+ maxDelayTime?: number;
+}
+
+interface DeviceMotionEventAccelerationInit {
+ x?: number | null;
+ y?: number | null;
+ z?: number | null;
+}
+
+interface DeviceMotionEventInit extends EventInit {
+ acceleration?: DeviceMotionEventAccelerationInit;
+ accelerationIncludingGravity?: DeviceMotionEventAccelerationInit;
+ interval?: number;
+ rotationRate?: DeviceMotionEventRotationRateInit;
+}
+
+interface DeviceMotionEventRotationRateInit {
+ alpha?: number | null;
+ beta?: number | null;
+ gamma?: number | null;
+}
+
+interface DeviceOrientationEventInit extends EventInit {
+ absolute?: boolean;
+ alpha?: number | null;
+ beta?: number | null;
+ gamma?: number | null;
+}
+
+interface DisplayMediaStreamConstraints {
+ audio?: boolean | MediaTrackConstraints;
+ video?: boolean | MediaTrackConstraints;
+}
+
+interface DocumentTimelineOptions {
+ originTime?: DOMHighResTimeStamp;
+}
+
+interface DoubleRange {
+ max?: number;
+ min?: number;
+}
+
+interface DragEventInit extends MouseEventInit {
+ dataTransfer?: DataTransfer | null;
+}
+
+interface DynamicsCompressorOptions extends AudioNodeOptions {
+ attack?: number;
+ knee?: number;
+ ratio?: number;
+ release?: number;
+ threshold?: number;
+}
+
+interface EcKeyAlgorithm extends KeyAlgorithm {
+ namedCurve: NamedCurve;
+}
+
+interface EcKeyGenParams extends Algorithm {
+ namedCurve: NamedCurve;
+}
+
+interface EcKeyImportParams extends Algorithm {
+ namedCurve: NamedCurve;
+}
+
+interface EcdhKeyDeriveParams extends Algorithm {
+ public: CryptoKey;
+}
+
+interface EcdsaParams extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+}
+
+interface EffectTiming {
+ delay?: number;
+ direction?: PlaybackDirection;
+ duration?: number | string;
+ easing?: string;
+ endDelay?: number;
+ fill?: FillMode;
+ iterationStart?: number;
+ iterations?: number;
+ playbackRate?: number;
+}
+
+interface ElementCreationOptions {
+ is?: string;
+}
+
+interface ElementDefinitionOptions {
+ extends?: string;
+}
+
+interface ErrorEventInit extends EventInit {
+ colno?: number;
+ error?: any;
+ filename?: string;
+ lineno?: number;
+ message?: string;
+}
+
+interface EventInit {
+ bubbles?: boolean;
+ cancelable?: boolean;
+ composed?: boolean;
+}
+
+interface EventListenerOptions {
+ capture?: boolean;
+}
+
+interface EventModifierInit extends UIEventInit {
+ altKey?: boolean;
+ ctrlKey?: boolean;
+ metaKey?: boolean;
+ modifierAltGraph?: boolean;
+ modifierCapsLock?: boolean;
+ modifierFn?: boolean;
+ modifierFnLock?: boolean;
+ modifierHyper?: boolean;
+ modifierNumLock?: boolean;
+ modifierScrollLock?: boolean;
+ modifierSuper?: boolean;
+ modifierSymbol?: boolean;
+ modifierSymbolLock?: boolean;
+ shiftKey?: boolean;
+}
+
+interface EventSourceInit {
+ withCredentials?: boolean;
+}
+
+interface FilePropertyBag extends BlobPropertyBag {
+ lastModified?: number;
+}
+
+interface FileSystemFlags {
+ create?: boolean;
+ exclusive?: boolean;
+}
+
+interface FileSystemGetDirectoryOptions {
+ create?: boolean;
+}
+
+interface FileSystemGetFileOptions {
+ create?: boolean;
+}
+
+interface FileSystemRemoveOptions {
+ recursive?: boolean;
+}
+
+interface FocusEventInit extends UIEventInit {
+ relatedTarget?: EventTarget | null;
+}
+
+interface FocusOptions {
+ preventScroll?: boolean;
+}
+
+interface FontFaceDescriptors {
+ display?: string;
+ featureSettings?: string;
+ stretch?: string;
+ style?: string;
+ unicodeRange?: string;
+ variant?: string;
+ weight?: string;
+}
+
+interface FontFaceSetLoadEventInit extends EventInit {
+ fontfaces?: FontFace[];
+}
+
+interface FormDataEventInit extends EventInit {
+ formData: FormData;
+}
+
+interface FullscreenOptions {
+ navigationUI?: FullscreenNavigationUI;
+}
+
+interface GainOptions extends AudioNodeOptions {
+ gain?: number;
+}
+
+interface GamepadEventInit extends EventInit {
+ gamepad: Gamepad;
+}
+
+interface GetAnimationsOptions {
+ subtree?: boolean;
+}
+
+interface GetNotificationOptions {
+ tag?: string;
+}
+
+interface GetRootNodeOptions {
+ composed?: boolean;
+}
+
+interface HashChangeEventInit extends EventInit {
+ newURL?: string;
+ oldURL?: string;
+}
+
+interface HkdfParams extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ info: BufferSource;
+ salt: BufferSource;
+}
+
+interface HmacImportParams extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ length?: number;
+}
+
+interface HmacKeyAlgorithm extends KeyAlgorithm {
+ hash: KeyAlgorithm;
+ length: number;
+}
+
+interface HmacKeyGenParams extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ length?: number;
+}
+
+interface IDBDatabaseInfo {
+ name?: string;
+ version?: number;
+}
+
+interface IDBIndexParameters {
+ multiEntry?: boolean;
+ unique?: boolean;
+}
+
+interface IDBObjectStoreParameters {
+ autoIncrement?: boolean;
+ keyPath?: string | string[] | null;
+}
+
+interface IDBTransactionOptions {
+ durability?: IDBTransactionDurability;
+}
+
+interface IDBVersionChangeEventInit extends EventInit {
+ newVersion?: number | null;
+ oldVersion?: number;
+}
+
+interface IIRFilterOptions extends AudioNodeOptions {
+ feedback: number[];
+ feedforward: number[];
+}
+
+interface IdleRequestOptions {
+ timeout?: number;
+}
+
+interface ImageBitmapOptions {
+ colorSpaceConversion?: ColorSpaceConversion;
+ imageOrientation?: ImageOrientation;
+ premultiplyAlpha?: PremultiplyAlpha;
+ resizeHeight?: number;
+ resizeQuality?: ResizeQuality;
+ resizeWidth?: number;
+}
+
+interface ImageBitmapRenderingContextSettings {
+ alpha?: boolean;
+}
+
+interface ImageDataSettings {
+ colorSpace?: PredefinedColorSpace;
+}
+
+interface ImportMeta {
+ url: string;
+}
+
+interface InputEventInit extends UIEventInit {
+ data?: string | null;
+ dataTransfer?: DataTransfer | null;
+ inputType?: string;
+ isComposing?: boolean;
+ targetRanges?: StaticRange[];
+}
+
+interface IntersectionObserverEntryInit {
+ boundingClientRect: DOMRectInit;
+ intersectionRatio: number;
+ intersectionRect: DOMRectInit;
+ isIntersecting: boolean;
+ rootBounds: DOMRectInit | null;
+ target: Element;
+ time: DOMHighResTimeStamp;
+}
+
+interface IntersectionObserverInit {
+ root?: Element | Document | null;
+ rootMargin?: string;
+ threshold?: number | number[];
+}
+
+interface JsonWebKey {
+ alg?: string;
+ crv?: string;
+ d?: string;
+ dp?: string;
+ dq?: string;
+ e?: string;
+ ext?: boolean;
+ k?: string;
+ key_ops?: string[];
+ kty?: string;
+ n?: string;
+ oth?: RsaOtherPrimesInfo[];
+ p?: string;
+ q?: string;
+ qi?: string;
+ use?: string;
+ x?: string;
+ y?: string;
+}
+
+interface KeyAlgorithm {
+ name: string;
+}
+
+interface KeyboardEventInit extends EventModifierInit {
+ /** @deprecated */
+ charCode?: number;
+ code?: string;
+ isComposing?: boolean;
+ key?: string;
+ /** @deprecated */
+ keyCode?: number;
+ location?: number;
+ repeat?: boolean;
+}
+
+interface Keyframe {
+ composite?: CompositeOperationOrAuto;
+ easing?: string;
+ offset?: number | null;
+ [property: string]: string | number | null | undefined;
+}
+
+interface KeyframeAnimationOptions extends KeyframeEffectOptions {
+ id?: string;
+}
+
+interface KeyframeEffectOptions extends EffectTiming {
+ composite?: CompositeOperation;
+ iterationComposite?: IterationCompositeOperation;
+ pseudoElement?: string | null;
+}
+
+interface LockInfo {
+ clientId?: string;
+ mode?: LockMode;
+ name?: string;
+}
+
+interface LockManagerSnapshot {
+ held?: LockInfo[];
+ pending?: LockInfo[];
+}
+
+interface LockOptions {
+ ifAvailable?: boolean;
+ mode?: LockMode;
+ signal?: AbortSignal;
+ steal?: boolean;
+}
+
+interface MediaCapabilitiesDecodingInfo extends MediaCapabilitiesInfo {
+ configuration?: MediaDecodingConfiguration;
+}
+
+interface MediaCapabilitiesEncodingInfo extends MediaCapabilitiesInfo {
+ configuration?: MediaEncodingConfiguration;
+}
+
+interface MediaCapabilitiesInfo {
+ powerEfficient: boolean;
+ smooth: boolean;
+ supported: boolean;
+}
+
+interface MediaConfiguration {
+ audio?: AudioConfiguration;
+ video?: VideoConfiguration;
+}
+
+interface MediaDecodingConfiguration extends MediaConfiguration {
+ type: MediaDecodingType;
+}
+
+interface MediaElementAudioSourceOptions {
+ mediaElement: HTMLMediaElement;
+}
+
+interface MediaEncodingConfiguration extends MediaConfiguration {
+ type: MediaEncodingType;
+}
+
+interface MediaEncryptedEventInit extends EventInit {
+ initData?: ArrayBuffer | null;
+ initDataType?: string;
+}
+
+interface MediaImage {
+ sizes?: string;
+ src: string;
+ type?: string;
+}
+
+interface MediaKeyMessageEventInit extends EventInit {
+ message: ArrayBuffer;
+ messageType: MediaKeyMessageType;
+}
+
+interface MediaKeySystemConfiguration {
+ audioCapabilities?: MediaKeySystemMediaCapability[];
+ distinctiveIdentifier?: MediaKeysRequirement;
+ initDataTypes?: string[];
+ label?: string;
+ persistentState?: MediaKeysRequirement;
+ sessionTypes?: string[];
+ videoCapabilities?: MediaKeySystemMediaCapability[];
+}
+
+interface MediaKeySystemMediaCapability {
+ contentType?: string;
+ encryptionScheme?: string | null;
+ robustness?: string;
+}
+
+interface MediaMetadataInit {
+ album?: string;
+ artist?: string;
+ artwork?: MediaImage[];
+ title?: string;
+}
+
+interface MediaPositionState {
+ duration?: number;
+ playbackRate?: number;
+ position?: number;
+}
+
+interface MediaQueryListEventInit extends EventInit {
+ matches?: boolean;
+ media?: string;
+}
+
+interface MediaRecorderErrorEventInit extends EventInit {
+ error: DOMException;
+}
+
+interface MediaRecorderOptions {
+ audioBitsPerSecond?: number;
+ bitsPerSecond?: number;
+ mimeType?: string;
+ videoBitsPerSecond?: number;
+}
+
+interface MediaSessionActionDetails {
+ action: MediaSessionAction;
+ fastSeek?: boolean | null;
+ seekOffset?: number | null;
+ seekTime?: number | null;
+}
+
+interface MediaStreamAudioSourceOptions {
+ mediaStream: MediaStream;
+}
+
+interface MediaStreamConstraints {
+ audio?: boolean | MediaTrackConstraints;
+ peerIdentity?: string;
+ preferCurrentTab?: boolean;
+ video?: boolean | MediaTrackConstraints;
+}
+
+interface MediaStreamTrackEventInit extends EventInit {
+ track: MediaStreamTrack;
+}
+
+interface MediaTrackCapabilities {
+ aspectRatio?: DoubleRange;
+ autoGainControl?: boolean[];
+ channelCount?: ULongRange;
+ cursor?: string[];
+ deviceId?: string;
+ displaySurface?: string;
+ echoCancellation?: boolean[];
+ facingMode?: string[];
+ frameRate?: DoubleRange;
+ groupId?: string;
+ height?: ULongRange;
+ latency?: DoubleRange;
+ logicalSurface?: boolean;
+ noiseSuppression?: boolean[];
+ resizeMode?: string[];
+ sampleRate?: ULongRange;
+ sampleSize?: ULongRange;
+ width?: ULongRange;
+}
+
+interface MediaTrackConstraintSet {
+ aspectRatio?: ConstrainDouble;
+ autoGainControl?: ConstrainBoolean;
+ channelCount?: ConstrainULong;
+ deviceId?: ConstrainDOMString;
+ echoCancellation?: ConstrainBoolean;
+ facingMode?: ConstrainDOMString;
+ frameRate?: ConstrainDouble;
+ groupId?: ConstrainDOMString;
+ height?: ConstrainULong;
+ latency?: ConstrainDouble;
+ noiseSuppression?: ConstrainBoolean;
+ sampleRate?: ConstrainULong;
+ sampleSize?: ConstrainULong;
+ suppressLocalAudioPlayback?: ConstrainBoolean;
+ width?: ConstrainULong;
+}
+
+interface MediaTrackConstraints extends MediaTrackConstraintSet {
+ advanced?: MediaTrackConstraintSet[];
+}
+
+interface MediaTrackSettings {
+ aspectRatio?: number;
+ autoGainControl?: boolean;
+ deviceId?: string;
+ echoCancellation?: boolean;
+ facingMode?: string;
+ frameRate?: number;
+ groupId?: string;
+ height?: number;
+ noiseSuppression?: boolean;
+ restrictOwnAudio?: boolean;
+ sampleRate?: number;
+ sampleSize?: number;
+ width?: number;
+}
+
+interface MediaTrackSupportedConstraints {
+ aspectRatio?: boolean;
+ autoGainControl?: boolean;
+ deviceId?: boolean;
+ echoCancellation?: boolean;
+ facingMode?: boolean;
+ frameRate?: boolean;
+ groupId?: boolean;
+ height?: boolean;
+ noiseSuppression?: boolean;
+ sampleRate?: boolean;
+ sampleSize?: boolean;
+ suppressLocalAudioPlayback?: boolean;
+ width?: boolean;
+}
+
+interface MessageEventInit<T = any> extends EventInit {
+ data?: T;
+ lastEventId?: string;
+ origin?: string;
+ ports?: MessagePort[];
+ source?: MessageEventSource | null;
+}
+
+interface MouseEventInit extends EventModifierInit {
+ button?: number;
+ buttons?: number;
+ clientX?: number;
+ clientY?: number;
+ movementX?: number;
+ movementY?: number;
+ relatedTarget?: EventTarget | null;
+ screenX?: number;
+ screenY?: number;
+}
+
+interface MultiCacheQueryOptions extends CacheQueryOptions {
+ cacheName?: string;
+}
+
+interface MutationObserverInit {
+ /** Set to a list of attribute local names (without namespace) if not all attribute mutations need to be observed and attributes is true or omitted. */
+ attributeFilter?: string[];
+ /** Set to true if attributes is true or omitted and target's attribute value before the mutation needs to be recorded. */
+ attributeOldValue?: boolean;
+ /** Set to true if mutations to target's attributes are to be observed. Can be omitted if attributeOldValue or attributeFilter is specified. */
+ attributes?: boolean;
+ /** Set to true if mutations to target's data are to be observed. Can be omitted if characterDataOldValue is specified. */
+ characterData?: boolean;
+ /** Set to true if characterData is set to true or omitted and target's data before the mutation needs to be recorded. */
+ characterDataOldValue?: boolean;
+ /** Set to true if mutations to target's children are to be observed. */
+ childList?: boolean;
+ /** Set to true if mutations to not just target, but also target's descendants are to be observed. */
+ subtree?: boolean;
+}
+
+interface NavigationPreloadState {
+ enabled?: boolean;
+ headerValue?: string;
+}
+
+interface NotificationAction {
+ action: string;
+ icon?: string;
+ title: string;
+}
+
+interface NotificationOptions {
+ actions?: NotificationAction[];
+ badge?: string;
+ body?: string;
+ data?: any;
+ dir?: NotificationDirection;
+ icon?: string;
+ image?: string;
+ lang?: string;
+ renotify?: boolean;
+ requireInteraction?: boolean;
+ silent?: boolean;
+ tag?: string;
+ timestamp?: EpochTimeStamp;
+ vibrate?: VibratePattern;
+}
+
+interface OfflineAudioCompletionEventInit extends EventInit {
+ renderedBuffer: AudioBuffer;
+}
+
+interface OfflineAudioContextOptions {
+ length: number;
+ numberOfChannels?: number;
+ sampleRate: number;
+}
+
+interface OptionalEffectTiming {
+ delay?: number;
+ direction?: PlaybackDirection;
+ duration?: number | string;
+ easing?: string;
+ endDelay?: number;
+ fill?: FillMode;
+ iterationStart?: number;
+ iterations?: number;
+ playbackRate?: number;
+}
+
+interface OscillatorOptions extends AudioNodeOptions {
+ detune?: number;
+ frequency?: number;
+ periodicWave?: PeriodicWave;
+ type?: OscillatorType;
+}
+
+interface PageTransitionEventInit extends EventInit {
+ persisted?: boolean;
+}
+
+interface PannerOptions extends AudioNodeOptions {
+ coneInnerAngle?: number;
+ coneOuterAngle?: number;
+ coneOuterGain?: number;
+ distanceModel?: DistanceModelType;
+ maxDistance?: number;
+ orientationX?: number;
+ orientationY?: number;
+ orientationZ?: number;
+ panningModel?: PanningModelType;
+ positionX?: number;
+ positionY?: number;
+ positionZ?: number;
+ refDistance?: number;
+ rolloffFactor?: number;
+}
+
+interface PaymentCurrencyAmount {
+ currency: string;
+ value: string;
+}
+
+interface PaymentDetailsBase {
+ displayItems?: PaymentItem[];
+ modifiers?: PaymentDetailsModifier[];
+}
+
+interface PaymentDetailsInit extends PaymentDetailsBase {
+ id?: string;
+ total: PaymentItem;
+}
+
+interface PaymentDetailsModifier {
+ additionalDisplayItems?: PaymentItem[];
+ data?: any;
+ supportedMethods: string;
+ total?: PaymentItem;
+}
+
+interface PaymentDetailsUpdate extends PaymentDetailsBase {
+ paymentMethodErrors?: any;
+ total?: PaymentItem;
+}
+
+interface PaymentItem {
+ amount: PaymentCurrencyAmount;
+ label: string;
+ pending?: boolean;
+}
+
+interface PaymentMethodChangeEventInit extends PaymentRequestUpdateEventInit {
+ methodDetails?: any;
+ methodName?: string;
+}
+
+interface PaymentMethodData {
+ data?: any;
+ supportedMethods: string;
+}
+
+interface PaymentRequestUpdateEventInit extends EventInit {
+}
+
+interface PaymentValidationErrors {
+ error?: string;
+ paymentMethod?: any;
+}
+
+interface Pbkdf2Params extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ iterations: number;
+ salt: BufferSource;
+}
+
+interface PerformanceMarkOptions {
+ detail?: any;
+ startTime?: DOMHighResTimeStamp;
+}
+
+interface PerformanceMeasureOptions {
+ detail?: any;
+ duration?: DOMHighResTimeStamp;
+ end?: string | DOMHighResTimeStamp;
+ start?: string | DOMHighResTimeStamp;
+}
+
+interface PerformanceObserverInit {
+ buffered?: boolean;
+ entryTypes?: string[];
+ type?: string;
+}
+
+interface PeriodicWaveConstraints {
+ disableNormalization?: boolean;
+}
+
+interface PeriodicWaveOptions extends PeriodicWaveConstraints {
+ imag?: number[] | Float32Array;
+ real?: number[] | Float32Array;
+}
+
+interface PermissionDescriptor {
+ name: PermissionName;
+}
+
+interface PointerEventInit extends MouseEventInit {
+ coalescedEvents?: PointerEvent[];
+ height?: number;
+ isPrimary?: boolean;
+ pointerId?: number;
+ pointerType?: string;
+ predictedEvents?: PointerEvent[];
+ pressure?: number;
+ tangentialPressure?: number;
+ tiltX?: number;
+ tiltY?: number;
+ twist?: number;
+ width?: number;
+}
+
+interface PopStateEventInit extends EventInit {
+ state?: any;
+}
+
+interface PositionOptions {
+ enableHighAccuracy?: boolean;
+ maximumAge?: number;
+ timeout?: number;
+}
+
+interface ProgressEventInit extends EventInit {
+ lengthComputable?: boolean;
+ loaded?: number;
+ total?: number;
+}
+
+interface PromiseRejectionEventInit extends EventInit {
+ promise: Promise<any>;
+ reason?: any;
+}
+
+interface PropertyIndexedKeyframes {
+ composite?: CompositeOperationOrAuto | CompositeOperationOrAuto[];
+ easing?: string | string[];
+ offset?: number | (number | null)[];
+ [property: string]: string | string[] | number | null | (number | null)[] | undefined;
+}
+
+interface PublicKeyCredentialCreationOptions {
+ attestation?: AttestationConveyancePreference;
+ authenticatorSelection?: AuthenticatorSelectionCriteria;
+ challenge: BufferSource;
+ excludeCredentials?: PublicKeyCredentialDescriptor[];
+ extensions?: AuthenticationExtensionsClientInputs;
+ pubKeyCredParams: PublicKeyCredentialParameters[];
+ rp: PublicKeyCredentialRpEntity;
+ timeout?: number;
+ user: PublicKeyCredentialUserEntity;
+}
+
+interface PublicKeyCredentialDescriptor {
+ id: BufferSource;
+ transports?: AuthenticatorTransport[];
+ type: PublicKeyCredentialType;
+}
+
+interface PublicKeyCredentialEntity {
+ name: string;
+}
+
+interface PublicKeyCredentialParameters {
+ alg: COSEAlgorithmIdentifier;
+ type: PublicKeyCredentialType;
+}
+
+interface PublicKeyCredentialRequestOptions {
+ allowCredentials?: PublicKeyCredentialDescriptor[];
+ challenge: BufferSource;
+ extensions?: AuthenticationExtensionsClientInputs;
+ rpId?: string;
+ timeout?: number;
+ userVerification?: UserVerificationRequirement;
+}
+
+interface PublicKeyCredentialRpEntity extends PublicKeyCredentialEntity {
+ id?: string;
+}
+
+interface PublicKeyCredentialUserEntity extends PublicKeyCredentialEntity {
+ displayName: string;
+ id: BufferSource;
+}
+
+interface PushSubscriptionJSON {
+ endpoint?: string;
+ expirationTime?: EpochTimeStamp | null;
+ keys?: Record<string, string>;
+}
+
+interface PushSubscriptionOptionsInit {
+ applicationServerKey?: BufferSource | string | null;
+ userVisibleOnly?: boolean;
+}
+
+interface QueuingStrategy<T = any> {
+ highWaterMark?: number;
+ size?: QueuingStrategySize<T>;
+}
+
+interface QueuingStrategyInit {
+ /**
+ * Creates a new ByteLengthQueuingStrategy with the provided high water mark.
+ *
+ * Note that the provided high water mark will not be validated ahead of time. Instead, if it is negative, NaN, or not a number, the resulting ByteLengthQueuingStrategy will cause the corresponding stream constructor to throw.
+ */
+ highWaterMark: number;
+}
+
+interface RTCAnswerOptions extends RTCOfferAnswerOptions {
+}
+
+interface RTCCertificateExpiration {
+ expires?: number;
+}
+
+interface RTCConfiguration {
+ bundlePolicy?: RTCBundlePolicy;
+ certificates?: RTCCertificate[];
+ iceCandidatePoolSize?: number;
+ iceServers?: RTCIceServer[];
+ iceTransportPolicy?: RTCIceTransportPolicy;
+ rtcpMuxPolicy?: RTCRtcpMuxPolicy;
+}
+
+interface RTCDTMFToneChangeEventInit extends EventInit {
+ tone?: string;
+}
+
+interface RTCDataChannelEventInit extends EventInit {
+ channel: RTCDataChannel;
+}
+
+interface RTCDataChannelInit {
+ id?: number;
+ maxPacketLifeTime?: number;
+ maxRetransmits?: number;
+ negotiated?: boolean;
+ ordered?: boolean;
+ protocol?: string;
+}
+
+interface RTCDtlsFingerprint {
+ algorithm?: string;
+ value?: string;
+}
+
+interface RTCEncodedAudioFrameMetadata {
+ contributingSources?: number[];
+ synchronizationSource?: number;
+}
+
+interface RTCEncodedVideoFrameMetadata {
+ contributingSources?: number[];
+ dependencies?: number[];
+ frameId?: number;
+ height?: number;
+ spatialIndex?: number;
+ synchronizationSource?: number;
+ temporalIndex?: number;
+ width?: number;
+}
+
+interface RTCErrorEventInit extends EventInit {
+ error: RTCError;
+}
+
+interface RTCErrorInit {
+ errorDetail: RTCErrorDetailType;
+ httpRequestStatusCode?: number;
+ receivedAlert?: number;
+ sctpCauseCode?: number;
+ sdpLineNumber?: number;
+ sentAlert?: number;
+}
+
+interface RTCIceCandidateInit {
+ candidate?: string;
+ sdpMLineIndex?: number | null;
+ sdpMid?: string | null;
+ usernameFragment?: string | null;
+}
+
+interface RTCIceCandidatePairStats extends RTCStats {
+ availableIncomingBitrate?: number;
+ availableOutgoingBitrate?: number;
+ bytesReceived?: number;
+ bytesSent?: number;
+ currentRoundTripTime?: number;
+ localCandidateId: string;
+ nominated?: boolean;
+ remoteCandidateId: string;
+ requestsReceived?: number;
+ requestsSent?: number;
+ responsesReceived?: number;
+ responsesSent?: number;
+ state: RTCStatsIceCandidatePairState;
+ totalRoundTripTime?: number;
+ transportId: string;
+}
+
+interface RTCIceServer {
+ credential?: string;
+ credentialType?: RTCIceCredentialType;
+ urls: string | string[];
+ username?: string;
+}
+
+interface RTCInboundRtpStreamStats extends RTCReceivedRtpStreamStats {
+ firCount?: number;
+ framesDecoded?: number;
+ nackCount?: number;
+ pliCount?: number;
+ qpSum?: number;
+ remoteId?: string;
+}
+
+interface RTCLocalSessionDescriptionInit {
+ sdp?: string;
+ type?: RTCSdpType;
+}
+
+interface RTCOfferAnswerOptions {
+}
+
+interface RTCOfferOptions extends RTCOfferAnswerOptions {
+ iceRestart?: boolean;
+ offerToReceiveAudio?: boolean;
+ offerToReceiveVideo?: boolean;
+}
+
+interface RTCOutboundRtpStreamStats extends RTCSentRtpStreamStats {
+ firCount?: number;
+ framesEncoded?: number;
+ nackCount?: number;
+ pliCount?: number;
+ qpSum?: number;
+ remoteId?: string;
+}
+
+interface RTCPeerConnectionIceErrorEventInit extends EventInit {
+ address?: string | null;
+ errorCode: number;
+ errorText?: string;
+ port?: number | null;
+ url?: string;
+}
+
+interface RTCPeerConnectionIceEventInit extends EventInit {
+ candidate?: RTCIceCandidate | null;
+ url?: string | null;
+}
+
+interface RTCReceivedRtpStreamStats extends RTCRtpStreamStats {
+ jitter?: number;
+ packetsDiscarded?: number;
+ packetsLost?: number;
+ packetsReceived?: number;
+}
+
+interface RTCRtcpParameters {
+ cname?: string;
+ reducedSize?: boolean;
+}
+
+interface RTCRtpCapabilities {
+ codecs: RTCRtpCodecCapability[];
+ headerExtensions: RTCRtpHeaderExtensionCapability[];
+}
+
+interface RTCRtpCodecCapability {
+ channels?: number;
+ clockRate: number;
+ mimeType: string;
+ sdpFmtpLine?: string;
+}
+
+interface RTCRtpCodecParameters {
+ channels?: number;
+ clockRate: number;
+ mimeType: string;
+ payloadType: number;
+ sdpFmtpLine?: string;
+}
+
+interface RTCRtpCodingParameters {
+ rid?: string;
+}
+
+interface RTCRtpContributingSource {
+ audioLevel?: number;
+ rtpTimestamp: number;
+ source: number;
+ timestamp: DOMHighResTimeStamp;
+}
+
+interface RTCRtpEncodingParameters extends RTCRtpCodingParameters {
+ active?: boolean;
+ maxBitrate?: number;
+ priority?: RTCPriorityType;
+ scaleResolutionDownBy?: number;
+}
+
+interface RTCRtpHeaderExtensionCapability {
+ uri?: string;
+}
+
+interface RTCRtpHeaderExtensionParameters {
+ encrypted?: boolean;
+ id: number;
+ uri: string;
+}
+
+interface RTCRtpParameters {
+ codecs: RTCRtpCodecParameters[];
+ headerExtensions: RTCRtpHeaderExtensionParameters[];
+ rtcp: RTCRtcpParameters;
+}
+
+interface RTCRtpReceiveParameters extends RTCRtpParameters {
+}
+
+interface RTCRtpSendParameters extends RTCRtpParameters {
+ degradationPreference?: RTCDegradationPreference;
+ encodings: RTCRtpEncodingParameters[];
+ transactionId: string;
+}
+
+interface RTCRtpStreamStats extends RTCStats {
+ codecId?: string;
+ kind: string;
+ ssrc: number;
+ transportId?: string;
+}
+
+interface RTCRtpSynchronizationSource extends RTCRtpContributingSource {
+}
+
+interface RTCRtpTransceiverInit {
+ direction?: RTCRtpTransceiverDirection;
+ sendEncodings?: RTCRtpEncodingParameters[];
+ streams?: MediaStream[];
+}
+
+interface RTCSentRtpStreamStats extends RTCRtpStreamStats {
+ bytesSent?: number;
+ packetsSent?: number;
+}
+
+interface RTCSessionDescriptionInit {
+ sdp?: string;
+ type: RTCSdpType;
+}
+
+interface RTCStats {
+ id: string;
+ timestamp: DOMHighResTimeStamp;
+ type: RTCStatsType;
+}
+
+interface RTCTrackEventInit extends EventInit {
+ receiver: RTCRtpReceiver;
+ streams?: MediaStream[];
+ track: MediaStreamTrack;
+ transceiver: RTCRtpTransceiver;
+}
+
+interface RTCTransportStats extends RTCStats {
+ bytesReceived?: number;
+ bytesSent?: number;
+ dtlsCipher?: string;
+ dtlsState: RTCDtlsTransportState;
+ localCertificateId?: string;
+ remoteCertificateId?: string;
+ rtcpTransportStatsId?: string;
+ selectedCandidatePairId?: string;
+ srtpCipher?: string;
+ tlsVersion?: string;
+}
+
+interface ReadableStreamReadDoneResult {
+ done: true;
+ value?: undefined;
+}
+
+interface ReadableStreamReadValueResult<T> {
+ done: false;
+ value: T;
+}
+
+interface ReadableWritablePair<R = any, W = any> {
+ readable: ReadableStream<R>;
+ /**
+ * Provides a convenient, chainable way of piping this readable stream through a transform stream (or any other { writable, readable } pair). It simply pipes the stream into the writable side of the supplied pair, and returns the readable side for further use.
+ *
+ * Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader.
+ */
+ writable: WritableStream<W>;
+}
+
+interface RegistrationOptions {
+ scope?: string;
+ type?: WorkerType;
+ updateViaCache?: ServiceWorkerUpdateViaCache;
+}
+
+interface RequestInit {
+ /** A BodyInit object or null to set request's body. */
+ body?: BodyInit | null;
+ /** A string indicating how the request will interact with the browser's cache to set request's cache. */
+ cache?: RequestCache;
+ /** A string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL. Sets request's credentials. */
+ credentials?: RequestCredentials;
+ /** A Headers object, an object literal, or an array of two-item arrays to set request's headers. */
+ headers?: HeadersInit;
+ /** A cryptographic hash of the resource to be fetched by request. Sets request's integrity. */
+ integrity?: string;
+ /** A boolean to set request's keepalive. */
+ keepalive?: boolean;
+ /** A string to set request's method. */
+ method?: string;
+ /** A string to indicate whether the request will use CORS, or will be restricted to same-origin URLs. Sets request's mode. */
+ mode?: RequestMode;
+ /** A string indicating whether request follows redirects, results in an error upon encountering a redirect, or returns the redirect (in an opaque fashion). Sets request's redirect. */
+ redirect?: RequestRedirect;
+ /** A string whose value is a same-origin URL, "about:client", or the empty string, to set request's referrer. */
+ referrer?: string;
+ /** A referrer policy to set request's referrerPolicy. */
+ referrerPolicy?: ReferrerPolicy;
+ /** An AbortSignal to set request's signal. */
+ signal?: AbortSignal | null;
+ /** Can only be null. Used to disassociate request from any Window. */
+ window?: null;
+}
+
+interface ResizeObserverOptions {
+ box?: ResizeObserverBoxOptions;
+}
+
+interface ResponseInit {
+ headers?: HeadersInit;
+ status?: number;
+ statusText?: string;
+}
+
+interface RsaHashedImportParams extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+}
+
+interface RsaHashedKeyAlgorithm extends RsaKeyAlgorithm {
+ hash: KeyAlgorithm;
+}
+
+interface RsaHashedKeyGenParams extends RsaKeyGenParams {
+ hash: HashAlgorithmIdentifier;
+}
+
+interface RsaKeyAlgorithm extends KeyAlgorithm {
+ modulusLength: number;
+ publicExponent: BigInteger;
+}
+
+interface RsaKeyGenParams extends Algorithm {
+ modulusLength: number;
+ publicExponent: BigInteger;
+}
+
+interface RsaOaepParams extends Algorithm {
+ label?: BufferSource;
+}
+
+interface RsaOtherPrimesInfo {
+ d?: string;
+ r?: string;
+ t?: string;
+}
+
+interface RsaPssParams extends Algorithm {
+ saltLength: number;
+}
+
+interface SVGBoundingBoxOptions {
+ clipped?: boolean;
+ fill?: boolean;
+ markers?: boolean;
+ stroke?: boolean;
+}
+
+interface ScrollIntoViewOptions extends ScrollOptions {
+ block?: ScrollLogicalPosition;
+ inline?: ScrollLogicalPosition;
+}
+
+interface ScrollOptions {
+ behavior?: ScrollBehavior;
+}
+
+interface ScrollToOptions extends ScrollOptions {
+ left?: number;
+ top?: number;
+}
+
+interface SecurityPolicyViolationEventInit extends EventInit {
+ blockedURI?: string;
+ columnNumber?: number;
+ disposition: SecurityPolicyViolationEventDisposition;
+ documentURI: string;
+ effectiveDirective: string;
+ lineNumber?: number;
+ originalPolicy: string;
+ referrer?: string;
+ sample?: string;
+ sourceFile?: string;
+ statusCode: number;
+ violatedDirective: string;
+}
+
+interface ShadowRootInit {
+ delegatesFocus?: boolean;
+ mode: ShadowRootMode;
+ slotAssignment?: SlotAssignmentMode;
+}
+
+interface ShareData {
+ files?: File[];
+ text?: string;
+ title?: string;
+ url?: string;
+}
+
+interface SpeechSynthesisErrorEventInit extends SpeechSynthesisEventInit {
+ error: SpeechSynthesisErrorCode;
+}
+
+interface SpeechSynthesisEventInit extends EventInit {
+ charIndex?: number;
+ charLength?: number;
+ elapsedTime?: number;
+ name?: string;
+ utterance: SpeechSynthesisUtterance;
+}
+
+interface StaticRangeInit {
+ endContainer: Node;
+ endOffset: number;
+ startContainer: Node;
+ startOffset: number;
+}
+
+interface StereoPannerOptions extends AudioNodeOptions {
+ pan?: number;
+}
+
+interface StorageEstimate {
+ quota?: number;
+ usage?: number;
+}
+
+interface StorageEventInit extends EventInit {
+ key?: string | null;
+ newValue?: string | null;
+ oldValue?: string | null;
+ storageArea?: Storage | null;
+ url?: string;
+}
+
+interface StreamPipeOptions {
+ preventAbort?: boolean;
+ preventCancel?: boolean;
+ /**
+ * Pipes this readable stream to a given writable stream destination. The way in which the piping process behaves under various error conditions can be customized with a number of passed options. It returns a promise that fulfills when the piping process completes successfully, or rejects if any errors were encountered.
+ *
+ * Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader.
+ *
+ * Errors and closures of the source and destination streams propagate as follows:
+ *
+ * An error in this source readable stream will abort destination, unless preventAbort is truthy. The returned promise will be rejected with the source's error, or with any error that occurs during aborting the destination.
+ *
+ * An error in destination will cancel this source readable stream, unless preventCancel is truthy. The returned promise will be rejected with the destination's error, or with any error that occurs during canceling the source.
+ *
+ * When this source readable stream closes, destination will be closed, unless preventClose is truthy. The returned promise will be fulfilled once this process completes, unless an error is encountered while closing the destination, in which case it will be rejected with that error.
+ *
+ * If destination starts out closed or closing, this source readable stream will be canceled, unless preventCancel is true. The returned promise will be rejected with an error indicating piping to a closed stream failed, or with any error that occurs during canceling the source.
+ *
+ * The signal option can be set to an AbortSignal to allow aborting an ongoing pipe operation via the corresponding AbortController. In this case, this source readable stream will be canceled, and destination aborted, unless the respective options preventCancel or preventAbort are set.
+ */
+ preventClose?: boolean;
+ signal?: AbortSignal;
+}
+
+interface StructuredSerializeOptions {
+ transfer?: Transferable[];
+}
+
+interface SubmitEventInit extends EventInit {
+ submitter?: HTMLElement | null;
+}
+
+interface TextDecodeOptions {
+ stream?: boolean;
+}
+
+interface TextDecoderOptions {
+ fatal?: boolean;
+ ignoreBOM?: boolean;
+}
+
+interface TextEncoderEncodeIntoResult {
+ read?: number;
+ written?: number;
+}
+
+interface TouchEventInit extends EventModifierInit {
+ changedTouches?: Touch[];
+ targetTouches?: Touch[];
+ touches?: Touch[];
+}
+
+interface TouchInit {
+ altitudeAngle?: number;
+ azimuthAngle?: number;
+ clientX?: number;
+ clientY?: number;
+ force?: number;
+ identifier: number;
+ pageX?: number;
+ pageY?: number;
+ radiusX?: number;
+ radiusY?: number;
+ rotationAngle?: number;
+ screenX?: number;
+ screenY?: number;
+ target: EventTarget;
+ touchType?: TouchType;
+}
+
+interface TrackEventInit extends EventInit {
+ track?: TextTrack | null;
+}
+
+interface Transformer<I = any, O = any> {
+ flush?: TransformerFlushCallback<O>;
+ readableType?: undefined;
+ start?: TransformerStartCallback<O>;
+ transform?: TransformerTransformCallback<I, O>;
+ writableType?: undefined;
+}
+
+interface TransitionEventInit extends EventInit {
+ elapsedTime?: number;
+ propertyName?: string;
+ pseudoElement?: string;
+}
+
+interface UIEventInit extends EventInit {
+ detail?: number;
+ view?: Window | null;
+ /** @deprecated */
+ which?: number;
+}
+
+interface ULongRange {
+ max?: number;
+ min?: number;
+}
+
+interface UnderlyingSink<W = any> {
+ abort?: UnderlyingSinkAbortCallback;
+ close?: UnderlyingSinkCloseCallback;
+ start?: UnderlyingSinkStartCallback;
+ type?: undefined;
+ write?: UnderlyingSinkWriteCallback<W>;
+}
+
+interface UnderlyingSource<R = any> {
+ cancel?: UnderlyingSourceCancelCallback;
+ pull?: UnderlyingSourcePullCallback<R>;
+ start?: UnderlyingSourceStartCallback<R>;
+ type?: undefined;
+}
+
+interface ValidityStateFlags {
+ badInput?: boolean;
+ customError?: boolean;
+ patternMismatch?: boolean;
+ rangeOverflow?: boolean;
+ rangeUnderflow?: boolean;
+ stepMismatch?: boolean;
+ tooLong?: boolean;
+ tooShort?: boolean;
+ typeMismatch?: boolean;
+ valueMissing?: boolean;
+}
+
+interface VideoColorSpaceInit {
+ fullRange?: boolean;
+ matrix?: VideoMatrixCoefficients;
+ primaries?: VideoColorPrimaries;
+ transfer?: VideoTransferCharacteristics;
+}
+
+interface VideoConfiguration {
+ bitrate: number;
+ colorGamut?: ColorGamut;
+ contentType: string;
+ framerate: number;
+ hdrMetadataType?: HdrMetadataType;
+ height: number;
+ scalabilityMode?: string;
+ transferFunction?: TransferFunction;
+ width: number;
+}
+
+interface VideoFrameMetadata {
+ captureTime?: DOMHighResTimeStamp;
+ expectedDisplayTime: DOMHighResTimeStamp;
+ height: number;
+ mediaTime: number;
+ presentationTime: DOMHighResTimeStamp;
+ presentedFrames: number;
+ processingDuration?: number;
+ receiveTime?: DOMHighResTimeStamp;
+ rtpTimestamp?: number;
+ width: number;
+}
+
+interface WaveShaperOptions extends AudioNodeOptions {
+ curve?: number[] | Float32Array;
+ oversample?: OverSampleType;
+}
+
+interface WebGLContextAttributes {
+ alpha?: boolean;
+ antialias?: boolean;
+ depth?: boolean;
+ desynchronized?: boolean;
+ failIfMajorPerformanceCaveat?: boolean;
+ powerPreference?: WebGLPowerPreference;
+ premultipliedAlpha?: boolean;
+ preserveDrawingBuffer?: boolean;
+ stencil?: boolean;
+}
+
+interface WebGLContextEventInit extends EventInit {
+ statusMessage?: string;
+}
+
+interface WheelEventInit extends MouseEventInit {
+ deltaMode?: number;
+ deltaX?: number;
+ deltaY?: number;
+ deltaZ?: number;
+}
+
+interface WindowPostMessageOptions extends StructuredSerializeOptions {
+ targetOrigin?: string;
+}
+
+interface WorkerOptions {
+ credentials?: RequestCredentials;
+ name?: string;
+ type?: WorkerType;
+}
+
+interface WorkletOptions {
+ credentials?: RequestCredentials;
+}
+
+type NodeFilter = ((node: Node) => number) | { acceptNode(node: Node): number; };
+
+declare var NodeFilter: {
+ readonly FILTER_ACCEPT: number;
+ readonly FILTER_REJECT: number;
+ readonly FILTER_SKIP: number;
+ readonly SHOW_ALL: number;
+ readonly SHOW_ATTRIBUTE: number;
+ readonly SHOW_CDATA_SECTION: number;
+ readonly SHOW_COMMENT: number;
+ readonly SHOW_DOCUMENT: number;
+ readonly SHOW_DOCUMENT_FRAGMENT: number;
+ readonly SHOW_DOCUMENT_TYPE: number;
+ readonly SHOW_ELEMENT: number;
+ readonly SHOW_ENTITY: number;
+ readonly SHOW_ENTITY_REFERENCE: number;
+ readonly SHOW_NOTATION: number;
+ readonly SHOW_PROCESSING_INSTRUCTION: number;
+ readonly SHOW_TEXT: number;
+};
+
+type XPathNSResolver = ((prefix: string | null) => string | null) | { lookupNamespaceURI(prefix: string | null): string | null; };
+
+/** The ANGLE_instanced_arrays extension is part of the WebGL API and allows to draw the same object, or groups of similar objects multiple times, if they share the same vertex data, primitive count and type. */
+interface ANGLE_instanced_arrays {
+ drawArraysInstancedANGLE(mode: GLenum, first: GLint, count: GLsizei, primcount: GLsizei): void;
+ drawElementsInstancedANGLE(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr, primcount: GLsizei): void;
+ vertexAttribDivisorANGLE(index: GLuint, divisor: GLuint): void;
+ readonly VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: GLenum;
+}
+
+interface ARIAMixin {
+ ariaAtomic: string | null;
+ ariaAutoComplete: string | null;
+ ariaBusy: string | null;
+ ariaChecked: string | null;
+ ariaColCount: string | null;
+ ariaColIndex: string | null;
+ ariaColSpan: string | null;
+ ariaCurrent: string | null;
+ ariaDisabled: string | null;
+ ariaExpanded: string | null;
+ ariaHasPopup: string | null;
+ ariaHidden: string | null;
+ ariaKeyShortcuts: string | null;
+ ariaLabel: string | null;
+ ariaLevel: string | null;
+ ariaLive: string | null;
+ ariaModal: string | null;
+ ariaMultiLine: string | null;
+ ariaMultiSelectable: string | null;
+ ariaOrientation: string | null;
+ ariaPlaceholder: string | null;
+ ariaPosInSet: string | null;
+ ariaPressed: string | null;
+ ariaReadOnly: string | null;
+ ariaRequired: string | null;
+ ariaRoleDescription: string | null;
+ ariaRowCount: string | null;
+ ariaRowIndex: string | null;
+ ariaRowSpan: string | null;
+ ariaSelected: string | null;
+ ariaSetSize: string | null;
+ ariaSort: string | null;
+ ariaValueMax: string | null;
+ ariaValueMin: string | null;
+ ariaValueNow: string | null;
+ ariaValueText: string | null;
+}
+
+/** A controller object that allows you to abort one or more DOM requests as and when desired. */
+interface AbortController {
+ /** Returns the AbortSignal object associated with this object. */
+ readonly signal: AbortSignal;
+ /** Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted. */
+ abort(reason?: any): void;
+}
+
+declare var AbortController: {
+ prototype: AbortController;
+ new(): AbortController;
+};
+
+interface AbortSignalEventMap {
+ "abort": Event;
+}
+
+/** A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object. */
+interface AbortSignal extends EventTarget {
+ /** Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise. */
+ readonly aborted: boolean;
+ onabort: ((this: AbortSignal, ev: Event) => any) | null;
+ readonly reason: any;
+ throwIfAborted(): void;
+ addEventListener<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var AbortSignal: {
+ prototype: AbortSignal;
+ new(): AbortSignal;
+ // abort(): AbortSignal; - To be re-added in the future
+};
+
+interface AbstractRange {
+ /** Returns true if range is collapsed, and false otherwise. */
+ readonly collapsed: boolean;
+ /** Returns range's end node. */
+ readonly endContainer: Node;
+ /** Returns range's end offset. */
+ readonly endOffset: number;
+ /** Returns range's start node. */
+ readonly startContainer: Node;
+ /** Returns range's start offset. */
+ readonly startOffset: number;
+}
+
+declare var AbstractRange: {
+ prototype: AbstractRange;
+ new(): AbstractRange;
+};
+
+interface AbstractWorkerEventMap {
+ "error": ErrorEvent;
+}
+
+interface AbstractWorker {
+ onerror: ((this: AbstractWorker, ev: ErrorEvent) => any) | null;
+ addEventListener<K extends keyof AbstractWorkerEventMap>(type: K, listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof AbstractWorkerEventMap>(type: K, listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+/** A node able to provide real-time frequency and time-domain analysis information. It is an AudioNode that passes the audio stream unchanged from the input to the output, but allows you to take the generated data, process it, and create audio visualizations. */
+interface AnalyserNode extends AudioNode {
+ fftSize: number;
+ readonly frequencyBinCount: number;
+ maxDecibels: number;
+ minDecibels: number;
+ smoothingTimeConstant: number;
+ getByteFrequencyData(array: Uint8Array): void;
+ getByteTimeDomainData(array: Uint8Array): void;
+ getFloatFrequencyData(array: Float32Array): void;
+ getFloatTimeDomainData(array: Float32Array): void;
+}
+
+declare var AnalyserNode: {
+ prototype: AnalyserNode;
+ new(context: BaseAudioContext, options?: AnalyserOptions): AnalyserNode;
+};
+
+interface Animatable {
+ animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions): Animation;
+ getAnimations(options?: GetAnimationsOptions): Animation[];
+}
+
+interface AnimationEventMap {
+ "cancel": AnimationPlaybackEvent;
+ "finish": AnimationPlaybackEvent;
+ "remove": Event;
+}
+
+interface Animation extends EventTarget {
+ currentTime: CSSNumberish | null;
+ effect: AnimationEffect | null;
+ readonly finished: Promise<Animation>;
+ id: string;
+ oncancel: ((this: Animation, ev: AnimationPlaybackEvent) => any) | null;
+ onfinish: ((this: Animation, ev: AnimationPlaybackEvent) => any) | null;
+ onremove: ((this: Animation, ev: Event) => any) | null;
+ readonly pending: boolean;
+ readonly playState: AnimationPlayState;
+ playbackRate: number;
+ readonly ready: Promise<Animation>;
+ readonly replaceState: AnimationReplaceState;
+ startTime: CSSNumberish | null;
+ timeline: AnimationTimeline | null;
+ cancel(): void;
+ commitStyles(): void;
+ finish(): void;
+ pause(): void;
+ persist(): void;
+ play(): void;
+ reverse(): void;
+ updatePlaybackRate(playbackRate: number): void;
+ addEventListener<K extends keyof AnimationEventMap>(type: K, listener: (this: Animation, ev: AnimationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof AnimationEventMap>(type: K, listener: (this: Animation, ev: AnimationEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var Animation: {
+ prototype: Animation;
+ new(effect?: AnimationEffect | null, timeline?: AnimationTimeline | null): Animation;
+};
+
+interface AnimationEffect {
+ getComputedTiming(): ComputedEffectTiming;
+ getTiming(): EffectTiming;
+ updateTiming(timing?: OptionalEffectTiming): void;
+}
+
+declare var AnimationEffect: {
+ prototype: AnimationEffect;
+ new(): AnimationEffect;
+};
+
+/** Events providing information related to animations. */
+interface AnimationEvent extends Event {
+ readonly animationName: string;
+ readonly elapsedTime: number;
+ readonly pseudoElement: string;
+}
+
+declare var AnimationEvent: {
+ prototype: AnimationEvent;
+ new(type: string, animationEventInitDict?: AnimationEventInit): AnimationEvent;
+};
+
+interface AnimationFrameProvider {
+ cancelAnimationFrame(handle: number): void;
+ requestAnimationFrame(callback: FrameRequestCallback): number;
+}
+
+interface AnimationPlaybackEvent extends Event {
+ readonly currentTime: CSSNumberish | null;
+ readonly timelineTime: CSSNumberish | null;
+}
+
+declare var AnimationPlaybackEvent: {
+ prototype: AnimationPlaybackEvent;
+ new(type: string, eventInitDict?: AnimationPlaybackEventInit): AnimationPlaybackEvent;
+};
+
+interface AnimationTimeline {
+ readonly currentTime: number | null;
+}
+
+declare var AnimationTimeline: {
+ prototype: AnimationTimeline;
+ new(): AnimationTimeline;
+};
+
+/** A DOM element's attribute as an object. In most DOM methods, you will probably directly retrieve the attribute as a string (e.g., Element.getAttribute(), but certain functions (e.g., Element.getAttributeNode()) or means of iterating give Attr types. */
+interface Attr extends Node {
+ readonly localName: string;
+ readonly name: string;
+ readonly namespaceURI: string | null;
+ readonly ownerDocument: Document;
+ readonly ownerElement: Element | null;
+ readonly prefix: string | null;
+ readonly specified: boolean;
+ value: string;
+}
+
+declare var Attr: {
+ prototype: Attr;
+ new(): Attr;
+};
+
+/** A short audio asset residing in memory, created from an audio file using the AudioContext.decodeAudioData() method, or from raw data using AudioContext.createBuffer(). Once put into an AudioBuffer, the audio can then be played by being passed into an AudioBufferSourceNode. */
+interface AudioBuffer {
+ readonly duration: number;
+ readonly length: number;
+ readonly numberOfChannels: number;
+ readonly sampleRate: number;
+ copyFromChannel(destination: Float32Array, channelNumber: number, bufferOffset?: number): void;
+ copyToChannel(source: Float32Array, channelNumber: number, bufferOffset?: number): void;
+ getChannelData(channel: number): Float32Array;
+}
+
+declare var AudioBuffer: {
+ prototype: AudioBuffer;
+ new(options: AudioBufferOptions): AudioBuffer;
+};
+
+/** An AudioScheduledSourceNode which represents an audio source consisting of in-memory audio data, stored in an AudioBuffer. It's especially useful for playing back audio which has particularly stringent timing accuracy requirements, such as for sounds that must match a specific rhythm and can be kept in memory rather than being played from disk or the network. */
+interface AudioBufferSourceNode extends AudioScheduledSourceNode {
+ buffer: AudioBuffer | null;
+ readonly detune: AudioParam;
+ loop: boolean;
+ loopEnd: number;
+ loopStart: number;
+ readonly playbackRate: AudioParam;
+ start(when?: number, offset?: number, duration?: number): void;
+ addEventListener<K extends keyof AudioScheduledSourceNodeEventMap>(type: K, listener: (this: AudioBufferSourceNode, ev: AudioScheduledSourceNodeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof AudioScheduledSourceNodeEventMap>(type: K, listener: (this: AudioBufferSourceNode, ev: AudioScheduledSourceNodeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var AudioBufferSourceNode: {
+ prototype: AudioBufferSourceNode;
+ new(context: BaseAudioContext, options?: AudioBufferSourceOptions): AudioBufferSourceNode;
+};
+
+/** An audio-processing graph built from audio modules linked together, each represented by an AudioNode. */
+interface AudioContext extends BaseAudioContext {
+ readonly baseLatency: number;
+ readonly outputLatency: number;
+ close(): Promise<void>;
+ createMediaElementSource(mediaElement: HTMLMediaElement): MediaElementAudioSourceNode;
+ createMediaStreamDestination(): MediaStreamAudioDestinationNode;
+ createMediaStreamSource(mediaStream: MediaStream): MediaStreamAudioSourceNode;
+ getOutputTimestamp(): AudioTimestamp;
+ resume(): Promise<void>;
+ suspend(): Promise<void>;
+ addEventListener<K extends keyof BaseAudioContextEventMap>(type: K, listener: (this: AudioContext, ev: BaseAudioContextEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof BaseAudioContextEventMap>(type: K, listener: (this: AudioContext, ev: BaseAudioContextEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var AudioContext: {
+ prototype: AudioContext;
+ new(contextOptions?: AudioContextOptions): AudioContext;
+};
+
+/** AudioDestinationNode has no output (as it is the output, no more AudioNode can be linked after it in the audio graph) and one input. The number of channels in the input must be between 0 and the maxChannelCount value or an exception is raised. */
+interface AudioDestinationNode extends AudioNode {
+ readonly maxChannelCount: number;
+}
+
+declare var AudioDestinationNode: {
+ prototype: AudioDestinationNode;
+ new(): AudioDestinationNode;
+};
+
+/** The position and orientation of the unique person listening to the audio scene, and is used in audio spatialization. All PannerNodes spatialize in relation to the AudioListener stored in the BaseAudioContext.listener attribute. */
+interface AudioListener {
+ readonly forwardX: AudioParam;
+ readonly forwardY: AudioParam;
+ readonly forwardZ: AudioParam;
+ readonly positionX: AudioParam;
+ readonly positionY: AudioParam;
+ readonly positionZ: AudioParam;
+ readonly upX: AudioParam;
+ readonly upY: AudioParam;
+ readonly upZ: AudioParam;
+ /** @deprecated */
+ setOrientation(x: number, y: number, z: number, xUp: number, yUp: number, zUp: number): void;
+ /** @deprecated */
+ setPosition(x: number, y: number, z: number): void;
+}
+
+declare var AudioListener: {
+ prototype: AudioListener;
+ new(): AudioListener;
+};
+
+/** A generic interface for representing an audio processing module. Examples include: */
+interface AudioNode extends EventTarget {
+ channelCount: number;
+ channelCountMode: ChannelCountMode;
+ channelInterpretation: ChannelInterpretation;
+ readonly context: BaseAudioContext;
+ readonly numberOfInputs: number;
+ readonly numberOfOutputs: number;
+ connect(destinationNode: AudioNode, output?: number, input?: number): AudioNode;
+ connect(destinationParam: AudioParam, output?: number): void;
+ disconnect(): void;
+ disconnect(output: number): void;
+ disconnect(destinationNode: AudioNode): void;
+ disconnect(destinationNode: AudioNode, output: number): void;
+ disconnect(destinationNode: AudioNode, output: number, input: number): void;
+ disconnect(destinationParam: AudioParam): void;
+ disconnect(destinationParam: AudioParam, output: number): void;
+}
+
+declare var AudioNode: {
+ prototype: AudioNode;
+ new(): AudioNode;
+};
+
+/** The Web Audio API's AudioParam interface represents an audio-related parameter, usually a parameter of an AudioNode (such as GainNode.gain). */
+interface AudioParam {
+ automationRate: AutomationRate;
+ readonly defaultValue: number;
+ readonly maxValue: number;
+ readonly minValue: number;
+ value: number;
+ cancelAndHoldAtTime(cancelTime: number): AudioParam;
+ cancelScheduledValues(cancelTime: number): AudioParam;
+ exponentialRampToValueAtTime(value: number, endTime: number): AudioParam;
+ linearRampToValueAtTime(value: number, endTime: number): AudioParam;
+ setTargetAtTime(target: number, startTime: number, timeConstant: number): AudioParam;
+ setValueAtTime(value: number, startTime: number): AudioParam;
+ setValueCurveAtTime(values: number[] | Float32Array, startTime: number, duration: number): AudioParam;
+}
+
+declare var AudioParam: {
+ prototype: AudioParam;
+ new(): AudioParam;
+};
+
+interface AudioParamMap {
+ forEach(callbackfn: (value: AudioParam, key: string, parent: AudioParamMap) => void, thisArg?: any): void;
+}
+
+declare var AudioParamMap: {
+ prototype: AudioParamMap;
+ new(): AudioParamMap;
+};
+
+/**
+ * The Web Audio API events that occur when a ScriptProcessorNode input buffer is ready to be processed.
+ * @deprecated As of the August 29 2014 Web Audio API spec publication, this feature has been marked as deprecated, and is soon to be replaced by AudioWorklet.
+ */
+interface AudioProcessingEvent extends Event {
+ /** @deprecated */
+ readonly inputBuffer: AudioBuffer;
+ /** @deprecated */
+ readonly outputBuffer: AudioBuffer;
+ /** @deprecated */
+ readonly playbackTime: number;
+}
+
+/** @deprecated */
+declare var AudioProcessingEvent: {
+ prototype: AudioProcessingEvent;
+ new(type: string, eventInitDict: AudioProcessingEventInit): AudioProcessingEvent;
+};
+
+interface AudioScheduledSourceNodeEventMap {
+ "ended": Event;
+}
+
+interface AudioScheduledSourceNode extends AudioNode {
+ onended: ((this: AudioScheduledSourceNode, ev: Event) => any) | null;
+ start(when?: number): void;
+ stop(when?: number): void;
+ addEventListener<K extends keyof AudioScheduledSourceNodeEventMap>(type: K, listener: (this: AudioScheduledSourceNode, ev: AudioScheduledSourceNodeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof AudioScheduledSourceNodeEventMap>(type: K, listener: (this: AudioScheduledSourceNode, ev: AudioScheduledSourceNodeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var AudioScheduledSourceNode: {
+ prototype: AudioScheduledSourceNode;
+ new(): AudioScheduledSourceNode;
+};
+
+/** Available only in secure contexts. */
+interface AudioWorklet extends Worklet {
+}
+
+declare var AudioWorklet: {
+ prototype: AudioWorklet;
+ new(): AudioWorklet;
+};
+
+interface AudioWorkletNodeEventMap {
+ "processorerror": Event;
+}
+
+/** Available only in secure contexts. */
+interface AudioWorkletNode extends AudioNode {
+ onprocessorerror: ((this: AudioWorkletNode, ev: Event) => any) | null;
+ readonly parameters: AudioParamMap;
+ readonly port: MessagePort;
+ addEventListener<K extends keyof AudioWorkletNodeEventMap>(type: K, listener: (this: AudioWorkletNode, ev: AudioWorkletNodeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof AudioWorkletNodeEventMap>(type: K, listener: (this: AudioWorkletNode, ev: AudioWorkletNodeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var AudioWorkletNode: {
+ prototype: AudioWorkletNode;
+ new(context: BaseAudioContext, name: string, options?: AudioWorkletNodeOptions): AudioWorkletNode;
+};
+
+/** Available only in secure contexts. */
+interface AuthenticatorAssertionResponse extends AuthenticatorResponse {
+ readonly authenticatorData: ArrayBuffer;
+ readonly signature: ArrayBuffer;
+ readonly userHandle: ArrayBuffer | null;
+}
+
+declare var AuthenticatorAssertionResponse: {
+ prototype: AuthenticatorAssertionResponse;
+ new(): AuthenticatorAssertionResponse;
+};
+
+/** Available only in secure contexts. */
+interface AuthenticatorAttestationResponse extends AuthenticatorResponse {
+ readonly attestationObject: ArrayBuffer;
+}
+
+declare var AuthenticatorAttestationResponse: {
+ prototype: AuthenticatorAttestationResponse;
+ new(): AuthenticatorAttestationResponse;
+};
+
+/** Available only in secure contexts. */
+interface AuthenticatorResponse {
+ readonly clientDataJSON: ArrayBuffer;
+}
+
+declare var AuthenticatorResponse: {
+ prototype: AuthenticatorResponse;
+ new(): AuthenticatorResponse;
+};
+
+interface BarProp {
+ readonly visible: boolean;
+}
+
+declare var BarProp: {
+ prototype: BarProp;
+ new(): BarProp;
+};
+
+interface BaseAudioContextEventMap {
+ "statechange": Event;
+}
+
+interface BaseAudioContext extends EventTarget {
+ /** Available only in secure contexts. */
+ readonly audioWorklet: AudioWorklet;
+ readonly currentTime: number;
+ readonly destination: AudioDestinationNode;
+ readonly listener: AudioListener;
+ onstatechange: ((this: BaseAudioContext, ev: Event) => any) | null;
+ readonly sampleRate: number;
+ readonly state: AudioContextState;
+ createAnalyser(): AnalyserNode;
+ createBiquadFilter(): BiquadFilterNode;
+ createBuffer(numberOfChannels: number, length: number, sampleRate: number): AudioBuffer;
+ createBufferSource(): AudioBufferSourceNode;
+ createChannelMerger(numberOfInputs?: number): ChannelMergerNode;
+ createChannelSplitter(numberOfOutputs?: number): ChannelSplitterNode;
+ createConstantSource(): ConstantSourceNode;
+ createConvolver(): ConvolverNode;
+ createDelay(maxDelayTime?: number): DelayNode;
+ createDynamicsCompressor(): DynamicsCompressorNode;
+ createGain(): GainNode;
+ createIIRFilter(feedforward: number[], feedback: number[]): IIRFilterNode;
+ createOscillator(): OscillatorNode;
+ createPanner(): PannerNode;
+ createPeriodicWave(real: number[] | Float32Array, imag: number[] | Float32Array, constraints?: PeriodicWaveConstraints): PeriodicWave;
+ /** @deprecated */
+ createScriptProcessor(bufferSize?: number, numberOfInputChannels?: number, numberOfOutputChannels?: number): ScriptProcessorNode;
+ createStereoPanner(): StereoPannerNode;
+ createWaveShaper(): WaveShaperNode;
+ decodeAudioData(audioData: ArrayBuffer, successCallback?: DecodeSuccessCallback | null, errorCallback?: DecodeErrorCallback | null): Promise<AudioBuffer>;
+ addEventListener<K extends keyof BaseAudioContextEventMap>(type: K, listener: (this: BaseAudioContext, ev: BaseAudioContextEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof BaseAudioContextEventMap>(type: K, listener: (this: BaseAudioContext, ev: BaseAudioContextEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var BaseAudioContext: {
+ prototype: BaseAudioContext;
+ new(): BaseAudioContext;
+};
+
+/** The beforeunload event is fired when the window, the document and its resources are about to be unloaded. */
+interface BeforeUnloadEvent extends Event {
+ returnValue: any;
+}
+
+declare var BeforeUnloadEvent: {
+ prototype: BeforeUnloadEvent;
+ new(): BeforeUnloadEvent;
+};
+
+/** A simple low-order filter, and is created using the AudioContext.createBiquadFilter() method. It is an AudioNode that can represent different kinds of filters, tone control devices, and graphic equalizers. */
+interface BiquadFilterNode extends AudioNode {
+ readonly Q: AudioParam;
+ readonly detune: AudioParam;
+ readonly frequency: AudioParam;
+ readonly gain: AudioParam;
+ type: BiquadFilterType;
+ getFrequencyResponse(frequencyHz: Float32Array, magResponse: Float32Array, phaseResponse: Float32Array): void;
+}
+
+declare var BiquadFilterNode: {
+ prototype: BiquadFilterNode;
+ new(context: BaseAudioContext, options?: BiquadFilterOptions): BiquadFilterNode;
+};
+
+/** A file-like object of immutable, raw data. Blobs represent data that isn't necessarily in a JavaScript-native format. The File interface is based on Blob, inheriting blob functionality and expanding it to support files on the user's system. */
+interface Blob {
+ readonly size: number;
+ readonly type: string;
+ arrayBuffer(): Promise<ArrayBuffer>;
+ slice(start?: number, end?: number, contentType?: string): Blob;
+ stream(): ReadableStream<Uint8Array>;
+ text(): Promise<string>;
+}
+
+declare var Blob: {
+ prototype: Blob;
+ new(blobParts?: BlobPart[], options?: BlobPropertyBag): Blob;
+};
+
+interface BlobEvent extends Event {
+ readonly data: Blob;
+ readonly timecode: DOMHighResTimeStamp;
+}
+
+declare var BlobEvent: {
+ prototype: BlobEvent;
+ new(type: string, eventInitDict: BlobEventInit): BlobEvent;
+};
+
+interface Body {
+ readonly body: ReadableStream<Uint8Array> | null;
+ readonly bodyUsed: boolean;
+ arrayBuffer(): Promise<ArrayBuffer>;
+ blob(): Promise<Blob>;
+ formData(): Promise<FormData>;
+ json(): Promise<any>;
+ text(): Promise<string>;
+}
+
+interface BroadcastChannelEventMap {
+ "message": MessageEvent;
+ "messageerror": MessageEvent;
+}
+
+interface BroadcastChannel extends EventTarget {
+ /** Returns the channel name (as passed to the constructor). */
+ readonly name: string;
+ onmessage: ((this: BroadcastChannel, ev: MessageEvent) => any) | null;
+ onmessageerror: ((this: BroadcastChannel, ev: MessageEvent) => any) | null;
+ /** Closes the BroadcastChannel object, opening it up to garbage collection. */
+ close(): void;
+ /** Sends the given message to other BroadcastChannel objects set up for this channel. Messages can be structured objects, e.g. nested objects and arrays. */
+ postMessage(message: any): void;
+ addEventListener<K extends keyof BroadcastChannelEventMap>(type: K, listener: (this: BroadcastChannel, ev: BroadcastChannelEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof BroadcastChannelEventMap>(type: K, listener: (this: BroadcastChannel, ev: BroadcastChannelEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var BroadcastChannel: {
+ prototype: BroadcastChannel;
+ new(name: string): BroadcastChannel;
+};
+
+/** This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. */
+interface ByteLengthQueuingStrategy extends QueuingStrategy<ArrayBufferView> {
+ readonly highWaterMark: number;
+ readonly size: QueuingStrategySize<ArrayBufferView>;
+}
+
+declare var ByteLengthQueuingStrategy: {
+ prototype: ByteLengthQueuingStrategy;
+ new(init: QueuingStrategyInit): ByteLengthQueuingStrategy;
+};
+
+/** A CDATA section that can be used within XML to include extended portions of unescaped text. The symbols < and & don’t need escaping as they normally do when inside a CDATA section. */
+interface CDATASection extends Text {
+}
+
+declare var CDATASection: {
+ prototype: CDATASection;
+ new(): CDATASection;
+};
+
+interface CSSAnimation extends Animation {
+ readonly animationName: string;
+ addEventListener<K extends keyof AnimationEventMap>(type: K, listener: (this: CSSAnimation, ev: AnimationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof AnimationEventMap>(type: K, listener: (this: CSSAnimation, ev: AnimationEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var CSSAnimation: {
+ prototype: CSSAnimation;
+ new(): CSSAnimation;
+};
+
+/** A single condition CSS at-rule, which consists of a condition and a statement block. It is a child of CSSGroupingRule. */
+interface CSSConditionRule extends CSSGroupingRule {
+ readonly conditionText: string;
+}
+
+declare var CSSConditionRule: {
+ prototype: CSSConditionRule;
+ new(): CSSConditionRule;
+};
+
+interface CSSCounterStyleRule extends CSSRule {
+ additiveSymbols: string;
+ fallback: string;
+ name: string;
+ negative: string;
+ pad: string;
+ prefix: string;
+ range: string;
+ speakAs: string;
+ suffix: string;
+ symbols: string;
+ system: string;
+}
+
+declare var CSSCounterStyleRule: {
+ prototype: CSSCounterStyleRule;
+ new(): CSSCounterStyleRule;
+};
+
+interface CSSFontFaceRule extends CSSRule {
+ readonly style: CSSStyleDeclaration;
+}
+
+declare var CSSFontFaceRule: {
+ prototype: CSSFontFaceRule;
+ new(): CSSFontFaceRule;
+};
+
+/** Any CSS at-rule that contains other rules nested within it. */
+interface CSSGroupingRule extends CSSRule {
+ readonly cssRules: CSSRuleList;
+ deleteRule(index: number): void;
+ insertRule(rule: string, index?: number): number;
+}
+
+declare var CSSGroupingRule: {
+ prototype: CSSGroupingRule;
+ new(): CSSGroupingRule;
+};
+
+interface CSSImportRule extends CSSRule {
+ readonly href: string;
+ readonly media: MediaList;
+ readonly styleSheet: CSSStyleSheet;
+}
+
+declare var CSSImportRule: {
+ prototype: CSSImportRule;
+ new(): CSSImportRule;
+};
+
+/** An object representing a set of style for a given keyframe. It corresponds to the contains of a single keyframe of a @keyframes at-rule. It implements the CSSRule interface with a type value of 8 (CSSRule.KEYFRAME_RULE). */
+interface CSSKeyframeRule extends CSSRule {
+ keyText: string;
+ readonly style: CSSStyleDeclaration;
+}
+
+declare var CSSKeyframeRule: {
+ prototype: CSSKeyframeRule;
+ new(): CSSKeyframeRule;
+};
+
+/** An object representing a complete set of keyframes for a CSS animation. It corresponds to the contains of a whole @keyframes at-rule. It implements the CSSRule interface with a type value of 7 (CSSRule.KEYFRAMES_RULE). */
+interface CSSKeyframesRule extends CSSRule {
+ readonly cssRules: CSSRuleList;
+ name: string;
+ appendRule(rule: string): void;
+ deleteRule(select: string): void;
+ findRule(select: string): CSSKeyframeRule | null;
+}
+
+declare var CSSKeyframesRule: {
+ prototype: CSSKeyframesRule;
+ new(): CSSKeyframesRule;
+};
+
+/** A single CSS @media rule. It implements the CSSConditionRule interface, and therefore the CSSGroupingRule and the CSSRule interface with a type value of 4 (CSSRule.MEDIA_RULE). */
+interface CSSMediaRule extends CSSConditionRule {
+ readonly media: MediaList;
+}
+
+declare var CSSMediaRule: {
+ prototype: CSSMediaRule;
+ new(): CSSMediaRule;
+};
+
+/** An object representing a single CSS @namespace at-rule. It implements the CSSRule interface, with a type value of 10 (CSSRule.NAMESPACE_RULE). */
+interface CSSNamespaceRule extends CSSRule {
+ readonly namespaceURI: string;
+ readonly prefix: string;
+}
+
+declare var CSSNamespaceRule: {
+ prototype: CSSNamespaceRule;
+ new(): CSSNamespaceRule;
+};
+
+/** CSSPageRule is an interface representing a single CSS @page rule. It implements the CSSRule interface with a type value of 6 (CSSRule.PAGE_RULE). */
+interface CSSPageRule extends CSSGroupingRule {
+ selectorText: string;
+ readonly style: CSSStyleDeclaration;
+}
+
+declare var CSSPageRule: {
+ prototype: CSSPageRule;
+ new(): CSSPageRule;
+};
+
+/** A single CSS rule. There are several types of rules, listed in the Type constants section below. */
+interface CSSRule {
+ cssText: string;
+ readonly parentRule: CSSRule | null;
+ readonly parentStyleSheet: CSSStyleSheet | null;
+ /** @deprecated */
+ readonly type: number;
+ readonly CHARSET_RULE: number;
+ readonly FONT_FACE_RULE: number;
+ readonly IMPORT_RULE: number;
+ readonly KEYFRAMES_RULE: number;
+ readonly KEYFRAME_RULE: number;
+ readonly MEDIA_RULE: number;
+ readonly NAMESPACE_RULE: number;
+ readonly PAGE_RULE: number;
+ readonly STYLE_RULE: number;
+ readonly SUPPORTS_RULE: number;
+}
+
+declare var CSSRule: {
+ prototype: CSSRule;
+ new(): CSSRule;
+ readonly CHARSET_RULE: number;
+ readonly FONT_FACE_RULE: number;
+ readonly IMPORT_RULE: number;
+ readonly KEYFRAMES_RULE: number;
+ readonly KEYFRAME_RULE: number;
+ readonly MEDIA_RULE: number;
+ readonly NAMESPACE_RULE: number;
+ readonly PAGE_RULE: number;
+ readonly STYLE_RULE: number;
+ readonly SUPPORTS_RULE: number;
+};
+
+/** A CSSRuleList is an (indirect-modify only) array-like object containing an ordered collection of CSSRule objects. */
+interface CSSRuleList {
+ readonly length: number;
+ item(index: number): CSSRule | null;
+ [index: number]: CSSRule;
+}
+
+declare var CSSRuleList: {
+ prototype: CSSRuleList;
+ new(): CSSRuleList;
+};
+
+/** An object that is a CSS declaration block, and exposes style information and various style-related methods and properties. */
+interface CSSStyleDeclaration {
+ accentColor: string;
+ alignContent: string;
+ alignItems: string;
+ alignSelf: string;
+ alignmentBaseline: string;
+ all: string;
+ animation: string;
+ animationDelay: string;
+ animationDirection: string;
+ animationDuration: string;
+ animationFillMode: string;
+ animationIterationCount: string;
+ animationName: string;
+ animationPlayState: string;
+ animationTimingFunction: string;
+ appearance: string;
+ aspectRatio: string;
+ backfaceVisibility: string;
+ background: string;
+ backgroundAttachment: string;
+ backgroundBlendMode: string;
+ backgroundClip: string;
+ backgroundColor: string;
+ backgroundImage: string;
+ backgroundOrigin: string;
+ backgroundPosition: string;
+ backgroundPositionX: string;
+ backgroundPositionY: string;
+ backgroundRepeat: string;
+ backgroundSize: string;
+ baselineShift: string;
+ blockSize: string;
+ border: string;
+ borderBlock: string;
+ borderBlockColor: string;
+ borderBlockEnd: string;
+ borderBlockEndColor: string;
+ borderBlockEndStyle: string;
+ borderBlockEndWidth: string;
+ borderBlockStart: string;
+ borderBlockStartColor: string;
+ borderBlockStartStyle: string;
+ borderBlockStartWidth: string;
+ borderBlockStyle: string;
+ borderBlockWidth: string;
+ borderBottom: string;
+ borderBottomColor: string;
+ borderBottomLeftRadius: string;
+ borderBottomRightRadius: string;
+ borderBottomStyle: string;
+ borderBottomWidth: string;
+ borderCollapse: string;
+ borderColor: string;
+ borderEndEndRadius: string;
+ borderEndStartRadius: string;
+ borderImage: string;
+ borderImageOutset: string;
+ borderImageRepeat: string;
+ borderImageSlice: string;
+ borderImageSource: string;
+ borderImageWidth: string;
+ borderInline: string;
+ borderInlineColor: string;
+ borderInlineEnd: string;
+ borderInlineEndColor: string;
+ borderInlineEndStyle: string;
+ borderInlineEndWidth: string;
+ borderInlineStart: string;
+ borderInlineStartColor: string;
+ borderInlineStartStyle: string;
+ borderInlineStartWidth: string;
+ borderInlineStyle: string;
+ borderInlineWidth: string;
+ borderLeft: string;
+ borderLeftColor: string;
+ borderLeftStyle: string;
+ borderLeftWidth: string;
+ borderRadius: string;
+ borderRight: string;
+ borderRightColor: string;
+ borderRightStyle: string;
+ borderRightWidth: string;
+ borderSpacing: string;
+ borderStartEndRadius: string;
+ borderStartStartRadius: string;
+ borderStyle: string;
+ borderTop: string;
+ borderTopColor: string;
+ borderTopLeftRadius: string;
+ borderTopRightRadius: string;
+ borderTopStyle: string;
+ borderTopWidth: string;
+ borderWidth: string;
+ bottom: string;
+ boxShadow: string;
+ boxSizing: string;
+ breakAfter: string;
+ breakBefore: string;
+ breakInside: string;
+ captionSide: string;
+ caretColor: string;
+ clear: string;
+ /** @deprecated */
+ clip: string;
+ clipPath: string;
+ clipRule: string;
+ color: string;
+ colorInterpolation: string;
+ colorInterpolationFilters: string;
+ colorScheme: string;
+ columnCount: string;
+ columnFill: string;
+ columnGap: string;
+ columnRule: string;
+ columnRuleColor: string;
+ columnRuleStyle: string;
+ columnRuleWidth: string;
+ columnSpan: string;
+ columnWidth: string;
+ columns: string;
+ contain: string;
+ content: string;
+ counterIncrement: string;
+ counterReset: string;
+ counterSet: string;
+ cssFloat: string;
+ cssText: string;
+ cursor: string;
+ direction: string;
+ display: string;
+ dominantBaseline: string;
+ emptyCells: string;
+ fill: string;
+ fillOpacity: string;
+ fillRule: string;
+ filter: string;
+ flex: string;
+ flexBasis: string;
+ flexDirection: string;
+ flexFlow: string;
+ flexGrow: string;
+ flexShrink: string;
+ flexWrap: string;
+ float: string;
+ floodColor: string;
+ floodOpacity: string;
+ font: string;
+ fontFamily: string;
+ fontFeatureSettings: string;
+ fontKerning: string;
+ fontOpticalSizing: string;
+ fontSize: string;
+ fontSizeAdjust: string;
+ fontStretch: string;
+ fontStyle: string;
+ fontSynthesis: string;
+ fontVariant: string;
+ fontVariantAlternates: string;
+ fontVariantCaps: string;
+ fontVariantEastAsian: string;
+ fontVariantLigatures: string;
+ fontVariantNumeric: string;
+ fontVariantPosition: string;
+ fontVariationSettings: string;
+ fontWeight: string;
+ gap: string;
+ grid: string;
+ gridArea: string;
+ gridAutoColumns: string;
+ gridAutoFlow: string;
+ gridAutoRows: string;
+ gridColumn: string;
+ gridColumnEnd: string;
+ /** @deprecated This is a legacy alias of `columnGap`. */
+ gridColumnGap: string;
+ gridColumnStart: string;
+ /** @deprecated This is a legacy alias of `gap`. */
+ gridGap: string;
+ gridRow: string;
+ gridRowEnd: string;
+ /** @deprecated This is a legacy alias of `rowGap`. */
+ gridRowGap: string;
+ gridRowStart: string;
+ gridTemplate: string;
+ gridTemplateAreas: string;
+ gridTemplateColumns: string;
+ gridTemplateRows: string;
+ height: string;
+ hyphens: string;
+ /** @deprecated */
+ imageOrientation: string;
+ imageRendering: string;
+ inlineSize: string;
+ inset: string;
+ insetBlock: string;
+ insetBlockEnd: string;
+ insetBlockStart: string;
+ insetInline: string;
+ insetInlineEnd: string;
+ insetInlineStart: string;
+ isolation: string;
+ justifyContent: string;
+ justifyItems: string;
+ justifySelf: string;
+ left: string;
+ readonly length: number;
+ letterSpacing: string;
+ lightingColor: string;
+ lineBreak: string;
+ lineHeight: string;
+ listStyle: string;
+ listStyleImage: string;
+ listStylePosition: string;
+ listStyleType: string;
+ margin: string;
+ marginBlock: string;
+ marginBlockEnd: string;
+ marginBlockStart: string;
+ marginBottom: string;
+ marginInline: string;
+ marginInlineEnd: string;
+ marginInlineStart: string;
+ marginLeft: string;
+ marginRight: string;
+ marginTop: string;
+ marker: string;
+ markerEnd: string;
+ markerMid: string;
+ markerStart: string;
+ mask: string;
+ maskClip: string;
+ maskComposite: string;
+ maskImage: string;
+ maskMode: string;
+ maskOrigin: string;
+ maskPosition: string;
+ maskRepeat: string;
+ maskSize: string;
+ maskType: string;
+ maxBlockSize: string;
+ maxHeight: string;
+ maxInlineSize: string;
+ maxWidth: string;
+ minBlockSize: string;
+ minHeight: string;
+ minInlineSize: string;
+ minWidth: string;
+ mixBlendMode: string;
+ objectFit: string;
+ objectPosition: string;
+ offset: string;
+ offsetDistance: string;
+ offsetPath: string;
+ offsetRotate: string;
+ opacity: string;
+ order: string;
+ orphans: string;
+ outline: string;
+ outlineColor: string;
+ outlineOffset: string;
+ outlineStyle: string;
+ outlineWidth: string;
+ overflow: string;
+ overflowAnchor: string;
+ overflowWrap: string;
+ overflowX: string;
+ overflowY: string;
+ overscrollBehavior: string;
+ overscrollBehaviorBlock: string;
+ overscrollBehaviorInline: string;
+ overscrollBehaviorX: string;
+ overscrollBehaviorY: string;
+ padding: string;
+ paddingBlock: string;
+ paddingBlockEnd: string;
+ paddingBlockStart: string;
+ paddingBottom: string;
+ paddingInline: string;
+ paddingInlineEnd: string;
+ paddingInlineStart: string;
+ paddingLeft: string;
+ paddingRight: string;
+ paddingTop: string;
+ pageBreakAfter: string;
+ pageBreakBefore: string;
+ pageBreakInside: string;
+ paintOrder: string;
+ readonly parentRule: CSSRule | null;
+ perspective: string;
+ perspectiveOrigin: string;
+ placeContent: string;
+ placeItems: string;
+ placeSelf: string;
+ pointerEvents: string;
+ position: string;
+ printColorAdjust: string;
+ quotes: string;
+ resize: string;
+ right: string;
+ rotate: string;
+ rowGap: string;
+ rubyPosition: string;
+ scale: string;
+ scrollBehavior: string;
+ scrollMargin: string;
+ scrollMarginBlock: string;
+ scrollMarginBlockEnd: string;
+ scrollMarginBlockStart: string;
+ scrollMarginBottom: string;
+ scrollMarginInline: string;
+ scrollMarginInlineEnd: string;
+ scrollMarginInlineStart: string;
+ scrollMarginLeft: string;
+ scrollMarginRight: string;
+ scrollMarginTop: string;
+ scrollPadding: string;
+ scrollPaddingBlock: string;
+ scrollPaddingBlockEnd: string;
+ scrollPaddingBlockStart: string;
+ scrollPaddingBottom: string;
+ scrollPaddingInline: string;
+ scrollPaddingInlineEnd: string;
+ scrollPaddingInlineStart: string;
+ scrollPaddingLeft: string;
+ scrollPaddingRight: string;
+ scrollPaddingTop: string;
+ scrollSnapAlign: string;
+ scrollSnapStop: string;
+ scrollSnapType: string;
+ scrollbarGutter: string;
+ shapeImageThreshold: string;
+ shapeMargin: string;
+ shapeOutside: string;
+ shapeRendering: string;
+ stopColor: string;
+ stopOpacity: string;
+ stroke: string;
+ strokeDasharray: string;
+ strokeDashoffset: string;
+ strokeLinecap: string;
+ strokeLinejoin: string;
+ strokeMiterlimit: string;
+ strokeOpacity: string;
+ strokeWidth: string;
+ tabSize: string;
+ tableLayout: string;
+ textAlign: string;
+ textAlignLast: string;
+ textAnchor: string;
+ textCombineUpright: string;
+ textDecoration: string;
+ textDecorationColor: string;
+ textDecorationLine: string;
+ textDecorationSkipInk: string;
+ textDecorationStyle: string;
+ textDecorationThickness: string;
+ textEmphasis: string;
+ textEmphasisColor: string;
+ textEmphasisPosition: string;
+ textEmphasisStyle: string;
+ textIndent: string;
+ textOrientation: string;
+ textOverflow: string;
+ textRendering: string;
+ textShadow: string;
+ textTransform: string;
+ textUnderlineOffset: string;
+ textUnderlinePosition: string;
+ top: string;
+ touchAction: string;
+ transform: string;
+ transformBox: string;
+ transformOrigin: string;
+ transformStyle: string;
+ transition: string;
+ transitionDelay: string;
+ transitionDuration: string;
+ transitionProperty: string;
+ transitionTimingFunction: string;
+ translate: string;
+ unicodeBidi: string;
+ userSelect: string;
+ verticalAlign: string;
+ visibility: string;
+ /** @deprecated This is a legacy alias of `alignContent`. */
+ webkitAlignContent: string;
+ /** @deprecated This is a legacy alias of `alignItems`. */
+ webkitAlignItems: string;
+ /** @deprecated This is a legacy alias of `alignSelf`. */
+ webkitAlignSelf: string;
+ /** @deprecated This is a legacy alias of `animation`. */
+ webkitAnimation: string;
+ /** @deprecated This is a legacy alias of `animationDelay`. */
+ webkitAnimationDelay: string;
+ /** @deprecated This is a legacy alias of `animationDirection`. */
+ webkitAnimationDirection: string;
+ /** @deprecated This is a legacy alias of `animationDuration`. */
+ webkitAnimationDuration: string;
+ /** @deprecated This is a legacy alias of `animationFillMode`. */
+ webkitAnimationFillMode: string;
+ /** @deprecated This is a legacy alias of `animationIterationCount`. */
+ webkitAnimationIterationCount: string;
+ /** @deprecated This is a legacy alias of `animationName`. */
+ webkitAnimationName: string;
+ /** @deprecated This is a legacy alias of `animationPlayState`. */
+ webkitAnimationPlayState: string;
+ /** @deprecated This is a legacy alias of `animationTimingFunction`. */
+ webkitAnimationTimingFunction: string;
+ /** @deprecated This is a legacy alias of `appearance`. */
+ webkitAppearance: string;
+ /** @deprecated This is a legacy alias of `backfaceVisibility`. */
+ webkitBackfaceVisibility: string;
+ /** @deprecated This is a legacy alias of `backgroundClip`. */
+ webkitBackgroundClip: string;
+ /** @deprecated This is a legacy alias of `backgroundOrigin`. */
+ webkitBackgroundOrigin: string;
+ /** @deprecated This is a legacy alias of `backgroundSize`. */
+ webkitBackgroundSize: string;
+ /** @deprecated This is a legacy alias of `borderBottomLeftRadius`. */
+ webkitBorderBottomLeftRadius: string;
+ /** @deprecated This is a legacy alias of `borderBottomRightRadius`. */
+ webkitBorderBottomRightRadius: string;
+ /** @deprecated This is a legacy alias of `borderRadius`. */
+ webkitBorderRadius: string;
+ /** @deprecated This is a legacy alias of `borderTopLeftRadius`. */
+ webkitBorderTopLeftRadius: string;
+ /** @deprecated This is a legacy alias of `borderTopRightRadius`. */
+ webkitBorderTopRightRadius: string;
+ /** @deprecated This is a legacy alias of `boxAlign`. */
+ webkitBoxAlign: string;
+ /** @deprecated This is a legacy alias of `boxFlex`. */
+ webkitBoxFlex: string;
+ /** @deprecated This is a legacy alias of `boxOrdinalGroup`. */
+ webkitBoxOrdinalGroup: string;
+ /** @deprecated This is a legacy alias of `boxOrient`. */
+ webkitBoxOrient: string;
+ /** @deprecated This is a legacy alias of `boxPack`. */
+ webkitBoxPack: string;
+ /** @deprecated This is a legacy alias of `boxShadow`. */
+ webkitBoxShadow: string;
+ /** @deprecated This is a legacy alias of `boxSizing`. */
+ webkitBoxSizing: string;
+ /** @deprecated This is a legacy alias of `filter`. */
+ webkitFilter: string;
+ /** @deprecated This is a legacy alias of `flex`. */
+ webkitFlex: string;
+ /** @deprecated This is a legacy alias of `flexBasis`. */
+ webkitFlexBasis: string;
+ /** @deprecated This is a legacy alias of `flexDirection`. */
+ webkitFlexDirection: string;
+ /** @deprecated This is a legacy alias of `flexFlow`. */
+ webkitFlexFlow: string;
+ /** @deprecated This is a legacy alias of `flexGrow`. */
+ webkitFlexGrow: string;
+ /** @deprecated This is a legacy alias of `flexShrink`. */
+ webkitFlexShrink: string;
+ /** @deprecated This is a legacy alias of `flexWrap`. */
+ webkitFlexWrap: string;
+ /** @deprecated This is a legacy alias of `justifyContent`. */
+ webkitJustifyContent: string;
+ webkitLineClamp: string;
+ /** @deprecated This is a legacy alias of `mask`. */
+ webkitMask: string;
+ /** @deprecated This is a legacy alias of `maskBorder`. */
+ webkitMaskBoxImage: string;
+ /** @deprecated This is a legacy alias of `maskBorderOutset`. */
+ webkitMaskBoxImageOutset: string;
+ /** @deprecated This is a legacy alias of `maskBorderRepeat`. */
+ webkitMaskBoxImageRepeat: string;
+ /** @deprecated This is a legacy alias of `maskBorderSlice`. */
+ webkitMaskBoxImageSlice: string;
+ /** @deprecated This is a legacy alias of `maskBorderSource`. */
+ webkitMaskBoxImageSource: string;
+ /** @deprecated This is a legacy alias of `maskBorderWidth`. */
+ webkitMaskBoxImageWidth: string;
+ /** @deprecated This is a legacy alias of `maskClip`. */
+ webkitMaskClip: string;
+ webkitMaskComposite: string;
+ /** @deprecated This is a legacy alias of `maskImage`. */
+ webkitMaskImage: string;
+ /** @deprecated This is a legacy alias of `maskOrigin`. */
+ webkitMaskOrigin: string;
+ /** @deprecated This is a legacy alias of `maskPosition`. */
+ webkitMaskPosition: string;
+ /** @deprecated This is a legacy alias of `maskRepeat`. */
+ webkitMaskRepeat: string;
+ /** @deprecated This is a legacy alias of `maskSize`. */
+ webkitMaskSize: string;
+ /** @deprecated This is a legacy alias of `order`. */
+ webkitOrder: string;
+ /** @deprecated This is a legacy alias of `perspective`. */
+ webkitPerspective: string;
+ /** @deprecated This is a legacy alias of `perspectiveOrigin`. */
+ webkitPerspectiveOrigin: string;
+ webkitTextFillColor: string;
+ /** @deprecated This is a legacy alias of `textSizeAdjust`. */
+ webkitTextSizeAdjust: string;
+ webkitTextStroke: string;
+ webkitTextStrokeColor: string;
+ webkitTextStrokeWidth: string;
+ /** @deprecated This is a legacy alias of `transform`. */
+ webkitTransform: string;
+ /** @deprecated This is a legacy alias of `transformOrigin`. */
+ webkitTransformOrigin: string;
+ /** @deprecated This is a legacy alias of `transformStyle`. */
+ webkitTransformStyle: string;
+ /** @deprecated This is a legacy alias of `transition`. */
+ webkitTransition: string;
+ /** @deprecated This is a legacy alias of `transitionDelay`. */
+ webkitTransitionDelay: string;
+ /** @deprecated This is a legacy alias of `transitionDuration`. */
+ webkitTransitionDuration: string;
+ /** @deprecated This is a legacy alias of `transitionProperty`. */
+ webkitTransitionProperty: string;
+ /** @deprecated This is a legacy alias of `transitionTimingFunction`. */
+ webkitTransitionTimingFunction: string;
+ /** @deprecated This is a legacy alias of `userSelect`. */
+ webkitUserSelect: string;
+ whiteSpace: string;
+ widows: string;
+ width: string;
+ willChange: string;
+ wordBreak: string;
+ wordSpacing: string;
+ /** @deprecated */
+ wordWrap: string;
+ writingMode: string;
+ zIndex: string;
+ getPropertyPriority(property: string): string;
+ getPropertyValue(property: string): string;
+ item(index: number): string;
+ removeProperty(property: string): string;
+ setProperty(property: string, value: string | null, priority?: string): void;
+ [index: number]: string;
+}
+
+declare var CSSStyleDeclaration: {
+ prototype: CSSStyleDeclaration;
+ new(): CSSStyleDeclaration;
+};
+
+/** CSSStyleRule represents a single CSS style rule. It implements the CSSRule interface with a type value of 1 (CSSRule.STYLE_RULE). */
+interface CSSStyleRule extends CSSRule {
+ selectorText: string;
+ readonly style: CSSStyleDeclaration;
+}
+
+declare var CSSStyleRule: {
+ prototype: CSSStyleRule;
+ new(): CSSStyleRule;
+};
+
+/** A single CSS style sheet. It inherits properties and methods from its parent, StyleSheet. */
+interface CSSStyleSheet extends StyleSheet {
+ readonly cssRules: CSSRuleList;
+ readonly ownerRule: CSSRule | null;
+ /** @deprecated */
+ readonly rules: CSSRuleList;
+ /** @deprecated */
+ addRule(selector?: string, style?: string, index?: number): number;
+ deleteRule(index: number): void;
+ insertRule(rule: string, index?: number): number;
+ /** @deprecated */
+ removeRule(index?: number): void;
+ replace(text: string): Promise<CSSStyleSheet>;
+ replaceSync(text: string): void;
+}
+
+declare var CSSStyleSheet: {
+ prototype: CSSStyleSheet;
+ new(options?: CSSStyleSheetInit): CSSStyleSheet;
+};
+
+/** An object representing a single CSS @supports at-rule. It implements the CSSConditionRule interface, and therefore the CSSRule and CSSGroupingRule interfaces with a type value of 12 (CSSRule.SUPPORTS_RULE). */
+interface CSSSupportsRule extends CSSConditionRule {
+}
+
+declare var CSSSupportsRule: {
+ prototype: CSSSupportsRule;
+ new(): CSSSupportsRule;
+};
+
+interface CSSTransition extends Animation {
+ readonly transitionProperty: string;
+ addEventListener<K extends keyof AnimationEventMap>(type: K, listener: (this: CSSTransition, ev: AnimationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof AnimationEventMap>(type: K, listener: (this: CSSTransition, ev: AnimationEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var CSSTransition: {
+ prototype: CSSTransition;
+ new(): CSSTransition;
+};
+
+/**
+ * Provides a storage mechanism for Request / Response object pairs that are cached, for example as part of the ServiceWorker life cycle. Note that the Cache interface is exposed to windowed scopes as well as workers. You don't have to use it in conjunction with service workers, even though it is defined in the service worker spec.
+ * Available only in secure contexts.
+ */
+interface Cache {
+ add(request: RequestInfo | URL): Promise<void>;
+ addAll(requests: RequestInfo[]): Promise<void>;
+ delete(request: RequestInfo | URL, options?: CacheQueryOptions): Promise<boolean>;
+ keys(request?: RequestInfo | URL, options?: CacheQueryOptions): Promise<ReadonlyArray<Request>>;
+ match(request: RequestInfo | URL, options?: CacheQueryOptions): Promise<Response | undefined>;
+ matchAll(request?: RequestInfo | URL, options?: CacheQueryOptions): Promise<ReadonlyArray<Response>>;
+ put(request: RequestInfo | URL, response: Response): Promise<void>;
+}
+
+declare var Cache: {
+ prototype: Cache;
+ new(): Cache;
+};
+
+/**
+ * The storage for Cache objects.
+ * Available only in secure contexts.
+ */
+interface CacheStorage {
+ delete(cacheName: string): Promise<boolean>;
+ has(cacheName: string): Promise<boolean>;
+ keys(): Promise<string[]>;
+ match(request: RequestInfo | URL, options?: MultiCacheQueryOptions): Promise<Response | undefined>;
+ open(cacheName: string): Promise<Cache>;
+}
+
+declare var CacheStorage: {
+ prototype: CacheStorage;
+ new(): CacheStorage;
+};
+
+interface CanvasCaptureMediaStreamTrack extends MediaStreamTrack {
+ readonly canvas: HTMLCanvasElement;
+ requestFrame(): void;
+ addEventListener<K extends keyof MediaStreamTrackEventMap>(type: K, listener: (this: CanvasCaptureMediaStreamTrack, ev: MediaStreamTrackEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof MediaStreamTrackEventMap>(type: K, listener: (this: CanvasCaptureMediaStreamTrack, ev: MediaStreamTrackEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var CanvasCaptureMediaStreamTrack: {
+ prototype: CanvasCaptureMediaStreamTrack;
+ new(): CanvasCaptureMediaStreamTrack;
+};
+
+interface CanvasCompositing {
+ globalAlpha: number;
+ globalCompositeOperation: GlobalCompositeOperation;
+}
+
+interface CanvasDrawImage {
+ drawImage(image: CanvasImageSource, dx: number, dy: number): void;
+ drawImage(image: CanvasImageSource, dx: number, dy: number, dw: number, dh: number): void;
+ drawImage(image: CanvasImageSource, sx: number, sy: number, sw: number, sh: number, dx: number, dy: number, dw: number, dh: number): void;
+}
+
+interface CanvasDrawPath {
+ beginPath(): void;
+ clip(fillRule?: CanvasFillRule): void;
+ clip(path: Path2D, fillRule?: CanvasFillRule): void;
+ fill(fillRule?: CanvasFillRule): void;
+ fill(path: Path2D, fillRule?: CanvasFillRule): void;
+ isPointInPath(x: number, y: number, fillRule?: CanvasFillRule): boolean;
+ isPointInPath(path: Path2D, x: number, y: number, fillRule?: CanvasFillRule): boolean;
+ isPointInStroke(x: number, y: number): boolean;
+ isPointInStroke(path: Path2D, x: number, y: number): boolean;
+ stroke(): void;
+ stroke(path: Path2D): void;
+}
+
+interface CanvasFillStrokeStyles {
+ fillStyle: string | CanvasGradient | CanvasPattern;
+ strokeStyle: string | CanvasGradient | CanvasPattern;
+ createConicGradient(startAngle: number, x: number, y: number): CanvasGradient;
+ createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient;
+ createPattern(image: CanvasImageSource, repetition: string | null): CanvasPattern | null;
+ createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient;
+}
+
+interface CanvasFilters {
+ filter: string;
+}
+
+/** An opaque object describing a gradient. It is returned by the methods CanvasRenderingContext2D.createLinearGradient() or CanvasRenderingContext2D.createRadialGradient(). */
+interface CanvasGradient {
+ /**
+ * Adds a color stop with the given color to the gradient at the given offset. 0.0 is the offset at one end of the gradient, 1.0 is the offset at the other end.
+ *
+ * Throws an "IndexSizeError" DOMException if the offset is out of range. Throws a "SyntaxError" DOMException if the color cannot be parsed.
+ */
+ addColorStop(offset: number, color: string): void;
+}
+
+declare var CanvasGradient: {
+ prototype: CanvasGradient;
+ new(): CanvasGradient;
+};
+
+interface CanvasImageData {
+ createImageData(sw: number, sh: number, settings?: ImageDataSettings): ImageData;
+ createImageData(imagedata: ImageData): ImageData;
+ getImageData(sx: number, sy: number, sw: number, sh: number, settings?: ImageDataSettings): ImageData;
+ putImageData(imagedata: ImageData, dx: number, dy: number): void;
+ putImageData(imagedata: ImageData, dx: number, dy: number, dirtyX: number, dirtyY: number, dirtyWidth: number, dirtyHeight: number): void;
+}
+
+interface CanvasImageSmoothing {
+ imageSmoothingEnabled: boolean;
+ imageSmoothingQuality: ImageSmoothingQuality;
+}
+
+interface CanvasPath {
+ arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, counterclockwise?: boolean): void;
+ arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void;
+ bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void;
+ closePath(): void;
+ ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, counterclockwise?: boolean): void;
+ lineTo(x: number, y: number): void;
+ moveTo(x: number, y: number): void;
+ quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;
+ rect(x: number, y: number, w: number, h: number): void;
+}
+
+interface CanvasPathDrawingStyles {
+ lineCap: CanvasLineCap;
+ lineDashOffset: number;
+ lineJoin: CanvasLineJoin;
+ lineWidth: number;
+ miterLimit: number;
+ getLineDash(): number[];
+ setLineDash(segments: number[]): void;
+}
+
+/** An opaque object describing a pattern, based on an image, a canvas, or a video, created by the CanvasRenderingContext2D.createPattern() method. */
+interface CanvasPattern {
+ /** Sets the transformation matrix that will be used when rendering the pattern during a fill or stroke painting operation. */
+ setTransform(transform?: DOMMatrix2DInit): void;
+}
+
+declare var CanvasPattern: {
+ prototype: CanvasPattern;
+ new(): CanvasPattern;
+};
+
+interface CanvasRect {
+ clearRect(x: number, y: number, w: number, h: number): void;
+ fillRect(x: number, y: number, w: number, h: number): void;
+ strokeRect(x: number, y: number, w: number, h: number): void;
+}
+
+/** The CanvasRenderingContext2D interface, part of the Canvas API, provides the 2D rendering context for the drawing surface of a <canvas> element. It is used for drawing shapes, text, images, and other objects. */
+interface CanvasRenderingContext2D extends CanvasCompositing, CanvasDrawImage, CanvasDrawPath, CanvasFillStrokeStyles, CanvasFilters, CanvasImageData, CanvasImageSmoothing, CanvasPath, CanvasPathDrawingStyles, CanvasRect, CanvasShadowStyles, CanvasState, CanvasText, CanvasTextDrawingStyles, CanvasTransform, CanvasUserInterface {
+ readonly canvas: HTMLCanvasElement;
+ getContextAttributes(): CanvasRenderingContext2DSettings;
+}
+
+declare var CanvasRenderingContext2D: {
+ prototype: CanvasRenderingContext2D;
+ new(): CanvasRenderingContext2D;
+};
+
+interface CanvasShadowStyles {
+ shadowBlur: number;
+ shadowColor: string;
+ shadowOffsetX: number;
+ shadowOffsetY: number;
+}
+
+interface CanvasState {
+ restore(): void;
+ save(): void;
+}
+
+interface CanvasText {
+ fillText(text: string, x: number, y: number, maxWidth?: number): void;
+ measureText(text: string): TextMetrics;
+ strokeText(text: string, x: number, y: number, maxWidth?: number): void;
+}
+
+interface CanvasTextDrawingStyles {
+ direction: CanvasDirection;
+ font: string;
+ textAlign: CanvasTextAlign;
+ textBaseline: CanvasTextBaseline;
+}
+
+interface CanvasTransform {
+ getTransform(): DOMMatrix;
+ resetTransform(): void;
+ rotate(angle: number): void;
+ scale(x: number, y: number): void;
+ setTransform(a: number, b: number, c: number, d: number, e: number, f: number): void;
+ setTransform(transform?: DOMMatrix2DInit): void;
+ transform(a: number, b: number, c: number, d: number, e: number, f: number): void;
+ translate(x: number, y: number): void;
+}
+
+interface CanvasUserInterface {
+ drawFocusIfNeeded(element: Element): void;
+ drawFocusIfNeeded(path: Path2D, element: Element): void;
+}
+
+/** The ChannelMergerNode interface, often used in conjunction with its opposite, ChannelSplitterNode, reunites different mono inputs into a single output. Each input is used to fill a channel of the output. This is useful for accessing each channels separately, e.g. for performing channel mixing where gain must be separately controlled on each channel. */
+interface ChannelMergerNode extends AudioNode {
+}
+
+declare var ChannelMergerNode: {
+ prototype: ChannelMergerNode;
+ new(context: BaseAudioContext, options?: ChannelMergerOptions): ChannelMergerNode;
+};
+
+/** The ChannelSplitterNode interface, often used in conjunction with its opposite, ChannelMergerNode, separates the different channels of an audio source into a set of mono outputs. This is useful for accessing each channel separately, e.g. for performing channel mixing where gain must be separately controlled on each channel. */
+interface ChannelSplitterNode extends AudioNode {
+}
+
+declare var ChannelSplitterNode: {
+ prototype: ChannelSplitterNode;
+ new(context: BaseAudioContext, options?: ChannelSplitterOptions): ChannelSplitterNode;
+};
+
+/** The CharacterData abstract interface represents a Node object that contains characters. This is an abstract interface, meaning there aren't any object of type CharacterData: it is implemented by other interfaces, like Text, Comment, or ProcessingInstruction which aren't abstract. */
+interface CharacterData extends Node, ChildNode, NonDocumentTypeChildNode {
+ data: string;
+ readonly length: number;
+ readonly ownerDocument: Document;
+ appendData(data: string): void;
+ deleteData(offset: number, count: number): void;
+ insertData(offset: number, data: string): void;
+ replaceData(offset: number, count: number, data: string): void;
+ substringData(offset: number, count: number): string;
+}
+
+declare var CharacterData: {
+ prototype: CharacterData;
+ new(): CharacterData;
+};
+
+interface ChildNode extends Node {
+ /**
+ * Inserts nodes just after node, while replacing strings in nodes with equivalent Text nodes.
+ *
+ * Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
+ */
+ after(...nodes: (Node | string)[]): void;
+ /**
+ * Inserts nodes just before node, while replacing strings in nodes with equivalent Text nodes.
+ *
+ * Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
+ */
+ before(...nodes: (Node | string)[]): void;
+ /** Removes node. */
+ remove(): void;
+ /**
+ * Replaces node with nodes, while replacing strings in nodes with equivalent Text nodes.
+ *
+ * Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
+ */
+ replaceWith(...nodes: (Node | string)[]): void;
+}
+
+/** @deprecated */
+interface ClientRect extends DOMRect {
+}
+
+/** Available only in secure contexts. */
+interface Clipboard extends EventTarget {
+ read(): Promise<ClipboardItems>;
+ readText(): Promise<string>;
+ write(data: ClipboardItems): Promise<void>;
+ writeText(data: string): Promise<void>;
+}
+
+declare var Clipboard: {
+ prototype: Clipboard;
+ new(): Clipboard;
+};
+
+/** Events providing information related to modification of the clipboard, that is cut, copy, and paste events. */
+interface ClipboardEvent extends Event {
+ readonly clipboardData: DataTransfer | null;
+}
+
+declare var ClipboardEvent: {
+ prototype: ClipboardEvent;
+ new(type: string, eventInitDict?: ClipboardEventInit): ClipboardEvent;
+};
+
+/** Available only in secure contexts. */
+interface ClipboardItem {
+ readonly types: ReadonlyArray<string>;
+ getType(type: string): Promise<Blob>;
+}
+
+declare var ClipboardItem: {
+ prototype: ClipboardItem;
+ new(items: Record<string, string | Blob | PromiseLike<string | Blob>>, options?: ClipboardItemOptions): ClipboardItem;
+};
+
+/** A CloseEvent is sent to clients using WebSockets when the connection is closed. This is delivered to the listener indicated by the WebSocket object's onclose attribute. */
+interface CloseEvent extends Event {
+ /** Returns the WebSocket connection close code provided by the server. */
+ readonly code: number;
+ /** Returns the WebSocket connection close reason provided by the server. */
+ readonly reason: string;
+ /** Returns true if the connection closed cleanly; false otherwise. */
+ readonly wasClean: boolean;
+}
+
+declare var CloseEvent: {
+ prototype: CloseEvent;
+ new(type: string, eventInitDict?: CloseEventInit): CloseEvent;
+};
+
+/** Textual notations within markup; although it is generally not visually shown, such comments are available to be read in the source view. */
+interface Comment extends CharacterData {
+}
+
+declare var Comment: {
+ prototype: Comment;
+ new(data?: string): Comment;
+};
+
+/** The DOM CompositionEvent represents events that occur due to the user indirectly entering text. */
+interface CompositionEvent extends UIEvent {
+ readonly data: string;
+ /** @deprecated */
+ initCompositionEvent(typeArg: string, bubblesArg?: boolean, cancelableArg?: boolean, viewArg?: WindowProxy | null, dataArg?: string): void;
+}
+
+declare var CompositionEvent: {
+ prototype: CompositionEvent;
+ new(type: string, eventInitDict?: CompositionEventInit): CompositionEvent;
+};
+
+interface ConstantSourceNode extends AudioScheduledSourceNode {
+ readonly offset: AudioParam;
+ addEventListener<K extends keyof AudioScheduledSourceNodeEventMap>(type: K, listener: (this: ConstantSourceNode, ev: AudioScheduledSourceNodeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof AudioScheduledSourceNodeEventMap>(type: K, listener: (this: ConstantSourceNode, ev: AudioScheduledSourceNodeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var ConstantSourceNode: {
+ prototype: ConstantSourceNode;
+ new(context: BaseAudioContext, options?: ConstantSourceOptions): ConstantSourceNode;
+};
+
+/** An AudioNode that performs a Linear Convolution on a given AudioBuffer, often used to achieve a reverb effect. A ConvolverNode always has exactly one input and one output. */
+interface ConvolverNode extends AudioNode {
+ buffer: AudioBuffer | null;
+ normalize: boolean;
+}
+
+declare var ConvolverNode: {
+ prototype: ConvolverNode;
+ new(context: BaseAudioContext, options?: ConvolverOptions): ConvolverNode;
+};
+
+/** This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. */
+interface CountQueuingStrategy extends QueuingStrategy {
+ readonly highWaterMark: number;
+ readonly size: QueuingStrategySize;
+}
+
+declare var CountQueuingStrategy: {
+ prototype: CountQueuingStrategy;
+ new(init: QueuingStrategyInit): CountQueuingStrategy;
+};
+
+/** Available only in secure contexts. */
+interface Credential {
+ readonly id: string;
+ readonly type: string;
+}
+
+declare var Credential: {
+ prototype: Credential;
+ new(): Credential;
+};
+
+/** Available only in secure contexts. */
+interface CredentialsContainer {
+ create(options?: CredentialCreationOptions): Promise<Credential | null>;
+ get(options?: CredentialRequestOptions): Promise<Credential | null>;
+ preventSilentAccess(): Promise<void>;
+ store(credential: Credential): Promise<Credential>;
+}
+
+declare var CredentialsContainer: {
+ prototype: CredentialsContainer;
+ new(): CredentialsContainer;
+};
+
+/** Basic cryptography features available in the current context. It allows access to a cryptographically strong random number generator and to cryptographic primitives. */
+interface Crypto {
+ /** Available only in secure contexts. */
+ readonly subtle: SubtleCrypto;
+ getRandomValues<T extends ArrayBufferView | null>(array: T): T;
+ /** Available only in secure contexts. */
+ randomUUID(): string;
+}
+
+declare var Crypto: {
+ prototype: Crypto;
+ new(): Crypto;
+};
+
+/**
+ * The CryptoKey dictionary of the Web Crypto API represents a cryptographic key.
+ * Available only in secure contexts.
+ */
+interface CryptoKey {
+ readonly algorithm: KeyAlgorithm;
+ readonly extractable: boolean;
+ readonly type: KeyType;
+ readonly usages: KeyUsage[];
+}
+
+declare var CryptoKey: {
+ prototype: CryptoKey;
+ new(): CryptoKey;
+};
+
+interface CustomElementRegistry {
+ define(name: string, constructor: CustomElementConstructor, options?: ElementDefinitionOptions): void;
+ get(name: string): CustomElementConstructor | undefined;
+ upgrade(root: Node): void;
+ whenDefined(name: string): Promise<CustomElementConstructor>;
+}
+
+declare var CustomElementRegistry: {
+ prototype: CustomElementRegistry;
+ new(): CustomElementRegistry;
+};
+
+interface CustomEvent<T = any> extends Event {
+ /** Returns any custom data event was created with. Typically used for synthetic events. */
+ readonly detail: T;
+ /** @deprecated */
+ initCustomEvent(type: string, bubbles?: boolean, cancelable?: boolean, detail?: T): void;
+}
+
+declare var CustomEvent: {
+ prototype: CustomEvent;
+ new<T>(type: string, eventInitDict?: CustomEventInit<T>): CustomEvent<T>;
+};
+
+/** An abnormal event (called an exception) which occurs as a result of calling a method or accessing a property of a web API. */
+interface DOMException extends Error {
+ /** @deprecated */
+ readonly code: number;
+ readonly message: string;
+ readonly name: string;
+ readonly ABORT_ERR: number;
+ readonly DATA_CLONE_ERR: number;
+ readonly DOMSTRING_SIZE_ERR: number;
+ readonly HIERARCHY_REQUEST_ERR: number;
+ readonly INDEX_SIZE_ERR: number;
+ readonly INUSE_ATTRIBUTE_ERR: number;
+ readonly INVALID_ACCESS_ERR: number;
+ readonly INVALID_CHARACTER_ERR: number;
+ readonly INVALID_MODIFICATION_ERR: number;
+ readonly INVALID_NODE_TYPE_ERR: number;
+ readonly INVALID_STATE_ERR: number;
+ readonly NAMESPACE_ERR: number;
+ readonly NETWORK_ERR: number;
+ readonly NOT_FOUND_ERR: number;
+ readonly NOT_SUPPORTED_ERR: number;
+ readonly NO_DATA_ALLOWED_ERR: number;
+ readonly NO_MODIFICATION_ALLOWED_ERR: number;
+ readonly QUOTA_EXCEEDED_ERR: number;
+ readonly SECURITY_ERR: number;
+ readonly SYNTAX_ERR: number;
+ readonly TIMEOUT_ERR: number;
+ readonly TYPE_MISMATCH_ERR: number;
+ readonly URL_MISMATCH_ERR: number;
+ readonly VALIDATION_ERR: number;
+ readonly WRONG_DOCUMENT_ERR: number;
+}
+
+declare var DOMException: {
+ prototype: DOMException;
+ new(message?: string, name?: string): DOMException;
+ readonly ABORT_ERR: number;
+ readonly DATA_CLONE_ERR: number;
+ readonly DOMSTRING_SIZE_ERR: number;
+ readonly HIERARCHY_REQUEST_ERR: number;
+ readonly INDEX_SIZE_ERR: number;
+ readonly INUSE_ATTRIBUTE_ERR: number;
+ readonly INVALID_ACCESS_ERR: number;
+ readonly INVALID_CHARACTER_ERR: number;
+ readonly INVALID_MODIFICATION_ERR: number;
+ readonly INVALID_NODE_TYPE_ERR: number;
+ readonly INVALID_STATE_ERR: number;
+ readonly NAMESPACE_ERR: number;
+ readonly NETWORK_ERR: number;
+ readonly NOT_FOUND_ERR: number;
+ readonly NOT_SUPPORTED_ERR: number;
+ readonly NO_DATA_ALLOWED_ERR: number;
+ readonly NO_MODIFICATION_ALLOWED_ERR: number;
+ readonly QUOTA_EXCEEDED_ERR: number;
+ readonly SECURITY_ERR: number;
+ readonly SYNTAX_ERR: number;
+ readonly TIMEOUT_ERR: number;
+ readonly TYPE_MISMATCH_ERR: number;
+ readonly URL_MISMATCH_ERR: number;
+ readonly VALIDATION_ERR: number;
+ readonly WRONG_DOCUMENT_ERR: number;
+};
+
+/** An object providing methods which are not dependent on any particular document. Such an object is returned by the Document.implementation property. */
+interface DOMImplementation {
+ createDocument(namespace: string | null, qualifiedName: string | null, doctype?: DocumentType | null): XMLDocument;
+ createDocumentType(qualifiedName: string, publicId: string, systemId: string): DocumentType;
+ createHTMLDocument(title?: string): Document;
+ /** @deprecated */
+ hasFeature(...args: any[]): true;
+}
+
+declare var DOMImplementation: {
+ prototype: DOMImplementation;
+ new(): DOMImplementation;
+};
+
+interface DOMMatrix extends DOMMatrixReadOnly {
+ a: number;
+ b: number;
+ c: number;
+ d: number;
+ e: number;
+ f: number;
+ m11: number;
+ m12: number;
+ m13: number;
+ m14: number;
+ m21: number;
+ m22: number;
+ m23: number;
+ m24: number;
+ m31: number;
+ m32: number;
+ m33: number;
+ m34: number;
+ m41: number;
+ m42: number;
+ m43: number;
+ m44: number;
+ invertSelf(): DOMMatrix;
+ multiplySelf(other?: DOMMatrixInit): DOMMatrix;
+ preMultiplySelf(other?: DOMMatrixInit): DOMMatrix;
+ rotateAxisAngleSelf(x?: number, y?: number, z?: number, angle?: number): DOMMatrix;
+ rotateFromVectorSelf(x?: number, y?: number): DOMMatrix;
+ rotateSelf(rotX?: number, rotY?: number, rotZ?: number): DOMMatrix;
+ scale3dSelf(scale?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix;
+ scaleSelf(scaleX?: number, scaleY?: number, scaleZ?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix;
+ setMatrixValue(transformList: string): DOMMatrix;
+ skewXSelf(sx?: number): DOMMatrix;
+ skewYSelf(sy?: number): DOMMatrix;
+ translateSelf(tx?: number, ty?: number, tz?: number): DOMMatrix;
+}
+
+declare var DOMMatrix: {
+ prototype: DOMMatrix;
+ new(init?: string | number[]): DOMMatrix;
+ fromFloat32Array(array32: Float32Array): DOMMatrix;
+ fromFloat64Array(array64: Float64Array): DOMMatrix;
+ fromMatrix(other?: DOMMatrixInit): DOMMatrix;
+};
+
+type SVGMatrix = DOMMatrix;
+declare var SVGMatrix: typeof DOMMatrix;
+
+type WebKitCSSMatrix = DOMMatrix;
+declare var WebKitCSSMatrix: typeof DOMMatrix;
+
+interface DOMMatrixReadOnly {
+ readonly a: number;
+ readonly b: number;
+ readonly c: number;
+ readonly d: number;
+ readonly e: number;
+ readonly f: number;
+ readonly is2D: boolean;
+ readonly isIdentity: boolean;
+ readonly m11: number;
+ readonly m12: number;
+ readonly m13: number;
+ readonly m14: number;
+ readonly m21: number;
+ readonly m22: number;
+ readonly m23: number;
+ readonly m24: number;
+ readonly m31: number;
+ readonly m32: number;
+ readonly m33: number;
+ readonly m34: number;
+ readonly m41: number;
+ readonly m42: number;
+ readonly m43: number;
+ readonly m44: number;
+ flipX(): DOMMatrix;
+ flipY(): DOMMatrix;
+ inverse(): DOMMatrix;
+ multiply(other?: DOMMatrixInit): DOMMatrix;
+ rotate(rotX?: number, rotY?: number, rotZ?: number): DOMMatrix;
+ rotateAxisAngle(x?: number, y?: number, z?: number, angle?: number): DOMMatrix;
+ rotateFromVector(x?: number, y?: number): DOMMatrix;
+ scale(scaleX?: number, scaleY?: number, scaleZ?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix;
+ scale3d(scale?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix;
+ /** @deprecated */
+ scaleNonUniform(scaleX?: number, scaleY?: number): DOMMatrix;
+ skewX(sx?: number): DOMMatrix;
+ skewY(sy?: number): DOMMatrix;
+ toFloat32Array(): Float32Array;
+ toFloat64Array(): Float64Array;
+ toJSON(): any;
+ transformPoint(point?: DOMPointInit): DOMPoint;
+ translate(tx?: number, ty?: number, tz?: number): DOMMatrix;
+ toString(): string;
+}
+
+declare var DOMMatrixReadOnly: {
+ prototype: DOMMatrixReadOnly;
+ new(init?: string | number[]): DOMMatrixReadOnly;
+ fromFloat32Array(array32: Float32Array): DOMMatrixReadOnly;
+ fromFloat64Array(array64: Float64Array): DOMMatrixReadOnly;
+ fromMatrix(other?: DOMMatrixInit): DOMMatrixReadOnly;
+ toString(): string;
+};
+
+/** Provides the ability to parse XML or HTML source code from a string into a DOM Document. */
+interface DOMParser {
+ /**
+ * Parses string using either the HTML or XML parser, according to type, and returns the resulting Document. type can be "text/html" (which will invoke the HTML parser), or any of "text/xml", "application/xml", "application/xhtml+xml", or "image/svg+xml" (which will invoke the XML parser).
+ *
+ * For the XML parser, if string cannot be parsed, then the returned Document will contain elements describing the resulting error.
+ *
+ * Note that script elements are not evaluated during parsing, and the resulting document's encoding will always be UTF-8.
+ *
+ * Values other than the above for type will cause a TypeError exception to be thrown.
+ */
+ parseFromString(string: string, type: DOMParserSupportedType): Document;
+}
+
+declare var DOMParser: {
+ prototype: DOMParser;
+ new(): DOMParser;
+};
+
+interface DOMPoint extends DOMPointReadOnly {
+ w: number;
+ x: number;
+ y: number;
+ z: number;
+}
+
+declare var DOMPoint: {
+ prototype: DOMPoint;
+ new(x?: number, y?: number, z?: number, w?: number): DOMPoint;
+ fromPoint(other?: DOMPointInit): DOMPoint;
+};
+
+type SVGPoint = DOMPoint;
+declare var SVGPoint: typeof DOMPoint;
+
+interface DOMPointReadOnly {
+ readonly w: number;
+ readonly x: number;
+ readonly y: number;
+ readonly z: number;
+ matrixTransform(matrix?: DOMMatrixInit): DOMPoint;
+ toJSON(): any;
+}
+
+declare var DOMPointReadOnly: {
+ prototype: DOMPointReadOnly;
+ new(x?: number, y?: number, z?: number, w?: number): DOMPointReadOnly;
+ fromPoint(other?: DOMPointInit): DOMPointReadOnly;
+};
+
+interface DOMQuad {
+ readonly p1: DOMPoint;
+ readonly p2: DOMPoint;
+ readonly p3: DOMPoint;
+ readonly p4: DOMPoint;
+ getBounds(): DOMRect;
+ toJSON(): any;
+}
+
+declare var DOMQuad: {
+ prototype: DOMQuad;
+ new(p1?: DOMPointInit, p2?: DOMPointInit, p3?: DOMPointInit, p4?: DOMPointInit): DOMQuad;
+ fromQuad(other?: DOMQuadInit): DOMQuad;
+ fromRect(other?: DOMRectInit): DOMQuad;
+};
+
+interface DOMRect extends DOMRectReadOnly {
+ height: number;
+ width: number;
+ x: number;
+ y: number;
+}
+
+declare var DOMRect: {
+ prototype: DOMRect;
+ new(x?: number, y?: number, width?: number, height?: number): DOMRect;
+ fromRect(other?: DOMRectInit): DOMRect;
+};
+
+type SVGRect = DOMRect;
+declare var SVGRect: typeof DOMRect;
+
+interface DOMRectList {
+ readonly length: number;
+ item(index: number): DOMRect | null;
+ [index: number]: DOMRect;
+}
+
+declare var DOMRectList: {
+ prototype: DOMRectList;
+ new(): DOMRectList;
+};
+
+interface DOMRectReadOnly {
+ readonly bottom: number;
+ readonly height: number;
+ readonly left: number;
+ readonly right: number;
+ readonly top: number;
+ readonly width: number;
+ readonly x: number;
+ readonly y: number;
+ toJSON(): any;
+}
+
+declare var DOMRectReadOnly: {
+ prototype: DOMRectReadOnly;
+ new(x?: number, y?: number, width?: number, height?: number): DOMRectReadOnly;
+ fromRect(other?: DOMRectInit): DOMRectReadOnly;
+};
+
+/** A type returned by some APIs which contains a list of DOMString (strings). */
+interface DOMStringList {
+ /** Returns the number of strings in strings. */
+ readonly length: number;
+ /** Returns true if strings contains string, and false otherwise. */
+ contains(string: string): boolean;
+ /** Returns the string with index index from strings. */
+ item(index: number): string | null;
+ [index: number]: string;
+}
+
+declare var DOMStringList: {
+ prototype: DOMStringList;
+ new(): DOMStringList;
+};
+
+/** Used by the dataset HTML attribute to represent data for custom attributes added to elements. */
+interface DOMStringMap {
+ [name: string]: string | undefined;
+}
+
+declare var DOMStringMap: {
+ prototype: DOMStringMap;
+ new(): DOMStringMap;
+};
+
+/** A set of space-separated tokens. Such a set is returned by Element.classList, HTMLLinkElement.relList, HTMLAnchorElement.relList, HTMLAreaElement.relList, HTMLIframeElement.sandbox, or HTMLOutputElement.htmlFor. It is indexed beginning with 0 as with JavaScript Array objects. DOMTokenList is always case-sensitive. */
+interface DOMTokenList {
+ /** Returns the number of tokens. */
+ readonly length: number;
+ /**
+ * Returns the associated set as string.
+ *
+ * Can be set, to change the associated attribute.
+ */
+ value: string;
+ toString(): string;
+ /**
+ * Adds all arguments passed, except those already present.
+ *
+ * Throws a "SyntaxError" DOMException if one of the arguments is the empty string.
+ *
+ * Throws an "InvalidCharacterError" DOMException if one of the arguments contains any ASCII whitespace.
+ */
+ add(...tokens: string[]): void;
+ /** Returns true if token is present, and false otherwise. */
+ contains(token: string): boolean;
+ /** Returns the token with index index. */
+ item(index: number): string | null;
+ /**
+ * Removes arguments passed, if they are present.
+ *
+ * Throws a "SyntaxError" DOMException if one of the arguments is the empty string.
+ *
+ * Throws an "InvalidCharacterError" DOMException if one of the arguments contains any ASCII whitespace.
+ */
+ remove(...tokens: string[]): void;
+ /**
+ * Replaces token with newToken.
+ *
+ * Returns true if token was replaced with newToken, and false otherwise.
+ *
+ * Throws a "SyntaxError" DOMException if one of the arguments is the empty string.
+ *
+ * Throws an "InvalidCharacterError" DOMException if one of the arguments contains any ASCII whitespace.
+ */
+ replace(token: string, newToken: string): boolean;
+ /**
+ * Returns true if token is in the associated attribute's supported tokens. Returns false otherwise.
+ *
+ * Throws a TypeError if the associated attribute has no supported tokens defined.
+ */
+ supports(token: string): boolean;
+ /**
+ * If force is not given, "toggles" token, removing it if it's present and adding it if it's not present. If force is true, adds token (same as add()). If force is false, removes token (same as remove()).
+ *
+ * Returns true if token is now present, and false otherwise.
+ *
+ * Throws a "SyntaxError" DOMException if token is empty.
+ *
+ * Throws an "InvalidCharacterError" DOMException if token contains any spaces.
+ */
+ toggle(token: string, force?: boolean): boolean;
+ forEach(callbackfn: (value: string, key: number, parent: DOMTokenList) => void, thisArg?: any): void;
+ [index: number]: string;
+}
+
+declare var DOMTokenList: {
+ prototype: DOMTokenList;
+ new(): DOMTokenList;
+};
+
+/** Used to hold the data that is being dragged during a drag and drop operation. It may hold one or more data items, each of one or more data types. For more information about drag and drop, see HTML Drag and Drop API. */
+interface DataTransfer {
+ /**
+ * Returns the kind of operation that is currently selected. If the kind of operation isn't one of those that is allowed by the effectAllowed attribute, then the operation will fail.
+ *
+ * Can be set, to change the selected operation.
+ *
+ * The possible values are "none", "copy", "link", and "move".
+ */
+ dropEffect: "none" | "copy" | "link" | "move";
+ /**
+ * Returns the kinds of operations that are to be allowed.
+ *
+ * Can be set (during the dragstart event), to change the allowed operations.
+ *
+ * The possible values are "none", "copy", "copyLink", "copyMove", "link", "linkMove", "move", "all", and "uninitialized",
+ */
+ effectAllowed: "none" | "copy" | "copyLink" | "copyMove" | "link" | "linkMove" | "move" | "all" | "uninitialized";
+ /** Returns a FileList of the files being dragged, if any. */
+ readonly files: FileList;
+ /** Returns a DataTransferItemList object, with the drag data. */
+ readonly items: DataTransferItemList;
+ /** Returns a frozen array listing the formats that were set in the dragstart event. In addition, if any files are being dragged, then one of the types will be the string "Files". */
+ readonly types: ReadonlyArray<string>;
+ /** Removes the data of the specified formats. Removes all data if the argument is omitted. */
+ clearData(format?: string): void;
+ /** Returns the specified data. If there is no such data, returns the empty string. */
+ getData(format: string): string;
+ /** Adds the specified data. */
+ setData(format: string, data: string): void;
+ /** Uses the given element to update the drag feedback, replacing any previously specified feedback. */
+ setDragImage(image: Element, x: number, y: number): void;
+}
+
+declare var DataTransfer: {
+ prototype: DataTransfer;
+ new(): DataTransfer;
+};
+
+/** One drag data item. During a drag operation, each drag event has a dataTransfer property which contains a list of drag data items. Each item in the list is a DataTransferItem object. */
+interface DataTransferItem {
+ /** Returns the drag data item kind, one of: "string", "file". */
+ readonly kind: string;
+ /** Returns the drag data item type string. */
+ readonly type: string;
+ /** Returns a File object, if the drag data item kind is File. */
+ getAsFile(): File | null;
+ /** Invokes the callback with the string data as the argument, if the drag data item kind is text. */
+ getAsString(callback: FunctionStringCallback | null): void;
+ webkitGetAsEntry(): FileSystemEntry | null;
+}
+
+declare var DataTransferItem: {
+ prototype: DataTransferItem;
+ new(): DataTransferItem;
+};
+
+/** A list of DataTransferItem objects representing items being dragged. During a drag operation, each DragEvent has a dataTransfer property and that property is a DataTransferItemList. */
+interface DataTransferItemList {
+ /** Returns the number of items in the drag data store. */
+ readonly length: number;
+ /** Adds a new entry for the given data to the drag data store. If the data is plain text then a type string has to be provided also. */
+ add(data: string, type: string): DataTransferItem | null;
+ add(data: File): DataTransferItem | null;
+ /** Removes all the entries in the drag data store. */
+ clear(): void;
+ /** Removes the indexth entry in the drag data store. */
+ remove(index: number): void;
+ [index: number]: DataTransferItem;
+}
+
+declare var DataTransferItemList: {
+ prototype: DataTransferItemList;
+ new(): DataTransferItemList;
+};
+
+/** A delay-line; an AudioNode audio-processing module that causes a delay between the arrival of an input data and its propagation to the output. */
+interface DelayNode extends AudioNode {
+ readonly delayTime: AudioParam;
+}
+
+declare var DelayNode: {
+ prototype: DelayNode;
+ new(context: BaseAudioContext, options?: DelayOptions): DelayNode;
+};
+
+/**
+ * The DeviceMotionEvent provides web developers with information about the speed of changes for the device's position and orientation.
+ * Available only in secure contexts.
+ */
+interface DeviceMotionEvent extends Event {
+ readonly acceleration: DeviceMotionEventAcceleration | null;
+ readonly accelerationIncludingGravity: DeviceMotionEventAcceleration | null;
+ readonly interval: number;
+ readonly rotationRate: DeviceMotionEventRotationRate | null;
+}
+
+declare var DeviceMotionEvent: {
+ prototype: DeviceMotionEvent;
+ new(type: string, eventInitDict?: DeviceMotionEventInit): DeviceMotionEvent;
+};
+
+/** Available only in secure contexts. */
+interface DeviceMotionEventAcceleration {
+ readonly x: number | null;
+ readonly y: number | null;
+ readonly z: number | null;
+}
+
+/** Available only in secure contexts. */
+interface DeviceMotionEventRotationRate {
+ readonly alpha: number | null;
+ readonly beta: number | null;
+ readonly gamma: number | null;
+}
+
+/**
+ * The DeviceOrientationEvent provides web developers with information from the physical orientation of the device running the web page.
+ * Available only in secure contexts.
+ */
+interface DeviceOrientationEvent extends Event {
+ readonly absolute: boolean;
+ readonly alpha: number | null;
+ readonly beta: number | null;
+ readonly gamma: number | null;
+}
+
+declare var DeviceOrientationEvent: {
+ prototype: DeviceOrientationEvent;
+ new(type: string, eventInitDict?: DeviceOrientationEventInit): DeviceOrientationEvent;
+};
+
+interface DocumentEventMap extends DocumentAndElementEventHandlersEventMap, GlobalEventHandlersEventMap {
+ "DOMContentLoaded": Event;
+ "fullscreenchange": Event;
+ "fullscreenerror": Event;
+ "pointerlockchange": Event;
+ "pointerlockerror": Event;
+ "readystatechange": Event;
+ "visibilitychange": Event;
+}
+
+/** Any web page loaded in the browser and serves as an entry point into the web page's content, which is the DOM tree. */
+interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShadowRoot, FontFaceSource, GlobalEventHandlers, NonElementParentNode, ParentNode, XPathEvaluatorBase {
+ /** Sets or gets the URL for the current document. */
+ readonly URL: string;
+ /**
+ * Sets or gets the color of all active links in the document.
+ * @deprecated
+ */
+ alinkColor: string;
+ /**
+ * Returns a reference to the collection of elements contained by the object.
+ * @deprecated
+ */
+ readonly all: HTMLAllCollection;
+ /**
+ * Retrieves a collection of all a objects that have a name and/or id property. Objects in this collection are in HTML source order.
+ * @deprecated
+ */
+ readonly anchors: HTMLCollectionOf<HTMLAnchorElement>;
+ /**
+ * Retrieves a collection of all applet objects in the document.
+ * @deprecated
+ */
+ readonly applets: HTMLCollection;
+ /**
+ * Deprecated. Sets or retrieves a value that indicates the background color behind the object.
+ * @deprecated
+ */
+ bgColor: string;
+ /** Specifies the beginning and end of the document body. */
+ body: HTMLElement;
+ /** Returns document's encoding. */
+ readonly characterSet: string;
+ /**
+ * Gets or sets the character set used to encode the object.
+ * @deprecated This is a legacy alias of `characterSet`.
+ */
+ readonly charset: string;
+ /** Gets a value that indicates whether standards-compliant mode is switched on for the object. */
+ readonly compatMode: string;
+ /** Returns document's content type. */
+ readonly contentType: string;
+ /**
+ * Returns the HTTP cookies that apply to the Document. If there are no cookies or cookies can't be applied to this resource, the empty string will be returned.
+ *
+ * Can be set, to add a new cookie to the element's set of HTTP cookies.
+ *
+ * If the contents are sandboxed into a unique origin (e.g. in an iframe with the sandbox attribute), a "SecurityError" DOMException will be thrown on getting and setting.
+ */
+ cookie: string;
+ /**
+ * Returns the script element, or the SVG script element, that is currently executing, as long as the element represents a classic script. In the case of reentrant script execution, returns the one that most recently started executing amongst those that have not yet finished executing.
+ *
+ * Returns null if the Document is not currently executing a script or SVG script element (e.g., because the running script is an event handler, or a timeout), or if the currently executing script or SVG script element represents a module script.
+ */
+ readonly currentScript: HTMLOrSVGScriptElement | null;
+ /** Returns the Window object of the active document. */
+ readonly defaultView: (WindowProxy & typeof globalThis) | null;
+ /** Sets or gets a value that indicates whether the document can be edited. */
+ designMode: string;
+ /** Sets or retrieves a value that indicates the reading order of the object. */
+ dir: string;
+ /** Gets an object representing the document type declaration associated with the current document. */
+ readonly doctype: DocumentType | null;
+ /** Gets a reference to the root node of the document. */
+ readonly documentElement: HTMLElement;
+ /** Returns document's URL. */
+ readonly documentURI: string;
+ /** Sets or gets the security domain of the document. */
+ domain: string;
+ /** Retrieves a collection of all embed objects in the document. */
+ readonly embeds: HTMLCollectionOf<HTMLEmbedElement>;
+ /**
+ * Sets or gets the foreground (text) color of the document.
+ * @deprecated
+ */
+ fgColor: string;
+ /** Retrieves a collection, in source order, of all form objects in the document. */
+ readonly forms: HTMLCollectionOf<HTMLFormElement>;
+ /** @deprecated */
+ readonly fullscreen: boolean;
+ /** Returns true if document has the ability to display elements fullscreen and fullscreen is supported, or false otherwise. */
+ readonly fullscreenEnabled: boolean;
+ /** Returns the head element. */
+ readonly head: HTMLHeadElement;
+ readonly hidden: boolean;
+ /** Retrieves a collection, in source order, of img objects in the document. */
+ readonly images: HTMLCollectionOf<HTMLImageElement>;
+ /** Gets the implementation object of the current document. */
+ readonly implementation: DOMImplementation;
+ /**
+ * Returns the character encoding used to create the webpage that is loaded into the document object.
+ * @deprecated This is a legacy alias of `characterSet`.
+ */
+ readonly inputEncoding: string;
+ /** Gets the date that the page was last modified, if the page supplies one. */
+ readonly lastModified: string;
+ /**
+ * Sets or gets the color of the document links.
+ * @deprecated
+ */
+ linkColor: string;
+ /** Retrieves a collection of all a objects that specify the href property and all area objects in the document. */
+ readonly links: HTMLCollectionOf<HTMLAnchorElement | HTMLAreaElement>;
+ /** Contains information about the current URL. */
+ get location(): Location;
+ set location(href: string | Location);
+ onfullscreenchange: ((this: Document, ev: Event) => any) | null;
+ onfullscreenerror: ((this: Document, ev: Event) => any) | null;
+ onpointerlockchange: ((this: Document, ev: Event) => any) | null;
+ onpointerlockerror: ((this: Document, ev: Event) => any) | null;
+ /**
+ * Fires when the state of the object has changed.
+ * @param ev The event
+ */
+ onreadystatechange: ((this: Document, ev: Event) => any) | null;
+ onvisibilitychange: ((this: Document, ev: Event) => any) | null;
+ readonly ownerDocument: null;
+ readonly pictureInPictureEnabled: boolean;
+ /** Return an HTMLCollection of the embed elements in the Document. */
+ readonly plugins: HTMLCollectionOf<HTMLEmbedElement>;
+ /** Retrieves a value that indicates the current state of the object. */
+ readonly readyState: DocumentReadyState;
+ /** Gets the URL of the location that referred the user to the current page. */
+ readonly referrer: string;
+ /** @deprecated */
+ readonly rootElement: SVGSVGElement | null;
+ /** Retrieves a collection of all script objects in the document. */
+ readonly scripts: HTMLCollectionOf<HTMLScriptElement>;
+ readonly scrollingElement: Element | null;
+ readonly timeline: DocumentTimeline;
+ /** Contains the title of the document. */
+ title: string;
+ readonly visibilityState: DocumentVisibilityState;
+ /**
+ * Sets or gets the color of the links that the user has visited.
+ * @deprecated
+ */
+ vlinkColor: string;
+ /**
+ * Moves node from another document and returns it.
+ *
+ * If node is a document, throws a "NotSupportedError" DOMException or, if node is a shadow root, throws a "HierarchyRequestError" DOMException.
+ */
+ adoptNode<T extends Node>(node: T): T;
+ /** @deprecated */
+ captureEvents(): void;
+ /** @deprecated */
+ caretRangeFromPoint(x: number, y: number): Range | null;
+ /** @deprecated */
+ clear(): void;
+ /** Closes an output stream and forces the sent data to display. */
+ close(): void;
+ /**
+ * Creates an attribute object with a specified name.
+ * @param name String that sets the attribute object's name.
+ */
+ createAttribute(localName: string): Attr;
+ createAttributeNS(namespace: string | null, qualifiedName: string): Attr;
+ /** Returns a CDATASection node whose data is data. */
+ createCDATASection(data: string): CDATASection;
+ /**
+ * Creates a comment object with the specified data.
+ * @param data Sets the comment object's data.
+ */
+ createComment(data: string): Comment;
+ /** Creates a new document. */
+ createDocumentFragment(): DocumentFragment;
+ /**
+ * Creates an instance of the element for the specified tag.
+ * @param tagName The name of an element.
+ */
+ createElement<K extends keyof HTMLElementTagNameMap>(tagName: K, options?: ElementCreationOptions): HTMLElementTagNameMap[K];
+ /** @deprecated */
+ createElement<K extends keyof HTMLElementDeprecatedTagNameMap>(tagName: K, options?: ElementCreationOptions): HTMLElementDeprecatedTagNameMap[K];
+ createElement(tagName: string, options?: ElementCreationOptions): HTMLElement;
+ /**
+ * Returns an element with namespace namespace. Its namespace prefix will be everything before ":" (U+003E) in qualifiedName or null. Its local name will be everything after ":" (U+003E) in qualifiedName or qualifiedName.
+ *
+ * If localName does not match the Name production an "InvalidCharacterError" DOMException will be thrown.
+ *
+ * If one of the following conditions is true a "NamespaceError" DOMException will be thrown:
+ *
+ * localName does not match the QName production.
+ * Namespace prefix is not null and namespace is the empty string.
+ * Namespace prefix is "xml" and namespace is not the XML namespace.
+ * qualifiedName or namespace prefix is "xmlns" and namespace is not the XMLNS namespace.
+ * namespace is the XMLNS namespace and neither qualifiedName nor namespace prefix is "xmlns".
+ *
+ * When supplied, options's is can be used to create a customized built-in element.
+ */
+ createElementNS(namespaceURI: "http://www.w3.org/1999/xhtml", qualifiedName: string): HTMLElement;
+ createElementNS<K extends keyof SVGElementTagNameMap>(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: K): SVGElementTagNameMap[K];
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: string): SVGElement;
+ createElementNS(namespaceURI: string | null, qualifiedName: string, options?: ElementCreationOptions): Element;
+ createElementNS(namespace: string | null, qualifiedName: string, options?: string | ElementCreationOptions): Element;
+ createEvent(eventInterface: "AnimationEvent"): AnimationEvent;
+ createEvent(eventInterface: "AnimationPlaybackEvent"): AnimationPlaybackEvent;
+ createEvent(eventInterface: "AudioProcessingEvent"): AudioProcessingEvent;
+ createEvent(eventInterface: "BeforeUnloadEvent"): BeforeUnloadEvent;
+ createEvent(eventInterface: "BlobEvent"): BlobEvent;
+ createEvent(eventInterface: "ClipboardEvent"): ClipboardEvent;
+ createEvent(eventInterface: "CloseEvent"): CloseEvent;
+ createEvent(eventInterface: "CompositionEvent"): CompositionEvent;
+ createEvent(eventInterface: "CustomEvent"): CustomEvent;
+ createEvent(eventInterface: "DeviceMotionEvent"): DeviceMotionEvent;
+ createEvent(eventInterface: "DeviceOrientationEvent"): DeviceOrientationEvent;
+ createEvent(eventInterface: "DragEvent"): DragEvent;
+ createEvent(eventInterface: "ErrorEvent"): ErrorEvent;
+ createEvent(eventInterface: "Event"): Event;
+ createEvent(eventInterface: "Events"): Event;
+ createEvent(eventInterface: "FocusEvent"): FocusEvent;
+ createEvent(eventInterface: "FontFaceSetLoadEvent"): FontFaceSetLoadEvent;
+ createEvent(eventInterface: "FormDataEvent"): FormDataEvent;
+ createEvent(eventInterface: "GamepadEvent"): GamepadEvent;
+ createEvent(eventInterface: "HashChangeEvent"): HashChangeEvent;
+ createEvent(eventInterface: "IDBVersionChangeEvent"): IDBVersionChangeEvent;
+ createEvent(eventInterface: "InputEvent"): InputEvent;
+ createEvent(eventInterface: "KeyboardEvent"): KeyboardEvent;
+ createEvent(eventInterface: "MediaEncryptedEvent"): MediaEncryptedEvent;
+ createEvent(eventInterface: "MediaKeyMessageEvent"): MediaKeyMessageEvent;
+ createEvent(eventInterface: "MediaQueryListEvent"): MediaQueryListEvent;
+ createEvent(eventInterface: "MediaRecorderErrorEvent"): MediaRecorderErrorEvent;
+ createEvent(eventInterface: "MediaStreamTrackEvent"): MediaStreamTrackEvent;
+ createEvent(eventInterface: "MessageEvent"): MessageEvent;
+ createEvent(eventInterface: "MouseEvent"): MouseEvent;
+ createEvent(eventInterface: "MouseEvents"): MouseEvent;
+ createEvent(eventInterface: "MutationEvent"): MutationEvent;
+ createEvent(eventInterface: "MutationEvents"): MutationEvent;
+ createEvent(eventInterface: "OfflineAudioCompletionEvent"): OfflineAudioCompletionEvent;
+ createEvent(eventInterface: "PageTransitionEvent"): PageTransitionEvent;
+ createEvent(eventInterface: "PaymentMethodChangeEvent"): PaymentMethodChangeEvent;
+ createEvent(eventInterface: "PaymentRequestUpdateEvent"): PaymentRequestUpdateEvent;
+ createEvent(eventInterface: "PointerEvent"): PointerEvent;
+ createEvent(eventInterface: "PopStateEvent"): PopStateEvent;
+ createEvent(eventInterface: "ProgressEvent"): ProgressEvent;
+ createEvent(eventInterface: "PromiseRejectionEvent"): PromiseRejectionEvent;
+ createEvent(eventInterface: "RTCDTMFToneChangeEvent"): RTCDTMFToneChangeEvent;
+ createEvent(eventInterface: "RTCDataChannelEvent"): RTCDataChannelEvent;
+ createEvent(eventInterface: "RTCErrorEvent"): RTCErrorEvent;
+ createEvent(eventInterface: "RTCPeerConnectionIceErrorEvent"): RTCPeerConnectionIceErrorEvent;
+ createEvent(eventInterface: "RTCPeerConnectionIceEvent"): RTCPeerConnectionIceEvent;
+ createEvent(eventInterface: "RTCTrackEvent"): RTCTrackEvent;
+ createEvent(eventInterface: "SecurityPolicyViolationEvent"): SecurityPolicyViolationEvent;
+ createEvent(eventInterface: "SpeechSynthesisErrorEvent"): SpeechSynthesisErrorEvent;
+ createEvent(eventInterface: "SpeechSynthesisEvent"): SpeechSynthesisEvent;
+ createEvent(eventInterface: "StorageEvent"): StorageEvent;
+ createEvent(eventInterface: "SubmitEvent"): SubmitEvent;
+ createEvent(eventInterface: "TouchEvent"): TouchEvent;
+ createEvent(eventInterface: "TrackEvent"): TrackEvent;
+ createEvent(eventInterface: "TransitionEvent"): TransitionEvent;
+ createEvent(eventInterface: "UIEvent"): UIEvent;
+ createEvent(eventInterface: "UIEvents"): UIEvent;
+ createEvent(eventInterface: "WebGLContextEvent"): WebGLContextEvent;
+ createEvent(eventInterface: "WheelEvent"): WheelEvent;
+ createEvent(eventInterface: string): Event;
+ /**
+ * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.
+ * @param root The root element or node to start traversing on.
+ * @param whatToShow The type of nodes or elements to appear in the node list
+ * @param filter A custom NodeFilter function to use. For more information, see filter. Use null for no filter.
+ */
+ createNodeIterator(root: Node, whatToShow?: number, filter?: NodeFilter | null): NodeIterator;
+ /** Returns a ProcessingInstruction node whose target is target and data is data. If target does not match the Name production an "InvalidCharacterError" DOMException will be thrown. If data contains "?>" an "InvalidCharacterError" DOMException will be thrown. */
+ createProcessingInstruction(target: string, data: string): ProcessingInstruction;
+ /** Returns an empty range object that has both of its boundary points positioned at the beginning of the document. */
+ createRange(): Range;
+ /**
+ * Creates a text string from the specified value.
+ * @param data String that specifies the nodeValue property of the text node.
+ */
+ createTextNode(data: string): Text;
+ /**
+ * Creates a TreeWalker object that you can use to traverse filtered lists of nodes or elements in a document.
+ * @param root The root element or node to start traversing on.
+ * @param whatToShow The type of nodes or elements to appear in the node list. For more information, see whatToShow.
+ * @param filter A custom NodeFilter function to use.
+ */
+ createTreeWalker(root: Node, whatToShow?: number, filter?: NodeFilter | null): TreeWalker;
+ /**
+ * Executes a command on the current document, current selection, or the given range.
+ * @param commandId String that specifies the command to execute. This command can be any of the command identifiers that can be executed in script.
+ * @param showUI Display the user interface, defaults to false.
+ * @param value Value to assign.
+ * @deprecated
+ */
+ execCommand(commandId: string, showUI?: boolean, value?: string): boolean;
+ /** Stops document's fullscreen element from being displayed fullscreen and resolves promise when done. */
+ exitFullscreen(): Promise<void>;
+ exitPictureInPicture(): Promise<void>;
+ exitPointerLock(): void;
+ /**
+ * Returns a reference to the first object with the specified value of the ID attribute.
+ * @param elementId String that specifies the ID value.
+ */
+ getElementById(elementId: string): HTMLElement | null;
+ /** Returns a HTMLCollection of the elements in the object on which the method was invoked (a document or an element) that have all the classes given by classNames. The classNames argument is interpreted as a space-separated list of classes. */
+ getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
+ /**
+ * Gets a collection of objects based on the value of the NAME or ID attribute.
+ * @param elementName Gets a collection of objects based on the value of the NAME or ID attribute.
+ */
+ getElementsByName(elementName: string): NodeListOf<HTMLElement>;
+ /**
+ * Retrieves a collection of objects based on the specified element name.
+ * @param name Specifies the name of an element.
+ */
+ getElementsByTagName<K extends keyof HTMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementTagNameMap[K]>;
+ getElementsByTagName<K extends keyof SVGElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<SVGElementTagNameMap[K]>;
+ getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>;
+ /**
+ * If namespace and localName are "*" returns a HTMLCollection of all descendant elements.
+ *
+ * If only namespace is "*" returns a HTMLCollection of all descendant elements whose local name is localName.
+ *
+ * If only localName is "*" returns a HTMLCollection of all descendant elements whose namespace is namespace.
+ *
+ * Otherwise, returns a HTMLCollection of all descendant elements whose namespace is namespace and local name is localName.
+ */
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
+ getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf<Element>;
+ /** Returns an object representing the current selection of the document that is loaded into the object displaying a webpage. */
+ getSelection(): Selection | null;
+ /** Gets a value indicating whether the object currently has focus. */
+ hasFocus(): boolean;
+ hasStorageAccess(): Promise<boolean>;
+ /**
+ * Returns a copy of node. If deep is true, the copy also includes the node's descendants.
+ *
+ * If node is a document or a shadow root, throws a "NotSupportedError" DOMException.
+ */
+ importNode<T extends Node>(node: T, deep?: boolean): T;
+ /**
+ * Opens a new window and loads a document specified by a given URL. Also, opens a new window that uses the url parameter and the name parameter to collect the output of the write method and the writeln method.
+ * @param url Specifies a MIME type for the document.
+ * @param name Specifies the name of the window. This name is used as the value for the TARGET attribute on a form or an anchor element.
+ * @param features Contains a list of items separated by commas. Each item consists of an option and a value, separated by an equals sign (for example, "fullscreen=yes, toolbar=yes"). The following values are supported.
+ * @param replace Specifies whether the existing entry for the document is replaced in the history list.
+ */
+ open(unused1?: string, unused2?: string): Document;
+ open(url: string | URL, name: string, features: string): WindowProxy | null;
+ /**
+ * Returns a Boolean value that indicates whether a specified command can be successfully executed using execCommand, given the current state of the document.
+ * @param commandId Specifies a command identifier.
+ * @deprecated
+ */
+ queryCommandEnabled(commandId: string): boolean;
+ /**
+ * Returns a Boolean value that indicates whether the specified command is in the indeterminate state.
+ * @param commandId String that specifies a command identifier.
+ */
+ queryCommandIndeterm(commandId: string): boolean;
+ /**
+ * Returns a Boolean value that indicates the current state of the command.
+ * @param commandId String that specifies a command identifier.
+ * @deprecated
+ */
+ queryCommandState(commandId: string): boolean;
+ /**
+ * Returns a Boolean value that indicates whether the current command is supported on the current range.
+ * @param commandId Specifies a command identifier.
+ * @deprecated
+ */
+ queryCommandSupported(commandId: string): boolean;
+ /**
+ * Returns the current value of the document, range, or current selection for the given command.
+ * @param commandId String that specifies a command identifier.
+ */
+ queryCommandValue(commandId: string): string;
+ /** @deprecated */
+ releaseEvents(): void;
+ requestStorageAccess(): Promise<void>;
+ /**
+ * Writes one or more HTML expressions to a document in the specified window.
+ * @param content Specifies the text and HTML tags to write.
+ */
+ write(...text: string[]): void;
+ /**
+ * Writes one or more HTML expressions, followed by a carriage return, to a document in the specified window.
+ * @param content The text and HTML tags to write.
+ */
+ writeln(...text: string[]): void;
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var Document: {
+ prototype: Document;
+ new(): Document;
+};
+
+interface DocumentAndElementEventHandlersEventMap {
+ "copy": ClipboardEvent;
+ "cut": ClipboardEvent;
+ "paste": ClipboardEvent;
+}
+
+interface DocumentAndElementEventHandlers {
+ oncopy: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
+ oncut: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
+ onpaste: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
+ addEventListener<K extends keyof DocumentAndElementEventHandlersEventMap>(type: K, listener: (this: DocumentAndElementEventHandlers, ev: DocumentAndElementEventHandlersEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof DocumentAndElementEventHandlersEventMap>(type: K, listener: (this: DocumentAndElementEventHandlers, ev: DocumentAndElementEventHandlersEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+/** A minimal document object that has no parent. It is used as a lightweight version of Document that stores a segment of a document structure comprised of nodes just like a standard document. The key difference is that because the document fragment isn't part of the active document tree structure, changes made to the fragment don't affect the document, cause reflow, or incur any performance impact that can occur when changes are made. */
+interface DocumentFragment extends Node, NonElementParentNode, ParentNode {
+ readonly ownerDocument: Document;
+ getElementById(elementId: string): HTMLElement | null;
+}
+
+declare var DocumentFragment: {
+ prototype: DocumentFragment;
+ new(): DocumentFragment;
+};
+
+interface DocumentOrShadowRoot {
+ /**
+ * Returns the deepest element in the document through which or to which key events are being routed. This is, roughly speaking, the focused element in the document.
+ *
+ * For the purposes of this API, when a child browsing context is focused, its container is focused in the parent browsing context. For example, if the user moves the focus to a text control in an iframe, the iframe is the element returned by the activeElement API in the iframe's node document.
+ *
+ * Similarly, when the focused element is in a different node tree than documentOrShadowRoot, the element returned will be the host that's located in the same node tree as documentOrShadowRoot if documentOrShadowRoot is a shadow-including inclusive ancestor of the focused element, and null if not.
+ */
+ readonly activeElement: Element | null;
+ adoptedStyleSheets: CSSStyleSheet[];
+ /** Returns document's fullscreen element. */
+ readonly fullscreenElement: Element | null;
+ readonly pictureInPictureElement: Element | null;
+ readonly pointerLockElement: Element | null;
+ /** Retrieves a collection of styleSheet objects representing the style sheets that correspond to each instance of a link or style object in the document. */
+ readonly styleSheets: StyleSheetList;
+ /**
+ * Returns the element for the specified x coordinate and the specified y coordinate.
+ * @param x The x-offset
+ * @param y The y-offset
+ */
+ elementFromPoint(x: number, y: number): Element | null;
+ elementsFromPoint(x: number, y: number): Element[];
+ getAnimations(): Animation[];
+}
+
+interface DocumentTimeline extends AnimationTimeline {
+}
+
+declare var DocumentTimeline: {
+ prototype: DocumentTimeline;
+ new(options?: DocumentTimelineOptions): DocumentTimeline;
+};
+
+/** A Node containing a doctype. */
+interface DocumentType extends Node, ChildNode {
+ readonly name: string;
+ readonly ownerDocument: Document;
+ readonly publicId: string;
+ readonly systemId: string;
+}
+
+declare var DocumentType: {
+ prototype: DocumentType;
+ new(): DocumentType;
+};
+
+/** A DOM event that represents a drag and drop interaction. The user initiates a drag by placing a pointer device (such as a mouse) on the touch surface and then dragging the pointer to a new location (such as another DOM element). Applications are free to interpret a drag and drop interaction in an application-specific way. */
+interface DragEvent extends MouseEvent {
+ /** Returns the DataTransfer object for the event. */
+ readonly dataTransfer: DataTransfer | null;
+}
+
+declare var DragEvent: {
+ prototype: DragEvent;
+ new(type: string, eventInitDict?: DragEventInit): DragEvent;
+};
+
+/** Inherits properties from its parent, AudioNode. */
+interface DynamicsCompressorNode extends AudioNode {
+ readonly attack: AudioParam;
+ readonly knee: AudioParam;
+ readonly ratio: AudioParam;
+ readonly reduction: number;
+ readonly release: AudioParam;
+ readonly threshold: AudioParam;
+}
+
+declare var DynamicsCompressorNode: {
+ prototype: DynamicsCompressorNode;
+ new(context: BaseAudioContext, options?: DynamicsCompressorOptions): DynamicsCompressorNode;
+};
+
+interface EXT_blend_minmax {
+ readonly MAX_EXT: GLenum;
+ readonly MIN_EXT: GLenum;
+}
+
+interface EXT_color_buffer_float {
+}
+
+interface EXT_color_buffer_half_float {
+ readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT: GLenum;
+ readonly RGB16F_EXT: GLenum;
+ readonly RGBA16F_EXT: GLenum;
+ readonly UNSIGNED_NORMALIZED_EXT: GLenum;
+}
+
+interface EXT_float_blend {
+}
+
+/** The EXT_frag_depth extension is part of the WebGL API and enables to set a depth value of a fragment from within the fragment shader. */
+interface EXT_frag_depth {
+}
+
+interface EXT_sRGB {
+ readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT: GLenum;
+ readonly SRGB8_ALPHA8_EXT: GLenum;
+ readonly SRGB_ALPHA_EXT: GLenum;
+ readonly SRGB_EXT: GLenum;
+}
+
+interface EXT_shader_texture_lod {
+}
+
+interface EXT_texture_compression_rgtc {
+ readonly COMPRESSED_RED_GREEN_RGTC2_EXT: GLenum;
+ readonly COMPRESSED_RED_RGTC1_EXT: GLenum;
+ readonly COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT: GLenum;
+ readonly COMPRESSED_SIGNED_RED_RGTC1_EXT: GLenum;
+}
+
+/** The EXT_texture_filter_anisotropic extension is part of the WebGL API and exposes two constants for anisotropic filtering (AF). */
+interface EXT_texture_filter_anisotropic {
+ readonly MAX_TEXTURE_MAX_ANISOTROPY_EXT: GLenum;
+ readonly TEXTURE_MAX_ANISOTROPY_EXT: GLenum;
+}
+
+interface ElementEventMap {
+ "fullscreenchange": Event;
+ "fullscreenerror": Event;
+}
+
+/** Element is the most general base class from which all objects in a Document inherit. It only has methods and properties common to all kinds of elements. More specific classes inherit from Element. */
+interface Element extends Node, ARIAMixin, Animatable, ChildNode, InnerHTML, NonDocumentTypeChildNode, ParentNode, Slottable {
+ readonly attributes: NamedNodeMap;
+ /** Allows for manipulation of element's class content attribute as a set of whitespace-separated tokens through a DOMTokenList object. */
+ readonly classList: DOMTokenList;
+ /** Returns the value of element's class content attribute. Can be set to change it. */
+ className: string;
+ readonly clientHeight: number;
+ readonly clientLeft: number;
+ readonly clientTop: number;
+ readonly clientWidth: number;
+ /** Returns the value of element's id content attribute. Can be set to change it. */
+ id: string;
+ /** Returns the local name. */
+ readonly localName: string;
+ /** Returns the namespace. */
+ readonly namespaceURI: string | null;
+ onfullscreenchange: ((this: Element, ev: Event) => any) | null;
+ onfullscreenerror: ((this: Element, ev: Event) => any) | null;
+ outerHTML: string;
+ readonly ownerDocument: Document;
+ readonly part: DOMTokenList;
+ /** Returns the namespace prefix. */
+ readonly prefix: string | null;
+ readonly scrollHeight: number;
+ scrollLeft: number;
+ scrollTop: number;
+ readonly scrollWidth: number;
+ /** Returns element's shadow root, if any, and if shadow root's mode is "open", and null otherwise. */
+ readonly shadowRoot: ShadowRoot | null;
+ /** Returns the value of element's slot content attribute. Can be set to change it. */
+ slot: string;
+ /** Returns the HTML-uppercased qualified name. */
+ readonly tagName: string;
+ /** Creates a shadow root for element and returns it. */
+ attachShadow(init: ShadowRootInit): ShadowRoot;
+ /** Returns the first (starting at element) inclusive ancestor that matches selectors, and null otherwise. */
+ closest<K extends keyof HTMLElementTagNameMap>(selector: K): HTMLElementTagNameMap[K] | null;
+ closest<K extends keyof SVGElementTagNameMap>(selector: K): SVGElementTagNameMap[K] | null;
+ closest<E extends Element = Element>(selectors: string): E | null;
+ /** Returns element's first attribute whose qualified name is qualifiedName, and null if there is no such attribute otherwise. */
+ getAttribute(qualifiedName: string): string | null;
+ /** Returns element's attribute whose namespace is namespace and local name is localName, and null if there is no such attribute otherwise. */
+ getAttributeNS(namespace: string | null, localName: string): string | null;
+ /** Returns the qualified names of all element's attributes. Can contain duplicates. */
+ getAttributeNames(): string[];
+ getAttributeNode(qualifiedName: string): Attr | null;
+ getAttributeNodeNS(namespace: string | null, localName: string): Attr | null;
+ getBoundingClientRect(): DOMRect;
+ getClientRects(): DOMRectList;
+ /** Returns a HTMLCollection of the elements in the object on which the method was invoked (a document or an element) that have all the classes given by classNames. The classNames argument is interpreted as a space-separated list of classes. */
+ getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
+ getElementsByTagName<K extends keyof HTMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementTagNameMap[K]>;
+ getElementsByTagName<K extends keyof SVGElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<SVGElementTagNameMap[K]>;
+ getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>;
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
+ getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf<Element>;
+ /** Returns true if element has an attribute whose qualified name is qualifiedName, and false otherwise. */
+ hasAttribute(qualifiedName: string): boolean;
+ /** Returns true if element has an attribute whose namespace is namespace and local name is localName. */
+ hasAttributeNS(namespace: string | null, localName: string): boolean;
+ /** Returns true if element has attributes, and false otherwise. */
+ hasAttributes(): boolean;
+ hasPointerCapture(pointerId: number): boolean;
+ insertAdjacentElement(where: InsertPosition, element: Element): Element | null;
+ insertAdjacentHTML(position: InsertPosition, text: string): void;
+ insertAdjacentText(where: InsertPosition, data: string): void;
+ /** Returns true if matching selectors against element's root yields element, and false otherwise. */
+ matches(selectors: string): boolean;
+ releasePointerCapture(pointerId: number): void;
+ /** Removes element's first attribute whose qualified name is qualifiedName. */
+ removeAttribute(qualifiedName: string): void;
+ /** Removes element's attribute whose namespace is namespace and local name is localName. */
+ removeAttributeNS(namespace: string | null, localName: string): void;
+ removeAttributeNode(attr: Attr): Attr;
+ /**
+ * Displays element fullscreen and resolves promise when done.
+ *
+ * When supplied, options's navigationUI member indicates whether showing navigation UI while in fullscreen is preferred or not. If set to "show", navigation simplicity is preferred over screen space, and if set to "hide", more screen space is preferred. User agents are always free to honor user preference over the application's. The default value "auto" indicates no application preference.
+ */
+ requestFullscreen(options?: FullscreenOptions): Promise<void>;
+ requestPointerLock(): void;
+ scroll(options?: ScrollToOptions): void;
+ scroll(x: number, y: number): void;
+ scrollBy(options?: ScrollToOptions): void;
+ scrollBy(x: number, y: number): void;
+ scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;
+ scrollTo(options?: ScrollToOptions): void;
+ scrollTo(x: number, y: number): void;
+ /** Sets the value of element's first attribute whose qualified name is qualifiedName to value. */
+ setAttribute(qualifiedName: string, value: string): void;
+ /** Sets the value of element's attribute whose namespace is namespace and local name is localName to value. */
+ setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void;
+ setAttributeNode(attr: Attr): Attr | null;
+ setAttributeNodeNS(attr: Attr): Attr | null;
+ setPointerCapture(pointerId: number): void;
+ /**
+ * If force is not given, "toggles" qualifiedName, removing it if it is present and adding it if it is not present. If force is true, adds qualifiedName. If force is false, removes qualifiedName.
+ *
+ * Returns true if qualifiedName is now present, and false otherwise.
+ */
+ toggleAttribute(qualifiedName: string, force?: boolean): boolean;
+ /** @deprecated This is a legacy alias of `matches`. */
+ webkitMatchesSelector(selectors: string): boolean;
+ addEventListener<K extends keyof ElementEventMap>(type: K, listener: (this: Element, ev: ElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof ElementEventMap>(type: K, listener: (this: Element, ev: ElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var Element: {
+ prototype: Element;
+ new(): Element;
+};
+
+interface ElementCSSInlineStyle {
+ readonly style: CSSStyleDeclaration;
+}
+
+interface ElementContentEditable {
+ contentEditable: string;
+ enterKeyHint: string;
+ inputMode: string;
+ readonly isContentEditable: boolean;
+}
+
+interface ElementInternals extends ARIAMixin {
+ /** Returns the form owner of internals's target element. */
+ readonly form: HTMLFormElement | null;
+ /** Returns a NodeList of all the label elements that internals's target element is associated with. */
+ readonly labels: NodeList;
+ /** Returns the ShadowRoot for internals's target element, if the target element is a shadow host, or null otherwise. */
+ readonly shadowRoot: ShadowRoot | null;
+ /** Returns the error message that would be shown to the user if internals's target element was to be checked for validity. */
+ readonly validationMessage: string;
+ /** Returns the ValidityState object for internals's target element. */
+ readonly validity: ValidityState;
+ /** Returns true if internals's target element will be validated when the form is submitted; false otherwise. */
+ readonly willValidate: boolean;
+ /** Returns true if internals's target element has no validity problems; false otherwise. Fires an invalid event at the element in the latter case. */
+ checkValidity(): boolean;
+ /** Returns true if internals's target element has no validity problems; otherwise, returns false, fires an invalid event at the element, and (if the event isn't canceled) reports the problem to the user. */
+ reportValidity(): boolean;
+ /**
+ * Sets both the state and submission value of internals's target element to value.
+ *
+ * If value is null, the element won't participate in form submission.
+ */
+ setFormValue(value: File | string | FormData | null, state?: File | string | FormData | null): void;
+ /** Marks internals's target element as suffering from the constraints indicated by the flags argument, and sets the element's validation message to message. If anchor is specified, the user agent might use it to indicate problems with the constraints of internals's target element when the form owner is validated interactively or reportValidity() is called. */
+ setValidity(flags?: ValidityStateFlags, message?: string, anchor?: HTMLElement): void;
+}
+
+declare var ElementInternals: {
+ prototype: ElementInternals;
+ new(): ElementInternals;
+};
+
+/** Events providing information related to errors in scripts or in files. */
+interface ErrorEvent extends Event {
+ readonly colno: number;
+ readonly error: any;
+ readonly filename: string;
+ readonly lineno: number;
+ readonly message: string;
+}
+
+declare var ErrorEvent: {
+ prototype: ErrorEvent;
+ new(type: string, eventInitDict?: ErrorEventInit): ErrorEvent;
+};
+
+/** An event which takes place in the DOM. */
+interface Event {
+ /** Returns true or false depending on how event was initialized. True if event goes through its target's ancestors in reverse tree order, and false otherwise. */
+ readonly bubbles: boolean;
+ cancelBubble: boolean;
+ /** Returns true or false depending on how event was initialized. Its return value does not always carry meaning, but true can indicate that part of the operation during which event was dispatched, can be canceled by invoking the preventDefault() method. */
+ readonly cancelable: boolean;
+ /** Returns true or false depending on how event was initialized. True if event invokes listeners past a ShadowRoot node that is the root of its target, and false otherwise. */
+ readonly composed: boolean;
+ /** Returns the object whose event listener's callback is currently being invoked. */
+ readonly currentTarget: EventTarget | null;
+ /** Returns true if preventDefault() was invoked successfully to indicate cancelation, and false otherwise. */
+ readonly defaultPrevented: boolean;
+ /** Returns the event's phase, which is one of NONE, CAPTURING_PHASE, AT_TARGET, and BUBBLING_PHASE. */
+ readonly eventPhase: number;
+ /** Returns true if event was dispatched by the user agent, and false otherwise. */
+ readonly isTrusted: boolean;
+ /** @deprecated */
+ returnValue: boolean;
+ /** @deprecated */
+ readonly srcElement: EventTarget | null;
+ /** Returns the object to which event is dispatched (its target). */
+ readonly target: EventTarget | null;
+ /** Returns the event's timestamp as the number of milliseconds measured relative to the time origin. */
+ readonly timeStamp: DOMHighResTimeStamp;
+ /** Returns the type of event, e.g. "click", "hashchange", or "submit". */
+ readonly type: string;
+ /** Returns the invocation target objects of event's path (objects on which listeners will be invoked), except for any nodes in shadow trees of which the shadow root's mode is "closed" that are not reachable from event's currentTarget. */
+ composedPath(): EventTarget[];
+ /** @deprecated */
+ initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void;
+ /** If invoked when the cancelable attribute value is true, and while executing a listener for the event with passive set to false, signals to the operation that caused event to be dispatched that it needs to be canceled. */
+ preventDefault(): void;
+ /** Invoking this method prevents event from reaching any registered event listeners after the current one finishes running and, when dispatched in a tree, also prevents event from reaching any other objects. */
+ stopImmediatePropagation(): void;
+ /** When dispatched in a tree, invoking this method prevents event from reaching any objects other than the current object. */
+ stopPropagation(): void;
+ readonly AT_TARGET: number;
+ readonly BUBBLING_PHASE: number;
+ readonly CAPTURING_PHASE: number;
+ readonly NONE: number;
+}
+
+declare var Event: {
+ prototype: Event;
+ new(type: string, eventInitDict?: EventInit): Event;
+ readonly AT_TARGET: number;
+ readonly BUBBLING_PHASE: number;
+ readonly CAPTURING_PHASE: number;
+ readonly NONE: number;
+};
+
+interface EventCounts {
+ forEach(callbackfn: (value: number, key: string, parent: EventCounts) => void, thisArg?: any): void;
+}
+
+declare var EventCounts: {
+ prototype: EventCounts;
+ new(): EventCounts;
+};
+
+interface EventListener {
+ (evt: Event): void;
+}
+
+interface EventListenerObject {
+ handleEvent(object: Event): void;
+}
+
+interface EventSourceEventMap {
+ "error": Event;
+ "message": MessageEvent;
+ "open": Event;
+}
+
+interface EventSource extends EventTarget {
+ onerror: ((this: EventSource, ev: Event) => any) | null;
+ onmessage: ((this: EventSource, ev: MessageEvent) => any) | null;
+ onopen: ((this: EventSource, ev: Event) => any) | null;
+ /** Returns the state of this EventSource object's connection. It can have the values described below. */
+ readonly readyState: number;
+ /** Returns the URL providing the event stream. */
+ readonly url: string;
+ /** Returns true if the credentials mode for connection requests to the URL providing the event stream is set to "include", and false otherwise. */
+ readonly withCredentials: boolean;
+ /** Aborts any instances of the fetch algorithm started for this EventSource object, and sets the readyState attribute to CLOSED. */
+ close(): void;
+ readonly CLOSED: number;
+ readonly CONNECTING: number;
+ readonly OPEN: number;
+ addEventListener<K extends keyof EventSourceEventMap>(type: K, listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: (this: EventSource, event: MessageEvent) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof EventSourceEventMap>(type: K, listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: (this: EventSource, event: MessageEvent) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var EventSource: {
+ prototype: EventSource;
+ new(url: string | URL, eventSourceInitDict?: EventSourceInit): EventSource;
+ readonly CLOSED: number;
+ readonly CONNECTING: number;
+ readonly OPEN: number;
+};
+
+/** EventTarget is a DOM interface implemented by objects that can receive events and may have listeners for them. */
+interface EventTarget {
+ /**
+ * Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
+ *
+ * The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
+ *
+ * When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
+ *
+ * When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
+ *
+ * When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
+ *
+ * If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
+ *
+ * The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
+ */
+ addEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean): void;
+ /** Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise. */
+ dispatchEvent(event: Event): boolean;
+ /** Removes the event listener in target's event listener list with the same type, callback, and options. */
+ removeEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void;
+}
+
+declare var EventTarget: {
+ prototype: EventTarget;
+ new(): EventTarget;
+};
+
+/** @deprecated */
+interface External {
+ /** @deprecated */
+ AddSearchProvider(): void;
+ /** @deprecated */
+ IsSearchProviderInstalled(): void;
+}
+
+/** @deprecated */
+declare var External: {
+ prototype: External;
+ new(): External;
+};
+
+/** Provides information about files and allows JavaScript in a web page to access their content. */
+interface File extends Blob {
+ readonly lastModified: number;
+ readonly name: string;
+ readonly webkitRelativePath: string;
+}
+
+declare var File: {
+ prototype: File;
+ new(fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File;
+};
+
+/** An object of this type is returned by the files property of the HTML <input> element; this lets you access the list of files selected with the <input type="file"> element. It's also used for a list of files dropped into web content when using the drag and drop API; see the DataTransfer object for details on this usage. */
+interface FileList {
+ readonly length: number;
+ item(index: number): File | null;
+ [index: number]: File;
+}
+
+declare var FileList: {
+ prototype: FileList;
+ new(): FileList;
+};
+
+interface FileReaderEventMap {
+ "abort": ProgressEvent<FileReader>;
+ "error": ProgressEvent<FileReader>;
+ "load": ProgressEvent<FileReader>;
+ "loadend": ProgressEvent<FileReader>;
+ "loadstart": ProgressEvent<FileReader>;
+ "progress": ProgressEvent<FileReader>;
+}
+
+/** Lets web applications asynchronously read the contents of files (or raw data buffers) stored on the user's computer, using File or Blob objects to specify the file or data to read. */
+interface FileReader extends EventTarget {
+ readonly error: DOMException | null;
+ onabort: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
+ onerror: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
+ onload: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
+ onloadend: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
+ onloadstart: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
+ onprogress: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
+ readonly readyState: number;
+ readonly result: string | ArrayBuffer | null;
+ abort(): void;
+ readAsArrayBuffer(blob: Blob): void;
+ readAsBinaryString(blob: Blob): void;
+ readAsDataURL(blob: Blob): void;
+ readAsText(blob: Blob, encoding?: string): void;
+ readonly DONE: number;
+ readonly EMPTY: number;
+ readonly LOADING: number;
+ addEventListener<K extends keyof FileReaderEventMap>(type: K, listener: (this: FileReader, ev: FileReaderEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof FileReaderEventMap>(type: K, listener: (this: FileReader, ev: FileReaderEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var FileReader: {
+ prototype: FileReader;
+ new(): FileReader;
+ readonly DONE: number;
+ readonly EMPTY: number;
+ readonly LOADING: number;
+};
+
+interface FileSystem {
+ readonly name: string;
+ readonly root: FileSystemDirectoryEntry;
+}
+
+declare var FileSystem: {
+ prototype: FileSystem;
+ new(): FileSystem;
+};
+
+interface FileSystemDirectoryEntry extends FileSystemEntry {
+ createReader(): FileSystemDirectoryReader;
+ getDirectory(path?: string | null, options?: FileSystemFlags, successCallback?: FileSystemEntryCallback, errorCallback?: ErrorCallback): void;
+ getFile(path?: string | null, options?: FileSystemFlags, successCallback?: FileSystemEntryCallback, errorCallback?: ErrorCallback): void;
+}
+
+declare var FileSystemDirectoryEntry: {
+ prototype: FileSystemDirectoryEntry;
+ new(): FileSystemDirectoryEntry;
+};
+
+/** Available only in secure contexts. */
+interface FileSystemDirectoryHandle extends FileSystemHandle {
+ readonly kind: "directory";
+ getDirectoryHandle(name: string, options?: FileSystemGetDirectoryOptions): Promise<FileSystemDirectoryHandle>;
+ getFileHandle(name: string, options?: FileSystemGetFileOptions): Promise<FileSystemFileHandle>;
+ removeEntry(name: string, options?: FileSystemRemoveOptions): Promise<void>;
+ resolve(possibleDescendant: FileSystemHandle): Promise<string[] | null>;
+}
+
+declare var FileSystemDirectoryHandle: {
+ prototype: FileSystemDirectoryHandle;
+ new(): FileSystemDirectoryHandle;
+};
+
+interface FileSystemDirectoryReader {
+ readEntries(successCallback: FileSystemEntriesCallback, errorCallback?: ErrorCallback): void;
+}
+
+declare var FileSystemDirectoryReader: {
+ prototype: FileSystemDirectoryReader;
+ new(): FileSystemDirectoryReader;
+};
+
+interface FileSystemEntry {
+ readonly filesystem: FileSystem;
+ readonly fullPath: string;
+ readonly isDirectory: boolean;
+ readonly isFile: boolean;
+ readonly name: string;
+ getParent(successCallback?: FileSystemEntryCallback, errorCallback?: ErrorCallback): void;
+}
+
+declare var FileSystemEntry: {
+ prototype: FileSystemEntry;
+ new(): FileSystemEntry;
+};
+
+interface FileSystemFileEntry extends FileSystemEntry {
+ file(successCallback: FileCallback, errorCallback?: ErrorCallback): void;
+}
+
+declare var FileSystemFileEntry: {
+ prototype: FileSystemFileEntry;
+ new(): FileSystemFileEntry;
+};
+
+/** Available only in secure contexts. */
+interface FileSystemFileHandle extends FileSystemHandle {
+ readonly kind: "file";
+ getFile(): Promise<File>;
+}
+
+declare var FileSystemFileHandle: {
+ prototype: FileSystemFileHandle;
+ new(): FileSystemFileHandle;
+};
+
+/** Available only in secure contexts. */
+interface FileSystemHandle {
+ readonly kind: FileSystemHandleKind;
+ readonly name: string;
+ isSameEntry(other: FileSystemHandle): Promise<boolean>;
+}
+
+declare var FileSystemHandle: {
+ prototype: FileSystemHandle;
+ new(): FileSystemHandle;
+};
+
+/** Focus-related events like focus, blur, focusin, or focusout. */
+interface FocusEvent extends UIEvent {
+ readonly relatedTarget: EventTarget | null;
+}
+
+declare var FocusEvent: {
+ prototype: FocusEvent;
+ new(type: string, eventInitDict?: FocusEventInit): FocusEvent;
+};
+
+interface FontFace {
+ ascentOverride: string;
+ descentOverride: string;
+ display: string;
+ family: string;
+ featureSettings: string;
+ lineGapOverride: string;
+ readonly loaded: Promise<FontFace>;
+ readonly status: FontFaceLoadStatus;
+ stretch: string;
+ style: string;
+ unicodeRange: string;
+ variant: string;
+ variationSettings: string;
+ weight: string;
+ load(): Promise<FontFace>;
+}
+
+declare var FontFace: {
+ prototype: FontFace;
+ new(family: string, source: string | BinaryData, descriptors?: FontFaceDescriptors): FontFace;
+};
+
+interface FontFaceSetEventMap {
+ "loading": Event;
+ "loadingdone": Event;
+ "loadingerror": Event;
+}
+
+interface FontFaceSet extends EventTarget {
+ onloading: ((this: FontFaceSet, ev: Event) => any) | null;
+ onloadingdone: ((this: FontFaceSet, ev: Event) => any) | null;
+ onloadingerror: ((this: FontFaceSet, ev: Event) => any) | null;
+ readonly ready: Promise<FontFaceSet>;
+ readonly status: FontFaceSetLoadStatus;
+ check(font: string, text?: string): boolean;
+ load(font: string, text?: string): Promise<FontFace[]>;
+ forEach(callbackfn: (value: FontFace, key: FontFace, parent: FontFaceSet) => void, thisArg?: any): void;
+ addEventListener<K extends keyof FontFaceSetEventMap>(type: K, listener: (this: FontFaceSet, ev: FontFaceSetEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof FontFaceSetEventMap>(type: K, listener: (this: FontFaceSet, ev: FontFaceSetEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var FontFaceSet: {
+ prototype: FontFaceSet;
+ new(initialFaces: FontFace[]): FontFaceSet;
+};
+
+interface FontFaceSetLoadEvent extends Event {
+ readonly fontfaces: ReadonlyArray<FontFace>;
+}
+
+declare var FontFaceSetLoadEvent: {
+ prototype: FontFaceSetLoadEvent;
+ new(type: string, eventInitDict?: FontFaceSetLoadEventInit): FontFaceSetLoadEvent;
+};
+
+interface FontFaceSource {
+ readonly fonts: FontFaceSet;
+}
+
+/** Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the XMLHttpRequest.send() method. It uses the same format a form would use if the encoding type were set to "multipart/form-data". */
+interface FormData {
+ append(name: string, value: string | Blob, fileName?: string): void;
+ delete(name: string): void;
+ get(name: string): FormDataEntryValue | null;
+ getAll(name: string): FormDataEntryValue[];
+ has(name: string): boolean;
+ set(name: string, value: string | Blob, fileName?: string): void;
+ forEach(callbackfn: (value: FormDataEntryValue, key: string, parent: FormData) => void, thisArg?: any): void;
+}
+
+declare var FormData: {
+ prototype: FormData;
+ new(form?: HTMLFormElement): FormData;
+};
+
+interface FormDataEvent extends Event {
+ /** Returns a FormData object representing names and values of elements associated to the target form. Operations on the FormData object will affect form data to be submitted. */
+ readonly formData: FormData;
+}
+
+declare var FormDataEvent: {
+ prototype: FormDataEvent;
+ new(type: string, eventInitDict: FormDataEventInit): FormDataEvent;
+};
+
+/** A change in volume. It is an AudioNode audio-processing module that causes a given gain to be applied to the input data before its propagation to the output. A GainNode always has exactly one input and one output, both with the same number of channels. */
+interface GainNode extends AudioNode {
+ readonly gain: AudioParam;
+}
+
+declare var GainNode: {
+ prototype: GainNode;
+ new(context: BaseAudioContext, options?: GainOptions): GainNode;
+};
+
+/**
+ * This Gamepad API interface defines an individual gamepad or other controller, allowing access to information such as button presses, axis positions, and id.
+ * Available only in secure contexts.
+ */
+interface Gamepad {
+ readonly axes: ReadonlyArray<number>;
+ readonly buttons: ReadonlyArray<GamepadButton>;
+ readonly connected: boolean;
+ readonly hapticActuators: ReadonlyArray<GamepadHapticActuator>;
+ readonly id: string;
+ readonly index: number;
+ readonly mapping: GamepadMappingType;
+ readonly timestamp: DOMHighResTimeStamp;
+}
+
+declare var Gamepad: {
+ prototype: Gamepad;
+ new(): Gamepad;
+};
+
+/**
+ * An individual button of a gamepad or other controller, allowing access to the current state of different types of buttons available on the control device.
+ * Available only in secure contexts.
+ */
+interface GamepadButton {
+ readonly pressed: boolean;
+ readonly touched: boolean;
+ readonly value: number;
+}
+
+declare var GamepadButton: {
+ prototype: GamepadButton;
+ new(): GamepadButton;
+};
+
+/**
+ * This Gamepad API interface contains references to gamepads connected to the system, which is what the gamepad events Window.gamepadconnected and Window.gamepaddisconnected are fired in response to.
+ * Available only in secure contexts.
+ */
+interface GamepadEvent extends Event {
+ readonly gamepad: Gamepad;
+}
+
+declare var GamepadEvent: {
+ prototype: GamepadEvent;
+ new(type: string, eventInitDict: GamepadEventInit): GamepadEvent;
+};
+
+/** This Gamepad API interface represents hardware in the controller designed to provide haptic feedback to the user (if available), most commonly vibration hardware. */
+interface GamepadHapticActuator {
+ readonly type: GamepadHapticActuatorType;
+}
+
+declare var GamepadHapticActuator: {
+ prototype: GamepadHapticActuator;
+ new(): GamepadHapticActuator;
+};
+
+interface GenericTransformStream {
+ readonly readable: ReadableStream;
+ readonly writable: WritableStream;
+}
+
+/** An object able to programmatically obtain the position of the device. It gives Web content access to the location of the device. This allows a Web site or app to offer customized results based on the user's location. */
+interface Geolocation {
+ clearWatch(watchId: number): void;
+ getCurrentPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback | null, options?: PositionOptions): void;
+ watchPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback | null, options?: PositionOptions): number;
+}
+
+declare var Geolocation: {
+ prototype: Geolocation;
+ new(): Geolocation;
+};
+
+/** Available only in secure contexts. */
+interface GeolocationCoordinates {
+ readonly accuracy: number;
+ readonly altitude: number | null;
+ readonly altitudeAccuracy: number | null;
+ readonly heading: number | null;
+ readonly latitude: number;
+ readonly longitude: number;
+ readonly speed: number | null;
+}
+
+declare var GeolocationCoordinates: {
+ prototype: GeolocationCoordinates;
+ new(): GeolocationCoordinates;
+};
+
+/** Available only in secure contexts. */
+interface GeolocationPosition {
+ readonly coords: GeolocationCoordinates;
+ readonly timestamp: EpochTimeStamp;
+}
+
+declare var GeolocationPosition: {
+ prototype: GeolocationPosition;
+ new(): GeolocationPosition;
+};
+
+interface GeolocationPositionError {
+ readonly code: number;
+ readonly message: string;
+ readonly PERMISSION_DENIED: number;
+ readonly POSITION_UNAVAILABLE: number;
+ readonly TIMEOUT: number;
+}
+
+declare var GeolocationPositionError: {
+ prototype: GeolocationPositionError;
+ new(): GeolocationPositionError;
+ readonly PERMISSION_DENIED: number;
+ readonly POSITION_UNAVAILABLE: number;
+ readonly TIMEOUT: number;
+};
+
+interface GlobalEventHandlersEventMap {
+ "abort": UIEvent;
+ "animationcancel": AnimationEvent;
+ "animationend": AnimationEvent;
+ "animationiteration": AnimationEvent;
+ "animationstart": AnimationEvent;
+ "auxclick": MouseEvent;
+ "beforeinput": InputEvent;
+ "blur": FocusEvent;
+ "canplay": Event;
+ "canplaythrough": Event;
+ "change": Event;
+ "click": MouseEvent;
+ "close": Event;
+ "compositionend": CompositionEvent;
+ "compositionstart": CompositionEvent;
+ "compositionupdate": CompositionEvent;
+ "contextmenu": MouseEvent;
+ "cuechange": Event;
+ "dblclick": MouseEvent;
+ "drag": DragEvent;
+ "dragend": DragEvent;
+ "dragenter": DragEvent;
+ "dragleave": DragEvent;
+ "dragover": DragEvent;
+ "dragstart": DragEvent;
+ "drop": DragEvent;
+ "durationchange": Event;
+ "emptied": Event;
+ "ended": Event;
+ "error": ErrorEvent;
+ "focus": FocusEvent;
+ "focusin": FocusEvent;
+ "focusout": FocusEvent;
+ "formdata": FormDataEvent;
+ "gotpointercapture": PointerEvent;
+ "input": Event;
+ "invalid": Event;
+ "keydown": KeyboardEvent;
+ "keypress": KeyboardEvent;
+ "keyup": KeyboardEvent;
+ "load": Event;
+ "loadeddata": Event;
+ "loadedmetadata": Event;
+ "loadstart": Event;
+ "lostpointercapture": PointerEvent;
+ "mousedown": MouseEvent;
+ "mouseenter": MouseEvent;
+ "mouseleave": MouseEvent;
+ "mousemove": MouseEvent;
+ "mouseout": MouseEvent;
+ "mouseover": MouseEvent;
+ "mouseup": MouseEvent;
+ "pause": Event;
+ "play": Event;
+ "playing": Event;
+ "pointercancel": PointerEvent;
+ "pointerdown": PointerEvent;
+ "pointerenter": PointerEvent;
+ "pointerleave": PointerEvent;
+ "pointermove": PointerEvent;
+ "pointerout": PointerEvent;
+ "pointerover": PointerEvent;
+ "pointerup": PointerEvent;
+ "progress": ProgressEvent;
+ "ratechange": Event;
+ "reset": Event;
+ "resize": UIEvent;
+ "scroll": Event;
+ "securitypolicyviolation": SecurityPolicyViolationEvent;
+ "seeked": Event;
+ "seeking": Event;
+ "select": Event;
+ "selectionchange": Event;
+ "selectstart": Event;
+ "slotchange": Event;
+ "stalled": Event;
+ "submit": SubmitEvent;
+ "suspend": Event;
+ "timeupdate": Event;
+ "toggle": Event;
+ "touchcancel": TouchEvent;
+ "touchend": TouchEvent;
+ "touchmove": TouchEvent;
+ "touchstart": TouchEvent;
+ "transitioncancel": TransitionEvent;
+ "transitionend": TransitionEvent;
+ "transitionrun": TransitionEvent;
+ "transitionstart": TransitionEvent;
+ "volumechange": Event;
+ "waiting": Event;
+ "webkitanimationend": Event;
+ "webkitanimationiteration": Event;
+ "webkitanimationstart": Event;
+ "webkittransitionend": Event;
+ "wheel": WheelEvent;
+}
+
+interface GlobalEventHandlers {
+ /**
+ * Fires when the user aborts the download.
+ * @param ev The event.
+ */
+ onabort: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
+ onanimationcancel: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
+ onanimationend: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
+ onanimationiteration: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
+ onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
+ onauxclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
+ /**
+ * Fires when the object loses the input focus.
+ * @param ev The focus event.
+ */
+ onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
+ /**
+ * Occurs when playback is possible, but would require further buffering.
+ * @param ev The event.
+ */
+ oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ oncanplaythrough: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Fires when the contents of the object or selection have changed.
+ * @param ev The event.
+ */
+ onchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Fires when the user clicks the left mouse button on the object
+ * @param ev The mouse event.
+ */
+ onclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
+ onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Fires when the user clicks the right mouse button in the client area, opening the context menu.
+ * @param ev The mouse event.
+ */
+ oncontextmenu: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
+ oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Fires when the user double-clicks the object.
+ * @param ev The mouse event.
+ */
+ ondblclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
+ /**
+ * Fires on the source object continuously during a drag operation.
+ * @param ev The event.
+ */
+ ondrag: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
+ /**
+ * Fires on the source object when the user releases the mouse at the close of a drag operation.
+ * @param ev The event.
+ */
+ ondragend: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
+ /**
+ * Fires on the target element when the user drags the object to a valid drop target.
+ * @param ev The drag event.
+ */
+ ondragenter: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
+ /**
+ * Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation.
+ * @param ev The drag event.
+ */
+ ondragleave: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
+ /**
+ * Fires on the target element continuously while the user drags the object over a valid drop target.
+ * @param ev The event.
+ */
+ ondragover: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
+ /**
+ * Fires on the source object when the user starts to drag a text selection or selected object.
+ * @param ev The event.
+ */
+ ondragstart: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
+ ondrop: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
+ /**
+ * Occurs when the duration attribute is updated.
+ * @param ev The event.
+ */
+ ondurationchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Occurs when the media element is reset to its initial state.
+ * @param ev The event.
+ */
+ onemptied: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Occurs when the end of playback is reached.
+ * @param ev The event
+ */
+ onended: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Fires when an error occurs during object loading.
+ * @param ev The event.
+ */
+ onerror: OnErrorEventHandler;
+ /**
+ * Fires when the object receives focus.
+ * @param ev The event.
+ */
+ onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
+ onformdata: ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null;
+ ongotpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
+ oninput: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ oninvalid: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Fires when the user presses a key.
+ * @param ev The keyboard event
+ */
+ onkeydown: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
+ /**
+ * Fires when the user presses an alphanumeric key.
+ * @param ev The event.
+ * @deprecated
+ */
+ onkeypress: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
+ /**
+ * Fires when the user releases a key.
+ * @param ev The keyboard event
+ */
+ onkeyup: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
+ /**
+ * Fires immediately after the browser loads the object.
+ * @param ev The event.
+ */
+ onload: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Occurs when media data is loaded at the current playback position.
+ * @param ev The event.
+ */
+ onloadeddata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Occurs when the duration and dimensions of the media have been determined.
+ * @param ev The event.
+ */
+ onloadedmetadata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Occurs when Internet Explorer begins looking for media data.
+ * @param ev The event.
+ */
+ onloadstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ onlostpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
+ /**
+ * Fires when the user clicks the object with either mouse button.
+ * @param ev The mouse event.
+ */
+ onmousedown: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
+ onmouseenter: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
+ onmouseleave: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
+ /**
+ * Fires when the user moves the mouse over the object.
+ * @param ev The mouse event.
+ */
+ onmousemove: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
+ /**
+ * Fires when the user moves the mouse pointer outside the boundaries of the object.
+ * @param ev The mouse event.
+ */
+ onmouseout: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
+ /**
+ * Fires when the user moves the mouse pointer into the object.
+ * @param ev The mouse event.
+ */
+ onmouseover: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
+ /**
+ * Fires when the user releases a mouse button while the mouse is over the object.
+ * @param ev The mouse event.
+ */
+ onmouseup: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
+ /**
+ * Occurs when playback is paused.
+ * @param ev The event.
+ */
+ onpause: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Occurs when the play method is requested.
+ * @param ev The event.
+ */
+ onplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Occurs when the audio or video has started playing.
+ * @param ev The event.
+ */
+ onplaying: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ onpointercancel: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
+ onpointerdown: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
+ onpointerenter: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
+ onpointerleave: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
+ onpointermove: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
+ onpointerout: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
+ onpointerover: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
+ onpointerup: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
+ /**
+ * Occurs to indicate progress while downloading media data.
+ * @param ev The event.
+ */
+ onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent) => any) | null;
+ /**
+ * Occurs when the playback rate is increased or decreased.
+ * @param ev The event.
+ */
+ onratechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Fires when the user resets a form.
+ * @param ev The event.
+ */
+ onreset: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ onresize: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
+ /**
+ * Fires when the user repositions the scroll box in the scroll bar on the object.
+ * @param ev The event.
+ */
+ onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ onsecuritypolicyviolation: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null;
+ /**
+ * Occurs when the seek operation ends.
+ * @param ev The event.
+ */
+ onseeked: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Occurs when the current playback position is moved.
+ * @param ev The event.
+ */
+ onseeking: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Fires when the current selection changes.
+ * @param ev The event.
+ */
+ onselect: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ onselectionchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ onselectstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ onslotchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Occurs when the download has stopped.
+ * @param ev The event.
+ */
+ onstalled: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ onsubmit: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;
+ /**
+ * Occurs if the load operation has been intentionally halted.
+ * @param ev The event.
+ */
+ onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Occurs to indicate the current playback position.
+ * @param ev The event.
+ */
+ ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ ontoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
+ ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
+ ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
+ ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
+ ontransitioncancel: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
+ ontransitionend: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
+ ontransitionrun: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
+ ontransitionstart: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
+ /**
+ * Occurs when the volume is changed, or playback is muted or unmuted.
+ * @param ev The event.
+ */
+ onvolumechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Occurs when playback stops because the next frame of a video resource is not available.
+ * @param ev The event.
+ */
+ onwaiting: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /** @deprecated This is a legacy alias of `onanimationend`. */
+ onwebkitanimationend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /** @deprecated This is a legacy alias of `onanimationiteration`. */
+ onwebkitanimationiteration: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /** @deprecated This is a legacy alias of `onanimationstart`. */
+ onwebkitanimationstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /** @deprecated This is a legacy alias of `ontransitionend`. */
+ onwebkittransitionend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ onwheel: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null;
+ addEventListener<K extends keyof GlobalEventHandlersEventMap>(type: K, listener: (this: GlobalEventHandlers, ev: GlobalEventHandlersEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof GlobalEventHandlersEventMap>(type: K, listener: (this: GlobalEventHandlers, ev: GlobalEventHandlersEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+interface HTMLAllCollection {
+ /** Returns the number of elements in the collection. */
+ readonly length: number;
+ /** Returns the item with index index from the collection (determined by tree order). */
+ item(nameOrIndex?: string): HTMLCollection | Element | null;
+ /**
+ * Returns the item with ID or name name from the collection.
+ *
+ * If there are multiple matching items, then an HTMLCollection object containing all those elements is returned.
+ *
+ * Only button, form, iframe, input, map, meta, object, select, and textarea elements can have a name for the purpose of this method; their name is given by the value of their name attribute.
+ */
+ namedItem(name: string): HTMLCollection | Element | null;
+ [index: number]: Element;
+}
+
+declare var HTMLAllCollection: {
+ prototype: HTMLAllCollection;
+ new(): HTMLAllCollection;
+};
+
+/** Hyperlink elements and provides special properties and methods (beyond those of the regular HTMLElement object interface that they inherit from) for manipulating the layout and presentation of such elements. */
+interface HTMLAnchorElement extends HTMLElement, HTMLHyperlinkElementUtils {
+ /**
+ * Sets or retrieves the character set used to encode the object.
+ * @deprecated
+ */
+ charset: string;
+ /**
+ * Sets or retrieves the coordinates of the object.
+ * @deprecated
+ */
+ coords: string;
+ download: string;
+ /** Sets or retrieves the language code of the object. */
+ hreflang: string;
+ /**
+ * Sets or retrieves the shape of the object.
+ * @deprecated
+ */
+ name: string;
+ ping: string;
+ referrerPolicy: string;
+ /** Sets or retrieves the relationship between the object and the destination of the link. */
+ rel: string;
+ readonly relList: DOMTokenList;
+ /**
+ * Sets or retrieves the relationship between the object and the destination of the link.
+ * @deprecated
+ */
+ rev: string;
+ /**
+ * Sets or retrieves the shape of the object.
+ * @deprecated
+ */
+ shape: string;
+ /** Sets or retrieves the window or frame at which to target content. */
+ target: string;
+ /** Retrieves or sets the text of the object as a string. */
+ text: string;
+ type: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLAnchorElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLAnchorElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLAnchorElement: {
+ prototype: HTMLAnchorElement;
+ new(): HTMLAnchorElement;
+};
+
+/** Provides special properties and methods (beyond those of the regular object HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of <area> elements. */
+interface HTMLAreaElement extends HTMLElement, HTMLHyperlinkElementUtils {
+ /** Sets or retrieves a text alternative to the graphic. */
+ alt: string;
+ /** Sets or retrieves the coordinates of the object. */
+ coords: string;
+ download: string;
+ /**
+ * Sets or gets whether clicks in this region cause action.
+ * @deprecated
+ */
+ noHref: boolean;
+ ping: string;
+ referrerPolicy: string;
+ rel: string;
+ readonly relList: DOMTokenList;
+ /** Sets or retrieves the shape of the object. */
+ shape: string;
+ /** Sets or retrieves the window or frame at which to target content. */
+ target: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLAreaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLAreaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLAreaElement: {
+ prototype: HTMLAreaElement;
+ new(): HTMLAreaElement;
+};
+
+/** Provides access to the properties of <audio> elements, as well as methods to manipulate them. It derives from the HTMLMediaElement interface. */
+interface HTMLAudioElement extends HTMLMediaElement {
+ addEventListener<K extends keyof HTMLMediaElementEventMap>(type: K, listener: (this: HTMLAudioElement, ev: HTMLMediaElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLMediaElementEventMap>(type: K, listener: (this: HTMLAudioElement, ev: HTMLMediaElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLAudioElement: {
+ prototype: HTMLAudioElement;
+ new(): HTMLAudioElement;
+};
+
+/** A HTML line break element (<br>). It inherits from HTMLElement. */
+interface HTMLBRElement extends HTMLElement {
+ /**
+ * Sets or retrieves the side on which floating objects are not to be positioned when any IHTMLBlockElement is inserted into the document.
+ * @deprecated
+ */
+ clear: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLBRElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLBRElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLBRElement: {
+ prototype: HTMLBRElement;
+ new(): HTMLBRElement;
+};
+
+/** Contains the base URI for a document. This object inherits all of the properties and methods as described in the HTMLElement interface. */
+interface HTMLBaseElement extends HTMLElement {
+ /** Gets or sets the baseline URL on which relative links are based. */
+ href: string;
+ /** Sets or retrieves the window or frame at which to target content. */
+ target: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLBaseElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLBaseElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLBaseElement: {
+ prototype: HTMLBaseElement;
+ new(): HTMLBaseElement;
+};
+
+interface HTMLBodyElementEventMap extends HTMLElementEventMap, WindowEventHandlersEventMap {
+}
+
+/** Provides special properties (beyond those inherited from the regular HTMLElement interface) for manipulating <body> elements. */
+interface HTMLBodyElement extends HTMLElement, WindowEventHandlers {
+ /** @deprecated */
+ aLink: string;
+ /** @deprecated */
+ background: string;
+ /** @deprecated */
+ bgColor: string;
+ /** @deprecated */
+ link: string;
+ /** @deprecated */
+ text: string;
+ /** @deprecated */
+ vLink: string;
+ addEventListener<K extends keyof HTMLBodyElementEventMap>(type: K, listener: (this: HTMLBodyElement, ev: HTMLBodyElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLBodyElementEventMap>(type: K, listener: (this: HTMLBodyElement, ev: HTMLBodyElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLBodyElement: {
+ prototype: HTMLBodyElement;
+ new(): HTMLBodyElement;
+};
+
+/** Provides properties and methods (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating <button> elements. */
+interface HTMLButtonElement extends HTMLElement {
+ disabled: boolean;
+ /** Retrieves a reference to the form that the object is embedded in. */
+ readonly form: HTMLFormElement | null;
+ /** Overrides the action attribute (where the data on a form is sent) on the parent form element. */
+ formAction: string;
+ /** Used to override the encoding (formEnctype attribute) specified on the form element. */
+ formEnctype: string;
+ /** Overrides the submit method attribute previously specified on a form element. */
+ formMethod: string;
+ /** Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a "save draft"-type submit option. */
+ formNoValidate: boolean;
+ /** Overrides the target attribute on a form element. */
+ formTarget: string;
+ readonly labels: NodeListOf<HTMLLabelElement>;
+ /** Sets or retrieves the name of the object. */
+ name: string;
+ /** Gets the classification and default behavior of the button. */
+ type: string;
+ /** Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting. */
+ readonly validationMessage: string;
+ /** Returns a ValidityState object that represents the validity states of an element. */
+ readonly validity: ValidityState;
+ /** Sets or retrieves the default or selected value of the control. */
+ value: string;
+ /** Returns whether an element will successfully validate based on forms validation rules and constraints. */
+ readonly willValidate: boolean;
+ /** Returns whether a form will validate when it is submitted, without having to submit it. */
+ checkValidity(): boolean;
+ reportValidity(): boolean;
+ /**
+ * Sets a custom error message that is displayed when a form is submitted.
+ * @param error Sets a custom error message that is displayed when a form is submitted.
+ */
+ setCustomValidity(error: string): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLButtonElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLButtonElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLButtonElement: {
+ prototype: HTMLButtonElement;
+ new(): HTMLButtonElement;
+};
+
+/** Provides properties and methods for manipulating the layout and presentation of <canvas> elements. The HTMLCanvasElement interface also inherits the properties and methods of the HTMLElement interface. */
+interface HTMLCanvasElement extends HTMLElement {
+ /** Gets or sets the height of a canvas element on a document. */
+ height: number;
+ /** Gets or sets the width of a canvas element on a document. */
+ width: number;
+ captureStream(frameRequestRate?: number): MediaStream;
+ /**
+ * Returns an object that provides methods and properties for drawing and manipulating images and graphics on a canvas element in a document. A context object includes information about colors, line widths, fonts, and other graphic parameters that can be drawn on a canvas.
+ * @param contextId The identifier (ID) of the type of canvas to create. Internet Explorer 9 and Internet Explorer 10 support only a 2-D context using canvas.getContext("2d"); IE11 Preview also supports 3-D or WebGL context using canvas.getContext("experimental-webgl");
+ */
+ getContext(contextId: "2d", options?: CanvasRenderingContext2DSettings): CanvasRenderingContext2D | null;
+ getContext(contextId: "bitmaprenderer", options?: ImageBitmapRenderingContextSettings): ImageBitmapRenderingContext | null;
+ getContext(contextId: "webgl", options?: WebGLContextAttributes): WebGLRenderingContext | null;
+ getContext(contextId: "webgl2", options?: WebGLContextAttributes): WebGL2RenderingContext | null;
+ getContext(contextId: string, options?: any): RenderingContext | null;
+ toBlob(callback: BlobCallback, type?: string, quality?: any): void;
+ /**
+ * Returns the content of the current canvas as an image that you can use as a source for another canvas or an HTML element.
+ * @param type The standard MIME type for the image format to return. If you do not specify this parameter, the default value is a PNG format image.
+ */
+ toDataURL(type?: string, quality?: any): string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLCanvasElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLCanvasElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLCanvasElement: {
+ prototype: HTMLCanvasElement;
+ new(): HTMLCanvasElement;
+};
+
+/** A generic collection (array-like object similar to arguments) of elements (in document order) and offers methods and properties for selecting from the list. */
+interface HTMLCollectionBase {
+ /** Sets or retrieves the number of objects in a collection. */
+ readonly length: number;
+ /** Retrieves an object from various collections. */
+ item(index: number): Element | null;
+ [index: number]: Element;
+}
+
+interface HTMLCollection extends HTMLCollectionBase {
+ /** Retrieves a select object or an object from an options collection. */
+ namedItem(name: string): Element | null;
+}
+
+declare var HTMLCollection: {
+ prototype: HTMLCollection;
+ new(): HTMLCollection;
+};
+
+interface HTMLCollectionOf<T extends Element> extends HTMLCollectionBase {
+ item(index: number): T | null;
+ namedItem(name: string): T | null;
+ [index: number]: T;
+}
+
+/** Provides special properties (beyond those of the regular HTMLElement interface it also has available to it by inheritance) for manipulating definition list (<dl>) elements. */
+interface HTMLDListElement extends HTMLElement {
+ /** @deprecated */
+ compact: boolean;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDListElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDListElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLDListElement: {
+ prototype: HTMLDListElement;
+ new(): HTMLDListElement;
+};
+
+/** Provides special properties (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating <data> elements. */
+interface HTMLDataElement extends HTMLElement {
+ value: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDataElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDataElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLDataElement: {
+ prototype: HTMLDataElement;
+ new(): HTMLDataElement;
+};
+
+/** Provides special properties (beyond the HTMLElement object interface it also has available to it by inheritance) to manipulate <datalist> elements and their content. */
+interface HTMLDataListElement extends HTMLElement {
+ /** Returns an HTMLCollection of the option elements of the datalist element. */
+ readonly options: HTMLCollectionOf<HTMLOptionElement>;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDataListElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDataListElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLDataListElement: {
+ prototype: HTMLDataListElement;
+ new(): HTMLDataListElement;
+};
+
+interface HTMLDetailsElement extends HTMLElement {
+ open: boolean;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDetailsElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDetailsElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLDetailsElement: {
+ prototype: HTMLDetailsElement;
+ new(): HTMLDetailsElement;
+};
+
+interface HTMLDialogElement extends HTMLElement {
+ open: boolean;
+ returnValue: string;
+ /**
+ * Closes the dialog element.
+ *
+ * The argument, if provided, provides a return value.
+ */
+ close(returnValue?: string): void;
+ /** Displays the dialog element. */
+ show(): void;
+ showModal(): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDialogElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDialogElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLDialogElement: {
+ prototype: HTMLDialogElement;
+ new(): HTMLDialogElement;
+};
+
+/** @deprecated */
+interface HTMLDirectoryElement extends HTMLElement {
+ /** @deprecated */
+ compact: boolean;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDirectoryElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDirectoryElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+/** @deprecated */
+declare var HTMLDirectoryElement: {
+ prototype: HTMLDirectoryElement;
+ new(): HTMLDirectoryElement;
+};
+
+/** Provides special properties (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating <div> elements. */
+interface HTMLDivElement extends HTMLElement {
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ * @deprecated
+ */
+ align: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDivElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDivElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLDivElement: {
+ prototype: HTMLDivElement;
+ new(): HTMLDivElement;
+};
+
+/** @deprecated use Document */
+interface HTMLDocument extends Document {
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: HTMLDocument, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: HTMLDocument, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+/** @deprecated */
+declare var HTMLDocument: {
+ prototype: HTMLDocument;
+ new(): HTMLDocument;
+};
+
+interface HTMLElementEventMap extends ElementEventMap, DocumentAndElementEventHandlersEventMap, GlobalEventHandlersEventMap {
+}
+
+/** Any HTML element. Some elements directly implement this interface, while others implement it via an interface that inherits it. */
+interface HTMLElement extends Element, DocumentAndElementEventHandlers, ElementCSSInlineStyle, ElementContentEditable, GlobalEventHandlers, HTMLOrSVGElement {
+ accessKey: string;
+ readonly accessKeyLabel: string;
+ autocapitalize: string;
+ dir: string;
+ draggable: boolean;
+ hidden: boolean;
+ inert: boolean;
+ innerText: string;
+ lang: string;
+ readonly offsetHeight: number;
+ readonly offsetLeft: number;
+ readonly offsetParent: Element | null;
+ readonly offsetTop: number;
+ readonly offsetWidth: number;
+ outerText: string;
+ spellcheck: boolean;
+ title: string;
+ translate: boolean;
+ attachInternals(): ElementInternals;
+ click(): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLElement: {
+ prototype: HTMLElement;
+ new(): HTMLElement;
+};
+
+/** Provides special properties (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating <embed> elements. */
+interface HTMLEmbedElement extends HTMLElement {
+ /** @deprecated */
+ align: string;
+ /** Sets or retrieves the height of the object. */
+ height: string;
+ /**
+ * Sets or retrieves the name of the object.
+ * @deprecated
+ */
+ name: string;
+ /** Sets or retrieves a URL to be loaded by the object. */
+ src: string;
+ type: string;
+ /** Sets or retrieves the width of the object. */
+ width: string;
+ getSVGDocument(): Document | null;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLEmbedElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLEmbedElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLEmbedElement: {
+ prototype: HTMLEmbedElement;
+ new(): HTMLEmbedElement;
+};
+
+/** Provides special properties and methods (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of <fieldset> elements. */
+interface HTMLFieldSetElement extends HTMLElement {
+ disabled: boolean;
+ /** Returns an HTMLCollection of the form controls in the element. */
+ readonly elements: HTMLCollection;
+ /** Retrieves a reference to the form that the object is embedded in. */
+ readonly form: HTMLFormElement | null;
+ name: string;
+ /** Returns the string "fieldset". */
+ readonly type: string;
+ /** Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting. */
+ readonly validationMessage: string;
+ /** Returns a ValidityState object that represents the validity states of an element. */
+ readonly validity: ValidityState;
+ /** Returns whether an element will successfully validate based on forms validation rules and constraints. */
+ readonly willValidate: boolean;
+ /** Returns whether a form will validate when it is submitted, without having to submit it. */
+ checkValidity(): boolean;
+ reportValidity(): boolean;
+ /**
+ * Sets a custom error message that is displayed when a form is submitted.
+ * @param error Sets a custom error message that is displayed when a form is submitted.
+ */
+ setCustomValidity(error: string): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLFieldSetElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLFieldSetElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLFieldSetElement: {
+ prototype: HTMLFieldSetElement;
+ new(): HTMLFieldSetElement;
+};
+
+/**
+ * Implements the document object model (DOM) representation of the font element. The HTML Font Element <font> defines the font size, font face and color of text.
+ * @deprecated
+ */
+interface HTMLFontElement extends HTMLElement {
+ /** @deprecated */
+ color: string;
+ /**
+ * Sets or retrieves the current typeface family.
+ * @deprecated
+ */
+ face: string;
+ /** @deprecated */
+ size: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLFontElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLFontElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+/** @deprecated */
+declare var HTMLFontElement: {
+ prototype: HTMLFontElement;
+ new(): HTMLFontElement;
+};
+
+/** A collection of HTML form control elements. */
+interface HTMLFormControlsCollection extends HTMLCollectionBase {
+ /**
+ * Returns the item with ID or name name from the collection.
+ *
+ * If there are multiple matching items, then a RadioNodeList object containing all those elements is returned.
+ */
+ namedItem(name: string): RadioNodeList | Element | null;
+}
+
+declare var HTMLFormControlsCollection: {
+ prototype: HTMLFormControlsCollection;
+ new(): HTMLFormControlsCollection;
+};
+
+/** A <form> element in the DOM; it allows access to and in some cases modification of aspects of the form, as well as access to its component elements. */
+interface HTMLFormElement extends HTMLElement {
+ /** Sets or retrieves a list of character encodings for input data that must be accepted by the server processing the form. */
+ acceptCharset: string;
+ /** Sets or retrieves the URL to which the form content is sent for processing. */
+ action: string;
+ /** Specifies whether autocomplete is applied to an editable text field. */
+ autocomplete: string;
+ /** Retrieves a collection, in source order, of all controls in a given form. */
+ readonly elements: HTMLFormControlsCollection;
+ /** Sets or retrieves the MIME encoding for the form. */
+ encoding: string;
+ /** Sets or retrieves the encoding type for the form. */
+ enctype: string;
+ /** Sets or retrieves the number of objects in a collection. */
+ readonly length: number;
+ /** Sets or retrieves how to send the form data to the server. */
+ method: string;
+ /** Sets or retrieves the name of the object. */
+ name: string;
+ /** Designates a form that is not validated when submitted. */
+ noValidate: boolean;
+ /** Sets or retrieves the window or frame at which to target content. */
+ target: string;
+ /** Returns whether a form will validate when it is submitted, without having to submit it. */
+ checkValidity(): boolean;
+ reportValidity(): boolean;
+ requestSubmit(submitter?: HTMLElement | null): void;
+ /** Fires when the user resets a form. */
+ reset(): void;
+ /** Fires when a FORM is about to be submitted. */
+ submit(): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLFormElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLFormElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+ [index: number]: Element;
+ [name: string]: any;
+}
+
+declare var HTMLFormElement: {
+ prototype: HTMLFormElement;
+ new(): HTMLFormElement;
+};
+
+/** @deprecated */
+interface HTMLFrameElement extends HTMLElement {
+ /**
+ * Retrieves the document object of the page or frame.
+ * @deprecated
+ */
+ readonly contentDocument: Document | null;
+ /**
+ * Retrieves the object of the specified.
+ * @deprecated
+ */
+ readonly contentWindow: WindowProxy | null;
+ /**
+ * Sets or retrieves whether to display a border for the frame.
+ * @deprecated
+ */
+ frameBorder: string;
+ /**
+ * Sets or retrieves a URI to a long description of the object.
+ * @deprecated
+ */
+ longDesc: string;
+ /**
+ * Sets or retrieves the top and bottom margin heights before displaying the text in a frame.
+ * @deprecated
+ */
+ marginHeight: string;
+ /**
+ * Sets or retrieves the left and right margin widths before displaying the text in a frame.
+ * @deprecated
+ */
+ marginWidth: string;
+ /**
+ * Sets or retrieves the frame name.
+ * @deprecated
+ */
+ name: string;
+ /**
+ * Sets or retrieves whether the user can resize the frame.
+ * @deprecated
+ */
+ noResize: boolean;
+ /**
+ * Sets or retrieves whether the frame can be scrolled.
+ * @deprecated
+ */
+ scrolling: string;
+ /**
+ * Sets or retrieves a URL to be loaded by the object.
+ * @deprecated
+ */
+ src: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLFrameElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLFrameElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+/** @deprecated */
+declare var HTMLFrameElement: {
+ prototype: HTMLFrameElement;
+ new(): HTMLFrameElement;
+};
+
+interface HTMLFrameSetElementEventMap extends HTMLElementEventMap, WindowEventHandlersEventMap {
+}
+
+/**
+ * Provides special properties (beyond those of the regular HTMLElement interface they also inherit) for manipulating <frameset> elements.
+ * @deprecated
+ */
+interface HTMLFrameSetElement extends HTMLElement, WindowEventHandlers {
+ /**
+ * Sets or retrieves the frame widths of the object.
+ * @deprecated
+ */
+ cols: string;
+ /**
+ * Sets or retrieves the frame heights of the object.
+ * @deprecated
+ */
+ rows: string;
+ addEventListener<K extends keyof HTMLFrameSetElementEventMap>(type: K, listener: (this: HTMLFrameSetElement, ev: HTMLFrameSetElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLFrameSetElementEventMap>(type: K, listener: (this: HTMLFrameSetElement, ev: HTMLFrameSetElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+/** @deprecated */
+declare var HTMLFrameSetElement: {
+ prototype: HTMLFrameSetElement;
+ new(): HTMLFrameSetElement;
+};
+
+/** Provides special properties (beyond those of the HTMLElement interface it also has available to it by inheritance) for manipulating <hr> elements. */
+interface HTMLHRElement extends HTMLElement {
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ * @deprecated
+ */
+ align: string;
+ /** @deprecated */
+ color: string;
+ /**
+ * Sets or retrieves whether the horizontal rule is drawn with 3-D shading.
+ * @deprecated
+ */
+ noShade: boolean;
+ /** @deprecated */
+ size: string;
+ /**
+ * Sets or retrieves the width of the object.
+ * @deprecated
+ */
+ width: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLHRElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLHRElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLHRElement: {
+ prototype: HTMLHRElement;
+ new(): HTMLHRElement;
+};
+
+/** Contains the descriptive information, or metadata, for a document. This object inherits all of the properties and methods described in the HTMLElement interface. */
+interface HTMLHeadElement extends HTMLElement {
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLHeadElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLHeadElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLHeadElement: {
+ prototype: HTMLHeadElement;
+ new(): HTMLHeadElement;
+};
+
+/** The different heading elements. It inherits methods and properties from the HTMLElement interface. */
+interface HTMLHeadingElement extends HTMLElement {
+ /**
+ * Sets or retrieves a value that indicates the table alignment.
+ * @deprecated
+ */
+ align: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLHeadingElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLHeadingElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLHeadingElement: {
+ prototype: HTMLHeadingElement;
+ new(): HTMLHeadingElement;
+};
+
+/** Serves as the root node for a given HTML document. This object inherits the properties and methods described in the HTMLElement interface. */
+interface HTMLHtmlElement extends HTMLElement {
+ /**
+ * Sets or retrieves the DTD version that governs the current document.
+ * @deprecated
+ */
+ version: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLHtmlElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLHtmlElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLHtmlElement: {
+ prototype: HTMLHtmlElement;
+ new(): HTMLHtmlElement;
+};
+
+interface HTMLHyperlinkElementUtils {
+ /**
+ * Returns the hyperlink's URL's fragment (includes leading "#" if non-empty).
+ *
+ * Can be set, to change the URL's fragment (ignores leading "#").
+ */
+ hash: string;
+ /**
+ * Returns the hyperlink's URL's host and port (if different from the default port for the scheme).
+ *
+ * Can be set, to change the URL's host and port.
+ */
+ host: string;
+ /**
+ * Returns the hyperlink's URL's host.
+ *
+ * Can be set, to change the URL's host.
+ */
+ hostname: string;
+ /**
+ * Returns the hyperlink's URL.
+ *
+ * Can be set, to change the URL.
+ */
+ href: string;
+ toString(): string;
+ /** Returns the hyperlink's URL's origin. */
+ readonly origin: string;
+ /**
+ * Returns the hyperlink's URL's password.
+ *
+ * Can be set, to change the URL's password.
+ */
+ password: string;
+ /**
+ * Returns the hyperlink's URL's path.
+ *
+ * Can be set, to change the URL's path.
+ */
+ pathname: string;
+ /**
+ * Returns the hyperlink's URL's port.
+ *
+ * Can be set, to change the URL's port.
+ */
+ port: string;
+ /**
+ * Returns the hyperlink's URL's scheme.
+ *
+ * Can be set, to change the URL's scheme.
+ */
+ protocol: string;
+ /**
+ * Returns the hyperlink's URL's query (includes leading "?" if non-empty).
+ *
+ * Can be set, to change the URL's query (ignores leading "?").
+ */
+ search: string;
+ /**
+ * Returns the hyperlink's URL's username.
+ *
+ * Can be set, to change the URL's username.
+ */
+ username: string;
+}
+
+/** Provides special properties and methods (beyond those of the HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of inline frame elements. */
+interface HTMLIFrameElement extends HTMLElement {
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ * @deprecated
+ */
+ align: string;
+ allow: string;
+ allowFullscreen: boolean;
+ /** Retrieves the document object of the page or frame. */
+ readonly contentDocument: Document | null;
+ /** Retrieves the object of the specified. */
+ readonly contentWindow: WindowProxy | null;
+ /**
+ * Sets or retrieves whether to display a border for the frame.
+ * @deprecated
+ */
+ frameBorder: string;
+ /** Sets or retrieves the height of the object. */
+ height: string;
+ /**
+ * Sets or retrieves a URI to a long description of the object.
+ * @deprecated
+ */
+ longDesc: string;
+ /**
+ * Sets or retrieves the top and bottom margin heights before displaying the text in a frame.
+ * @deprecated
+ */
+ marginHeight: string;
+ /**
+ * Sets or retrieves the left and right margin widths before displaying the text in a frame.
+ * @deprecated
+ */
+ marginWidth: string;
+ /** Sets or retrieves the frame name. */
+ name: string;
+ referrerPolicy: ReferrerPolicy;
+ readonly sandbox: DOMTokenList;
+ /**
+ * Sets or retrieves whether the frame can be scrolled.
+ * @deprecated
+ */
+ scrolling: string;
+ /** Sets or retrieves a URL to be loaded by the object. */
+ src: string;
+ /** Sets or retrives the content of the page that is to contain. */
+ srcdoc: string;
+ /** Sets or retrieves the width of the object. */
+ width: string;
+ getSVGDocument(): Document | null;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLIFrameElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLIFrameElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLIFrameElement: {
+ prototype: HTMLIFrameElement;
+ new(): HTMLIFrameElement;
+};
+
+/** Provides special properties and methods for manipulating <img> elements. */
+interface HTMLImageElement extends HTMLElement {
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ * @deprecated
+ */
+ align: string;
+ /** Sets or retrieves a text alternative to the graphic. */
+ alt: string;
+ /**
+ * Specifies the properties of a border drawn around an object.
+ * @deprecated
+ */
+ border: string;
+ /** Retrieves whether the object is fully loaded. */
+ readonly complete: boolean;
+ crossOrigin: string | null;
+ readonly currentSrc: string;
+ decoding: "async" | "sync" | "auto";
+ /** Sets or retrieves the height of the object. */
+ height: number;
+ /**
+ * Sets or retrieves the width of the border to draw around the object.
+ * @deprecated
+ */
+ hspace: number;
+ /** Sets or retrieves whether the image is a server-side image map. */
+ isMap: boolean;
+ /** Sets or retrieves the policy for loading image elements that are outside the viewport. */
+ loading: "eager" | "lazy";
+ /**
+ * Sets or retrieves a Uniform Resource Identifier (URI) to a long description of the object.
+ * @deprecated
+ */
+ longDesc: string;
+ /** @deprecated */
+ lowsrc: string;
+ /**
+ * Sets or retrieves the name of the object.
+ * @deprecated
+ */
+ name: string;
+ /** The original height of the image resource before sizing. */
+ readonly naturalHeight: number;
+ /** The original width of the image resource before sizing. */
+ readonly naturalWidth: number;
+ referrerPolicy: string;
+ sizes: string;
+ /** The address or URL of the a media resource that is to be considered. */
+ src: string;
+ srcset: string;
+ /** Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map. */
+ useMap: string;
+ /**
+ * Sets or retrieves the vertical margin for the object.
+ * @deprecated
+ */
+ vspace: number;
+ /** Sets or retrieves the width of the object. */
+ width: number;
+ readonly x: number;
+ readonly y: number;
+ decode(): Promise<void>;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLImageElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLImageElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLImageElement: {
+ prototype: HTMLImageElement;
+ new(): HTMLImageElement;
+};
+
+/** Provides special properties and methods for manipulating the options, layout, and presentation of <input> elements. */
+interface HTMLInputElement extends HTMLElement {
+ /** Sets or retrieves a comma-separated list of content types. */
+ accept: string;
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ * @deprecated
+ */
+ align: string;
+ /** Sets or retrieves a text alternative to the graphic. */
+ alt: string;
+ /** Specifies whether autocomplete is applied to an editable text field. */
+ autocomplete: string;
+ capture: string;
+ /** Sets or retrieves the state of the check box or radio button. */
+ checked: boolean;
+ /** Sets or retrieves the state of the check box or radio button. */
+ defaultChecked: boolean;
+ /** Sets or retrieves the initial contents of the object. */
+ defaultValue: string;
+ dirName: string;
+ disabled: boolean;
+ /** Returns a FileList object on a file type input object. */
+ files: FileList | null;
+ /** Retrieves a reference to the form that the object is embedded in. */
+ readonly form: HTMLFormElement | null;
+ /** Overrides the action attribute (where the data on a form is sent) on the parent form element. */
+ formAction: string;
+ /** Used to override the encoding (formEnctype attribute) specified on the form element. */
+ formEnctype: string;
+ /** Overrides the submit method attribute previously specified on a form element. */
+ formMethod: string;
+ /** Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a "save draft"-type submit option. */
+ formNoValidate: boolean;
+ /** Overrides the target attribute on a form element. */
+ formTarget: string;
+ /** Sets or retrieves the height of the object. */
+ height: number;
+ /** When set, overrides the rendering of checkbox controls so that the current value is not visible. */
+ indeterminate: boolean;
+ readonly labels: NodeListOf<HTMLLabelElement> | null;
+ /** Specifies the ID of a pre-defined datalist of options for an input element. */
+ readonly list: HTMLElement | null;
+ /** Defines the maximum acceptable value for an input element with type="number".When used with the min and step attributes, lets you control the range and increment (such as only even numbers) that the user can enter into an input field. */
+ max: string;
+ /** Sets or retrieves the maximum number of characters that the user can enter in a text control. */
+ maxLength: number;
+ /** Defines the minimum acceptable value for an input element with type="number". When used with the max and step attributes, lets you control the range and increment (such as even numbers only) that the user can enter into an input field. */
+ min: string;
+ minLength: number;
+ /** Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list. */
+ multiple: boolean;
+ /** Sets or retrieves the name of the object. */
+ name: string;
+ /** Gets or sets a string containing a regular expression that the user's input must match. */
+ pattern: string;
+ /** Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field. */
+ placeholder: string;
+ readOnly: boolean;
+ /** When present, marks an element that can't be submitted without a value. */
+ required: boolean;
+ selectionDirection: "forward" | "backward" | "none" | null;
+ /** Gets or sets the end position or offset of a text selection. */
+ selectionEnd: number | null;
+ /** Gets or sets the starting position or offset of a text selection. */
+ selectionStart: number | null;
+ size: number;
+ /** The address or URL of the a media resource that is to be considered. */
+ src: string;
+ /** Defines an increment or jump between values that you want to allow the user to enter. When used with the max and min attributes, lets you control the range and increment (for example, allow only even numbers) that the user can enter into an input field. */
+ step: string;
+ /** Returns the content type of the object. */
+ type: string;
+ /**
+ * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
+ * @deprecated
+ */
+ useMap: string;
+ /** Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting. */
+ readonly validationMessage: string;
+ /** Returns a ValidityState object that represents the validity states of an element. */
+ readonly validity: ValidityState;
+ /** Returns the value of the data at the cursor's current position. */
+ value: string;
+ /** Returns a Date object representing the form control's value, if applicable; otherwise, returns null. Can be set, to change the value. Throws an "InvalidStateError" DOMException if the control isn't date- or time-based. */
+ valueAsDate: Date | null;
+ /** Returns the input field value as a number. */
+ valueAsNumber: number;
+ readonly webkitEntries: ReadonlyArray<FileSystemEntry>;
+ webkitdirectory: boolean;
+ /** Sets or retrieves the width of the object. */
+ width: number;
+ /** Returns whether an element will successfully validate based on forms validation rules and constraints. */
+ readonly willValidate: boolean;
+ /** Returns whether a form will validate when it is submitted, without having to submit it. */
+ checkValidity(): boolean;
+ reportValidity(): boolean;
+ /** Makes the selection equal to the current object. */
+ select(): void;
+ /**
+ * Sets a custom error message that is displayed when a form is submitted.
+ * @param error Sets a custom error message that is displayed when a form is submitted.
+ */
+ setCustomValidity(error: string): void;
+ setRangeText(replacement: string): void;
+ setRangeText(replacement: string, start: number, end: number, selectionMode?: SelectionMode): void;
+ /**
+ * Sets the start and end positions of a selection in a text field.
+ * @param start The offset into the text field for the start of the selection.
+ * @param end The offset into the text field for the end of the selection.
+ * @param direction The direction in which the selection is performed.
+ */
+ setSelectionRange(start: number | null, end: number | null, direction?: "forward" | "backward" | "none"): void;
+ showPicker(): void;
+ /**
+ * Decrements a range input control's value by the value given by the Step attribute. If the optional parameter is used, it will decrement the input control's step value multiplied by the parameter's value.
+ * @param n Value to decrement the value by.
+ */
+ stepDown(n?: number): void;
+ /**
+ * Increments a range input control's value by the value given by the Step attribute. If the optional parameter is used, will increment the input control's value by that value.
+ * @param n Value to increment the value by.
+ */
+ stepUp(n?: number): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLInputElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLInputElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLInputElement: {
+ prototype: HTMLInputElement;
+ new(): HTMLInputElement;
+};
+
+/** Exposes specific properties and methods (beyond those defined by regular HTMLElement interface it also has available to it by inheritance) for manipulating list elements. */
+interface HTMLLIElement extends HTMLElement {
+ /** @deprecated */
+ type: string;
+ /** Sets or retrieves the value of a list item. */
+ value: number;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLLIElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLLIElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLLIElement: {
+ prototype: HTMLLIElement;
+ new(): HTMLLIElement;
+};
+
+/** Gives access to properties specific to <label> elements. It inherits methods and properties from the base HTMLElement interface. */
+interface HTMLLabelElement extends HTMLElement {
+ /** Returns the form control that is associated with this element. */
+ readonly control: HTMLElement | null;
+ /** Retrieves a reference to the form that the object is embedded in. */
+ readonly form: HTMLFormElement | null;
+ /** Sets or retrieves the object to which the given label object is assigned. */
+ htmlFor: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLLabelElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLLabelElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLLabelElement: {
+ prototype: HTMLLabelElement;
+ new(): HTMLLabelElement;
+};
+
+/** The HTMLLegendElement is an interface allowing to access properties of the <legend> elements. It inherits properties and methods from the HTMLElement interface. */
+interface HTMLLegendElement extends HTMLElement {
+ /** @deprecated */
+ align: string;
+ /** Retrieves a reference to the form that the object is embedded in. */
+ readonly form: HTMLFormElement | null;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLLegendElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLLegendElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLLegendElement: {
+ prototype: HTMLLegendElement;
+ new(): HTMLLegendElement;
+};
+
+/** Reference information for external resources and the relationship of those resources to a document and vice-versa. This object inherits all of the properties and methods of the HTMLElement interface. */
+interface HTMLLinkElement extends HTMLElement, LinkStyle {
+ as: string;
+ /**
+ * Sets or retrieves the character set used to encode the object.
+ * @deprecated
+ */
+ charset: string;
+ crossOrigin: string | null;
+ disabled: boolean;
+ /** Sets or retrieves a destination URL or an anchor point. */
+ href: string;
+ /** Sets or retrieves the language code of the object. */
+ hreflang: string;
+ imageSizes: string;
+ imageSrcset: string;
+ integrity: string;
+ /** Sets or retrieves the media type. */
+ media: string;
+ referrerPolicy: string;
+ /** Sets or retrieves the relationship between the object and the destination of the link. */
+ rel: string;
+ readonly relList: DOMTokenList;
+ /**
+ * Sets or retrieves the relationship between the object and the destination of the link.
+ * @deprecated
+ */
+ rev: string;
+ readonly sizes: DOMTokenList;
+ /**
+ * Sets or retrieves the window or frame at which to target content.
+ * @deprecated
+ */
+ target: string;
+ /** Sets or retrieves the MIME type of the object. */
+ type: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLLinkElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLLinkElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLLinkElement: {
+ prototype: HTMLLinkElement;
+ new(): HTMLLinkElement;
+};
+
+/** Provides special properties and methods (beyond those of the regular object HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of map elements. */
+interface HTMLMapElement extends HTMLElement {
+ /** Retrieves a collection of the area objects defined for the given map object. */
+ readonly areas: HTMLCollection;
+ /** Sets or retrieves the name of the object. */
+ name: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLMapElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLMapElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLMapElement: {
+ prototype: HTMLMapElement;
+ new(): HTMLMapElement;
+};
+
+/**
+ * Provides methods to manipulate <marquee> elements.
+ * @deprecated
+ */
+interface HTMLMarqueeElement extends HTMLElement {
+ /** @deprecated */
+ behavior: string;
+ /** @deprecated */
+ bgColor: string;
+ /** @deprecated */
+ direction: string;
+ /** @deprecated */
+ height: string;
+ /** @deprecated */
+ hspace: number;
+ /** @deprecated */
+ loop: number;
+ /** @deprecated */
+ scrollAmount: number;
+ /** @deprecated */
+ scrollDelay: number;
+ /** @deprecated */
+ trueSpeed: boolean;
+ /** @deprecated */
+ vspace: number;
+ /** @deprecated */
+ width: string;
+ /** @deprecated */
+ start(): void;
+ /** @deprecated */
+ stop(): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLMarqueeElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLMarqueeElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+/** @deprecated */
+declare var HTMLMarqueeElement: {
+ prototype: HTMLMarqueeElement;
+ new(): HTMLMarqueeElement;
+};
+
+interface HTMLMediaElementEventMap extends HTMLElementEventMap {
+ "encrypted": MediaEncryptedEvent;
+ "waitingforkey": Event;
+}
+
+/** Adds to HTMLElement the properties and methods needed to support basic media-related capabilities that are common to audio and video. */
+interface HTMLMediaElement extends HTMLElement {
+ /** Gets or sets a value that indicates whether to start playing the media automatically. */
+ autoplay: boolean;
+ /** Gets a collection of buffered time ranges. */
+ readonly buffered: TimeRanges;
+ /** Gets or sets a flag that indicates whether the client provides a set of controls for the media (in case the developer does not include controls for the player). */
+ controls: boolean;
+ crossOrigin: string | null;
+ /** Gets the address or URL of the current media resource that is selected by IHTMLMediaElement. */
+ readonly currentSrc: string;
+ /** Gets or sets the current playback position, in seconds. */
+ currentTime: number;
+ defaultMuted: boolean;
+ /** Gets or sets the default playback rate when the user is not using fast forward or reverse for a video or audio resource. */
+ defaultPlaybackRate: number;
+ disableRemotePlayback: boolean;
+ /** Returns the duration in seconds of the current media resource. A NaN value is returned if duration is not available, or Infinity if the media resource is streaming. */
+ readonly duration: number;
+ /** Gets information about whether the playback has ended or not. */
+ readonly ended: boolean;
+ /** Returns an object representing the current error state of the audio or video element. */
+ readonly error: MediaError | null;
+ /** Gets or sets a flag to specify whether playback should restart after it completes. */
+ loop: boolean;
+ /** Available only in secure contexts. */
+ readonly mediaKeys: MediaKeys | null;
+ /** Gets or sets a flag that indicates whether the audio (either audio or the audio track on video media) is muted. */
+ muted: boolean;
+ /** Gets the current network activity for the element. */
+ readonly networkState: number;
+ onencrypted: ((this: HTMLMediaElement, ev: MediaEncryptedEvent) => any) | null;
+ onwaitingforkey: ((this: HTMLMediaElement, ev: Event) => any) | null;
+ /** Gets a flag that specifies whether playback is paused. */
+ readonly paused: boolean;
+ /** Gets or sets the current rate of speed for the media resource to play. This speed is expressed as a multiple of the normal speed of the media resource. */
+ playbackRate: number;
+ /** Gets TimeRanges for the current media resource that has been played. */
+ readonly played: TimeRanges;
+ /** Gets or sets a value indicating what data should be preloaded, if any. */
+ preload: "none" | "metadata" | "auto" | "";
+ preservesPitch: boolean;
+ readonly readyState: number;
+ readonly remote: RemotePlayback;
+ /** Returns a TimeRanges object that represents the ranges of the current media resource that can be seeked. */
+ readonly seekable: TimeRanges;
+ /** Gets a flag that indicates whether the client is currently moving to a new playback position in the media resource. */
+ readonly seeking: boolean;
+ /** The address or URL of the a media resource that is to be considered. */
+ src: string;
+ srcObject: MediaProvider | null;
+ readonly textTracks: TextTrackList;
+ /** Gets or sets the volume level for audio portions of the media element. */
+ volume: number;
+ addTextTrack(kind: TextTrackKind, label?: string, language?: string): TextTrack;
+ /** Returns a string that specifies whether the client can play a given media resource type. */
+ canPlayType(type: string): CanPlayTypeResult;
+ fastSeek(time: number): void;
+ /** Resets the audio or video object and loads a new media resource. */
+ load(): void;
+ /** Pauses the current playback and sets paused to TRUE. This can be used to test whether the media is playing or paused. You can also use the pause or play events to tell whether the media is playing or not. */
+ pause(): void;
+ /** Loads and starts playback of a media resource. */
+ play(): Promise<void>;
+ /** Available only in secure contexts. */
+ setMediaKeys(mediaKeys: MediaKeys | null): Promise<void>;
+ readonly HAVE_CURRENT_DATA: number;
+ readonly HAVE_ENOUGH_DATA: number;
+ readonly HAVE_FUTURE_DATA: number;
+ readonly HAVE_METADATA: number;
+ readonly HAVE_NOTHING: number;
+ readonly NETWORK_EMPTY: number;
+ readonly NETWORK_IDLE: number;
+ readonly NETWORK_LOADING: number;
+ readonly NETWORK_NO_SOURCE: number;
+ addEventListener<K extends keyof HTMLMediaElementEventMap>(type: K, listener: (this: HTMLMediaElement, ev: HTMLMediaElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLMediaElementEventMap>(type: K, listener: (this: HTMLMediaElement, ev: HTMLMediaElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLMediaElement: {
+ prototype: HTMLMediaElement;
+ new(): HTMLMediaElement;
+ readonly HAVE_CURRENT_DATA: number;
+ readonly HAVE_ENOUGH_DATA: number;
+ readonly HAVE_FUTURE_DATA: number;
+ readonly HAVE_METADATA: number;
+ readonly HAVE_NOTHING: number;
+ readonly NETWORK_EMPTY: number;
+ readonly NETWORK_IDLE: number;
+ readonly NETWORK_LOADING: number;
+ readonly NETWORK_NO_SOURCE: number;
+};
+
+interface HTMLMenuElement extends HTMLElement {
+ /** @deprecated */
+ compact: boolean;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLMenuElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLMenuElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLMenuElement: {
+ prototype: HTMLMenuElement;
+ new(): HTMLMenuElement;
+};
+
+/** Contains descriptive metadata about a document. It inherits all of the properties and methods described in the HTMLElement interface. */
+interface HTMLMetaElement extends HTMLElement {
+ /** Gets or sets meta-information to associate with httpEquiv or name. */
+ content: string;
+ /** Gets or sets information used to bind the value of a content attribute of a meta element to an HTTP response header. */
+ httpEquiv: string;
+ media: string;
+ /** Sets or retrieves the value specified in the content attribute of the meta object. */
+ name: string;
+ /**
+ * Sets or retrieves a scheme to be used in interpreting the value of a property specified for the object.
+ * @deprecated
+ */
+ scheme: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLMetaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLMetaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLMetaElement: {
+ prototype: HTMLMetaElement;
+ new(): HTMLMetaElement;
+};
+
+/** The HTML <meter> elements expose the HTMLMeterElement interface, which provides special properties and methods (beyond the HTMLElement object interface they also have available to them by inheritance) for manipulating the layout and presentation of <meter> elements. */
+interface HTMLMeterElement extends HTMLElement {
+ high: number;
+ readonly labels: NodeListOf<HTMLLabelElement>;
+ low: number;
+ max: number;
+ min: number;
+ optimum: number;
+ value: number;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLMeterElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLMeterElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLMeterElement: {
+ prototype: HTMLMeterElement;
+ new(): HTMLMeterElement;
+};
+
+/** Provides special properties (beyond the regular methods and properties available through the HTMLElement interface they also have available to them by inheritance) for manipulating modification elements, that is <del> and <ins>. */
+interface HTMLModElement extends HTMLElement {
+ /** Sets or retrieves reference information about the object. */
+ cite: string;
+ /** Sets or retrieves the date and time of a modification to the object. */
+ dateTime: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLModElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLModElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLModElement: {
+ prototype: HTMLModElement;
+ new(): HTMLModElement;
+};
+
+/** Provides special properties (beyond those defined on the regular HTMLElement interface it also has available to it by inheritance) for manipulating ordered list elements. */
+interface HTMLOListElement extends HTMLElement {
+ /** @deprecated */
+ compact: boolean;
+ reversed: boolean;
+ /** The starting number. */
+ start: number;
+ type: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLOListElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLOListElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLOListElement: {
+ prototype: HTMLOListElement;
+ new(): HTMLOListElement;
+};
+
+/** Provides special properties and methods (beyond those on the HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of <object> element, representing external resources. */
+interface HTMLObjectElement extends HTMLElement {
+ /** @deprecated */
+ align: string;
+ /**
+ * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.
+ * @deprecated
+ */
+ archive: string;
+ /** @deprecated */
+ border: string;
+ /**
+ * Sets or retrieves the URL of the file containing the compiled Java class.
+ * @deprecated
+ */
+ code: string;
+ /**
+ * Sets or retrieves the URL of the component.
+ * @deprecated
+ */
+ codeBase: string;
+ /**
+ * Sets or retrieves the Internet media type for the code associated with the object.
+ * @deprecated
+ */
+ codeType: string;
+ /** Retrieves the document object of the page or frame. */
+ readonly contentDocument: Document | null;
+ readonly contentWindow: WindowProxy | null;
+ /** Sets or retrieves the URL that references the data of the object. */
+ data: string;
+ /** @deprecated */
+ declare: boolean;
+ /** Retrieves a reference to the form that the object is embedded in. */
+ readonly form: HTMLFormElement | null;
+ /** Sets or retrieves the height of the object. */
+ height: string;
+ /** @deprecated */
+ hspace: number;
+ /** Sets or retrieves the name of the object. */
+ name: string;
+ /**
+ * Sets or retrieves a message to be displayed while an object is loading.
+ * @deprecated
+ */
+ standby: string;
+ /** Sets or retrieves the MIME type of the object. */
+ type: string;
+ /** Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map. */
+ useMap: string;
+ /** Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting. */
+ readonly validationMessage: string;
+ /** Returns a ValidityState object that represents the validity states of an element. */
+ readonly validity: ValidityState;
+ /** @deprecated */
+ vspace: number;
+ /** Sets or retrieves the width of the object. */
+ width: string;
+ /** Returns whether an element will successfully validate based on forms validation rules and constraints. */
+ readonly willValidate: boolean;
+ /** Returns whether a form will validate when it is submitted, without having to submit it. */
+ checkValidity(): boolean;
+ getSVGDocument(): Document | null;
+ reportValidity(): boolean;
+ /**
+ * Sets a custom error message that is displayed when a form is submitted.
+ * @param error Sets a custom error message that is displayed when a form is submitted.
+ */
+ setCustomValidity(error: string): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLObjectElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLObjectElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLObjectElement: {
+ prototype: HTMLObjectElement;
+ new(): HTMLObjectElement;
+};
+
+/** Provides special properties and methods (beyond the regular HTMLElement object interface they also have available to them by inheritance) for manipulating the layout and presentation of <optgroup> elements. */
+interface HTMLOptGroupElement extends HTMLElement {
+ disabled: boolean;
+ /** Sets or retrieves a value that you can use to implement your own label functionality for the object. */
+ label: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLOptGroupElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLOptGroupElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLOptGroupElement: {
+ prototype: HTMLOptGroupElement;
+ new(): HTMLOptGroupElement;
+};
+
+/** <option> elements and inherits all classes and methods of the HTMLElement interface. */
+interface HTMLOptionElement extends HTMLElement {
+ /** Sets or retrieves the status of an option. */
+ defaultSelected: boolean;
+ disabled: boolean;
+ /** Retrieves a reference to the form that the object is embedded in. */
+ readonly form: HTMLFormElement | null;
+ /** Sets or retrieves the ordinal position of an option in a list box. */
+ readonly index: number;
+ /** Sets or retrieves a value that you can use to implement your own label functionality for the object. */
+ label: string;
+ /** Sets or retrieves whether the option in the list box is the default item. */
+ selected: boolean;
+ /** Sets or retrieves the text string specified by the option tag. */
+ text: string;
+ /** Sets or retrieves the value which is returned to the server when the form control is submitted. */
+ value: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLOptionElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLOptionElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLOptionElement: {
+ prototype: HTMLOptionElement;
+ new(): HTMLOptionElement;
+};
+
+/** HTMLOptionsCollection is an interface representing a collection of HTML option elements (in document order) and offers methods and properties for traversing the list as well as optionally altering its items. This type is returned solely by the "options" property of select. */
+interface HTMLOptionsCollection extends HTMLCollectionOf<HTMLOptionElement> {
+ /**
+ * Returns the number of elements in the collection.
+ *
+ * When set to a smaller number, truncates the number of option elements in the corresponding container.
+ *
+ * When set to a greater number, adds new blank option elements to that container.
+ */
+ length: number;
+ /**
+ * Returns the index of the first selected item, if any, or −1 if there is no selected item.
+ *
+ * Can be set, to change the selection.
+ */
+ selectedIndex: number;
+ /**
+ * Inserts element before the node given by before.
+ *
+ * The before argument can be a number, in which case element is inserted before the item with that number, or an element from the collection, in which case element is inserted before that element.
+ *
+ * If before is omitted, null, or a number out of range, then element will be added at the end of the list.
+ *
+ * This method will throw a "HierarchyRequestError" DOMException if element is an ancestor of the element into which it is to be inserted.
+ */
+ add(element: HTMLOptionElement | HTMLOptGroupElement, before?: HTMLElement | number | null): void;
+ /** Removes the item with index index from the collection. */
+ remove(index: number): void;
+}
+
+declare var HTMLOptionsCollection: {
+ prototype: HTMLOptionsCollection;
+ new(): HTMLOptionsCollection;
+};
+
+interface HTMLOrSVGElement {
+ autofocus: boolean;
+ readonly dataset: DOMStringMap;
+ nonce?: string;
+ tabIndex: number;
+ blur(): void;
+ focus(options?: FocusOptions): void;
+}
+
+/** Provides properties and methods (beyond those inherited from HTMLElement) for manipulating the layout and presentation of <output> elements. */
+interface HTMLOutputElement extends HTMLElement {
+ defaultValue: string;
+ readonly form: HTMLFormElement | null;
+ readonly htmlFor: DOMTokenList;
+ readonly labels: NodeListOf<HTMLLabelElement>;
+ name: string;
+ /** Returns the string "output". */
+ readonly type: string;
+ readonly validationMessage: string;
+ readonly validity: ValidityState;
+ /**
+ * Returns the element's current value.
+ *
+ * Can be set, to change the value.
+ */
+ value: string;
+ readonly willValidate: boolean;
+ checkValidity(): boolean;
+ reportValidity(): boolean;
+ setCustomValidity(error: string): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLOutputElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLOutputElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLOutputElement: {
+ prototype: HTMLOutputElement;
+ new(): HTMLOutputElement;
+};
+
+/** Provides special properties (beyond those of the regular HTMLElement object interface it inherits) for manipulating <p> elements. */
+interface HTMLParagraphElement extends HTMLElement {
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ * @deprecated
+ */
+ align: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLParagraphElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLParagraphElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLParagraphElement: {
+ prototype: HTMLParagraphElement;
+ new(): HTMLParagraphElement;
+};
+
+/**
+ * Provides special properties (beyond those of the regular HTMLElement object interface it inherits) for manipulating <param> elements, representing a pair of a key and a value that acts as a parameter for an <object> element.
+ * @deprecated
+ */
+interface HTMLParamElement extends HTMLElement {
+ /**
+ * Sets or retrieves the name of an input parameter for an element.
+ * @deprecated
+ */
+ name: string;
+ /**
+ * Sets or retrieves the content type of the resource designated by the value attribute.
+ * @deprecated
+ */
+ type: string;
+ /**
+ * Sets or retrieves the value of an input parameter for an element.
+ * @deprecated
+ */
+ value: string;
+ /**
+ * Sets or retrieves the data type of the value attribute.
+ * @deprecated
+ */
+ valueType: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLParamElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLParamElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+/** @deprecated */
+declare var HTMLParamElement: {
+ prototype: HTMLParamElement;
+ new(): HTMLParamElement;
+};
+
+/** A <picture> HTML element. It doesn't implement specific properties or methods. */
+interface HTMLPictureElement extends HTMLElement {
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLPictureElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLPictureElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLPictureElement: {
+ prototype: HTMLPictureElement;
+ new(): HTMLPictureElement;
+};
+
+/** Exposes specific properties and methods (beyond those of the HTMLElement interface it also has available to it by inheritance) for manipulating a block of preformatted text (<pre>). */
+interface HTMLPreElement extends HTMLElement {
+ /**
+ * Sets or gets a value that you can use to implement your own width functionality for the object.
+ * @deprecated
+ */
+ width: number;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLPreElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLPreElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLPreElement: {
+ prototype: HTMLPreElement;
+ new(): HTMLPreElement;
+};
+
+/** Provides special properties and methods (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of <progress> elements. */
+interface HTMLProgressElement extends HTMLElement {
+ readonly labels: NodeListOf<HTMLLabelElement>;
+ /** Defines the maximum, or "done" value for a progress element. */
+ max: number;
+ /** Returns the quotient of value/max when the value attribute is set (determinate progress bar), or -1 when the value attribute is missing (indeterminate progress bar). */
+ readonly position: number;
+ /** Sets or gets the current value of a progress element. The value must be a non-negative number between 0 and the max value. */
+ value: number;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLProgressElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLProgressElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLProgressElement: {
+ prototype: HTMLProgressElement;
+ new(): HTMLProgressElement;
+};
+
+/** Provides special properties and methods (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating quoting elements, like <blockquote> and <q>, but not the <cite> element. */
+interface HTMLQuoteElement extends HTMLElement {
+ /** Sets or retrieves reference information about the object. */
+ cite: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLQuoteElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLQuoteElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLQuoteElement: {
+ prototype: HTMLQuoteElement;
+ new(): HTMLQuoteElement;
+};
+
+/** HTML <script> elements expose the HTMLScriptElement interface, which provides special properties and methods for manipulating the behavior and execution of <script> elements (beyond the inherited HTMLElement interface). */
+interface HTMLScriptElement extends HTMLElement {
+ async: boolean;
+ /**
+ * Sets or retrieves the character set used to encode the object.
+ * @deprecated
+ */
+ charset: string;
+ crossOrigin: string | null;
+ /** Sets or retrieves the status of the script. */
+ defer: boolean;
+ /**
+ * Sets or retrieves the event for which the script is written.
+ * @deprecated
+ */
+ event: string;
+ /**
+ * Sets or retrieves the object that is bound to the event script.
+ * @deprecated
+ */
+ htmlFor: string;
+ integrity: string;
+ noModule: boolean;
+ referrerPolicy: string;
+ /** Retrieves the URL to an external file that contains the source code or data. */
+ src: string;
+ /** Retrieves or sets the text of the object as a string. */
+ text: string;
+ /** Sets or retrieves the MIME type for the associated scripting engine. */
+ type: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLScriptElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLScriptElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLScriptElement: {
+ prototype: HTMLScriptElement;
+ new(): HTMLScriptElement;
+ supports(type: string): boolean;
+};
+
+/** A <select> HTML Element. These elements also share all of the properties and methods of other HTML elements via the HTMLElement interface. */
+interface HTMLSelectElement extends HTMLElement {
+ autocomplete: string;
+ disabled: boolean;
+ /** Retrieves a reference to the form that the object is embedded in. */
+ readonly form: HTMLFormElement | null;
+ readonly labels: NodeListOf<HTMLLabelElement>;
+ /** Sets or retrieves the number of objects in a collection. */
+ length: number;
+ /** Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list. */
+ multiple: boolean;
+ /** Sets or retrieves the name of the object. */
+ name: string;
+ /** Returns an HTMLOptionsCollection of the list of options. */
+ readonly options: HTMLOptionsCollection;
+ /** When present, marks an element that can't be submitted without a value. */
+ required: boolean;
+ /** Sets or retrieves the index of the selected option in a select object. */
+ selectedIndex: number;
+ readonly selectedOptions: HTMLCollectionOf<HTMLOptionElement>;
+ /** Sets or retrieves the number of rows in the list box. */
+ size: number;
+ /** Retrieves the type of select control based on the value of the MULTIPLE attribute. */
+ readonly type: string;
+ /** Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting. */
+ readonly validationMessage: string;
+ /** Returns a ValidityState object that represents the validity states of an element. */
+ readonly validity: ValidityState;
+ /** Sets or retrieves the value which is returned to the server when the form control is submitted. */
+ value: string;
+ /** Returns whether an element will successfully validate based on forms validation rules and constraints. */
+ readonly willValidate: boolean;
+ /**
+ * Adds an element to the areas, controlRange, or options collection.
+ * @param element Variant of type Number that specifies the index position in the collection where the element is placed. If no value is given, the method places the element at the end of the collection.
+ * @param before Variant of type Object that specifies an element to insert before, or null to append the object to the collection.
+ */
+ add(element: HTMLOptionElement | HTMLOptGroupElement, before?: HTMLElement | number | null): void;
+ /** Returns whether a form will validate when it is submitted, without having to submit it. */
+ checkValidity(): boolean;
+ /**
+ * Retrieves a select object or an object from an options collection.
+ * @param name Variant of type Number or String that specifies the object or collection to retrieve. If this parameter is an integer, it is the zero-based index of the object. If this parameter is a string, all objects with matching name or id properties are retrieved, and a collection is returned if more than one match is made.
+ * @param index Variant of type Number that specifies the zero-based index of the object to retrieve when a collection is returned.
+ */
+ item(index: number): HTMLOptionElement | null;
+ /**
+ * Retrieves a select object or an object from an options collection.
+ * @param namedItem A String that specifies the name or id property of the object to retrieve. A collection is returned if more than one match is made.
+ */
+ namedItem(name: string): HTMLOptionElement | null;
+ /**
+ * Removes an element from the collection.
+ * @param index Number that specifies the zero-based index of the element to remove from the collection.
+ */
+ remove(): void;
+ remove(index: number): void;
+ reportValidity(): boolean;
+ /**
+ * Sets a custom error message that is displayed when a form is submitted.
+ * @param error Sets a custom error message that is displayed when a form is submitted.
+ */
+ setCustomValidity(error: string): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLSelectElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLSelectElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+ [name: number]: HTMLOptionElement | HTMLOptGroupElement;
+}
+
+declare var HTMLSelectElement: {
+ prototype: HTMLSelectElement;
+ new(): HTMLSelectElement;
+};
+
+interface HTMLSlotElement extends HTMLElement {
+ name: string;
+ assign(...nodes: (Element | Text)[]): void;
+ assignedElements(options?: AssignedNodesOptions): Element[];
+ assignedNodes(options?: AssignedNodesOptions): Node[];
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLSlotElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLSlotElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLSlotElement: {
+ prototype: HTMLSlotElement;
+ new(): HTMLSlotElement;
+};
+
+/** Provides special properties (beyond the regular HTMLElement object interface it also has available to it by inheritance) for manipulating <source> elements. */
+interface HTMLSourceElement extends HTMLElement {
+ height: number;
+ /** Gets or sets the intended media type of the media source. */
+ media: string;
+ sizes: string;
+ /** The address or URL of the a media resource that is to be considered. */
+ src: string;
+ srcset: string;
+ /** Gets or sets the MIME type of a media resource. */
+ type: string;
+ width: number;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLSourceElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLSourceElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLSourceElement: {
+ prototype: HTMLSourceElement;
+ new(): HTMLSourceElement;
+};
+
+/** A <span> element and derives from the HTMLElement interface, but without implementing any additional properties or methods. */
+interface HTMLSpanElement extends HTMLElement {
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLSpanElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLSpanElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLSpanElement: {
+ prototype: HTMLSpanElement;
+ new(): HTMLSpanElement;
+};
+
+/** A <style> element. It inherits properties and methods from its parent, HTMLElement, and from LinkStyle. */
+interface HTMLStyleElement extends HTMLElement, LinkStyle {
+ /** Enables or disables the style sheet. */
+ disabled: boolean;
+ /** Sets or retrieves the media type. */
+ media: string;
+ /**
+ * Retrieves the CSS language in which the style sheet is written.
+ * @deprecated
+ */
+ type: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLStyleElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLStyleElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLStyleElement: {
+ prototype: HTMLStyleElement;
+ new(): HTMLStyleElement;
+};
+
+/** Special properties (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating table caption elements. */
+interface HTMLTableCaptionElement extends HTMLElement {
+ /**
+ * Sets or retrieves the alignment of the caption or legend.
+ * @deprecated
+ */
+ align: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableCaptionElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableCaptionElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLTableCaptionElement: {
+ prototype: HTMLTableCaptionElement;
+ new(): HTMLTableCaptionElement;
+};
+
+/** Provides special properties and methods (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of table cells, either header or data cells, in an HTML document. */
+interface HTMLTableCellElement extends HTMLElement {
+ /** Sets or retrieves abbreviated text for the object. */
+ abbr: string;
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ * @deprecated
+ */
+ align: string;
+ /**
+ * Sets or retrieves a comma-delimited list of conceptual categories associated with the object.
+ * @deprecated
+ */
+ axis: string;
+ /** @deprecated */
+ bgColor: string;
+ /** Retrieves the position of the object in the cells collection of a row. */
+ readonly cellIndex: number;
+ /** @deprecated */
+ ch: string;
+ /** @deprecated */
+ chOff: string;
+ /** Sets or retrieves the number columns in the table that the object should span. */
+ colSpan: number;
+ /** Sets or retrieves a list of header cells that provide information for the object. */
+ headers: string;
+ /**
+ * Sets or retrieves the height of the object.
+ * @deprecated
+ */
+ height: string;
+ /**
+ * Sets or retrieves whether the browser automatically performs wordwrap.
+ * @deprecated
+ */
+ noWrap: boolean;
+ /** Sets or retrieves how many rows in a table the cell should span. */
+ rowSpan: number;
+ /** Sets or retrieves the group of cells in a table to which the object's information applies. */
+ scope: string;
+ /** @deprecated */
+ vAlign: string;
+ /**
+ * Sets or retrieves the width of the object.
+ * @deprecated
+ */
+ width: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableCellElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableCellElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLTableCellElement: {
+ prototype: HTMLTableCellElement;
+ new(): HTMLTableCellElement;
+};
+
+/** Provides special properties (beyond the HTMLElement interface it also has available to it inheritance) for manipulating single or grouped table column elements. */
+interface HTMLTableColElement extends HTMLElement {
+ /**
+ * Sets or retrieves the alignment of the object relative to the display or table.
+ * @deprecated
+ */
+ align: string;
+ /** @deprecated */
+ ch: string;
+ /** @deprecated */
+ chOff: string;
+ /** Sets or retrieves the number of columns in the group. */
+ span: number;
+ /** @deprecated */
+ vAlign: string;
+ /**
+ * Sets or retrieves the width of the object.
+ * @deprecated
+ */
+ width: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableColElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableColElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLTableColElement: {
+ prototype: HTMLTableColElement;
+ new(): HTMLTableColElement;
+};
+
+/** @deprecated prefer HTMLTableCellElement */
+interface HTMLTableDataCellElement extends HTMLTableCellElement {
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableDataCellElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableDataCellElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+/** Provides special properties and methods (beyond the regular HTMLElement object interface it also has available to it by inheritance) for manipulating the layout and presentation of tables in an HTML document. */
+interface HTMLTableElement extends HTMLElement {
+ /**
+ * Sets or retrieves a value that indicates the table alignment.
+ * @deprecated
+ */
+ align: string;
+ /** @deprecated */
+ bgColor: string;
+ /**
+ * Sets or retrieves the width of the border to draw around the object.
+ * @deprecated
+ */
+ border: string;
+ /** Retrieves the caption object of a table. */
+ caption: HTMLTableCaptionElement | null;
+ /**
+ * Sets or retrieves the amount of space between the border of the cell and the content of the cell.
+ * @deprecated
+ */
+ cellPadding: string;
+ /**
+ * Sets or retrieves the amount of space between cells in a table.
+ * @deprecated
+ */
+ cellSpacing: string;
+ /**
+ * Sets or retrieves the way the border frame around the table is displayed.
+ * @deprecated
+ */
+ frame: string;
+ /** Sets or retrieves the number of horizontal rows contained in the object. */
+ readonly rows: HTMLCollectionOf<HTMLTableRowElement>;
+ /**
+ * Sets or retrieves which dividing lines (inner borders) are displayed.
+ * @deprecated
+ */
+ rules: string;
+ /**
+ * Sets or retrieves a description and/or structure of the object.
+ * @deprecated
+ */
+ summary: string;
+ /** Retrieves a collection of all tBody objects in the table. Objects in this collection are in source order. */
+ readonly tBodies: HTMLCollectionOf<HTMLTableSectionElement>;
+ /** Retrieves the tFoot object of the table. */
+ tFoot: HTMLTableSectionElement | null;
+ /** Retrieves the tHead object of the table. */
+ tHead: HTMLTableSectionElement | null;
+ /**
+ * Sets or retrieves the width of the object.
+ * @deprecated
+ */
+ width: string;
+ /** Creates an empty caption element in the table. */
+ createCaption(): HTMLTableCaptionElement;
+ /** Creates an empty tBody element in the table. */
+ createTBody(): HTMLTableSectionElement;
+ /** Creates an empty tFoot element in the table. */
+ createTFoot(): HTMLTableSectionElement;
+ /** Returns the tHead element object if successful, or null otherwise. */
+ createTHead(): HTMLTableSectionElement;
+ /** Deletes the caption element and its contents from the table. */
+ deleteCaption(): void;
+ /**
+ * Removes the specified row (tr) from the element and from the rows collection.
+ * @param index Number that specifies the zero-based position in the rows collection of the row to remove.
+ */
+ deleteRow(index: number): void;
+ /** Deletes the tFoot element and its contents from the table. */
+ deleteTFoot(): void;
+ /** Deletes the tHead element and its contents from the table. */
+ deleteTHead(): void;
+ /**
+ * Creates a new row (tr) in the table, and adds the row to the rows collection.
+ * @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.
+ */
+ insertRow(index?: number): HTMLTableRowElement;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLTableElement: {
+ prototype: HTMLTableElement;
+ new(): HTMLTableElement;
+};
+
+/** @deprecated prefer HTMLTableCellElement */
+interface HTMLTableHeaderCellElement extends HTMLTableCellElement {
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableHeaderCellElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableHeaderCellElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+/** Provides special properties and methods (beyond the HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of rows in an HTML table. */
+interface HTMLTableRowElement extends HTMLElement {
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ * @deprecated
+ */
+ align: string;
+ /** @deprecated */
+ bgColor: string;
+ /** Retrieves a collection of all cells in the table row. */
+ readonly cells: HTMLCollectionOf<HTMLTableCellElement>;
+ /** @deprecated */
+ ch: string;
+ /** @deprecated */
+ chOff: string;
+ /** Retrieves the position of the object in the rows collection for the table. */
+ readonly rowIndex: number;
+ /** Retrieves the position of the object in the collection. */
+ readonly sectionRowIndex: number;
+ /** @deprecated */
+ vAlign: string;
+ /**
+ * Removes the specified cell from the table row, as well as from the cells collection.
+ * @param index Number that specifies the zero-based position of the cell to remove from the table row. If no value is provided, the last cell in the cells collection is deleted.
+ */
+ deleteCell(index: number): void;
+ /**
+ * Creates a new cell in the table row, and adds the cell to the cells collection.
+ * @param index Number that specifies where to insert the cell in the tr. The default value is -1, which appends the new cell to the end of the cells collection.
+ */
+ insertCell(index?: number): HTMLTableCellElement;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableRowElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableRowElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLTableRowElement: {
+ prototype: HTMLTableRowElement;
+ new(): HTMLTableRowElement;
+};
+
+/** Provides special properties and methods (beyond the HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of sections, that is headers, footers and bodies, in an HTML table. */
+interface HTMLTableSectionElement extends HTMLElement {
+ /**
+ * Sets or retrieves a value that indicates the table alignment.
+ * @deprecated
+ */
+ align: string;
+ /** @deprecated */
+ ch: string;
+ /** @deprecated */
+ chOff: string;
+ /** Sets or retrieves the number of horizontal rows contained in the object. */
+ readonly rows: HTMLCollectionOf<HTMLTableRowElement>;
+ /** @deprecated */
+ vAlign: string;
+ /**
+ * Removes the specified row (tr) from the element and from the rows collection.
+ * @param index Number that specifies the zero-based position in the rows collection of the row to remove.
+ */
+ deleteRow(index: number): void;
+ /**
+ * Creates a new row (tr) in the table, and adds the row to the rows collection.
+ * @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.
+ */
+ insertRow(index?: number): HTMLTableRowElement;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableSectionElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableSectionElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLTableSectionElement: {
+ prototype: HTMLTableSectionElement;
+ new(): HTMLTableSectionElement;
+};
+
+/** Enables access to the contents of an HTML <template> element. */
+interface HTMLTemplateElement extends HTMLElement {
+ /** Returns the template contents (a DocumentFragment). */
+ readonly content: DocumentFragment;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTemplateElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTemplateElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLTemplateElement: {
+ prototype: HTMLTemplateElement;
+ new(): HTMLTemplateElement;
+};
+
+/** Provides special properties and methods for manipulating the layout and presentation of <textarea> elements. */
+interface HTMLTextAreaElement extends HTMLElement {
+ autocomplete: string;
+ /** Sets or retrieves the width of the object. */
+ cols: number;
+ /** Sets or retrieves the initial contents of the object. */
+ defaultValue: string;
+ dirName: string;
+ disabled: boolean;
+ /** Retrieves a reference to the form that the object is embedded in. */
+ readonly form: HTMLFormElement | null;
+ readonly labels: NodeListOf<HTMLLabelElement>;
+ /** Sets or retrieves the maximum number of characters that the user can enter in a text control. */
+ maxLength: number;
+ minLength: number;
+ /** Sets or retrieves the name of the object. */
+ name: string;
+ /** Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field. */
+ placeholder: string;
+ /** Sets or retrieves the value indicated whether the content of the object is read-only. */
+ readOnly: boolean;
+ /** When present, marks an element that can't be submitted without a value. */
+ required: boolean;
+ /** Sets or retrieves the number of horizontal rows contained in the object. */
+ rows: number;
+ selectionDirection: "forward" | "backward" | "none";
+ /** Gets or sets the end position or offset of a text selection. */
+ selectionEnd: number;
+ /** Gets or sets the starting position or offset of a text selection. */
+ selectionStart: number;
+ readonly textLength: number;
+ /** Retrieves the type of control. */
+ readonly type: string;
+ /** Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting. */
+ readonly validationMessage: string;
+ /** Returns a ValidityState object that represents the validity states of an element. */
+ readonly validity: ValidityState;
+ /** Retrieves or sets the text in the entry field of the textArea element. */
+ value: string;
+ /** Returns whether an element will successfully validate based on forms validation rules and constraints. */
+ readonly willValidate: boolean;
+ /** Sets or retrieves how to handle wordwrapping in the object. */
+ wrap: string;
+ /** Returns whether a form will validate when it is submitted, without having to submit it. */
+ checkValidity(): boolean;
+ reportValidity(): boolean;
+ /** Highlights the input area of a form element. */
+ select(): void;
+ /**
+ * Sets a custom error message that is displayed when a form is submitted.
+ * @param error Sets a custom error message that is displayed when a form is submitted.
+ */
+ setCustomValidity(error: string): void;
+ setRangeText(replacement: string): void;
+ setRangeText(replacement: string, start: number, end: number, selectionMode?: SelectionMode): void;
+ /**
+ * Sets the start and end positions of a selection in a text field.
+ * @param start The offset into the text field for the start of the selection.
+ * @param end The offset into the text field for the end of the selection.
+ * @param direction The direction in which the selection is performed.
+ */
+ setSelectionRange(start: number | null, end: number | null, direction?: "forward" | "backward" | "none"): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTextAreaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTextAreaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLTextAreaElement: {
+ prototype: HTMLTextAreaElement;
+ new(): HTMLTextAreaElement;
+};
+
+/** Provides special properties (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating <time> elements. */
+interface HTMLTimeElement extends HTMLElement {
+ dateTime: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTimeElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTimeElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLTimeElement: {
+ prototype: HTMLTimeElement;
+ new(): HTMLTimeElement;
+};
+
+/** Contains the title for a document. This element inherits all of the properties and methods of the HTMLElement interface. */
+interface HTMLTitleElement extends HTMLElement {
+ /** Retrieves or sets the text of the object as a string. */
+ text: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTitleElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTitleElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLTitleElement: {
+ prototype: HTMLTitleElement;
+ new(): HTMLTitleElement;
+};
+
+/** The HTMLTrackElement */
+interface HTMLTrackElement extends HTMLElement {
+ default: boolean;
+ kind: string;
+ label: string;
+ readonly readyState: number;
+ src: string;
+ srclang: string;
+ /** Returns the TextTrack object corresponding to the text track of the track element. */
+ readonly track: TextTrack;
+ readonly ERROR: number;
+ readonly LOADED: number;
+ readonly LOADING: number;
+ readonly NONE: number;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTrackElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTrackElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLTrackElement: {
+ prototype: HTMLTrackElement;
+ new(): HTMLTrackElement;
+ readonly ERROR: number;
+ readonly LOADED: number;
+ readonly LOADING: number;
+ readonly NONE: number;
+};
+
+/** Provides special properties (beyond those defined on the regular HTMLElement interface it also has available to it by inheritance) for manipulating unordered list elements. */
+interface HTMLUListElement extends HTMLElement {
+ /** @deprecated */
+ compact: boolean;
+ /** @deprecated */
+ type: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLUListElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLUListElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLUListElement: {
+ prototype: HTMLUListElement;
+ new(): HTMLUListElement;
+};
+
+/** An invalid HTML element and derives from the HTMLElement interface, but without implementing any additional properties or methods. */
+interface HTMLUnknownElement extends HTMLElement {
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLUnknownElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLUnknownElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLUnknownElement: {
+ prototype: HTMLUnknownElement;
+ new(): HTMLUnknownElement;
+};
+
+interface HTMLVideoElementEventMap extends HTMLMediaElementEventMap {
+ "enterpictureinpicture": Event;
+ "leavepictureinpicture": Event;
+}
+
+/** Provides special properties and methods for manipulating video objects. It also inherits properties and methods of HTMLMediaElement and HTMLElement. */
+interface HTMLVideoElement extends HTMLMediaElement {
+ disablePictureInPicture: boolean;
+ /** Gets or sets the height of the video element. */
+ height: number;
+ onenterpictureinpicture: ((this: HTMLVideoElement, ev: Event) => any) | null;
+ onleavepictureinpicture: ((this: HTMLVideoElement, ev: Event) => any) | null;
+ /** Gets or sets the playsinline of the video element. for example, On iPhone, video elements will now be allowed to play inline, and will not automatically enter fullscreen mode when playback begins. */
+ playsInline: boolean;
+ /** Gets or sets a URL of an image to display, for example, like a movie poster. This can be a still frame from the video, or another image if no video data is available. */
+ poster: string;
+ /** Gets the intrinsic height of a video in CSS pixels, or zero if the dimensions are not known. */
+ readonly videoHeight: number;
+ /** Gets the intrinsic width of a video in CSS pixels, or zero if the dimensions are not known. */
+ readonly videoWidth: number;
+ /** Gets or sets the width of the video element. */
+ width: number;
+ cancelVideoFrameCallback(handle: number): void;
+ getVideoPlaybackQuality(): VideoPlaybackQuality;
+ requestPictureInPicture(): Promise<PictureInPictureWindow>;
+ requestVideoFrameCallback(callback: VideoFrameRequestCallback): number;
+ addEventListener<K extends keyof HTMLVideoElementEventMap>(type: K, listener: (this: HTMLVideoElement, ev: HTMLVideoElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLVideoElementEventMap>(type: K, listener: (this: HTMLVideoElement, ev: HTMLVideoElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLVideoElement: {
+ prototype: HTMLVideoElement;
+ new(): HTMLVideoElement;
+};
+
+/** Events that fire when the fragment identifier of the URL has changed. */
+interface HashChangeEvent extends Event {
+ /** Returns the URL of the session history entry that is now current. */
+ readonly newURL: string;
+ /** Returns the URL of the session history entry that was previously current. */
+ readonly oldURL: string;
+}
+
+declare var HashChangeEvent: {
+ prototype: HashChangeEvent;
+ new(type: string, eventInitDict?: HashChangeEventInit): HashChangeEvent;
+};
+
+/** This Fetch API interface allows you to perform various actions on HTTP request and response headers. These actions include retrieving, setting, adding to, and removing. A Headers object has an associated header list, which is initially empty and consists of zero or more name and value pairs.  You can add to this using methods like append() (see Examples.) In all methods of this interface, header names are matched by case-insensitive byte sequence. */
+interface Headers {
+ append(name: string, value: string): void;
+ delete(name: string): void;
+ get(name: string): string | null;
+ has(name: string): boolean;
+ set(name: string, value: string): void;
+ forEach(callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any): void;
+}
+
+declare var Headers: {
+ prototype: Headers;
+ new(init?: HeadersInit): Headers;
+};
+
+/** Allows manipulation of the browser session history, that is the pages visited in the tab or frame that the current page is loaded in. */
+interface History {
+ readonly length: number;
+ scrollRestoration: ScrollRestoration;
+ readonly state: any;
+ back(): void;
+ forward(): void;
+ go(delta?: number): void;
+ pushState(data: any, unused: string, url?: string | URL | null): void;
+ replaceState(data: any, unused: string, url?: string | URL | null): void;
+}
+
+declare var History: {
+ prototype: History;
+ new(): History;
+};
+
+/** This IndexedDB API interface represents a cursor for traversing or iterating over multiple records in a database. */
+interface IDBCursor {
+ /** Returns the direction ("next", "nextunique", "prev" or "prevunique") of the cursor. */
+ readonly direction: IDBCursorDirection;
+ /** Returns the key of the cursor. Throws a "InvalidStateError" DOMException if the cursor is advancing or is finished. */
+ readonly key: IDBValidKey;
+ /** Returns the effective key of the cursor. Throws a "InvalidStateError" DOMException if the cursor is advancing or is finished. */
+ readonly primaryKey: IDBValidKey;
+ readonly request: IDBRequest;
+ /** Returns the IDBObjectStore or IDBIndex the cursor was opened from. */
+ readonly source: IDBObjectStore | IDBIndex;
+ /** Advances the cursor through the next count records in range. */
+ advance(count: number): void;
+ /** Advances the cursor to the next record in range. */
+ continue(key?: IDBValidKey): void;
+ /** Advances the cursor to the next record in range matching or after key and primaryKey. Throws an "InvalidAccessError" DOMException if the source is not an index. */
+ continuePrimaryKey(key: IDBValidKey, primaryKey: IDBValidKey): void;
+ /**
+ * Delete the record pointed at by the cursor with a new value.
+ *
+ * If successful, request's result will be undefined.
+ */
+ delete(): IDBRequest<undefined>;
+ /**
+ * Updated the record pointed at by the cursor with a new value.
+ *
+ * Throws a "DataError" DOMException if the effective object store uses in-line keys and the key would have changed.
+ *
+ * If successful, request's result will be the record's key.
+ */
+ update(value: any): IDBRequest<IDBValidKey>;
+}
+
+declare var IDBCursor: {
+ prototype: IDBCursor;
+ new(): IDBCursor;
+};
+
+/** This IndexedDB API interface represents a cursor for traversing or iterating over multiple records in a database. It is the same as the IDBCursor, except that it includes the value property. */
+interface IDBCursorWithValue extends IDBCursor {
+ /** Returns the cursor's current value. */
+ readonly value: any;
+}
+
+declare var IDBCursorWithValue: {
+ prototype: IDBCursorWithValue;
+ new(): IDBCursorWithValue;
+};
+
+interface IDBDatabaseEventMap {
+ "abort": Event;
+ "close": Event;
+ "error": Event;
+ "versionchange": IDBVersionChangeEvent;
+}
+
+/** This IndexedDB API interface provides a connection to a database; you can use an IDBDatabase object to open a transaction on your database then create, manipulate, and delete objects (data) in that database. The interface provides the only way to get and manage versions of the database. */
+interface IDBDatabase extends EventTarget {
+ /** Returns the name of the database. */
+ readonly name: string;
+ /** Returns a list of the names of object stores in the database. */
+ readonly objectStoreNames: DOMStringList;
+ onabort: ((this: IDBDatabase, ev: Event) => any) | null;
+ onclose: ((this: IDBDatabase, ev: Event) => any) | null;
+ onerror: ((this: IDBDatabase, ev: Event) => any) | null;
+ onversionchange: ((this: IDBDatabase, ev: IDBVersionChangeEvent) => any) | null;
+ /** Returns the version of the database. */
+ readonly version: number;
+ /** Closes the connection once all running transactions have finished. */
+ close(): void;
+ /**
+ * Creates a new object store with the given name and options and returns a new IDBObjectStore.
+ *
+ * Throws a "InvalidStateError" DOMException if not called within an upgrade transaction.
+ */
+ createObjectStore(name: string, options?: IDBObjectStoreParameters): IDBObjectStore;
+ /**
+ * Deletes the object store with the given name.
+ *
+ * Throws a "InvalidStateError" DOMException if not called within an upgrade transaction.
+ */
+ deleteObjectStore(name: string): void;
+ /** Returns a new transaction with the given mode ("readonly" or "readwrite") and scope which can be a single object store name or an array of names. */
+ transaction(storeNames: string | string[], mode?: IDBTransactionMode, options?: IDBTransactionOptions): IDBTransaction;
+ addEventListener<K extends keyof IDBDatabaseEventMap>(type: K, listener: (this: IDBDatabase, ev: IDBDatabaseEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof IDBDatabaseEventMap>(type: K, listener: (this: IDBDatabase, ev: IDBDatabaseEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var IDBDatabase: {
+ prototype: IDBDatabase;
+ new(): IDBDatabase;
+};
+
+/** In the following code snippet, we make a request to open a database, and include handlers for the success and error cases. For a full working example, see our To-do Notifications app (view example live.) */
+interface IDBFactory {
+ /**
+ * Compares two values as keys. Returns -1 if key1 precedes key2, 1 if key2 precedes key1, and 0 if the keys are equal.
+ *
+ * Throws a "DataError" DOMException if either input is not a valid key.
+ */
+ cmp(first: any, second: any): number;
+ databases(): Promise<IDBDatabaseInfo[]>;
+ /** Attempts to delete the named database. If the database already exists and there are open connections that don't close in response to a versionchange event, the request will be blocked until all they close. If the request is successful request's result will be null. */
+ deleteDatabase(name: string): IDBOpenDBRequest;
+ /** Attempts to open a connection to the named database with the current version, or 1 if it does not already exist. If the request is successful request's result will be the connection. */
+ open(name: string, version?: number): IDBOpenDBRequest;
+}
+
+declare var IDBFactory: {
+ prototype: IDBFactory;
+ new(): IDBFactory;
+};
+
+/** IDBIndex interface of the IndexedDB API provides asynchronous access to an index in a database. An index is a kind of object store for looking up records in another object store, called the referenced object store. You use this interface to retrieve data. */
+interface IDBIndex {
+ readonly keyPath: string | string[];
+ readonly multiEntry: boolean;
+ /** Returns the name of the index. */
+ name: string;
+ /** Returns the IDBObjectStore the index belongs to. */
+ readonly objectStore: IDBObjectStore;
+ readonly unique: boolean;
+ /**
+ * Retrieves the number of records matching the given key or key range in query.
+ *
+ * If successful, request's result will be the count.
+ */
+ count(query?: IDBValidKey | IDBKeyRange): IDBRequest<number>;
+ /**
+ * Retrieves the value of the first record matching the given key or key range in query.
+ *
+ * If successful, request's result will be the value, or undefined if there was no matching record.
+ */
+ get(query: IDBValidKey | IDBKeyRange): IDBRequest<any>;
+ /**
+ * Retrieves the values of the records matching the given key or key range in query (up to count if given).
+ *
+ * If successful, request's result will be an Array of the values.
+ */
+ getAll(query?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest<any[]>;
+ /**
+ * Retrieves the keys of records matching the given key or key range in query (up to count if given).
+ *
+ * If successful, request's result will be an Array of the keys.
+ */
+ getAllKeys(query?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest<IDBValidKey[]>;
+ /**
+ * Retrieves the key of the first record matching the given key or key range in query.
+ *
+ * If successful, request's result will be the key, or undefined if there was no matching record.
+ */
+ getKey(query: IDBValidKey | IDBKeyRange): IDBRequest<IDBValidKey | undefined>;
+ /**
+ * Opens a cursor over the records matching query, ordered by direction. If query is null, all records in index are matched.
+ *
+ * If successful, request's result will be an IDBCursorWithValue, or null if there were no matching records.
+ */
+ openCursor(query?: IDBValidKey | IDBKeyRange | null, direction?: IDBCursorDirection): IDBRequest<IDBCursorWithValue | null>;
+ /**
+ * Opens a cursor with key only flag set over the records matching query, ordered by direction. If query is null, all records in index are matched.
+ *
+ * If successful, request's result will be an IDBCursor, or null if there were no matching records.
+ */
+ openKeyCursor(query?: IDBValidKey | IDBKeyRange | null, direction?: IDBCursorDirection): IDBRequest<IDBCursor | null>;
+}
+
+declare var IDBIndex: {
+ prototype: IDBIndex;
+ new(): IDBIndex;
+};
+
+/** A key range can be a single value or a range with upper and lower bounds or endpoints. If the key range has both upper and lower bounds, then it is bounded; if it has no bounds, it is unbounded. A bounded key range can either be open (the endpoints are excluded) or closed (the endpoints are included). To retrieve all keys within a certain range, you can use the following code constructs: */
+interface IDBKeyRange {
+ /** Returns lower bound, or undefined if none. */
+ readonly lower: any;
+ /** Returns true if the lower open flag is set, and false otherwise. */
+ readonly lowerOpen: boolean;
+ /** Returns upper bound, or undefined if none. */
+ readonly upper: any;
+ /** Returns true if the upper open flag is set, and false otherwise. */
+ readonly upperOpen: boolean;
+ /** Returns true if key is included in the range, and false otherwise. */
+ includes(key: any): boolean;
+}
+
+declare var IDBKeyRange: {
+ prototype: IDBKeyRange;
+ new(): IDBKeyRange;
+ /** Returns a new IDBKeyRange spanning from lower to upper. If lowerOpen is true, lower is not included in the range. If upperOpen is true, upper is not included in the range. */
+ bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange;
+ /** Returns a new IDBKeyRange starting at key with no upper bound. If open is true, key is not included in the range. */
+ lowerBound(lower: any, open?: boolean): IDBKeyRange;
+ /** Returns a new IDBKeyRange spanning only key. */
+ only(value: any): IDBKeyRange;
+ /** Returns a new IDBKeyRange with no lower bound and ending at key. If open is true, key is not included in the range. */
+ upperBound(upper: any, open?: boolean): IDBKeyRange;
+};
+
+/** This example shows a variety of different uses of object stores, from updating the data structure with IDBObjectStore.createIndex inside an onupgradeneeded function, to adding a new item to our object store with IDBObjectStore.add. For a full working example, see our To-do Notifications app (view example live.) */
+interface IDBObjectStore {
+ /** Returns true if the store has a key generator, and false otherwise. */
+ readonly autoIncrement: boolean;
+ /** Returns a list of the names of indexes in the store. */
+ readonly indexNames: DOMStringList;
+ /** Returns the key path of the store, or null if none. */
+ readonly keyPath: string | string[];
+ /** Returns the name of the store. */
+ name: string;
+ /** Returns the associated transaction. */
+ readonly transaction: IDBTransaction;
+ /**
+ * Adds or updates a record in store with the given value and key.
+ *
+ * If the store uses in-line keys and key is specified a "DataError" DOMException will be thrown.
+ *
+ * If put() is used, any existing record with the key will be replaced. If add() is used, and if a record with the key already exists the request will fail, with request's error set to a "ConstraintError" DOMException.
+ *
+ * If successful, request's result will be the record's key.
+ */
+ add(value: any, key?: IDBValidKey): IDBRequest<IDBValidKey>;
+ /**
+ * Deletes all records in store.
+ *
+ * If successful, request's result will be undefined.
+ */
+ clear(): IDBRequest<undefined>;
+ /**
+ * Retrieves the number of records matching the given key or key range in query.
+ *
+ * If successful, request's result will be the count.
+ */
+ count(query?: IDBValidKey | IDBKeyRange): IDBRequest<number>;
+ /**
+ * Creates a new index in store with the given name, keyPath and options and returns a new IDBIndex. If the keyPath and options define constraints that cannot be satisfied with the data already in store the upgrade transaction will abort with a "ConstraintError" DOMException.
+ *
+ * Throws an "InvalidStateError" DOMException if not called within an upgrade transaction.
+ */
+ createIndex(name: string, keyPath: string | string[], options?: IDBIndexParameters): IDBIndex;
+ /**
+ * Deletes records in store with the given key or in the given key range in query.
+ *
+ * If successful, request's result will be undefined.
+ */
+ delete(query: IDBValidKey | IDBKeyRange): IDBRequest<undefined>;
+ /**
+ * Deletes the index in store with the given name.
+ *
+ * Throws an "InvalidStateError" DOMException if not called within an upgrade transaction.
+ */
+ deleteIndex(name: string): void;
+ /**
+ * Retrieves the value of the first record matching the given key or key range in query.
+ *
+ * If successful, request's result will be the value, or undefined if there was no matching record.
+ */
+ get(query: IDBValidKey | IDBKeyRange): IDBRequest<any>;
+ /**
+ * Retrieves the values of the records matching the given key or key range in query (up to count if given).
+ *
+ * If successful, request's result will be an Array of the values.
+ */
+ getAll(query?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest<any[]>;
+ /**
+ * Retrieves the keys of records matching the given key or key range in query (up to count if given).
+ *
+ * If successful, request's result will be an Array of the keys.
+ */
+ getAllKeys(query?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest<IDBValidKey[]>;
+ /**
+ * Retrieves the key of the first record matching the given key or key range in query.
+ *
+ * If successful, request's result will be the key, or undefined if there was no matching record.
+ */
+ getKey(query: IDBValidKey | IDBKeyRange): IDBRequest<IDBValidKey | undefined>;
+ index(name: string): IDBIndex;
+ /**
+ * Opens a cursor over the records matching query, ordered by direction. If query is null, all records in store are matched.
+ *
+ * If successful, request's result will be an IDBCursorWithValue pointing at the first matching record, or null if there were no matching records.
+ */
+ openCursor(query?: IDBValidKey | IDBKeyRange | null, direction?: IDBCursorDirection): IDBRequest<IDBCursorWithValue | null>;
+ /**
+ * Opens a cursor with key only flag set over the records matching query, ordered by direction. If query is null, all records in store are matched.
+ *
+ * If successful, request's result will be an IDBCursor pointing at the first matching record, or null if there were no matching records.
+ */
+ openKeyCursor(query?: IDBValidKey | IDBKeyRange | null, direction?: IDBCursorDirection): IDBRequest<IDBCursor | null>;
+ /**
+ * Adds or updates a record in store with the given value and key.
+ *
+ * If the store uses in-line keys and key is specified a "DataError" DOMException will be thrown.
+ *
+ * If put() is used, any existing record with the key will be replaced. If add() is used, and if a record with the key already exists the request will fail, with request's error set to a "ConstraintError" DOMException.
+ *
+ * If successful, request's result will be the record's key.
+ */
+ put(value: any, key?: IDBValidKey): IDBRequest<IDBValidKey>;
+}
+
+declare var IDBObjectStore: {
+ prototype: IDBObjectStore;
+ new(): IDBObjectStore;
+};
+
+interface IDBOpenDBRequestEventMap extends IDBRequestEventMap {
+ "blocked": Event;
+ "upgradeneeded": IDBVersionChangeEvent;
+}
+
+/** Also inherits methods from its parents IDBRequest and EventTarget. */
+interface IDBOpenDBRequest extends IDBRequest<IDBDatabase> {
+ onblocked: ((this: IDBOpenDBRequest, ev: Event) => any) | null;
+ onupgradeneeded: ((this: IDBOpenDBRequest, ev: IDBVersionChangeEvent) => any) | null;
+ addEventListener<K extends keyof IDBOpenDBRequestEventMap>(type: K, listener: (this: IDBOpenDBRequest, ev: IDBOpenDBRequestEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof IDBOpenDBRequestEventMap>(type: K, listener: (this: IDBOpenDBRequest, ev: IDBOpenDBRequestEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var IDBOpenDBRequest: {
+ prototype: IDBOpenDBRequest;
+ new(): IDBOpenDBRequest;
+};
+
+interface IDBRequestEventMap {
+ "error": Event;
+ "success": Event;
+}
+
+/** The request object does not initially contain any information about the result of the operation, but once information becomes available, an event is fired on the request, and the information becomes available through the properties of the IDBRequest instance. */
+interface IDBRequest<T = any> extends EventTarget {
+ /** When a request is completed, returns the error (a DOMException), or null if the request succeeded. Throws a "InvalidStateError" DOMException if the request is still pending. */
+ readonly error: DOMException | null;
+ onerror: ((this: IDBRequest<T>, ev: Event) => any) | null;
+ onsuccess: ((this: IDBRequest<T>, ev: Event) => any) | null;
+ /** Returns "pending" until a request is complete, then returns "done". */
+ readonly readyState: IDBRequestReadyState;
+ /** When a request is completed, returns the result, or undefined if the request failed. Throws a "InvalidStateError" DOMException if the request is still pending. */
+ readonly result: T;
+ /** Returns the IDBObjectStore, IDBIndex, or IDBCursor the request was made against, or null if is was an open request. */
+ readonly source: IDBObjectStore | IDBIndex | IDBCursor;
+ /** Returns the IDBTransaction the request was made within. If this as an open request, then it returns an upgrade transaction while it is running, or null otherwise. */
+ readonly transaction: IDBTransaction | null;
+ addEventListener<K extends keyof IDBRequestEventMap>(type: K, listener: (this: IDBRequest<T>, ev: IDBRequestEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof IDBRequestEventMap>(type: K, listener: (this: IDBRequest<T>, ev: IDBRequestEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var IDBRequest: {
+ prototype: IDBRequest;
+ new(): IDBRequest;
+};
+
+interface IDBTransactionEventMap {
+ "abort": Event;
+ "complete": Event;
+ "error": Event;
+}
+
+interface IDBTransaction extends EventTarget {
+ /** Returns the transaction's connection. */
+ readonly db: IDBDatabase;
+ readonly durability: IDBTransactionDurability;
+ /** If the transaction was aborted, returns the error (a DOMException) providing the reason. */
+ readonly error: DOMException | null;
+ /** Returns the mode the transaction was created with ("readonly" or "readwrite"), or "versionchange" for an upgrade transaction. */
+ readonly mode: IDBTransactionMode;
+ /** Returns a list of the names of object stores in the transaction's scope. For an upgrade transaction this is all object stores in the database. */
+ readonly objectStoreNames: DOMStringList;
+ onabort: ((this: IDBTransaction, ev: Event) => any) | null;
+ oncomplete: ((this: IDBTransaction, ev: Event) => any) | null;
+ onerror: ((this: IDBTransaction, ev: Event) => any) | null;
+ /** Aborts the transaction. All pending requests will fail with a "AbortError" DOMException and all changes made to the database will be reverted. */
+ abort(): void;
+ commit(): void;
+ /** Returns an IDBObjectStore in the transaction's scope. */
+ objectStore(name: string): IDBObjectStore;
+ addEventListener<K extends keyof IDBTransactionEventMap>(type: K, listener: (this: IDBTransaction, ev: IDBTransactionEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof IDBTransactionEventMap>(type: K, listener: (this: IDBTransaction, ev: IDBTransactionEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var IDBTransaction: {
+ prototype: IDBTransaction;
+ new(): IDBTransaction;
+};
+
+/** This IndexedDB API interface indicates that the version of the database has changed, as the result of an IDBOpenDBRequest.onupgradeneeded event handler function. */
+interface IDBVersionChangeEvent extends Event {
+ readonly newVersion: number | null;
+ readonly oldVersion: number;
+}
+
+declare var IDBVersionChangeEvent: {
+ prototype: IDBVersionChangeEvent;
+ new(type: string, eventInitDict?: IDBVersionChangeEventInit): IDBVersionChangeEvent;
+};
+
+/** The IIRFilterNode interface of the Web Audio API is a AudioNode processor which implements a general infinite impulse response (IIR)  filter; this type of filter can be used to implement tone control devices and graphic equalizers as well. It lets the parameters of the filter response be specified, so that it can be tuned as needed. */
+interface IIRFilterNode extends AudioNode {
+ getFrequencyResponse(frequencyHz: Float32Array, magResponse: Float32Array, phaseResponse: Float32Array): void;
+}
+
+declare var IIRFilterNode: {
+ prototype: IIRFilterNode;
+ new(context: BaseAudioContext, options: IIRFilterOptions): IIRFilterNode;
+};
+
+interface IdleDeadline {
+ readonly didTimeout: boolean;
+ timeRemaining(): DOMHighResTimeStamp;
+}
+
+declare var IdleDeadline: {
+ prototype: IdleDeadline;
+ new(): IdleDeadline;
+};
+
+interface ImageBitmap {
+ /** Returns the intrinsic height of the image, in CSS pixels. */
+ readonly height: number;
+ /** Returns the intrinsic width of the image, in CSS pixels. */
+ readonly width: number;
+ /** Releases imageBitmap's underlying bitmap data. */
+ close(): void;
+}
+
+declare var ImageBitmap: {
+ prototype: ImageBitmap;
+ new(): ImageBitmap;
+};
+
+interface ImageBitmapRenderingContext {
+ /** Returns the canvas element that the context is bound to. */
+ readonly canvas: HTMLCanvasElement;
+ /** Transfers the underlying bitmap data from imageBitmap to context, and the bitmap becomes the contents of the canvas element to which context is bound. */
+ transferFromImageBitmap(bitmap: ImageBitmap | null): void;
+}
+
+declare var ImageBitmapRenderingContext: {
+ prototype: ImageBitmapRenderingContext;
+ new(): ImageBitmapRenderingContext;
+};
+
+/** The underlying pixel data of an area of a <canvas> element. It is created using the ImageData() constructor or creator methods on the CanvasRenderingContext2D object associated with a canvas: createImageData() and getImageData(). It can also be used to set a part of the canvas by using putImageData(). */
+interface ImageData {
+ readonly colorSpace: PredefinedColorSpace;
+ /** Returns the one-dimensional array containing the data in RGBA order, as integers in the range 0 to 255. */
+ readonly data: Uint8ClampedArray;
+ /** Returns the actual dimensions of the data in the ImageData object, in pixels. */
+ readonly height: number;
+ /** Returns the actual dimensions of the data in the ImageData object, in pixels. */
+ readonly width: number;
+}
+
+declare var ImageData: {
+ prototype: ImageData;
+ new(sw: number, sh: number, settings?: ImageDataSettings): ImageData;
+ new(data: Uint8ClampedArray, sw: number, sh?: number, settings?: ImageDataSettings): ImageData;
+};
+
+interface InnerHTML {
+ innerHTML: string;
+}
+
+interface InputDeviceInfo extends MediaDeviceInfo {
+}
+
+declare var InputDeviceInfo: {
+ prototype: InputDeviceInfo;
+ new(): InputDeviceInfo;
+};
+
+interface InputEvent extends UIEvent {
+ readonly data: string | null;
+ readonly dataTransfer: DataTransfer | null;
+ readonly inputType: string;
+ readonly isComposing: boolean;
+ getTargetRanges(): StaticRange[];
+}
+
+declare var InputEvent: {
+ prototype: InputEvent;
+ new(type: string, eventInitDict?: InputEventInit): InputEvent;
+};
+
+/** provides a way to asynchronously observe changes in the intersection of a target element with an ancestor element or with a top-level document's viewport. */
+interface IntersectionObserver {
+ readonly root: Element | Document | null;
+ readonly rootMargin: string;
+ readonly thresholds: ReadonlyArray<number>;
+ disconnect(): void;
+ observe(target: Element): void;
+ takeRecords(): IntersectionObserverEntry[];
+ unobserve(target: Element): void;
+}
+
+declare var IntersectionObserver: {
+ prototype: IntersectionObserver;
+ new(callback: IntersectionObserverCallback, options?: IntersectionObserverInit): IntersectionObserver;
+};
+
+/** This Intersection Observer API interface describes the intersection between the target element and its root container at a specific moment of transition. */
+interface IntersectionObserverEntry {
+ readonly boundingClientRect: DOMRectReadOnly;
+ readonly intersectionRatio: number;
+ readonly intersectionRect: DOMRectReadOnly;
+ readonly isIntersecting: boolean;
+ readonly rootBounds: DOMRectReadOnly | null;
+ readonly target: Element;
+ readonly time: DOMHighResTimeStamp;
+}
+
+declare var IntersectionObserverEntry: {
+ prototype: IntersectionObserverEntry;
+ new(intersectionObserverEntryInit: IntersectionObserverEntryInit): IntersectionObserverEntry;
+};
+
+interface KHR_parallel_shader_compile {
+ readonly COMPLETION_STATUS_KHR: GLenum;
+}
+
+/** KeyboardEvent objects describe a user interaction with the keyboard; each event describes a single interaction between the user and a key (or combination of a key with modifier keys) on the keyboard. */
+interface KeyboardEvent extends UIEvent {
+ readonly altKey: boolean;
+ /** @deprecated */
+ readonly charCode: number;
+ readonly code: string;
+ readonly ctrlKey: boolean;
+ readonly isComposing: boolean;
+ readonly key: string;
+ /** @deprecated */
+ readonly keyCode: number;
+ readonly location: number;
+ readonly metaKey: boolean;
+ readonly repeat: boolean;
+ readonly shiftKey: boolean;
+ getModifierState(keyArg: string): boolean;
+ /** @deprecated */
+ initKeyboardEvent(typeArg: string, bubblesArg?: boolean, cancelableArg?: boolean, viewArg?: Window | null, keyArg?: string, locationArg?: number, ctrlKey?: boolean, altKey?: boolean, shiftKey?: boolean, metaKey?: boolean): void;
+ readonly DOM_KEY_LOCATION_LEFT: number;
+ readonly DOM_KEY_LOCATION_NUMPAD: number;
+ readonly DOM_KEY_LOCATION_RIGHT: number;
+ readonly DOM_KEY_LOCATION_STANDARD: number;
+}
+
+declare var KeyboardEvent: {
+ prototype: KeyboardEvent;
+ new(type: string, eventInitDict?: KeyboardEventInit): KeyboardEvent;
+ readonly DOM_KEY_LOCATION_LEFT: number;
+ readonly DOM_KEY_LOCATION_NUMPAD: number;
+ readonly DOM_KEY_LOCATION_RIGHT: number;
+ readonly DOM_KEY_LOCATION_STANDARD: number;
+};
+
+interface KeyframeEffect extends AnimationEffect {
+ composite: CompositeOperation;
+ iterationComposite: IterationCompositeOperation;
+ pseudoElement: string | null;
+ target: Element | null;
+ getKeyframes(): ComputedKeyframe[];
+ setKeyframes(keyframes: Keyframe[] | PropertyIndexedKeyframes | null): void;
+}
+
+declare var KeyframeEffect: {
+ prototype: KeyframeEffect;
+ new(target: Element | null, keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeEffectOptions): KeyframeEffect;
+ new(source: KeyframeEffect): KeyframeEffect;
+};
+
+interface LinkStyle {
+ readonly sheet: CSSStyleSheet | null;
+}
+
+/** The location (URL) of the object it is linked to. Changes done on it are reflected on the object it relates to. Both the Document and Window interface have such a linked Location, accessible via Document.location and Window.location respectively. */
+interface Location {
+ /** Returns a DOMStringList object listing the origins of the ancestor browsing contexts, from the parent browsing context to the top-level browsing context. */
+ readonly ancestorOrigins: DOMStringList;
+ /**
+ * Returns the Location object's URL's fragment (includes leading "#" if non-empty).
+ *
+ * Can be set, to navigate to the same URL with a changed fragment (ignores leading "#").
+ */
+ hash: string;
+ /**
+ * Returns the Location object's URL's host and port (if different from the default port for the scheme).
+ *
+ * Can be set, to navigate to the same URL with a changed host and port.
+ */
+ host: string;
+ /**
+ * Returns the Location object's URL's host.
+ *
+ * Can be set, to navigate to the same URL with a changed host.
+ */
+ hostname: string;
+ /**
+ * Returns the Location object's URL.
+ *
+ * Can be set, to navigate to the given URL.
+ */
+ href: string;
+ toString(): string;
+ /** Returns the Location object's URL's origin. */
+ readonly origin: string;
+ /**
+ * Returns the Location object's URL's path.
+ *
+ * Can be set, to navigate to the same URL with a changed path.
+ */
+ pathname: string;
+ /**
+ * Returns the Location object's URL's port.
+ *
+ * Can be set, to navigate to the same URL with a changed port.
+ */
+ port: string;
+ /**
+ * Returns the Location object's URL's scheme.
+ *
+ * Can be set, to navigate to the same URL with a changed scheme.
+ */
+ protocol: string;
+ /**
+ * Returns the Location object's URL's query (includes leading "?" if non-empty).
+ *
+ * Can be set, to navigate to the same URL with a changed query (ignores leading "?").
+ */
+ search: string;
+ /** Navigates to the given URL. */
+ assign(url: string | URL): void;
+ /** Reloads the current page. */
+ reload(): void;
+ /** Removes the current page from the session history and navigates to the given URL. */
+ replace(url: string | URL): void;
+}
+
+declare var Location: {
+ prototype: Location;
+ new(): Location;
+};
+
+/** Available only in secure contexts. */
+interface Lock {
+ readonly mode: LockMode;
+ readonly name: string;
+}
+
+declare var Lock: {
+ prototype: Lock;
+ new(): Lock;
+};
+
+/** Available only in secure contexts. */
+interface LockManager {
+ query(): Promise<LockManagerSnapshot>;
+ request(name: string, callback: LockGrantedCallback): Promise<any>;
+ request(name: string, options: LockOptions, callback: LockGrantedCallback): Promise<any>;
+}
+
+declare var LockManager: {
+ prototype: LockManager;
+ new(): LockManager;
+};
+
+interface MathMLElementEventMap extends ElementEventMap, DocumentAndElementEventHandlersEventMap, GlobalEventHandlersEventMap {
+}
+
+interface MathMLElement extends Element, DocumentAndElementEventHandlers, ElementCSSInlineStyle, GlobalEventHandlers, HTMLOrSVGElement {
+ addEventListener<K extends keyof MathMLElementEventMap>(type: K, listener: (this: MathMLElement, ev: MathMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof MathMLElementEventMap>(type: K, listener: (this: MathMLElement, ev: MathMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var MathMLElement: {
+ prototype: MathMLElement;
+ new(): MathMLElement;
+};
+
+interface MediaCapabilities {
+ decodingInfo(configuration: MediaDecodingConfiguration): Promise<MediaCapabilitiesDecodingInfo>;
+ encodingInfo(configuration: MediaEncodingConfiguration): Promise<MediaCapabilitiesEncodingInfo>;
+}
+
+declare var MediaCapabilities: {
+ prototype: MediaCapabilities;
+ new(): MediaCapabilities;
+};
+
+/**
+ * The MediaDevicesInfo interface contains information that describes a single media input or output device.
+ * Available only in secure contexts.
+ */
+interface MediaDeviceInfo {
+ readonly deviceId: string;
+ readonly groupId: string;
+ readonly kind: MediaDeviceKind;
+ readonly label: string;
+ toJSON(): any;
+}
+
+declare var MediaDeviceInfo: {
+ prototype: MediaDeviceInfo;
+ new(): MediaDeviceInfo;
+};
+
+interface MediaDevicesEventMap {
+ "devicechange": Event;
+}
+
+/**
+ * Provides access to connected media input devices like cameras and microphones, as well as screen sharing. In essence, it lets you obtain access to any hardware source of media data.
+ * Available only in secure contexts.
+ */
+interface MediaDevices extends EventTarget {
+ ondevicechange: ((this: MediaDevices, ev: Event) => any) | null;
+ enumerateDevices(): Promise<MediaDeviceInfo[]>;
+ getDisplayMedia(constraints?: DisplayMediaStreamConstraints): Promise<MediaStream>;
+ getSupportedConstraints(): MediaTrackSupportedConstraints;
+ getUserMedia(constraints?: MediaStreamConstraints): Promise<MediaStream>;
+ addEventListener<K extends keyof MediaDevicesEventMap>(type: K, listener: (this: MediaDevices, ev: MediaDevicesEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof MediaDevicesEventMap>(type: K, listener: (this: MediaDevices, ev: MediaDevicesEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var MediaDevices: {
+ prototype: MediaDevices;
+ new(): MediaDevices;
+};
+
+/** A MediaElementSourceNode has no inputs and exactly one output, and is created using the AudioContext.createMediaElementSource method. The amount of channels in the output equals the number of channels of the audio referenced by the HTMLMediaElement used in the creation of the node, or is 1 if the HTMLMediaElement has no audio. */
+interface MediaElementAudioSourceNode extends AudioNode {
+ readonly mediaElement: HTMLMediaElement;
+}
+
+declare var MediaElementAudioSourceNode: {
+ prototype: MediaElementAudioSourceNode;
+ new(context: AudioContext, options: MediaElementAudioSourceOptions): MediaElementAudioSourceNode;
+};
+
+interface MediaEncryptedEvent extends Event {
+ readonly initData: ArrayBuffer | null;
+ readonly initDataType: string;
+}
+
+declare var MediaEncryptedEvent: {
+ prototype: MediaEncryptedEvent;
+ new(type: string, eventInitDict?: MediaEncryptedEventInit): MediaEncryptedEvent;
+};
+
+/** An error which occurred while handling media in an HTML media element based on HTMLMediaElement, such as <audio> or <video>. */
+interface MediaError {
+ readonly code: number;
+ readonly message: string;
+ readonly MEDIA_ERR_ABORTED: number;
+ readonly MEDIA_ERR_DECODE: number;
+ readonly MEDIA_ERR_NETWORK: number;
+ readonly MEDIA_ERR_SRC_NOT_SUPPORTED: number;
+}
+
+declare var MediaError: {
+ prototype: MediaError;
+ new(): MediaError;
+ readonly MEDIA_ERR_ABORTED: number;
+ readonly MEDIA_ERR_DECODE: number;
+ readonly MEDIA_ERR_NETWORK: number;
+ readonly MEDIA_ERR_SRC_NOT_SUPPORTED: number;
+};
+
+/**
+ * This EncryptedMediaExtensions API interface contains the content and related data when the content decryption module generates a message for the session.
+ * Available only in secure contexts.
+ */
+interface MediaKeyMessageEvent extends Event {
+ readonly message: ArrayBuffer;
+ readonly messageType: MediaKeyMessageType;
+}
+
+declare var MediaKeyMessageEvent: {
+ prototype: MediaKeyMessageEvent;
+ new(type: string, eventInitDict: MediaKeyMessageEventInit): MediaKeyMessageEvent;
+};
+
+interface MediaKeySessionEventMap {
+ "keystatuseschange": Event;
+ "message": MediaKeyMessageEvent;
+}
+
+/**
+ * This EncryptedMediaExtensions API interface represents a context for message exchange with a content decryption module (CDM).
+ * Available only in secure contexts.
+ */
+interface MediaKeySession extends EventTarget {
+ readonly closed: Promise<MediaKeySessionClosedReason>;
+ readonly expiration: number;
+ readonly keyStatuses: MediaKeyStatusMap;
+ onkeystatuseschange: ((this: MediaKeySession, ev: Event) => any) | null;
+ onmessage: ((this: MediaKeySession, ev: MediaKeyMessageEvent) => any) | null;
+ readonly sessionId: string;
+ close(): Promise<void>;
+ generateRequest(initDataType: string, initData: BufferSource): Promise<void>;
+ load(sessionId: string): Promise<boolean>;
+ remove(): Promise<void>;
+ update(response: BufferSource): Promise<void>;
+ addEventListener<K extends keyof MediaKeySessionEventMap>(type: K, listener: (this: MediaKeySession, ev: MediaKeySessionEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof MediaKeySessionEventMap>(type: K, listener: (this: MediaKeySession, ev: MediaKeySessionEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var MediaKeySession: {
+ prototype: MediaKeySession;
+ new(): MediaKeySession;
+};
+
+/**
+ * This EncryptedMediaExtensions API interface is a read-only map of media key statuses by key IDs.
+ * Available only in secure contexts.
+ */
+interface MediaKeyStatusMap {
+ readonly size: number;
+ get(keyId: BufferSource): MediaKeyStatus | undefined;
+ has(keyId: BufferSource): boolean;
+ forEach(callbackfn: (value: MediaKeyStatus, key: BufferSource, parent: MediaKeyStatusMap) => void, thisArg?: any): void;
+}
+
+declare var MediaKeyStatusMap: {
+ prototype: MediaKeyStatusMap;
+ new(): MediaKeyStatusMap;
+};
+
+/**
+ * This EncryptedMediaExtensions API interface provides access to a Key System for decryption and/or a content protection provider. You can request an instance of this object using the Navigator.requestMediaKeySystemAccess method.
+ * Available only in secure contexts.
+ */
+interface MediaKeySystemAccess {
+ readonly keySystem: string;
+ createMediaKeys(): Promise<MediaKeys>;
+ getConfiguration(): MediaKeySystemConfiguration;
+}
+
+declare var MediaKeySystemAccess: {
+ prototype: MediaKeySystemAccess;
+ new(): MediaKeySystemAccess;
+};
+
+/**
+ * This EncryptedMediaExtensions API interface the represents a set of keys that an associated HTMLMediaElement can use for decryption of media data during playback.
+ * Available only in secure contexts.
+ */
+interface MediaKeys {
+ createSession(sessionType?: MediaKeySessionType): MediaKeySession;
+ setServerCertificate(serverCertificate: BufferSource): Promise<boolean>;
+}
+
+declare var MediaKeys: {
+ prototype: MediaKeys;
+ new(): MediaKeys;
+};
+
+interface MediaList {
+ readonly length: number;
+ mediaText: string;
+ toString(): string;
+ appendMedium(medium: string): void;
+ deleteMedium(medium: string): void;
+ item(index: number): string | null;
+ [index: number]: string;
+}
+
+declare var MediaList: {
+ prototype: MediaList;
+ new(): MediaList;
+};
+
+interface MediaMetadata {
+ album: string;
+ artist: string;
+ artwork: ReadonlyArray<MediaImage>;
+ title: string;
+}
+
+declare var MediaMetadata: {
+ prototype: MediaMetadata;
+ new(init?: MediaMetadataInit): MediaMetadata;
+};
+
+interface MediaQueryListEventMap {
+ "change": MediaQueryListEvent;
+}
+
+/** Stores information on a media query applied to a document, and handles sending notifications to listeners when the media query state change (i.e. when the media query test starts or stops evaluating to true). */
+interface MediaQueryList extends EventTarget {
+ readonly matches: boolean;
+ readonly media: string;
+ onchange: ((this: MediaQueryList, ev: MediaQueryListEvent) => any) | null;
+ /** @deprecated */
+ addListener(callback: ((this: MediaQueryList, ev: MediaQueryListEvent) => any) | null): void;
+ /** @deprecated */
+ removeListener(callback: ((this: MediaQueryList, ev: MediaQueryListEvent) => any) | null): void;
+ addEventListener<K extends keyof MediaQueryListEventMap>(type: K, listener: (this: MediaQueryList, ev: MediaQueryListEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof MediaQueryListEventMap>(type: K, listener: (this: MediaQueryList, ev: MediaQueryListEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var MediaQueryList: {
+ prototype: MediaQueryList;
+ new(): MediaQueryList;
+};
+
+interface MediaQueryListEvent extends Event {
+ readonly matches: boolean;
+ readonly media: string;
+}
+
+declare var MediaQueryListEvent: {
+ prototype: MediaQueryListEvent;
+ new(type: string, eventInitDict?: MediaQueryListEventInit): MediaQueryListEvent;
+};
+
+interface MediaRecorderEventMap {
+ "dataavailable": BlobEvent;
+ "error": MediaRecorderErrorEvent;
+ "pause": Event;
+ "resume": Event;
+ "start": Event;
+ "stop": Event;
+}
+
+interface MediaRecorder extends EventTarget {
+ readonly audioBitsPerSecond: number;
+ readonly mimeType: string;
+ ondataavailable: ((this: MediaRecorder, ev: BlobEvent) => any) | null;
+ onerror: ((this: MediaRecorder, ev: MediaRecorderErrorEvent) => any) | null;
+ onpause: ((this: MediaRecorder, ev: Event) => any) | null;
+ onresume: ((this: MediaRecorder, ev: Event) => any) | null;
+ onstart: ((this: MediaRecorder, ev: Event) => any) | null;
+ onstop: ((this: MediaRecorder, ev: Event) => any) | null;
+ readonly state: RecordingState;
+ readonly stream: MediaStream;
+ readonly videoBitsPerSecond: number;
+ pause(): void;
+ requestData(): void;
+ resume(): void;
+ start(timeslice?: number): void;
+ stop(): void;
+ addEventListener<K extends keyof MediaRecorderEventMap>(type: K, listener: (this: MediaRecorder, ev: MediaRecorderEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof MediaRecorderEventMap>(type: K, listener: (this: MediaRecorder, ev: MediaRecorderEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var MediaRecorder: {
+ prototype: MediaRecorder;
+ new(stream: MediaStream, options?: MediaRecorderOptions): MediaRecorder;
+ isTypeSupported(type: string): boolean;
+};
+
+interface MediaRecorderErrorEvent extends Event {
+ readonly error: DOMException;
+}
+
+declare var MediaRecorderErrorEvent: {
+ prototype: MediaRecorderErrorEvent;
+ new(type: string, eventInitDict: MediaRecorderErrorEventInit): MediaRecorderErrorEvent;
+};
+
+interface MediaSession {
+ metadata: MediaMetadata | null;
+ playbackState: MediaSessionPlaybackState;
+ setActionHandler(action: MediaSessionAction, handler: MediaSessionActionHandler | null): void;
+ setPositionState(state?: MediaPositionState): void;
+}
+
+declare var MediaSession: {
+ prototype: MediaSession;
+ new(): MediaSession;
+};
+
+interface MediaSourceEventMap {
+ "sourceclose": Event;
+ "sourceended": Event;
+ "sourceopen": Event;
+}
+
+/** This Media Source Extensions API interface represents a source of media data for an HTMLMediaElement object. A MediaSource object can be attached to a HTMLMediaElement to be played in the user agent. */
+interface MediaSource extends EventTarget {
+ readonly activeSourceBuffers: SourceBufferList;
+ duration: number;
+ onsourceclose: ((this: MediaSource, ev: Event) => any) | null;
+ onsourceended: ((this: MediaSource, ev: Event) => any) | null;
+ onsourceopen: ((this: MediaSource, ev: Event) => any) | null;
+ readonly readyState: ReadyState;
+ readonly sourceBuffers: SourceBufferList;
+ addSourceBuffer(type: string): SourceBuffer;
+ clearLiveSeekableRange(): void;
+ endOfStream(error?: EndOfStreamError): void;
+ removeSourceBuffer(sourceBuffer: SourceBuffer): void;
+ setLiveSeekableRange(start: number, end: number): void;
+ addEventListener<K extends keyof MediaSourceEventMap>(type: K, listener: (this: MediaSource, ev: MediaSourceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof MediaSourceEventMap>(type: K, listener: (this: MediaSource, ev: MediaSourceEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var MediaSource: {
+ prototype: MediaSource;
+ new(): MediaSource;
+ isTypeSupported(type: string): boolean;
+};
+
+interface MediaStreamEventMap {
+ "addtrack": MediaStreamTrackEvent;
+ "removetrack": MediaStreamTrackEvent;
+}
+
+/** A stream of media content. A stream consists of several tracks such as video or audio tracks. Each track is specified as an instance of MediaStreamTrack. */
+interface MediaStream extends EventTarget {
+ readonly active: boolean;
+ readonly id: string;
+ onaddtrack: ((this: MediaStream, ev: MediaStreamTrackEvent) => any) | null;
+ onremovetrack: ((this: MediaStream, ev: MediaStreamTrackEvent) => any) | null;
+ addTrack(track: MediaStreamTrack): void;
+ clone(): MediaStream;
+ getAudioTracks(): MediaStreamTrack[];
+ getTrackById(trackId: string): MediaStreamTrack | null;
+ getTracks(): MediaStreamTrack[];
+ getVideoTracks(): MediaStreamTrack[];
+ removeTrack(track: MediaStreamTrack): void;
+ addEventListener<K extends keyof MediaStreamEventMap>(type: K, listener: (this: MediaStream, ev: MediaStreamEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof MediaStreamEventMap>(type: K, listener: (this: MediaStream, ev: MediaStreamEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var MediaStream: {
+ prototype: MediaStream;
+ new(): MediaStream;
+ new(stream: MediaStream): MediaStream;
+ new(tracks: MediaStreamTrack[]): MediaStream;
+};
+
+interface MediaStreamAudioDestinationNode extends AudioNode {
+ readonly stream: MediaStream;
+}
+
+declare var MediaStreamAudioDestinationNode: {
+ prototype: MediaStreamAudioDestinationNode;
+ new(context: AudioContext, options?: AudioNodeOptions): MediaStreamAudioDestinationNode;
+};
+
+/** A type of AudioNode which operates as an audio source whose media is received from a MediaStream obtained using the WebRTC or Media Capture and Streams APIs. */
+interface MediaStreamAudioSourceNode extends AudioNode {
+ readonly mediaStream: MediaStream;
+}
+
+declare var MediaStreamAudioSourceNode: {
+ prototype: MediaStreamAudioSourceNode;
+ new(context: AudioContext, options: MediaStreamAudioSourceOptions): MediaStreamAudioSourceNode;
+};
+
+interface MediaStreamTrackEventMap {
+ "ended": Event;
+ "mute": Event;
+ "unmute": Event;
+}
+
+/** A single media track within a stream; typically, these are audio or video tracks, but other track types may exist as well. */
+interface MediaStreamTrack extends EventTarget {
+ contentHint: string;
+ enabled: boolean;
+ readonly id: string;
+ readonly kind: string;
+ readonly label: string;
+ readonly muted: boolean;
+ onended: ((this: MediaStreamTrack, ev: Event) => any) | null;
+ onmute: ((this: MediaStreamTrack, ev: Event) => any) | null;
+ onunmute: ((this: MediaStreamTrack, ev: Event) => any) | null;
+ readonly readyState: MediaStreamTrackState;
+ applyConstraints(constraints?: MediaTrackConstraints): Promise<void>;
+ clone(): MediaStreamTrack;
+ getCapabilities(): MediaTrackCapabilities;
+ getConstraints(): MediaTrackConstraints;
+ getSettings(): MediaTrackSettings;
+ stop(): void;
+ addEventListener<K extends keyof MediaStreamTrackEventMap>(type: K, listener: (this: MediaStreamTrack, ev: MediaStreamTrackEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof MediaStreamTrackEventMap>(type: K, listener: (this: MediaStreamTrack, ev: MediaStreamTrackEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var MediaStreamTrack: {
+ prototype: MediaStreamTrack;
+ new(): MediaStreamTrack;
+};
+
+/** Events which indicate that a MediaStream has had tracks added to or removed from the stream through calls to Media Stream API methods. These events are sent to the stream when these changes occur. */
+interface MediaStreamTrackEvent extends Event {
+ readonly track: MediaStreamTrack;
+}
+
+declare var MediaStreamTrackEvent: {
+ prototype: MediaStreamTrackEvent;
+ new(type: string, eventInitDict: MediaStreamTrackEventInit): MediaStreamTrackEvent;
+};
+
+/** This Channel Messaging API interface allows us to create a new message channel and send data through it via its two MessagePort properties. */
+interface MessageChannel {
+ /** Returns the first MessagePort object. */
+ readonly port1: MessagePort;
+ /** Returns the second MessagePort object. */
+ readonly port2: MessagePort;
+}
+
+declare var MessageChannel: {
+ prototype: MessageChannel;
+ new(): MessageChannel;
+};
+
+/** A message received by a target object. */
+interface MessageEvent<T = any> extends Event {
+ /** Returns the data of the message. */
+ readonly data: T;
+ /** Returns the last event ID string, for server-sent events. */
+ readonly lastEventId: string;
+ /** Returns the origin of the message, for server-sent events and cross-document messaging. */
+ readonly origin: string;
+ /** Returns the MessagePort array sent with the message, for cross-document messaging and channel messaging. */
+ readonly ports: ReadonlyArray<MessagePort>;
+ /** Returns the WindowProxy of the source window, for cross-document messaging, and the MessagePort being attached, in the connect event fired at SharedWorkerGlobalScope objects. */
+ readonly source: MessageEventSource | null;
+ /** @deprecated */
+ initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: MessagePort[]): void;
+}
+
+declare var MessageEvent: {
+ prototype: MessageEvent;
+ new<T>(type: string, eventInitDict?: MessageEventInit<T>): MessageEvent<T>;
+};
+
+interface MessagePortEventMap {
+ "message": MessageEvent;
+ "messageerror": MessageEvent;
+}
+
+/** This Channel Messaging API interface represents one of the two ports of a MessageChannel, allowing messages to be sent from one port and listening out for them arriving at the other. */
+interface MessagePort extends EventTarget {
+ onmessage: ((this: MessagePort, ev: MessageEvent) => any) | null;
+ onmessageerror: ((this: MessagePort, ev: MessageEvent) => any) | null;
+ /** Disconnects the port, so that it is no longer active. */
+ close(): void;
+ /**
+ * Posts a message through the channel. Objects listed in transfer are transferred, not just cloned, meaning that they are no longer usable on the sending side.
+ *
+ * Throws a "DataCloneError" DOMException if transfer contains duplicate objects or port, or if message could not be cloned.
+ */
+ postMessage(message: any, transfer: Transferable[]): void;
+ postMessage(message: any, options?: StructuredSerializeOptions): void;
+ /** Begins dispatching messages received on the port. */
+ start(): void;
+ addEventListener<K extends keyof MessagePortEventMap>(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof MessagePortEventMap>(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var MessagePort: {
+ prototype: MessagePort;
+ new(): MessagePort;
+};
+
+/**
+ * Provides contains information about a MIME type associated with a particular plugin. NavigatorPlugins.mimeTypes returns an array of this object.
+ * @deprecated
+ */
+interface MimeType {
+ /**
+ * Returns the MIME type's description.
+ * @deprecated
+ */
+ readonly description: string;
+ /**
+ * Returns the Plugin object that implements this MIME type.
+ * @deprecated
+ */
+ readonly enabledPlugin: Plugin;
+ /**
+ * Returns the MIME type's typical file extensions, in a comma-separated list.
+ * @deprecated
+ */
+ readonly suffixes: string;
+ /**
+ * Returns the MIME type.
+ * @deprecated
+ */
+ readonly type: string;
+}
+
+/** @deprecated */
+declare var MimeType: {
+ prototype: MimeType;
+ new(): MimeType;
+};
+
+/**
+ * Returns an array of MimeType instances, each of which contains information about a supported browser plugins. This object is returned by NavigatorPlugins.mimeTypes.
+ * @deprecated
+ */
+interface MimeTypeArray {
+ /** @deprecated */
+ readonly length: number;
+ /** @deprecated */
+ item(index: number): MimeType | null;
+ /** @deprecated */
+ namedItem(name: string): MimeType | null;
+ [index: number]: MimeType;
+}
+
+/** @deprecated */
+declare var MimeTypeArray: {
+ prototype: MimeTypeArray;
+ new(): MimeTypeArray;
+};
+
+/** Events that occur due to the user interacting with a pointing device (such as a mouse). Common events using this interface include click, dblclick, mouseup, mousedown. */
+interface MouseEvent extends UIEvent {
+ readonly altKey: boolean;
+ readonly button: number;
+ readonly buttons: number;
+ readonly clientX: number;
+ readonly clientY: number;
+ readonly ctrlKey: boolean;
+ readonly metaKey: boolean;
+ readonly movementX: number;
+ readonly movementY: number;
+ readonly offsetX: number;
+ readonly offsetY: number;
+ readonly pageX: number;
+ readonly pageY: number;
+ readonly relatedTarget: EventTarget | null;
+ readonly screenX: number;
+ readonly screenY: number;
+ readonly shiftKey: boolean;
+ readonly x: number;
+ readonly y: number;
+ getModifierState(keyArg: string): boolean;
+ /** @deprecated */
+ initMouseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget | null): void;
+}
+
+declare var MouseEvent: {
+ prototype: MouseEvent;
+ new(type: string, eventInitDict?: MouseEventInit): MouseEvent;
+};
+
+/**
+ * Provides event properties that are specific to modifications to the Document Object Model (DOM) hierarchy and nodes.
+ * @deprecated DOM4 [DOM] provides a new mechanism using a MutationObserver interface which addresses the use cases that mutation events solve, but in a more performant manner. Thus, this specification describes mutation events for reference and completeness of legacy behavior, but deprecates the use of the MutationEvent interface.
+ */
+interface MutationEvent extends Event {
+ /** @deprecated */
+ readonly attrChange: number;
+ /** @deprecated */
+ readonly attrName: string;
+ /** @deprecated */
+ readonly newValue: string;
+ /** @deprecated */
+ readonly prevValue: string;
+ /** @deprecated */
+ readonly relatedNode: Node | null;
+ /** @deprecated */
+ initMutationEvent(typeArg: string, bubblesArg?: boolean, cancelableArg?: boolean, relatedNodeArg?: Node | null, prevValueArg?: string, newValueArg?: string, attrNameArg?: string, attrChangeArg?: number): void;
+ readonly ADDITION: number;
+ readonly MODIFICATION: number;
+ readonly REMOVAL: number;
+}
+
+/** @deprecated */
+declare var MutationEvent: {
+ prototype: MutationEvent;
+ new(): MutationEvent;
+ readonly ADDITION: number;
+ readonly MODIFICATION: number;
+ readonly REMOVAL: number;
+};
+
+/** Provides the ability to watch for changes being made to the DOM tree. It is designed as a replacement for the older Mutation Events feature which was part of the DOM3 Events specification. */
+interface MutationObserver {
+ /** Stops observer from observing any mutations. Until the observe() method is used again, observer's callback will not be invoked. */
+ disconnect(): void;
+ /**
+ * Instructs the user agent to observe a given target (a node) and report any mutations based on the criteria given by options (an object).
+ *
+ * The options argument allows for setting mutation observation options via object members.
+ */
+ observe(target: Node, options?: MutationObserverInit): void;
+ /** Empties the record queue and returns what was in there. */
+ takeRecords(): MutationRecord[];
+}
+
+declare var MutationObserver: {
+ prototype: MutationObserver;
+ new(callback: MutationCallback): MutationObserver;
+};
+
+/** A MutationRecord represents an individual DOM mutation. It is the object that is passed to MutationObserver's callback. */
+interface MutationRecord {
+ /** Return the nodes added and removed respectively. */
+ readonly addedNodes: NodeList;
+ /** Returns the local name of the changed attribute, and null otherwise. */
+ readonly attributeName: string | null;
+ /** Returns the namespace of the changed attribute, and null otherwise. */
+ readonly attributeNamespace: string | null;
+ /** Return the previous and next sibling respectively of the added or removed nodes, and null otherwise. */
+ readonly nextSibling: Node | null;
+ /** The return value depends on type. For "attributes", it is the value of the changed attribute before the change. For "characterData", it is the data of the changed node before the change. For "childList", it is null. */
+ readonly oldValue: string | null;
+ /** Return the previous and next sibling respectively of the added or removed nodes, and null otherwise. */
+ readonly previousSibling: Node | null;
+ /** Return the nodes added and removed respectively. */
+ readonly removedNodes: NodeList;
+ /** Returns the node the mutation affected, depending on the type. For "attributes", it is the element whose attribute changed. For "characterData", it is the CharacterData node. For "childList", it is the node whose children changed. */
+ readonly target: Node;
+ /** Returns "attributes" if it was an attribute mutation. "characterData" if it was a mutation to a CharacterData node. And "childList" if it was a mutation to the tree of nodes. */
+ readonly type: MutationRecordType;
+}
+
+declare var MutationRecord: {
+ prototype: MutationRecord;
+ new(): MutationRecord;
+};
+
+/** A collection of Attr objects. Objects inside a NamedNodeMap are not in any particular order, unlike NodeList, although they may be accessed by an index as in an array. */
+interface NamedNodeMap {
+ readonly length: number;
+ getNamedItem(qualifiedName: string): Attr | null;
+ getNamedItemNS(namespace: string | null, localName: string): Attr | null;
+ item(index: number): Attr | null;
+ removeNamedItem(qualifiedName: string): Attr;
+ removeNamedItemNS(namespace: string | null, localName: string): Attr;
+ setNamedItem(attr: Attr): Attr | null;
+ setNamedItemNS(attr: Attr): Attr | null;
+ [index: number]: Attr;
+}
+
+declare var NamedNodeMap: {
+ prototype: NamedNodeMap;
+ new(): NamedNodeMap;
+};
+
+/** Available only in secure contexts. */
+interface NavigationPreloadManager {
+ disable(): Promise<void>;
+ enable(): Promise<void>;
+ getState(): Promise<NavigationPreloadState>;
+ setHeaderValue(value: string): Promise<void>;
+}
+
+declare var NavigationPreloadManager: {
+ prototype: NavigationPreloadManager;
+ new(): NavigationPreloadManager;
+};
+
+/** The state and the identity of the user agent. It allows scripts to query it and to register themselves to carry on some activities. */
+interface Navigator extends NavigatorAutomationInformation, NavigatorConcurrentHardware, NavigatorContentUtils, NavigatorCookies, NavigatorID, NavigatorLanguage, NavigatorLocks, NavigatorOnLine, NavigatorPlugins, NavigatorStorage {
+ /** Available only in secure contexts. */
+ readonly clipboard: Clipboard;
+ /** Available only in secure contexts. */
+ readonly credentials: CredentialsContainer;
+ readonly doNotTrack: string | null;
+ readonly geolocation: Geolocation;
+ readonly maxTouchPoints: number;
+ readonly mediaCapabilities: MediaCapabilities;
+ /** Available only in secure contexts. */
+ readonly mediaDevices: MediaDevices;
+ readonly mediaSession: MediaSession;
+ readonly permissions: Permissions;
+ /** Available only in secure contexts. */
+ readonly serviceWorker: ServiceWorkerContainer;
+ /** Available only in secure contexts. */
+ canShare(data?: ShareData): boolean;
+ getGamepads(): (Gamepad | null)[];
+ /** Available only in secure contexts. */
+ requestMediaKeySystemAccess(keySystem: string, supportedConfigurations: MediaKeySystemConfiguration[]): Promise<MediaKeySystemAccess>;
+ sendBeacon(url: string | URL, data?: BodyInit | null): boolean;
+ /** Available only in secure contexts. */
+ share(data?: ShareData): Promise<void>;
+ vibrate(pattern: VibratePattern): boolean;
+}
+
+declare var Navigator: {
+ prototype: Navigator;
+ new(): Navigator;
+};
+
+interface NavigatorAutomationInformation {
+ readonly webdriver: boolean;
+}
+
+interface NavigatorConcurrentHardware {
+ readonly hardwareConcurrency: number;
+}
+
+interface NavigatorContentUtils {
+ /** Available only in secure contexts. */
+ registerProtocolHandler(scheme: string, url: string | URL): void;
+}
+
+interface NavigatorCookies {
+ readonly cookieEnabled: boolean;
+}
+
+interface NavigatorID {
+ /** @deprecated */
+ readonly appCodeName: string;
+ /** @deprecated */
+ readonly appName: string;
+ /** @deprecated */
+ readonly appVersion: string;
+ readonly platform: string;
+ /** @deprecated */
+ readonly product: string;
+ /** @deprecated */
+ readonly productSub: string;
+ readonly userAgent: string;
+ readonly vendor: string;
+ /** @deprecated */
+ readonly vendorSub: string;
+}
+
+interface NavigatorLanguage {
+ readonly language: string;
+ readonly languages: ReadonlyArray<string>;
+}
+
+/** Available only in secure contexts. */
+interface NavigatorLocks {
+ readonly locks: LockManager;
+}
+
+interface NavigatorOnLine {
+ readonly onLine: boolean;
+}
+
+interface NavigatorPlugins {
+ /** @deprecated */
+ readonly mimeTypes: MimeTypeArray;
+ readonly pdfViewerEnabled: boolean;
+ /** @deprecated */
+ readonly plugins: PluginArray;
+ /** @deprecated */
+ javaEnabled(): boolean;
+}
+
+/** Available only in secure contexts. */
+interface NavigatorStorage {
+ readonly storage: StorageManager;
+}
+
+/** Node is an interface from which a number of DOM API object types inherit. It allows those types to be treated similarly; for example, inheriting the same set of methods, or being tested in the same way. */
+interface Node extends EventTarget {
+ /** Returns node's node document's document base URL. */
+ readonly baseURI: string;
+ /** Returns the children. */
+ readonly childNodes: NodeListOf<ChildNode>;
+ /** Returns the first child. */
+ readonly firstChild: ChildNode | null;
+ /** Returns true if node is connected and false otherwise. */
+ readonly isConnected: boolean;
+ /** Returns the last child. */
+ readonly lastChild: ChildNode | null;
+ /** Returns the next sibling. */
+ readonly nextSibling: ChildNode | null;
+ /** Returns a string appropriate for the type of node. */
+ readonly nodeName: string;
+ /** Returns the type of node. */
+ readonly nodeType: number;
+ nodeValue: string | null;
+ /** Returns the node document. Returns null for documents. */
+ readonly ownerDocument: Document | null;
+ /** Returns the parent element. */
+ readonly parentElement: HTMLElement | null;
+ /** Returns the parent. */
+ readonly parentNode: ParentNode | null;
+ /** Returns the previous sibling. */
+ readonly previousSibling: ChildNode | null;
+ textContent: string | null;
+ appendChild<T extends Node>(node: T): T;
+ /** Returns a copy of node. If deep is true, the copy also includes the node's descendants. */
+ cloneNode(deep?: boolean): Node;
+ /** Returns a bitmask indicating the position of other relative to node. */
+ compareDocumentPosition(other: Node): number;
+ /** Returns true if other is an inclusive descendant of node, and false otherwise. */
+ contains(other: Node | null): boolean;
+ /** Returns node's root. */
+ getRootNode(options?: GetRootNodeOptions): Node;
+ /** Returns whether node has children. */
+ hasChildNodes(): boolean;
+ insertBefore<T extends Node>(node: T, child: Node | null): T;
+ isDefaultNamespace(namespace: string | null): boolean;
+ /** Returns whether node and otherNode have the same properties. */
+ isEqualNode(otherNode: Node | null): boolean;
+ isSameNode(otherNode: Node | null): boolean;
+ lookupNamespaceURI(prefix: string | null): string | null;
+ lookupPrefix(namespace: string | null): string | null;
+ /** Removes empty exclusive Text nodes and concatenates the data of remaining contiguous exclusive Text nodes into the first of their nodes. */
+ normalize(): void;
+ removeChild<T extends Node>(child: T): T;
+ replaceChild<T extends Node>(node: Node, child: T): T;
+ readonly ATTRIBUTE_NODE: number;
+ /** node is a CDATASection node. */
+ readonly CDATA_SECTION_NODE: number;
+ /** node is a Comment node. */
+ readonly COMMENT_NODE: number;
+ /** node is a DocumentFragment node. */
+ readonly DOCUMENT_FRAGMENT_NODE: number;
+ /** node is a document. */
+ readonly DOCUMENT_NODE: number;
+ /** Set when other is a descendant of node. */
+ readonly DOCUMENT_POSITION_CONTAINED_BY: number;
+ /** Set when other is an ancestor of node. */
+ readonly DOCUMENT_POSITION_CONTAINS: number;
+ /** Set when node and other are not in the same tree. */
+ readonly DOCUMENT_POSITION_DISCONNECTED: number;
+ /** Set when other is following node. */
+ readonly DOCUMENT_POSITION_FOLLOWING: number;
+ readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
+ /** Set when other is preceding node. */
+ readonly DOCUMENT_POSITION_PRECEDING: number;
+ /** node is a doctype. */
+ readonly DOCUMENT_TYPE_NODE: number;
+ /** node is an element. */
+ readonly ELEMENT_NODE: number;
+ readonly ENTITY_NODE: number;
+ readonly ENTITY_REFERENCE_NODE: number;
+ readonly NOTATION_NODE: number;
+ /** node is a ProcessingInstruction node. */
+ readonly PROCESSING_INSTRUCTION_NODE: number;
+ /** node is a Text node. */
+ readonly TEXT_NODE: number;
+}
+
+declare var Node: {
+ prototype: Node;
+ new(): Node;
+ readonly ATTRIBUTE_NODE: number;
+ /** node is a CDATASection node. */
+ readonly CDATA_SECTION_NODE: number;
+ /** node is a Comment node. */
+ readonly COMMENT_NODE: number;
+ /** node is a DocumentFragment node. */
+ readonly DOCUMENT_FRAGMENT_NODE: number;
+ /** node is a document. */
+ readonly DOCUMENT_NODE: number;
+ /** Set when other is a descendant of node. */
+ readonly DOCUMENT_POSITION_CONTAINED_BY: number;
+ /** Set when other is an ancestor of node. */
+ readonly DOCUMENT_POSITION_CONTAINS: number;
+ /** Set when node and other are not in the same tree. */
+ readonly DOCUMENT_POSITION_DISCONNECTED: number;
+ /** Set when other is following node. */
+ readonly DOCUMENT_POSITION_FOLLOWING: number;
+ readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
+ /** Set when other is preceding node. */
+ readonly DOCUMENT_POSITION_PRECEDING: number;
+ /** node is a doctype. */
+ readonly DOCUMENT_TYPE_NODE: number;
+ /** node is an element. */
+ readonly ELEMENT_NODE: number;
+ readonly ENTITY_NODE: number;
+ readonly ENTITY_REFERENCE_NODE: number;
+ readonly NOTATION_NODE: number;
+ /** node is a ProcessingInstruction node. */
+ readonly PROCESSING_INSTRUCTION_NODE: number;
+ /** node is a Text node. */
+ readonly TEXT_NODE: number;
+};
+
+/** An iterator over the members of a list of the nodes in a subtree of the DOM. The nodes will be returned in document order. */
+interface NodeIterator {
+ readonly filter: NodeFilter | null;
+ readonly pointerBeforeReferenceNode: boolean;
+ readonly referenceNode: Node;
+ readonly root: Node;
+ readonly whatToShow: number;
+ /** @deprecated */
+ detach(): void;
+ nextNode(): Node | null;
+ previousNode(): Node | null;
+}
+
+declare var NodeIterator: {
+ prototype: NodeIterator;
+ new(): NodeIterator;
+};
+
+/** NodeList objects are collections of nodes, usually returned by properties such as Node.childNodes and methods such as document.querySelectorAll(). */
+interface NodeList {
+ /** Returns the number of nodes in the collection. */
+ readonly length: number;
+ /** Returns the node with index index from the collection. The nodes are sorted in tree order. */
+ item(index: number): Node | null;
+ /**
+ * Performs the specified action for each node in an list.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the list.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: Node, key: number, parent: NodeList) => void, thisArg?: any): void;
+ [index: number]: Node;
+}
+
+declare var NodeList: {
+ prototype: NodeList;
+ new(): NodeList;
+};
+
+interface NodeListOf<TNode extends Node> extends NodeList {
+ item(index: number): TNode;
+ /**
+ * Performs the specified action for each node in an list.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the list.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: TNode, key: number, parent: NodeListOf<TNode>) => void, thisArg?: any): void;
+ [index: number]: TNode;
+}
+
+interface NonDocumentTypeChildNode {
+ /** Returns the first following sibling that is an element, and null otherwise. */
+ readonly nextElementSibling: Element | null;
+ /** Returns the first preceding sibling that is an element, and null otherwise. */
+ readonly previousElementSibling: Element | null;
+}
+
+interface NonElementParentNode {
+ /** Returns the first element within node's descendants whose ID is elementId. */
+ getElementById(elementId: string): Element | null;
+}
+
+interface NotificationEventMap {
+ "click": Event;
+ "close": Event;
+ "error": Event;
+ "show": Event;
+}
+
+/** This Notifications API interface is used to configure and display desktop notifications to the user. */
+interface Notification extends EventTarget {
+ readonly body: string;
+ readonly data: any;
+ readonly dir: NotificationDirection;
+ readonly icon: string;
+ readonly lang: string;
+ onclick: ((this: Notification, ev: Event) => any) | null;
+ onclose: ((this: Notification, ev: Event) => any) | null;
+ onerror: ((this: Notification, ev: Event) => any) | null;
+ onshow: ((this: Notification, ev: Event) => any) | null;
+ readonly tag: string;
+ readonly title: string;
+ close(): void;
+ addEventListener<K extends keyof NotificationEventMap>(type: K, listener: (this: Notification, ev: NotificationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof NotificationEventMap>(type: K, listener: (this: Notification, ev: NotificationEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var Notification: {
+ prototype: Notification;
+ new(title: string, options?: NotificationOptions): Notification;
+ readonly permission: NotificationPermission;
+ requestPermission(deprecatedCallback?: NotificationPermissionCallback): Promise<NotificationPermission>;
+};
+
+/** The OES_element_index_uint extension is part of the WebGL API and adds support for gl.UNSIGNED_INT types to WebGLRenderingContext.drawElements(). */
+interface OES_element_index_uint {
+}
+
+interface OES_fbo_render_mipmap {
+}
+
+/** The OES_standard_derivatives extension is part of the WebGL API and adds the GLSL derivative functions dFdx, dFdy, and fwidth. */
+interface OES_standard_derivatives {
+ readonly FRAGMENT_SHADER_DERIVATIVE_HINT_OES: GLenum;
+}
+
+/** The OES_texture_float extension is part of the WebGL API and exposes floating-point pixel types for textures. */
+interface OES_texture_float {
+}
+
+/** The OES_texture_float_linear extension is part of the WebGL API and allows linear filtering with floating-point pixel types for textures. */
+interface OES_texture_float_linear {
+}
+
+/** The OES_texture_half_float extension is part of the WebGL API and adds texture formats with 16- (aka half float) and 32-bit floating-point components. */
+interface OES_texture_half_float {
+ readonly HALF_FLOAT_OES: GLenum;
+}
+
+/** The OES_texture_half_float_linear extension is part of the WebGL API and allows linear filtering with half floating-point pixel types for textures. */
+interface OES_texture_half_float_linear {
+}
+
+interface OES_vertex_array_object {
+ bindVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): void;
+ createVertexArrayOES(): WebGLVertexArrayObjectOES | null;
+ deleteVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): void;
+ isVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): GLboolean;
+ readonly VERTEX_ARRAY_BINDING_OES: GLenum;
+}
+
+interface OVR_multiview2 {
+ framebufferTextureMultiviewOVR(target: GLenum, attachment: GLenum, texture: WebGLTexture | null, level: GLint, baseViewIndex: GLint, numViews: GLsizei): void;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR: GLenum;
+ readonly MAX_VIEWS_OVR: GLenum;
+}
+
+/** The Web Audio API OfflineAudioCompletionEvent interface represents events that occur when the processing of an OfflineAudioContext is terminated. The complete event implements this interface. */
+interface OfflineAudioCompletionEvent extends Event {
+ readonly renderedBuffer: AudioBuffer;
+}
+
+declare var OfflineAudioCompletionEvent: {
+ prototype: OfflineAudioCompletionEvent;
+ new(type: string, eventInitDict: OfflineAudioCompletionEventInit): OfflineAudioCompletionEvent;
+};
+
+interface OfflineAudioContextEventMap extends BaseAudioContextEventMap {
+ "complete": OfflineAudioCompletionEvent;
+}
+
+/** An AudioContext interface representing an audio-processing graph built from linked together AudioNodes. In contrast with a standard AudioContext, an OfflineAudioContext doesn't render the audio to the device hardware; instead, it generates it, as fast as it can, and outputs the result to an AudioBuffer. */
+interface OfflineAudioContext extends BaseAudioContext {
+ readonly length: number;
+ oncomplete: ((this: OfflineAudioContext, ev: OfflineAudioCompletionEvent) => any) | null;
+ resume(): Promise<void>;
+ startRendering(): Promise<AudioBuffer>;
+ suspend(suspendTime: number): Promise<void>;
+ addEventListener<K extends keyof OfflineAudioContextEventMap>(type: K, listener: (this: OfflineAudioContext, ev: OfflineAudioContextEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof OfflineAudioContextEventMap>(type: K, listener: (this: OfflineAudioContext, ev: OfflineAudioContextEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var OfflineAudioContext: {
+ prototype: OfflineAudioContext;
+ new(contextOptions: OfflineAudioContextOptions): OfflineAudioContext;
+ new(numberOfChannels: number, length: number, sampleRate: number): OfflineAudioContext;
+};
+
+/** The OscillatorNode interface represents a periodic waveform, such as a sine wave. It is an AudioScheduledSourceNode audio-processing module that causes a specified frequency of a given wave to be created—in effect, a constant tone. */
+interface OscillatorNode extends AudioScheduledSourceNode {
+ readonly detune: AudioParam;
+ readonly frequency: AudioParam;
+ type: OscillatorType;
+ setPeriodicWave(periodicWave: PeriodicWave): void;
+ addEventListener<K extends keyof AudioScheduledSourceNodeEventMap>(type: K, listener: (this: OscillatorNode, ev: AudioScheduledSourceNodeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof AudioScheduledSourceNodeEventMap>(type: K, listener: (this: OscillatorNode, ev: AudioScheduledSourceNodeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var OscillatorNode: {
+ prototype: OscillatorNode;
+ new(context: BaseAudioContext, options?: OscillatorOptions): OscillatorNode;
+};
+
+interface OverconstrainedError extends Error {
+ readonly constraint: string;
+}
+
+declare var OverconstrainedError: {
+ prototype: OverconstrainedError;
+ new(constraint: string, message?: string): OverconstrainedError;
+};
+
+/** The PageTransitionEvent is fired when a document is being loaded or unloaded. */
+interface PageTransitionEvent extends Event {
+ /**
+ * For the pageshow event, returns false if the page is newly being loaded (and the load event will fire). Otherwise, returns true.
+ *
+ * For the pagehide event, returns false if the page is going away for the last time. Otherwise, returns true, meaning that (if nothing conspires to make the page unsalvageable) the page might be reused if the user navigates back to this page.
+ *
+ * Things that can cause the page to be unsalvageable include:
+ *
+ * The user agent decided to not keep the Document alive in a session history entry after unload
+ * Having iframes that are not salvageable
+ * Active WebSocket objects
+ * Aborting a Document
+ */
+ readonly persisted: boolean;
+}
+
+declare var PageTransitionEvent: {
+ prototype: PageTransitionEvent;
+ new(type: string, eventInitDict?: PageTransitionEventInit): PageTransitionEvent;
+};
+
+/** A PannerNode always has exactly one input and one output: the input can be mono or stereo but the output is always stereo (2 channels); you can't have panning effects without at least two audio channels! */
+interface PannerNode extends AudioNode {
+ coneInnerAngle: number;
+ coneOuterAngle: number;
+ coneOuterGain: number;
+ distanceModel: DistanceModelType;
+ maxDistance: number;
+ readonly orientationX: AudioParam;
+ readonly orientationY: AudioParam;
+ readonly orientationZ: AudioParam;
+ panningModel: PanningModelType;
+ readonly positionX: AudioParam;
+ readonly positionY: AudioParam;
+ readonly positionZ: AudioParam;
+ refDistance: number;
+ rolloffFactor: number;
+ /** @deprecated */
+ setOrientation(x: number, y: number, z: number): void;
+ /** @deprecated */
+ setPosition(x: number, y: number, z: number): void;
+}
+
+declare var PannerNode: {
+ prototype: PannerNode;
+ new(context: BaseAudioContext, options?: PannerOptions): PannerNode;
+};
+
+interface ParentNode extends Node {
+ readonly childElementCount: number;
+ /** Returns the child elements. */
+ readonly children: HTMLCollection;
+ /** Returns the first child that is an element, and null otherwise. */
+ readonly firstElementChild: Element | null;
+ /** Returns the last child that is an element, and null otherwise. */
+ readonly lastElementChild: Element | null;
+ /**
+ * Inserts nodes after the last child of node, while replacing strings in nodes with equivalent Text nodes.
+ *
+ * Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
+ */
+ append(...nodes: (Node | string)[]): void;
+ /**
+ * Inserts nodes before the first child of node, while replacing strings in nodes with equivalent Text nodes.
+ *
+ * Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
+ */
+ prepend(...nodes: (Node | string)[]): void;
+ /** Returns the first element that is a descendant of node that matches selectors. */
+ querySelector<K extends keyof HTMLElementTagNameMap>(selectors: K): HTMLElementTagNameMap[K] | null;
+ querySelector<K extends keyof SVGElementTagNameMap>(selectors: K): SVGElementTagNameMap[K] | null;
+ querySelector<E extends Element = Element>(selectors: string): E | null;
+ /** Returns all element descendants of node that match selectors. */
+ querySelectorAll<K extends keyof HTMLElementTagNameMap>(selectors: K): NodeListOf<HTMLElementTagNameMap[K]>;
+ querySelectorAll<K extends keyof SVGElementTagNameMap>(selectors: K): NodeListOf<SVGElementTagNameMap[K]>;
+ querySelectorAll<E extends Element = Element>(selectors: string): NodeListOf<E>;
+ /**
+ * Replace all children of node with nodes, while replacing strings in nodes with equivalent Text nodes.
+ *
+ * Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
+ */
+ replaceChildren(...nodes: (Node | string)[]): void;
+}
+
+/** This Canvas 2D API interface is used to declare a path that can then be used on a CanvasRenderingContext2D object. The path methods of the CanvasRenderingContext2D interface are also present on this interface, which gives you the convenience of being able to retain and replay your path whenever desired. */
+interface Path2D extends CanvasPath {
+ /** Adds to the path the path given by the argument. */
+ addPath(path: Path2D, transform?: DOMMatrix2DInit): void;
+}
+
+declare var Path2D: {
+ prototype: Path2D;
+ new(path?: Path2D | string): Path2D;
+};
+
+/** Available only in secure contexts. */
+interface PaymentMethodChangeEvent extends PaymentRequestUpdateEvent {
+ readonly methodDetails: any;
+ readonly methodName: string;
+}
+
+declare var PaymentMethodChangeEvent: {
+ prototype: PaymentMethodChangeEvent;
+ new(type: string, eventInitDict?: PaymentMethodChangeEventInit): PaymentMethodChangeEvent;
+};
+
+interface PaymentRequestEventMap {
+ "paymentmethodchange": Event;
+}
+
+/**
+ * This Payment Request API interface is the primary access point into the API, and lets web content and apps accept payments from the end user.
+ * Available only in secure contexts.
+ */
+interface PaymentRequest extends EventTarget {
+ readonly id: string;
+ onpaymentmethodchange: ((this: PaymentRequest, ev: Event) => any) | null;
+ abort(): Promise<void>;
+ canMakePayment(): Promise<boolean>;
+ show(detailsPromise?: PaymentDetailsUpdate | PromiseLike<PaymentDetailsUpdate>): Promise<PaymentResponse>;
+ addEventListener<K extends keyof PaymentRequestEventMap>(type: K, listener: (this: PaymentRequest, ev: PaymentRequestEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof PaymentRequestEventMap>(type: K, listener: (this: PaymentRequest, ev: PaymentRequestEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var PaymentRequest: {
+ prototype: PaymentRequest;
+ new(methodData: PaymentMethodData[], details: PaymentDetailsInit): PaymentRequest;
+};
+
+/**
+ * This Payment Request API interface enables a web page to update the details of a PaymentRequest in response to a user action.
+ * Available only in secure contexts.
+ */
+interface PaymentRequestUpdateEvent extends Event {
+ updateWith(detailsPromise: PaymentDetailsUpdate | PromiseLike<PaymentDetailsUpdate>): void;
+}
+
+declare var PaymentRequestUpdateEvent: {
+ prototype: PaymentRequestUpdateEvent;
+ new(type: string, eventInitDict?: PaymentRequestUpdateEventInit): PaymentRequestUpdateEvent;
+};
+
+/**
+ * This Payment Request API interface is returned after a user selects a payment method and approves a payment request.
+ * Available only in secure contexts.
+ */
+interface PaymentResponse extends EventTarget {
+ readonly details: any;
+ readonly methodName: string;
+ readonly requestId: string;
+ complete(result?: PaymentComplete): Promise<void>;
+ retry(errorFields?: PaymentValidationErrors): Promise<void>;
+ toJSON(): any;
+}
+
+declare var PaymentResponse: {
+ prototype: PaymentResponse;
+ new(): PaymentResponse;
+};
+
+interface PerformanceEventMap {
+ "resourcetimingbufferfull": Event;
+}
+
+/** Provides access to performance-related information for the current page. It's part of the High Resolution Time API, but is enhanced by the Performance Timeline API, the Navigation Timing API, the User Timing API, and the Resource Timing API. */
+interface Performance extends EventTarget {
+ readonly eventCounts: EventCounts;
+ /** @deprecated */
+ readonly navigation: PerformanceNavigation;
+ onresourcetimingbufferfull: ((this: Performance, ev: Event) => any) | null;
+ readonly timeOrigin: DOMHighResTimeStamp;
+ /** @deprecated */
+ readonly timing: PerformanceTiming;
+ clearMarks(markName?: string): void;
+ clearMeasures(measureName?: string): void;
+ clearResourceTimings(): void;
+ getEntries(): PerformanceEntryList;
+ getEntriesByName(name: string, type?: string): PerformanceEntryList;
+ getEntriesByType(type: string): PerformanceEntryList;
+ mark(markName: string, markOptions?: PerformanceMarkOptions): PerformanceMark;
+ measure(measureName: string, startOrMeasureOptions?: string | PerformanceMeasureOptions, endMark?: string): PerformanceMeasure;
+ now(): DOMHighResTimeStamp;
+ setResourceTimingBufferSize(maxSize: number): void;
+ toJSON(): any;
+ addEventListener<K extends keyof PerformanceEventMap>(type: K, listener: (this: Performance, ev: PerformanceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof PerformanceEventMap>(type: K, listener: (this: Performance, ev: PerformanceEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var Performance: {
+ prototype: Performance;
+ new(): Performance;
+};
+
+/** Encapsulates a single performance metric that is part of the performance timeline. A performance entry can be directly created by making a performance mark or measure (for example by calling the mark() method) at an explicit point in an application. Performance entries are also created in indirect ways such as loading a resource (such as an image). */
+interface PerformanceEntry {
+ readonly duration: DOMHighResTimeStamp;
+ readonly entryType: string;
+ readonly name: string;
+ readonly startTime: DOMHighResTimeStamp;
+ toJSON(): any;
+}
+
+declare var PerformanceEntry: {
+ prototype: PerformanceEntry;
+ new(): PerformanceEntry;
+};
+
+interface PerformanceEventTiming extends PerformanceEntry {
+ readonly cancelable: boolean;
+ readonly processingEnd: DOMHighResTimeStamp;
+ readonly processingStart: DOMHighResTimeStamp;
+ readonly target: Node | null;
+ toJSON(): any;
+}
+
+declare var PerformanceEventTiming: {
+ prototype: PerformanceEventTiming;
+ new(): PerformanceEventTiming;
+};
+
+/** PerformanceMark is an abstract interface for PerformanceEntry objects with an entryType of "mark". Entries of this type are created by calling performance.mark() to add a named DOMHighResTimeStamp (the mark) to the browser's performance timeline. */
+interface PerformanceMark extends PerformanceEntry {
+ readonly detail: any;
+}
+
+declare var PerformanceMark: {
+ prototype: PerformanceMark;
+ new(markName: string, markOptions?: PerformanceMarkOptions): PerformanceMark;
+};
+
+/** PerformanceMeasure is an abstract interface for PerformanceEntry objects with an entryType of "measure". Entries of this type are created by calling performance.measure() to add a named DOMHighResTimeStamp (the measure) between two marks to the browser's performance timeline. */
+interface PerformanceMeasure extends PerformanceEntry {
+ readonly detail: any;
+}
+
+declare var PerformanceMeasure: {
+ prototype: PerformanceMeasure;
+ new(): PerformanceMeasure;
+};
+
+/**
+ * The legacy PerformanceNavigation interface represents information about how the navigation to the current document was done.
+ * @deprecated This interface is deprecated in the Navigation Timing Level 2 specification. Please use the PerformanceNavigationTiming interface instead.
+ */
+interface PerformanceNavigation {
+ /** @deprecated */
+ readonly redirectCount: number;
+ /** @deprecated */
+ readonly type: number;
+ /** @deprecated */
+ toJSON(): any;
+ readonly TYPE_BACK_FORWARD: number;
+ readonly TYPE_NAVIGATE: number;
+ readonly TYPE_RELOAD: number;
+ readonly TYPE_RESERVED: number;
+}
+
+/** @deprecated */
+declare var PerformanceNavigation: {
+ prototype: PerformanceNavigation;
+ new(): PerformanceNavigation;
+ readonly TYPE_BACK_FORWARD: number;
+ readonly TYPE_NAVIGATE: number;
+ readonly TYPE_RELOAD: number;
+ readonly TYPE_RESERVED: number;
+};
+
+/** Provides methods and properties to store and retrieve metrics regarding the browser's document navigation events. For example, this interface can be used to determine how much time it takes to load or unload a document. */
+interface PerformanceNavigationTiming extends PerformanceResourceTiming {
+ readonly domComplete: DOMHighResTimeStamp;
+ readonly domContentLoadedEventEnd: DOMHighResTimeStamp;
+ readonly domContentLoadedEventStart: DOMHighResTimeStamp;
+ readonly domInteractive: DOMHighResTimeStamp;
+ readonly loadEventEnd: DOMHighResTimeStamp;
+ readonly loadEventStart: DOMHighResTimeStamp;
+ readonly redirectCount: number;
+ readonly type: NavigationTimingType;
+ readonly unloadEventEnd: DOMHighResTimeStamp;
+ readonly unloadEventStart: DOMHighResTimeStamp;
+ toJSON(): any;
+}
+
+declare var PerformanceNavigationTiming: {
+ prototype: PerformanceNavigationTiming;
+ new(): PerformanceNavigationTiming;
+};
+
+interface PerformanceObserver {
+ disconnect(): void;
+ observe(options?: PerformanceObserverInit): void;
+ takeRecords(): PerformanceEntryList;
+}
+
+declare var PerformanceObserver: {
+ prototype: PerformanceObserver;
+ new(callback: PerformanceObserverCallback): PerformanceObserver;
+ readonly supportedEntryTypes: ReadonlyArray<string>;
+};
+
+interface PerformanceObserverEntryList {
+ getEntries(): PerformanceEntryList;
+ getEntriesByName(name: string, type?: string): PerformanceEntryList;
+ getEntriesByType(type: string): PerformanceEntryList;
+}
+
+declare var PerformanceObserverEntryList: {
+ prototype: PerformanceObserverEntryList;
+ new(): PerformanceObserverEntryList;
+};
+
+interface PerformancePaintTiming extends PerformanceEntry {
+}
+
+declare var PerformancePaintTiming: {
+ prototype: PerformancePaintTiming;
+ new(): PerformancePaintTiming;
+};
+
+/** Enables retrieval and analysis of detailed network timing data regarding the loading of an application's resources. An application can use the timing metrics to determine, for example, the length of time it takes to fetch a specific resource, such as an XMLHttpRequest, <SVG>, image, or script. */
+interface PerformanceResourceTiming extends PerformanceEntry {
+ readonly connectEnd: DOMHighResTimeStamp;
+ readonly connectStart: DOMHighResTimeStamp;
+ readonly decodedBodySize: number;
+ readonly domainLookupEnd: DOMHighResTimeStamp;
+ readonly domainLookupStart: DOMHighResTimeStamp;
+ readonly encodedBodySize: number;
+ readonly fetchStart: DOMHighResTimeStamp;
+ readonly initiatorType: string;
+ readonly nextHopProtocol: string;
+ readonly redirectEnd: DOMHighResTimeStamp;
+ readonly redirectStart: DOMHighResTimeStamp;
+ readonly requestStart: DOMHighResTimeStamp;
+ readonly responseEnd: DOMHighResTimeStamp;
+ readonly responseStart: DOMHighResTimeStamp;
+ readonly secureConnectionStart: DOMHighResTimeStamp;
+ readonly serverTiming: ReadonlyArray<PerformanceServerTiming>;
+ readonly transferSize: number;
+ readonly workerStart: DOMHighResTimeStamp;
+ toJSON(): any;
+}
+
+declare var PerformanceResourceTiming: {
+ prototype: PerformanceResourceTiming;
+ new(): PerformanceResourceTiming;
+};
+
+interface PerformanceServerTiming {
+ readonly description: string;
+ readonly duration: DOMHighResTimeStamp;
+ readonly name: string;
+ toJSON(): any;
+}
+
+declare var PerformanceServerTiming: {
+ prototype: PerformanceServerTiming;
+ new(): PerformanceServerTiming;
+};
+
+/**
+ * A legacy interface kept for backwards compatibility and contains properties that offer performance timing information for various events which occur during the loading and use of the current page. You get a PerformanceTiming object describing your page using the window.performance.timing property.
+ * @deprecated This interface is deprecated in the Navigation Timing Level 2 specification. Please use the PerformanceNavigationTiming interface instead.
+ */
+interface PerformanceTiming {
+ /** @deprecated */
+ readonly connectEnd: number;
+ /** @deprecated */
+ readonly connectStart: number;
+ /** @deprecated */
+ readonly domComplete: number;
+ /** @deprecated */
+ readonly domContentLoadedEventEnd: number;
+ /** @deprecated */
+ readonly domContentLoadedEventStart: number;
+ /** @deprecated */
+ readonly domInteractive: number;
+ /** @deprecated */
+ readonly domLoading: number;
+ /** @deprecated */
+ readonly domainLookupEnd: number;
+ /** @deprecated */
+ readonly domainLookupStart: number;
+ /** @deprecated */
+ readonly fetchStart: number;
+ /** @deprecated */
+ readonly loadEventEnd: number;
+ /** @deprecated */
+ readonly loadEventStart: number;
+ /** @deprecated */
+ readonly navigationStart: number;
+ /** @deprecated */
+ readonly redirectEnd: number;
+ /** @deprecated */
+ readonly redirectStart: number;
+ /** @deprecated */
+ readonly requestStart: number;
+ /** @deprecated */
+ readonly responseEnd: number;
+ /** @deprecated */
+ readonly responseStart: number;
+ /** @deprecated */
+ readonly secureConnectionStart: number;
+ /** @deprecated */
+ readonly unloadEventEnd: number;
+ /** @deprecated */
+ readonly unloadEventStart: number;
+ /** @deprecated */
+ toJSON(): any;
+}
+
+/** @deprecated */
+declare var PerformanceTiming: {
+ prototype: PerformanceTiming;
+ new(): PerformanceTiming;
+};
+
+/** PeriodicWave has no inputs or outputs; it is used to define custom oscillators when calling OscillatorNode.setPeriodicWave(). The PeriodicWave itself is created/returned by AudioContext.createPeriodicWave(). */
+interface PeriodicWave {
+}
+
+declare var PeriodicWave: {
+ prototype: PeriodicWave;
+ new(context: BaseAudioContext, options?: PeriodicWaveOptions): PeriodicWave;
+};
+
+interface PermissionStatusEventMap {
+ "change": Event;
+}
+
+interface PermissionStatus extends EventTarget {
+ onchange: ((this: PermissionStatus, ev: Event) => any) | null;
+ readonly state: PermissionState;
+ addEventListener<K extends keyof PermissionStatusEventMap>(type: K, listener: (this: PermissionStatus, ev: PermissionStatusEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof PermissionStatusEventMap>(type: K, listener: (this: PermissionStatus, ev: PermissionStatusEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var PermissionStatus: {
+ prototype: PermissionStatus;
+ new(): PermissionStatus;
+};
+
+interface Permissions {
+ query(permissionDesc: PermissionDescriptor): Promise<PermissionStatus>;
+}
+
+declare var Permissions: {
+ prototype: Permissions;
+ new(): Permissions;
+};
+
+interface PictureInPictureWindowEventMap {
+ "resize": Event;
+}
+
+interface PictureInPictureWindow extends EventTarget {
+ readonly height: number;
+ onresize: ((this: PictureInPictureWindow, ev: Event) => any) | null;
+ readonly width: number;
+ addEventListener<K extends keyof PictureInPictureWindowEventMap>(type: K, listener: (this: PictureInPictureWindow, ev: PictureInPictureWindowEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof PictureInPictureWindowEventMap>(type: K, listener: (this: PictureInPictureWindow, ev: PictureInPictureWindowEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var PictureInPictureWindow: {
+ prototype: PictureInPictureWindow;
+ new(): PictureInPictureWindow;
+};
+
+/**
+ * Provides information about a browser plugin.
+ * @deprecated
+ */
+interface Plugin {
+ /**
+ * Returns the plugin's description.
+ * @deprecated
+ */
+ readonly description: string;
+ /**
+ * Returns the plugin library's filename, if applicable on the current platform.
+ * @deprecated
+ */
+ readonly filename: string;
+ /**
+ * Returns the number of MIME types, represented by MimeType objects, supported by the plugin.
+ * @deprecated
+ */
+ readonly length: number;
+ /**
+ * Returns the plugin's name.
+ * @deprecated
+ */
+ readonly name: string;
+ /**
+ * Returns the specified MimeType object.
+ * @deprecated
+ */
+ item(index: number): MimeType | null;
+ /** @deprecated */
+ namedItem(name: string): MimeType | null;
+ [index: number]: MimeType;
+}
+
+/** @deprecated */
+declare var Plugin: {
+ prototype: Plugin;
+ new(): Plugin;
+};
+
+/**
+ * Used to store a list of Plugin objects describing the available plugins; it's returned by the window.navigator.plugins property. The PluginArray is not a JavaScript array, but has the length property and supports accessing individual items using bracket notation (plugins[2]), as well as via item(index) and namedItem("name") methods.
+ * @deprecated
+ */
+interface PluginArray {
+ /** @deprecated */
+ readonly length: number;
+ /** @deprecated */
+ item(index: number): Plugin | null;
+ /** @deprecated */
+ namedItem(name: string): Plugin | null;
+ /** @deprecated */
+ refresh(): void;
+ [index: number]: Plugin;
+}
+
+/** @deprecated */
+declare var PluginArray: {
+ prototype: PluginArray;
+ new(): PluginArray;
+};
+
+/** The state of a DOM event produced by a pointer such as the geometry of the contact point, the device type that generated the event, the amount of pressure that was applied on the contact surface, etc. */
+interface PointerEvent extends MouseEvent {
+ readonly height: number;
+ readonly isPrimary: boolean;
+ readonly pointerId: number;
+ readonly pointerType: string;
+ readonly pressure: number;
+ readonly tangentialPressure: number;
+ readonly tiltX: number;
+ readonly tiltY: number;
+ readonly twist: number;
+ readonly width: number;
+ /** Available only in secure contexts. */
+ getCoalescedEvents(): PointerEvent[];
+ getPredictedEvents(): PointerEvent[];
+}
+
+declare var PointerEvent: {
+ prototype: PointerEvent;
+ new(type: string, eventInitDict?: PointerEventInit): PointerEvent;
+};
+
+/** PopStateEvent is an event handler for the popstate event on the window. */
+interface PopStateEvent extends Event {
+ /** Returns a copy of the information that was provided to pushState() or replaceState(). */
+ readonly state: any;
+}
+
+declare var PopStateEvent: {
+ prototype: PopStateEvent;
+ new(type: string, eventInitDict?: PopStateEventInit): PopStateEvent;
+};
+
+/** A processing instruction embeds application-specific instructions in XML which can be ignored by other applications that don't recognize them. */
+interface ProcessingInstruction extends CharacterData, LinkStyle {
+ readonly ownerDocument: Document;
+ readonly target: string;
+}
+
+declare var ProcessingInstruction: {
+ prototype: ProcessingInstruction;
+ new(): ProcessingInstruction;
+};
+
+/** Events measuring progress of an underlying process, like an HTTP request (for an XMLHttpRequest, or the loading of the underlying resource of an <img>, <audio>, <video>, <style> or <link>). */
+interface ProgressEvent<T extends EventTarget = EventTarget> extends Event {
+ readonly lengthComputable: boolean;
+ readonly loaded: number;
+ readonly target: T | null;
+ readonly total: number;
+}
+
+declare var ProgressEvent: {
+ prototype: ProgressEvent;
+ new(type: string, eventInitDict?: ProgressEventInit): ProgressEvent;
+};
+
+interface PromiseRejectionEvent extends Event {
+ readonly promise: Promise<any>;
+ readonly reason: any;
+}
+
+declare var PromiseRejectionEvent: {
+ prototype: PromiseRejectionEvent;
+ new(type: string, eventInitDict: PromiseRejectionEventInit): PromiseRejectionEvent;
+};
+
+/** Available only in secure contexts. */
+interface PublicKeyCredential extends Credential {
+ readonly rawId: ArrayBuffer;
+ readonly response: AuthenticatorResponse;
+ getClientExtensionResults(): AuthenticationExtensionsClientOutputs;
+}
+
+declare var PublicKeyCredential: {
+ prototype: PublicKeyCredential;
+ new(): PublicKeyCredential;
+ isUserVerifyingPlatformAuthenticatorAvailable(): Promise<boolean>;
+};
+
+/**
+ * This Push API interface provides a way to receive notifications from third-party servers as well as request URLs for push notifications.
+ * Available only in secure contexts.
+ */
+interface PushManager {
+ getSubscription(): Promise<PushSubscription | null>;
+ permissionState(options?: PushSubscriptionOptionsInit): Promise<PermissionState>;
+ subscribe(options?: PushSubscriptionOptionsInit): Promise<PushSubscription>;
+}
+
+declare var PushManager: {
+ prototype: PushManager;
+ new(): PushManager;
+ readonly supportedContentEncodings: ReadonlyArray<string>;
+};
+
+/**
+ * This Push API interface provides a subcription's URL endpoint and allows unsubscription from a push service.
+ * Available only in secure contexts.
+ */
+interface PushSubscription {
+ readonly endpoint: string;
+ readonly expirationTime: EpochTimeStamp | null;
+ readonly options: PushSubscriptionOptions;
+ getKey(name: PushEncryptionKeyName): ArrayBuffer | null;
+ toJSON(): PushSubscriptionJSON;
+ unsubscribe(): Promise<boolean>;
+}
+
+declare var PushSubscription: {
+ prototype: PushSubscription;
+ new(): PushSubscription;
+};
+
+/** Available only in secure contexts. */
+interface PushSubscriptionOptions {
+ readonly applicationServerKey: ArrayBuffer | null;
+}
+
+declare var PushSubscriptionOptions: {
+ prototype: PushSubscriptionOptions;
+ new(): PushSubscriptionOptions;
+};
+
+interface RTCCertificate {
+ readonly expires: EpochTimeStamp;
+ getFingerprints(): RTCDtlsFingerprint[];
+}
+
+declare var RTCCertificate: {
+ prototype: RTCCertificate;
+ new(): RTCCertificate;
+};
+
+interface RTCDTMFSenderEventMap {
+ "tonechange": RTCDTMFToneChangeEvent;
+}
+
+interface RTCDTMFSender extends EventTarget {
+ readonly canInsertDTMF: boolean;
+ ontonechange: ((this: RTCDTMFSender, ev: RTCDTMFToneChangeEvent) => any) | null;
+ readonly toneBuffer: string;
+ insertDTMF(tones: string, duration?: number, interToneGap?: number): void;
+ addEventListener<K extends keyof RTCDTMFSenderEventMap>(type: K, listener: (this: RTCDTMFSender, ev: RTCDTMFSenderEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof RTCDTMFSenderEventMap>(type: K, listener: (this: RTCDTMFSender, ev: RTCDTMFSenderEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var RTCDTMFSender: {
+ prototype: RTCDTMFSender;
+ new(): RTCDTMFSender;
+};
+
+/** Events sent to indicate that DTMF tones have started or finished playing. This interface is used by the tonechange event. */
+interface RTCDTMFToneChangeEvent extends Event {
+ readonly tone: string;
+}
+
+declare var RTCDTMFToneChangeEvent: {
+ prototype: RTCDTMFToneChangeEvent;
+ new(type: string, eventInitDict?: RTCDTMFToneChangeEventInit): RTCDTMFToneChangeEvent;
+};
+
+interface RTCDataChannelEventMap {
+ "bufferedamountlow": Event;
+ "close": Event;
+ "closing": Event;
+ "error": Event;
+ "message": MessageEvent;
+ "open": Event;
+}
+
+interface RTCDataChannel extends EventTarget {
+ binaryType: BinaryType;
+ readonly bufferedAmount: number;
+ bufferedAmountLowThreshold: number;
+ readonly id: number | null;
+ readonly label: string;
+ readonly maxPacketLifeTime: number | null;
+ readonly maxRetransmits: number | null;
+ readonly negotiated: boolean;
+ onbufferedamountlow: ((this: RTCDataChannel, ev: Event) => any) | null;
+ onclose: ((this: RTCDataChannel, ev: Event) => any) | null;
+ onclosing: ((this: RTCDataChannel, ev: Event) => any) | null;
+ onerror: ((this: RTCDataChannel, ev: Event) => any) | null;
+ onmessage: ((this: RTCDataChannel, ev: MessageEvent) => any) | null;
+ onopen: ((this: RTCDataChannel, ev: Event) => any) | null;
+ readonly ordered: boolean;
+ readonly protocol: string;
+ readonly readyState: RTCDataChannelState;
+ close(): void;
+ send(data: string): void;
+ send(data: Blob): void;
+ send(data: ArrayBuffer): void;
+ send(data: ArrayBufferView): void;
+ addEventListener<K extends keyof RTCDataChannelEventMap>(type: K, listener: (this: RTCDataChannel, ev: RTCDataChannelEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof RTCDataChannelEventMap>(type: K, listener: (this: RTCDataChannel, ev: RTCDataChannelEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var RTCDataChannel: {
+ prototype: RTCDataChannel;
+ new(): RTCDataChannel;
+};
+
+interface RTCDataChannelEvent extends Event {
+ readonly channel: RTCDataChannel;
+}
+
+declare var RTCDataChannelEvent: {
+ prototype: RTCDataChannelEvent;
+ new(type: string, eventInitDict: RTCDataChannelEventInit): RTCDataChannelEvent;
+};
+
+interface RTCDtlsTransportEventMap {
+ "error": Event;
+ "statechange": Event;
+}
+
+interface RTCDtlsTransport extends EventTarget {
+ readonly iceTransport: RTCIceTransport;
+ onerror: ((this: RTCDtlsTransport, ev: Event) => any) | null;
+ onstatechange: ((this: RTCDtlsTransport, ev: Event) => any) | null;
+ readonly state: RTCDtlsTransportState;
+ getRemoteCertificates(): ArrayBuffer[];
+ addEventListener<K extends keyof RTCDtlsTransportEventMap>(type: K, listener: (this: RTCDtlsTransport, ev: RTCDtlsTransportEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof RTCDtlsTransportEventMap>(type: K, listener: (this: RTCDtlsTransport, ev: RTCDtlsTransportEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var RTCDtlsTransport: {
+ prototype: RTCDtlsTransport;
+ new(): RTCDtlsTransport;
+};
+
+interface RTCEncodedAudioFrame {
+ data: ArrayBuffer;
+ readonly timestamp: number;
+ getMetadata(): RTCEncodedAudioFrameMetadata;
+}
+
+declare var RTCEncodedAudioFrame: {
+ prototype: RTCEncodedAudioFrame;
+ new(): RTCEncodedAudioFrame;
+};
+
+interface RTCEncodedVideoFrame {
+ data: ArrayBuffer;
+ readonly timestamp: number;
+ readonly type: RTCEncodedVideoFrameType;
+ getMetadata(): RTCEncodedVideoFrameMetadata;
+}
+
+declare var RTCEncodedVideoFrame: {
+ prototype: RTCEncodedVideoFrame;
+ new(): RTCEncodedVideoFrame;
+};
+
+interface RTCError extends DOMException {
+ readonly errorDetail: RTCErrorDetailType;
+ readonly receivedAlert: number | null;
+ readonly sctpCauseCode: number | null;
+ readonly sdpLineNumber: number | null;
+ readonly sentAlert: number | null;
+}
+
+declare var RTCError: {
+ prototype: RTCError;
+ new(init: RTCErrorInit, message?: string): RTCError;
+};
+
+interface RTCErrorEvent extends Event {
+ readonly error: RTCError;
+}
+
+declare var RTCErrorEvent: {
+ prototype: RTCErrorEvent;
+ new(type: string, eventInitDict: RTCErrorEventInit): RTCErrorEvent;
+};
+
+/** The RTCIceCandidate interface—part of the WebRTC API—represents a candidate Internet Connectivity Establishment (ICE) configuration which may be used to establish an RTCPeerConnection. */
+interface RTCIceCandidate {
+ readonly address: string | null;
+ readonly candidate: string;
+ readonly component: RTCIceComponent | null;
+ readonly foundation: string | null;
+ readonly port: number | null;
+ readonly priority: number | null;
+ readonly protocol: RTCIceProtocol | null;
+ readonly relatedAddress: string | null;
+ readonly relatedPort: number | null;
+ readonly sdpMLineIndex: number | null;
+ readonly sdpMid: string | null;
+ readonly tcpType: RTCIceTcpCandidateType | null;
+ readonly type: RTCIceCandidateType | null;
+ readonly usernameFragment: string | null;
+ toJSON(): RTCIceCandidateInit;
+}
+
+declare var RTCIceCandidate: {
+ prototype: RTCIceCandidate;
+ new(candidateInitDict?: RTCIceCandidateInit): RTCIceCandidate;
+};
+
+interface RTCIceTransportEventMap {
+ "gatheringstatechange": Event;
+ "statechange": Event;
+}
+
+/** Provides access to information about the ICE transport layer over which the data is being sent and received. */
+interface RTCIceTransport extends EventTarget {
+ readonly gatheringState: RTCIceGathererState;
+ ongatheringstatechange: ((this: RTCIceTransport, ev: Event) => any) | null;
+ onstatechange: ((this: RTCIceTransport, ev: Event) => any) | null;
+ readonly state: RTCIceTransportState;
+ addEventListener<K extends keyof RTCIceTransportEventMap>(type: K, listener: (this: RTCIceTransport, ev: RTCIceTransportEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof RTCIceTransportEventMap>(type: K, listener: (this: RTCIceTransport, ev: RTCIceTransportEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var RTCIceTransport: {
+ prototype: RTCIceTransport;
+ new(): RTCIceTransport;
+};
+
+interface RTCPeerConnectionEventMap {
+ "connectionstatechange": Event;
+ "datachannel": RTCDataChannelEvent;
+ "icecandidate": RTCPeerConnectionIceEvent;
+ "icecandidateerror": Event;
+ "iceconnectionstatechange": Event;
+ "icegatheringstatechange": Event;
+ "negotiationneeded": Event;
+ "signalingstatechange": Event;
+ "track": RTCTrackEvent;
+}
+
+/** A WebRTC connection between the local computer and a remote peer. It provides methods to connect to a remote peer, maintain and monitor the connection, and close the connection once it's no longer needed. */
+interface RTCPeerConnection extends EventTarget {
+ readonly canTrickleIceCandidates: boolean | null;
+ readonly connectionState: RTCPeerConnectionState;
+ readonly currentLocalDescription: RTCSessionDescription | null;
+ readonly currentRemoteDescription: RTCSessionDescription | null;
+ readonly iceConnectionState: RTCIceConnectionState;
+ readonly iceGatheringState: RTCIceGatheringState;
+ readonly localDescription: RTCSessionDescription | null;
+ onconnectionstatechange: ((this: RTCPeerConnection, ev: Event) => any) | null;
+ ondatachannel: ((this: RTCPeerConnection, ev: RTCDataChannelEvent) => any) | null;
+ onicecandidate: ((this: RTCPeerConnection, ev: RTCPeerConnectionIceEvent) => any) | null;
+ onicecandidateerror: ((this: RTCPeerConnection, ev: Event) => any) | null;
+ oniceconnectionstatechange: ((this: RTCPeerConnection, ev: Event) => any) | null;
+ onicegatheringstatechange: ((this: RTCPeerConnection, ev: Event) => any) | null;
+ onnegotiationneeded: ((this: RTCPeerConnection, ev: Event) => any) | null;
+ onsignalingstatechange: ((this: RTCPeerConnection, ev: Event) => any) | null;
+ ontrack: ((this: RTCPeerConnection, ev: RTCTrackEvent) => any) | null;
+ readonly pendingLocalDescription: RTCSessionDescription | null;
+ readonly pendingRemoteDescription: RTCSessionDescription | null;
+ readonly remoteDescription: RTCSessionDescription | null;
+ readonly sctp: RTCSctpTransport | null;
+ readonly signalingState: RTCSignalingState;
+ addIceCandidate(candidate?: RTCIceCandidateInit): Promise<void>;
+ /** @deprecated */
+ addIceCandidate(candidate: RTCIceCandidateInit, successCallback: VoidFunction, failureCallback: RTCPeerConnectionErrorCallback): Promise<void>;
+ addTrack(track: MediaStreamTrack, ...streams: MediaStream[]): RTCRtpSender;
+ addTransceiver(trackOrKind: MediaStreamTrack | string, init?: RTCRtpTransceiverInit): RTCRtpTransceiver;
+ close(): void;
+ createAnswer(options?: RTCAnswerOptions): Promise<RTCSessionDescriptionInit>;
+ /** @deprecated */
+ createAnswer(successCallback: RTCSessionDescriptionCallback, failureCallback: RTCPeerConnectionErrorCallback): Promise<void>;
+ createDataChannel(label: string, dataChannelDict?: RTCDataChannelInit): RTCDataChannel;
+ createOffer(options?: RTCOfferOptions): Promise<RTCSessionDescriptionInit>;
+ /** @deprecated */
+ createOffer(successCallback: RTCSessionDescriptionCallback, failureCallback: RTCPeerConnectionErrorCallback, options?: RTCOfferOptions): Promise<void>;
+ getConfiguration(): RTCConfiguration;
+ getReceivers(): RTCRtpReceiver[];
+ getSenders(): RTCRtpSender[];
+ getStats(selector?: MediaStreamTrack | null): Promise<RTCStatsReport>;
+ getTransceivers(): RTCRtpTransceiver[];
+ removeTrack(sender: RTCRtpSender): void;
+ restartIce(): void;
+ setConfiguration(configuration?: RTCConfiguration): void;
+ setLocalDescription(description?: RTCLocalSessionDescriptionInit): Promise<void>;
+ /** @deprecated */
+ setLocalDescription(description: RTCLocalSessionDescriptionInit, successCallback: VoidFunction, failureCallback: RTCPeerConnectionErrorCallback): Promise<void>;
+ setRemoteDescription(description: RTCSessionDescriptionInit): Promise<void>;
+ /** @deprecated */
+ setRemoteDescription(description: RTCSessionDescriptionInit, successCallback: VoidFunction, failureCallback: RTCPeerConnectionErrorCallback): Promise<void>;
+ addEventListener<K extends keyof RTCPeerConnectionEventMap>(type: K, listener: (this: RTCPeerConnection, ev: RTCPeerConnectionEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof RTCPeerConnectionEventMap>(type: K, listener: (this: RTCPeerConnection, ev: RTCPeerConnectionEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var RTCPeerConnection: {
+ prototype: RTCPeerConnection;
+ new(configuration?: RTCConfiguration): RTCPeerConnection;
+ generateCertificate(keygenAlgorithm: AlgorithmIdentifier): Promise<RTCCertificate>;
+};
+
+interface RTCPeerConnectionIceErrorEvent extends Event {
+ readonly address: string | null;
+ readonly errorCode: number;
+ readonly errorText: string;
+ readonly port: number | null;
+ readonly url: string;
+}
+
+declare var RTCPeerConnectionIceErrorEvent: {
+ prototype: RTCPeerConnectionIceErrorEvent;
+ new(type: string, eventInitDict: RTCPeerConnectionIceErrorEventInit): RTCPeerConnectionIceErrorEvent;
+};
+
+/** Events that occurs in relation to ICE candidates with the target, usually an RTCPeerConnection. Only one event is of this type: icecandidate. */
+interface RTCPeerConnectionIceEvent extends Event {
+ readonly candidate: RTCIceCandidate | null;
+}
+
+declare var RTCPeerConnectionIceEvent: {
+ prototype: RTCPeerConnectionIceEvent;
+ new(type: string, eventInitDict?: RTCPeerConnectionIceEventInit): RTCPeerConnectionIceEvent;
+};
+
+/** This WebRTC API interface manages the reception and decoding of data for a MediaStreamTrack on an RTCPeerConnection. */
+interface RTCRtpReceiver {
+ readonly track: MediaStreamTrack;
+ readonly transport: RTCDtlsTransport | null;
+ getContributingSources(): RTCRtpContributingSource[];
+ getParameters(): RTCRtpReceiveParameters;
+ getStats(): Promise<RTCStatsReport>;
+ getSynchronizationSources(): RTCRtpSynchronizationSource[];
+}
+
+declare var RTCRtpReceiver: {
+ prototype: RTCRtpReceiver;
+ new(): RTCRtpReceiver;
+ getCapabilities(kind: string): RTCRtpCapabilities | null;
+};
+
+/** Provides the ability to control and obtain details about how a particular MediaStreamTrack is encoded and sent to a remote peer. */
+interface RTCRtpSender {
+ readonly dtmf: RTCDTMFSender | null;
+ readonly track: MediaStreamTrack | null;
+ readonly transport: RTCDtlsTransport | null;
+ getParameters(): RTCRtpSendParameters;
+ getStats(): Promise<RTCStatsReport>;
+ replaceTrack(withTrack: MediaStreamTrack | null): Promise<void>;
+ setParameters(parameters: RTCRtpSendParameters): Promise<void>;
+ setStreams(...streams: MediaStream[]): void;
+}
+
+declare var RTCRtpSender: {
+ prototype: RTCRtpSender;
+ new(): RTCRtpSender;
+ getCapabilities(kind: string): RTCRtpCapabilities | null;
+};
+
+interface RTCRtpTransceiver {
+ readonly currentDirection: RTCRtpTransceiverDirection | null;
+ direction: RTCRtpTransceiverDirection;
+ readonly mid: string | null;
+ readonly receiver: RTCRtpReceiver;
+ readonly sender: RTCRtpSender;
+ setCodecPreferences(codecs: RTCRtpCodecCapability[]): void;
+ stop(): void;
+}
+
+declare var RTCRtpTransceiver: {
+ prototype: RTCRtpTransceiver;
+ new(): RTCRtpTransceiver;
+};
+
+interface RTCSctpTransportEventMap {
+ "statechange": Event;
+}
+
+interface RTCSctpTransport extends EventTarget {
+ readonly maxChannels: number | null;
+ readonly maxMessageSize: number;
+ onstatechange: ((this: RTCSctpTransport, ev: Event) => any) | null;
+ readonly state: RTCSctpTransportState;
+ readonly transport: RTCDtlsTransport;
+ addEventListener<K extends keyof RTCSctpTransportEventMap>(type: K, listener: (this: RTCSctpTransport, ev: RTCSctpTransportEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof RTCSctpTransportEventMap>(type: K, listener: (this: RTCSctpTransport, ev: RTCSctpTransportEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var RTCSctpTransport: {
+ prototype: RTCSctpTransport;
+ new(): RTCSctpTransport;
+};
+
+/** One end of a connection—or potential connection—and how it's configured. Each RTCSessionDescription consists of a description type indicating which part of the offer/answer negotiation process it describes and of the SDP descriptor of the session. */
+interface RTCSessionDescription {
+ readonly sdp: string;
+ readonly type: RTCSdpType;
+ toJSON(): any;
+}
+
+declare var RTCSessionDescription: {
+ prototype: RTCSessionDescription;
+ new(descriptionInitDict: RTCSessionDescriptionInit): RTCSessionDescription;
+};
+
+interface RTCStatsReport {
+ forEach(callbackfn: (value: any, key: string, parent: RTCStatsReport) => void, thisArg?: any): void;
+}
+
+declare var RTCStatsReport: {
+ prototype: RTCStatsReport;
+ new(): RTCStatsReport;
+};
+
+interface RTCTrackEvent extends Event {
+ readonly receiver: RTCRtpReceiver;
+ readonly streams: ReadonlyArray<MediaStream>;
+ readonly track: MediaStreamTrack;
+ readonly transceiver: RTCRtpTransceiver;
+}
+
+declare var RTCTrackEvent: {
+ prototype: RTCTrackEvent;
+ new(type: string, eventInitDict: RTCTrackEventInit): RTCTrackEvent;
+};
+
+interface RadioNodeList extends NodeList {
+ value: string;
+}
+
+declare var RadioNodeList: {
+ prototype: RadioNodeList;
+ new(): RadioNodeList;
+};
+
+/** A fragment of a document that can contain nodes and parts of text nodes. */
+interface Range extends AbstractRange {
+ /** Returns the node, furthest away from the document, that is an ancestor of both range's start node and end node. */
+ readonly commonAncestorContainer: Node;
+ cloneContents(): DocumentFragment;
+ cloneRange(): Range;
+ collapse(toStart?: boolean): void;
+ compareBoundaryPoints(how: number, sourceRange: Range): number;
+ /** Returns −1 if the point is before the range, 0 if the point is in the range, and 1 if the point is after the range. */
+ comparePoint(node: Node, offset: number): number;
+ createContextualFragment(fragment: string): DocumentFragment;
+ deleteContents(): void;
+ detach(): void;
+ extractContents(): DocumentFragment;
+ getBoundingClientRect(): DOMRect;
+ getClientRects(): DOMRectList;
+ insertNode(node: Node): void;
+ /** Returns whether range intersects node. */
+ intersectsNode(node: Node): boolean;
+ isPointInRange(node: Node, offset: number): boolean;
+ selectNode(node: Node): void;
+ selectNodeContents(node: Node): void;
+ setEnd(node: Node, offset: number): void;
+ setEndAfter(node: Node): void;
+ setEndBefore(node: Node): void;
+ setStart(node: Node, offset: number): void;
+ setStartAfter(node: Node): void;
+ setStartBefore(node: Node): void;
+ surroundContents(newParent: Node): void;
+ toString(): string;
+ readonly END_TO_END: number;
+ readonly END_TO_START: number;
+ readonly START_TO_END: number;
+ readonly START_TO_START: number;
+}
+
+declare var Range: {
+ prototype: Range;
+ new(): Range;
+ readonly END_TO_END: number;
+ readonly END_TO_START: number;
+ readonly START_TO_END: number;
+ readonly START_TO_START: number;
+ toString(): string;
+};
+
+interface ReadableByteStreamController {
+ readonly byobRequest: ReadableStreamBYOBRequest | null;
+ readonly desiredSize: number | null;
+ close(): void;
+ enqueue(chunk: ArrayBufferView): void;
+ error(e?: any): void;
+}
+
+declare var ReadableByteStreamController: {
+ prototype: ReadableByteStreamController;
+ new(): ReadableByteStreamController;
+};
+
+/** This Streams API interface represents a readable stream of byte data. The Fetch API offers a concrete instance of a ReadableStream through the body property of a Response object. */
+interface ReadableStream<R = any> {
+ readonly locked: boolean;
+ cancel(reason?: any): Promise<void>;
+ getReader(): ReadableStreamDefaultReader<R>;
+ pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
+ pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
+ tee(): [ReadableStream<R>, ReadableStream<R>];
+}
+
+declare var ReadableStream: {
+ prototype: ReadableStream;
+ new<R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
+};
+
+interface ReadableStreamBYOBReader extends ReadableStreamGenericReader {
+ read(view: ArrayBufferView): Promise<ReadableStreamReadResult<ArrayBufferView>>;
+ releaseLock(): void;
+}
+
+declare var ReadableStreamBYOBReader: {
+ prototype: ReadableStreamBYOBReader;
+ new(stream: ReadableStream): ReadableStreamBYOBReader;
+};
+
+interface ReadableStreamBYOBRequest {
+ readonly view: ArrayBufferView | null;
+ respond(bytesWritten: number): void;
+ respondWithNewView(view: ArrayBufferView): void;
+}
+
+declare var ReadableStreamBYOBRequest: {
+ prototype: ReadableStreamBYOBRequest;
+ new(): ReadableStreamBYOBRequest;
+};
+
+interface ReadableStreamDefaultController<R = any> {
+ readonly desiredSize: number | null;
+ close(): void;
+ enqueue(chunk?: R): void;
+ error(e?: any): void;
+}
+
+declare var ReadableStreamDefaultController: {
+ prototype: ReadableStreamDefaultController;
+ new(): ReadableStreamDefaultController;
+};
+
+interface ReadableStreamDefaultReader<R = any> extends ReadableStreamGenericReader {
+ read(): Promise<ReadableStreamReadResult<R>>;
+ releaseLock(): void;
+}
+
+declare var ReadableStreamDefaultReader: {
+ prototype: ReadableStreamDefaultReader;
+ new<R = any>(stream: ReadableStream<R>): ReadableStreamDefaultReader<R>;
+};
+
+interface ReadableStreamGenericReader {
+ readonly closed: Promise<undefined>;
+ cancel(reason?: any): Promise<void>;
+}
+
+interface RemotePlaybackEventMap {
+ "connect": Event;
+ "connecting": Event;
+ "disconnect": Event;
+}
+
+interface RemotePlayback extends EventTarget {
+ onconnect: ((this: RemotePlayback, ev: Event) => any) | null;
+ onconnecting: ((this: RemotePlayback, ev: Event) => any) | null;
+ ondisconnect: ((this: RemotePlayback, ev: Event) => any) | null;
+ readonly state: RemotePlaybackState;
+ cancelWatchAvailability(id?: number): Promise<void>;
+ prompt(): Promise<void>;
+ watchAvailability(callback: RemotePlaybackAvailabilityCallback): Promise<number>;
+ addEventListener<K extends keyof RemotePlaybackEventMap>(type: K, listener: (this: RemotePlayback, ev: RemotePlaybackEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof RemotePlaybackEventMap>(type: K, listener: (this: RemotePlayback, ev: RemotePlaybackEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var RemotePlayback: {
+ prototype: RemotePlayback;
+ new(): RemotePlayback;
+};
+
+/** This Fetch API interface represents a resource request. */
+interface Request extends Body {
+ /** Returns the cache mode associated with request, which is a string indicating how the request will interact with the browser's cache when fetching. */
+ readonly cache: RequestCache;
+ /** Returns the credentials mode associated with request, which is a string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL. */
+ readonly credentials: RequestCredentials;
+ /** Returns the kind of resource requested by request, e.g., "document" or "script". */
+ readonly destination: RequestDestination;
+ /** Returns a Headers object consisting of the headers associated with request. Note that headers added in the network layer by the user agent will not be accounted for in this object, e.g., the "Host" header. */
+ readonly headers: Headers;
+ /** Returns request's subresource integrity metadata, which is a cryptographic hash of the resource being fetched. Its value consists of multiple hashes separated by whitespace. [SRI] */
+ readonly integrity: string;
+ /** Returns a boolean indicating whether or not request can outlive the global in which it was created. */
+ readonly keepalive: boolean;
+ /** Returns request's HTTP method, which is "GET" by default. */
+ readonly method: string;
+ /** Returns the mode associated with request, which is a string indicating whether the request will use CORS, or will be restricted to same-origin URLs. */
+ readonly mode: RequestMode;
+ /** Returns the redirect mode associated with request, which is a string indicating how redirects for the request will be handled during fetching. A request will follow redirects by default. */
+ readonly redirect: RequestRedirect;
+ /** Returns the referrer of request. Its value can be a same-origin URL if explicitly set in init, the empty string to indicate no referrer, and "about:client" when defaulting to the global's default. This is used during fetching to determine the value of the `Referer` header of the request being made. */
+ readonly referrer: string;
+ /** Returns the referrer policy associated with request. This is used during fetching to compute the value of the request's referrer. */
+ readonly referrerPolicy: ReferrerPolicy;
+ /** Returns the signal associated with request, which is an AbortSignal object indicating whether or not request has been aborted, and its abort event handler. */
+ readonly signal: AbortSignal;
+ /** Returns the URL of request as a string. */
+ readonly url: string;
+ clone(): Request;
+}
+
+declare var Request: {
+ prototype: Request;
+ new(input: RequestInfo | URL, init?: RequestInit): Request;
+};
+
+interface ResizeObserver {
+ disconnect(): void;
+ observe(target: Element, options?: ResizeObserverOptions): void;
+ unobserve(target: Element): void;
+}
+
+declare var ResizeObserver: {
+ prototype: ResizeObserver;
+ new(callback: ResizeObserverCallback): ResizeObserver;
+};
+
+interface ResizeObserverEntry {
+ readonly borderBoxSize: ReadonlyArray<ResizeObserverSize>;
+ readonly contentBoxSize: ReadonlyArray<ResizeObserverSize>;
+ readonly contentRect: DOMRectReadOnly;
+ readonly devicePixelContentBoxSize: ReadonlyArray<ResizeObserverSize>;
+ readonly target: Element;
+}
+
+declare var ResizeObserverEntry: {
+ prototype: ResizeObserverEntry;
+ new(): ResizeObserverEntry;
+};
+
+interface ResizeObserverSize {
+ readonly blockSize: number;
+ readonly inlineSize: number;
+}
+
+declare var ResizeObserverSize: {
+ prototype: ResizeObserverSize;
+ new(): ResizeObserverSize;
+};
+
+/** This Fetch API interface represents the response to a request. */
+interface Response extends Body {
+ readonly headers: Headers;
+ readonly ok: boolean;
+ readonly redirected: boolean;
+ readonly status: number;
+ readonly statusText: string;
+ readonly type: ResponseType;
+ readonly url: string;
+ clone(): Response;
+}
+
+declare var Response: {
+ prototype: Response;
+ new(body?: BodyInit | null, init?: ResponseInit): Response;
+ json(data: unknown, init?: ResponseInit): Response;
+ error(): Response;
+ redirect(url: string | URL, status?: number): Response;
+};
+
+/** Provides access to the properties of <a> element, as well as methods to manipulate them. */
+interface SVGAElement extends SVGGraphicsElement, SVGURIReference {
+ rel: string;
+ readonly relList: DOMTokenList;
+ readonly target: SVGAnimatedString;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGAElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGAElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGAElement: {
+ prototype: SVGAElement;
+ new(): SVGAElement;
+};
+
+/** Used to represent a value that can be an <angle> or <number> value. An SVGAngle reflected through the animVal attribute is always read only. */
+interface SVGAngle {
+ readonly unitType: number;
+ value: number;
+ valueAsString: string;
+ valueInSpecifiedUnits: number;
+ convertToSpecifiedUnits(unitType: number): void;
+ newValueSpecifiedUnits(unitType: number, valueInSpecifiedUnits: number): void;
+ readonly SVG_ANGLETYPE_DEG: number;
+ readonly SVG_ANGLETYPE_GRAD: number;
+ readonly SVG_ANGLETYPE_RAD: number;
+ readonly SVG_ANGLETYPE_UNKNOWN: number;
+ readonly SVG_ANGLETYPE_UNSPECIFIED: number;
+}
+
+declare var SVGAngle: {
+ prototype: SVGAngle;
+ new(): SVGAngle;
+ readonly SVG_ANGLETYPE_DEG: number;
+ readonly SVG_ANGLETYPE_GRAD: number;
+ readonly SVG_ANGLETYPE_RAD: number;
+ readonly SVG_ANGLETYPE_UNKNOWN: number;
+ readonly SVG_ANGLETYPE_UNSPECIFIED: number;
+};
+
+interface SVGAnimateElement extends SVGAnimationElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGAnimateElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGAnimateElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGAnimateElement: {
+ prototype: SVGAnimateElement;
+ new(): SVGAnimateElement;
+};
+
+interface SVGAnimateMotionElement extends SVGAnimationElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGAnimateMotionElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGAnimateMotionElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGAnimateMotionElement: {
+ prototype: SVGAnimateMotionElement;
+ new(): SVGAnimateMotionElement;
+};
+
+interface SVGAnimateTransformElement extends SVGAnimationElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGAnimateTransformElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGAnimateTransformElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGAnimateTransformElement: {
+ prototype: SVGAnimateTransformElement;
+ new(): SVGAnimateTransformElement;
+};
+
+/** Used for attributes of basic type <angle> which can be animated. */
+interface SVGAnimatedAngle {
+ readonly animVal: SVGAngle;
+ readonly baseVal: SVGAngle;
+}
+
+declare var SVGAnimatedAngle: {
+ prototype: SVGAnimatedAngle;
+ new(): SVGAnimatedAngle;
+};
+
+/** Used for attributes of type boolean which can be animated. */
+interface SVGAnimatedBoolean {
+ readonly animVal: boolean;
+ baseVal: boolean;
+}
+
+declare var SVGAnimatedBoolean: {
+ prototype: SVGAnimatedBoolean;
+ new(): SVGAnimatedBoolean;
+};
+
+/** Used for attributes whose value must be a constant from a particular enumeration and which can be animated. */
+interface SVGAnimatedEnumeration {
+ readonly animVal: number;
+ baseVal: number;
+}
+
+declare var SVGAnimatedEnumeration: {
+ prototype: SVGAnimatedEnumeration;
+ new(): SVGAnimatedEnumeration;
+};
+
+/** Used for attributes of basic type <integer> which can be animated. */
+interface SVGAnimatedInteger {
+ readonly animVal: number;
+ baseVal: number;
+}
+
+declare var SVGAnimatedInteger: {
+ prototype: SVGAnimatedInteger;
+ new(): SVGAnimatedInteger;
+};
+
+/** Used for attributes of basic type <length> which can be animated. */
+interface SVGAnimatedLength {
+ readonly animVal: SVGLength;
+ readonly baseVal: SVGLength;
+}
+
+declare var SVGAnimatedLength: {
+ prototype: SVGAnimatedLength;
+ new(): SVGAnimatedLength;
+};
+
+/** Used for attributes of type SVGLengthList which can be animated. */
+interface SVGAnimatedLengthList {
+ readonly animVal: SVGLengthList;
+ readonly baseVal: SVGLengthList;
+}
+
+declare var SVGAnimatedLengthList: {
+ prototype: SVGAnimatedLengthList;
+ new(): SVGAnimatedLengthList;
+};
+
+/** Used for attributes of basic type <Number> which can be animated. */
+interface SVGAnimatedNumber {
+ readonly animVal: number;
+ baseVal: number;
+}
+
+declare var SVGAnimatedNumber: {
+ prototype: SVGAnimatedNumber;
+ new(): SVGAnimatedNumber;
+};
+
+/** The SVGAnimatedNumber interface is used for attributes which take a list of numbers and which can be animated. */
+interface SVGAnimatedNumberList {
+ readonly animVal: SVGNumberList;
+ readonly baseVal: SVGNumberList;
+}
+
+declare var SVGAnimatedNumberList: {
+ prototype: SVGAnimatedNumberList;
+ new(): SVGAnimatedNumberList;
+};
+
+interface SVGAnimatedPoints {
+ readonly animatedPoints: SVGPointList;
+ readonly points: SVGPointList;
+}
+
+/** Used for attributes of type SVGPreserveAspectRatio which can be animated. */
+interface SVGAnimatedPreserveAspectRatio {
+ readonly animVal: SVGPreserveAspectRatio;
+ readonly baseVal: SVGPreserveAspectRatio;
+}
+
+declare var SVGAnimatedPreserveAspectRatio: {
+ prototype: SVGAnimatedPreserveAspectRatio;
+ new(): SVGAnimatedPreserveAspectRatio;
+};
+
+/** Used for attributes of basic SVGRect which can be animated. */
+interface SVGAnimatedRect {
+ readonly animVal: DOMRectReadOnly;
+ readonly baseVal: DOMRect;
+}
+
+declare var SVGAnimatedRect: {
+ prototype: SVGAnimatedRect;
+ new(): SVGAnimatedRect;
+};
+
+/** The SVGAnimatedString interface represents string attributes which can be animated from each SVG declaration. You need to create SVG attribute before doing anything else, everything should be declared inside this. */
+interface SVGAnimatedString {
+ readonly animVal: string;
+ baseVal: string;
+}
+
+declare var SVGAnimatedString: {
+ prototype: SVGAnimatedString;
+ new(): SVGAnimatedString;
+};
+
+/** Used for attributes which take a list of numbers and which can be animated. */
+interface SVGAnimatedTransformList {
+ readonly animVal: SVGTransformList;
+ readonly baseVal: SVGTransformList;
+}
+
+declare var SVGAnimatedTransformList: {
+ prototype: SVGAnimatedTransformList;
+ new(): SVGAnimatedTransformList;
+};
+
+interface SVGAnimationElement extends SVGElement, SVGTests {
+ readonly targetElement: SVGElement | null;
+ beginElement(): void;
+ beginElementAt(offset: number): void;
+ endElement(): void;
+ endElementAt(offset: number): void;
+ getCurrentTime(): number;
+ getSimpleDuration(): number;
+ getStartTime(): number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGAnimationElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGAnimationElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGAnimationElement: {
+ prototype: SVGAnimationElement;
+ new(): SVGAnimationElement;
+};
+
+/** An interface for the <circle> element. The circle element is defined by the cx and cy attributes that denote the coordinates of the centre of the circle. */
+interface SVGCircleElement extends SVGGeometryElement {
+ readonly cx: SVGAnimatedLength;
+ readonly cy: SVGAnimatedLength;
+ readonly r: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGCircleElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGCircleElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGCircleElement: {
+ prototype: SVGCircleElement;
+ new(): SVGCircleElement;
+};
+
+/** Provides access to the properties of <clipPath> elements, as well as methods to manipulate them. */
+interface SVGClipPathElement extends SVGElement {
+ readonly clipPathUnits: SVGAnimatedEnumeration;
+ readonly transform: SVGAnimatedTransformList;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGClipPathElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGClipPathElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGClipPathElement: {
+ prototype: SVGClipPathElement;
+ new(): SVGClipPathElement;
+};
+
+/** A base interface used by the component transfer function interfaces. */
+interface SVGComponentTransferFunctionElement extends SVGElement {
+ readonly amplitude: SVGAnimatedNumber;
+ readonly exponent: SVGAnimatedNumber;
+ readonly intercept: SVGAnimatedNumber;
+ readonly offset: SVGAnimatedNumber;
+ readonly slope: SVGAnimatedNumber;
+ readonly tableValues: SVGAnimatedNumberList;
+ readonly type: SVGAnimatedEnumeration;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_GAMMA: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_LINEAR: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_TABLE: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGComponentTransferFunctionElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGComponentTransferFunctionElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGComponentTransferFunctionElement: {
+ prototype: SVGComponentTransferFunctionElement;
+ new(): SVGComponentTransferFunctionElement;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_GAMMA: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_LINEAR: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_TABLE: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN: number;
+};
+
+/** Corresponds to the <defs> element. */
+interface SVGDefsElement extends SVGGraphicsElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGDefsElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGDefsElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGDefsElement: {
+ prototype: SVGDefsElement;
+ new(): SVGDefsElement;
+};
+
+/** Corresponds to the <desc> element. */
+interface SVGDescElement extends SVGElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGDescElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGDescElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGDescElement: {
+ prototype: SVGDescElement;
+ new(): SVGDescElement;
+};
+
+interface SVGElementEventMap extends ElementEventMap, DocumentAndElementEventHandlersEventMap, GlobalEventHandlersEventMap {
+}
+
+/** All of the SVG DOM interfaces that correspond directly to elements in the SVG language derive from the SVGElement interface. */
+interface SVGElement extends Element, DocumentAndElementEventHandlers, ElementCSSInlineStyle, GlobalEventHandlers, HTMLOrSVGElement {
+ /** @deprecated */
+ readonly className: any;
+ readonly ownerSVGElement: SVGSVGElement | null;
+ readonly viewportElement: SVGElement | null;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGElement: {
+ prototype: SVGElement;
+ new(): SVGElement;
+};
+
+/** Provides access to the properties of <ellipse> elements. */
+interface SVGEllipseElement extends SVGGeometryElement {
+ readonly cx: SVGAnimatedLength;
+ readonly cy: SVGAnimatedLength;
+ readonly rx: SVGAnimatedLength;
+ readonly ry: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGEllipseElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGEllipseElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGEllipseElement: {
+ prototype: SVGEllipseElement;
+ new(): SVGEllipseElement;
+};
+
+/** Corresponds to the <feBlend> element. */
+interface SVGFEBlendElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ readonly in2: SVGAnimatedString;
+ readonly mode: SVGAnimatedEnumeration;
+ readonly SVG_FEBLEND_MODE_COLOR: number;
+ readonly SVG_FEBLEND_MODE_COLOR_BURN: number;
+ readonly SVG_FEBLEND_MODE_COLOR_DODGE: number;
+ readonly SVG_FEBLEND_MODE_DARKEN: number;
+ readonly SVG_FEBLEND_MODE_DIFFERENCE: number;
+ readonly SVG_FEBLEND_MODE_EXCLUSION: number;
+ readonly SVG_FEBLEND_MODE_HARD_LIGHT: number;
+ readonly SVG_FEBLEND_MODE_HUE: number;
+ readonly SVG_FEBLEND_MODE_LIGHTEN: number;
+ readonly SVG_FEBLEND_MODE_LUMINOSITY: number;
+ readonly SVG_FEBLEND_MODE_MULTIPLY: number;
+ readonly SVG_FEBLEND_MODE_NORMAL: number;
+ readonly SVG_FEBLEND_MODE_OVERLAY: number;
+ readonly SVG_FEBLEND_MODE_SATURATION: number;
+ readonly SVG_FEBLEND_MODE_SCREEN: number;
+ readonly SVG_FEBLEND_MODE_SOFT_LIGHT: number;
+ readonly SVG_FEBLEND_MODE_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEBlendElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEBlendElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFEBlendElement: {
+ prototype: SVGFEBlendElement;
+ new(): SVGFEBlendElement;
+ readonly SVG_FEBLEND_MODE_COLOR: number;
+ readonly SVG_FEBLEND_MODE_COLOR_BURN: number;
+ readonly SVG_FEBLEND_MODE_COLOR_DODGE: number;
+ readonly SVG_FEBLEND_MODE_DARKEN: number;
+ readonly SVG_FEBLEND_MODE_DIFFERENCE: number;
+ readonly SVG_FEBLEND_MODE_EXCLUSION: number;
+ readonly SVG_FEBLEND_MODE_HARD_LIGHT: number;
+ readonly SVG_FEBLEND_MODE_HUE: number;
+ readonly SVG_FEBLEND_MODE_LIGHTEN: number;
+ readonly SVG_FEBLEND_MODE_LUMINOSITY: number;
+ readonly SVG_FEBLEND_MODE_MULTIPLY: number;
+ readonly SVG_FEBLEND_MODE_NORMAL: number;
+ readonly SVG_FEBLEND_MODE_OVERLAY: number;
+ readonly SVG_FEBLEND_MODE_SATURATION: number;
+ readonly SVG_FEBLEND_MODE_SCREEN: number;
+ readonly SVG_FEBLEND_MODE_SOFT_LIGHT: number;
+ readonly SVG_FEBLEND_MODE_UNKNOWN: number;
+};
+
+/** Corresponds to the <feColorMatrix> element. */
+interface SVGFEColorMatrixElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ readonly type: SVGAnimatedEnumeration;
+ readonly values: SVGAnimatedNumberList;
+ readonly SVG_FECOLORMATRIX_TYPE_HUEROTATE: number;
+ readonly SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA: number;
+ readonly SVG_FECOLORMATRIX_TYPE_MATRIX: number;
+ readonly SVG_FECOLORMATRIX_TYPE_SATURATE: number;
+ readonly SVG_FECOLORMATRIX_TYPE_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEColorMatrixElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEColorMatrixElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFEColorMatrixElement: {
+ prototype: SVGFEColorMatrixElement;
+ new(): SVGFEColorMatrixElement;
+ readonly SVG_FECOLORMATRIX_TYPE_HUEROTATE: number;
+ readonly SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA: number;
+ readonly SVG_FECOLORMATRIX_TYPE_MATRIX: number;
+ readonly SVG_FECOLORMATRIX_TYPE_SATURATE: number;
+ readonly SVG_FECOLORMATRIX_TYPE_UNKNOWN: number;
+};
+
+/** Corresponds to the <feComponentTransfer> element. */
+interface SVGFEComponentTransferElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEComponentTransferElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEComponentTransferElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFEComponentTransferElement: {
+ prototype: SVGFEComponentTransferElement;
+ new(): SVGFEComponentTransferElement;
+};
+
+/** Corresponds to the <feComposite> element. */
+interface SVGFECompositeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ readonly in2: SVGAnimatedString;
+ readonly k1: SVGAnimatedNumber;
+ readonly k2: SVGAnimatedNumber;
+ readonly k3: SVGAnimatedNumber;
+ readonly k4: SVGAnimatedNumber;
+ readonly operator: SVGAnimatedEnumeration;
+ readonly SVG_FECOMPOSITE_OPERATOR_ARITHMETIC: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_ATOP: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_IN: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_OUT: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_OVER: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_UNKNOWN: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_XOR: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFECompositeElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFECompositeElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFECompositeElement: {
+ prototype: SVGFECompositeElement;
+ new(): SVGFECompositeElement;
+ readonly SVG_FECOMPOSITE_OPERATOR_ARITHMETIC: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_ATOP: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_IN: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_OUT: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_OVER: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_UNKNOWN: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_XOR: number;
+};
+
+/** Corresponds to the <feConvolveMatrix> element. */
+interface SVGFEConvolveMatrixElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly bias: SVGAnimatedNumber;
+ readonly divisor: SVGAnimatedNumber;
+ readonly edgeMode: SVGAnimatedEnumeration;
+ readonly in1: SVGAnimatedString;
+ readonly kernelMatrix: SVGAnimatedNumberList;
+ readonly kernelUnitLengthX: SVGAnimatedNumber;
+ readonly kernelUnitLengthY: SVGAnimatedNumber;
+ readonly orderX: SVGAnimatedInteger;
+ readonly orderY: SVGAnimatedInteger;
+ readonly preserveAlpha: SVGAnimatedBoolean;
+ readonly targetX: SVGAnimatedInteger;
+ readonly targetY: SVGAnimatedInteger;
+ readonly SVG_EDGEMODE_DUPLICATE: number;
+ readonly SVG_EDGEMODE_NONE: number;
+ readonly SVG_EDGEMODE_UNKNOWN: number;
+ readonly SVG_EDGEMODE_WRAP: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEConvolveMatrixElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEConvolveMatrixElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFEConvolveMatrixElement: {
+ prototype: SVGFEConvolveMatrixElement;
+ new(): SVGFEConvolveMatrixElement;
+ readonly SVG_EDGEMODE_DUPLICATE: number;
+ readonly SVG_EDGEMODE_NONE: number;
+ readonly SVG_EDGEMODE_UNKNOWN: number;
+ readonly SVG_EDGEMODE_WRAP: number;
+};
+
+/** Corresponds to the <feDiffuseLighting> element. */
+interface SVGFEDiffuseLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly diffuseConstant: SVGAnimatedNumber;
+ readonly in1: SVGAnimatedString;
+ readonly kernelUnitLengthX: SVGAnimatedNumber;
+ readonly kernelUnitLengthY: SVGAnimatedNumber;
+ readonly surfaceScale: SVGAnimatedNumber;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEDiffuseLightingElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEDiffuseLightingElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFEDiffuseLightingElement: {
+ prototype: SVGFEDiffuseLightingElement;
+ new(): SVGFEDiffuseLightingElement;
+};
+
+/** Corresponds to the <feDisplacementMap> element. */
+interface SVGFEDisplacementMapElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ readonly in2: SVGAnimatedString;
+ readonly scale: SVGAnimatedNumber;
+ readonly xChannelSelector: SVGAnimatedEnumeration;
+ readonly yChannelSelector: SVGAnimatedEnumeration;
+ readonly SVG_CHANNEL_A: number;
+ readonly SVG_CHANNEL_B: number;
+ readonly SVG_CHANNEL_G: number;
+ readonly SVG_CHANNEL_R: number;
+ readonly SVG_CHANNEL_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEDisplacementMapElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEDisplacementMapElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFEDisplacementMapElement: {
+ prototype: SVGFEDisplacementMapElement;
+ new(): SVGFEDisplacementMapElement;
+ readonly SVG_CHANNEL_A: number;
+ readonly SVG_CHANNEL_B: number;
+ readonly SVG_CHANNEL_G: number;
+ readonly SVG_CHANNEL_R: number;
+ readonly SVG_CHANNEL_UNKNOWN: number;
+};
+
+/** Corresponds to the <feDistantLight> element. */
+interface SVGFEDistantLightElement extends SVGElement {
+ readonly azimuth: SVGAnimatedNumber;
+ readonly elevation: SVGAnimatedNumber;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEDistantLightElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEDistantLightElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFEDistantLightElement: {
+ prototype: SVGFEDistantLightElement;
+ new(): SVGFEDistantLightElement;
+};
+
+interface SVGFEDropShadowElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly dx: SVGAnimatedNumber;
+ readonly dy: SVGAnimatedNumber;
+ readonly in1: SVGAnimatedString;
+ readonly stdDeviationX: SVGAnimatedNumber;
+ readonly stdDeviationY: SVGAnimatedNumber;
+ setStdDeviation(stdDeviationX: number, stdDeviationY: number): void;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEDropShadowElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEDropShadowElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFEDropShadowElement: {
+ prototype: SVGFEDropShadowElement;
+ new(): SVGFEDropShadowElement;
+};
+
+/** Corresponds to the <feFlood> element. */
+interface SVGFEFloodElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEFloodElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEFloodElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFEFloodElement: {
+ prototype: SVGFEFloodElement;
+ new(): SVGFEFloodElement;
+};
+
+/** Corresponds to the <feFuncA> element. */
+interface SVGFEFuncAElement extends SVGComponentTransferFunctionElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEFuncAElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEFuncAElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFEFuncAElement: {
+ prototype: SVGFEFuncAElement;
+ new(): SVGFEFuncAElement;
+};
+
+/** Corresponds to the <feFuncB> element. */
+interface SVGFEFuncBElement extends SVGComponentTransferFunctionElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEFuncBElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEFuncBElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFEFuncBElement: {
+ prototype: SVGFEFuncBElement;
+ new(): SVGFEFuncBElement;
+};
+
+/** Corresponds to the <feFuncG> element. */
+interface SVGFEFuncGElement extends SVGComponentTransferFunctionElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEFuncGElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEFuncGElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFEFuncGElement: {
+ prototype: SVGFEFuncGElement;
+ new(): SVGFEFuncGElement;
+};
+
+/** Corresponds to the <feFuncR> element. */
+interface SVGFEFuncRElement extends SVGComponentTransferFunctionElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEFuncRElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEFuncRElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFEFuncRElement: {
+ prototype: SVGFEFuncRElement;
+ new(): SVGFEFuncRElement;
+};
+
+/** Corresponds to the <feGaussianBlur> element. */
+interface SVGFEGaussianBlurElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ readonly stdDeviationX: SVGAnimatedNumber;
+ readonly stdDeviationY: SVGAnimatedNumber;
+ setStdDeviation(stdDeviationX: number, stdDeviationY: number): void;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEGaussianBlurElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEGaussianBlurElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFEGaussianBlurElement: {
+ prototype: SVGFEGaussianBlurElement;
+ new(): SVGFEGaussianBlurElement;
+};
+
+/** Corresponds to the <feImage> element. */
+interface SVGFEImageElement extends SVGElement, SVGFilterPrimitiveStandardAttributes, SVGURIReference {
+ readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEImageElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEImageElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFEImageElement: {
+ prototype: SVGFEImageElement;
+ new(): SVGFEImageElement;
+};
+
+/** Corresponds to the <feMerge> element. */
+interface SVGFEMergeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEMergeElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEMergeElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFEMergeElement: {
+ prototype: SVGFEMergeElement;
+ new(): SVGFEMergeElement;
+};
+
+/** Corresponds to the <feMergeNode> element. */
+interface SVGFEMergeNodeElement extends SVGElement {
+ readonly in1: SVGAnimatedString;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEMergeNodeElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEMergeNodeElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFEMergeNodeElement: {
+ prototype: SVGFEMergeNodeElement;
+ new(): SVGFEMergeNodeElement;
+};
+
+/** Corresponds to the <feMorphology> element. */
+interface SVGFEMorphologyElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ readonly operator: SVGAnimatedEnumeration;
+ readonly radiusX: SVGAnimatedNumber;
+ readonly radiusY: SVGAnimatedNumber;
+ readonly SVG_MORPHOLOGY_OPERATOR_DILATE: number;
+ readonly SVG_MORPHOLOGY_OPERATOR_ERODE: number;
+ readonly SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEMorphologyElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEMorphologyElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFEMorphologyElement: {
+ prototype: SVGFEMorphologyElement;
+ new(): SVGFEMorphologyElement;
+ readonly SVG_MORPHOLOGY_OPERATOR_DILATE: number;
+ readonly SVG_MORPHOLOGY_OPERATOR_ERODE: number;
+ readonly SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number;
+};
+
+/** Corresponds to the <feOffset> element. */
+interface SVGFEOffsetElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly dx: SVGAnimatedNumber;
+ readonly dy: SVGAnimatedNumber;
+ readonly in1: SVGAnimatedString;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEOffsetElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEOffsetElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFEOffsetElement: {
+ prototype: SVGFEOffsetElement;
+ new(): SVGFEOffsetElement;
+};
+
+/** Corresponds to the <fePointLight> element. */
+interface SVGFEPointLightElement extends SVGElement {
+ readonly x: SVGAnimatedNumber;
+ readonly y: SVGAnimatedNumber;
+ readonly z: SVGAnimatedNumber;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEPointLightElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEPointLightElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFEPointLightElement: {
+ prototype: SVGFEPointLightElement;
+ new(): SVGFEPointLightElement;
+};
+
+/** Corresponds to the <feSpecularLighting> element. */
+interface SVGFESpecularLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ readonly kernelUnitLengthX: SVGAnimatedNumber;
+ readonly kernelUnitLengthY: SVGAnimatedNumber;
+ readonly specularConstant: SVGAnimatedNumber;
+ readonly specularExponent: SVGAnimatedNumber;
+ readonly surfaceScale: SVGAnimatedNumber;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFESpecularLightingElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFESpecularLightingElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFESpecularLightingElement: {
+ prototype: SVGFESpecularLightingElement;
+ new(): SVGFESpecularLightingElement;
+};
+
+/** Corresponds to the <feSpotLight> element. */
+interface SVGFESpotLightElement extends SVGElement {
+ readonly limitingConeAngle: SVGAnimatedNumber;
+ readonly pointsAtX: SVGAnimatedNumber;
+ readonly pointsAtY: SVGAnimatedNumber;
+ readonly pointsAtZ: SVGAnimatedNumber;
+ readonly specularExponent: SVGAnimatedNumber;
+ readonly x: SVGAnimatedNumber;
+ readonly y: SVGAnimatedNumber;
+ readonly z: SVGAnimatedNumber;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFESpotLightElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFESpotLightElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFESpotLightElement: {
+ prototype: SVGFESpotLightElement;
+ new(): SVGFESpotLightElement;
+};
+
+/** Corresponds to the <feTile> element. */
+interface SVGFETileElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFETileElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFETileElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFETileElement: {
+ prototype: SVGFETileElement;
+ new(): SVGFETileElement;
+};
+
+/** Corresponds to the <feTurbulence> element. */
+interface SVGFETurbulenceElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly baseFrequencyX: SVGAnimatedNumber;
+ readonly baseFrequencyY: SVGAnimatedNumber;
+ readonly numOctaves: SVGAnimatedInteger;
+ readonly seed: SVGAnimatedNumber;
+ readonly stitchTiles: SVGAnimatedEnumeration;
+ readonly type: SVGAnimatedEnumeration;
+ readonly SVG_STITCHTYPE_NOSTITCH: number;
+ readonly SVG_STITCHTYPE_STITCH: number;
+ readonly SVG_STITCHTYPE_UNKNOWN: number;
+ readonly SVG_TURBULENCE_TYPE_FRACTALNOISE: number;
+ readonly SVG_TURBULENCE_TYPE_TURBULENCE: number;
+ readonly SVG_TURBULENCE_TYPE_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFETurbulenceElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFETurbulenceElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFETurbulenceElement: {
+ prototype: SVGFETurbulenceElement;
+ new(): SVGFETurbulenceElement;
+ readonly SVG_STITCHTYPE_NOSTITCH: number;
+ readonly SVG_STITCHTYPE_STITCH: number;
+ readonly SVG_STITCHTYPE_UNKNOWN: number;
+ readonly SVG_TURBULENCE_TYPE_FRACTALNOISE: number;
+ readonly SVG_TURBULENCE_TYPE_TURBULENCE: number;
+ readonly SVG_TURBULENCE_TYPE_UNKNOWN: number;
+};
+
+/** Provides access to the properties of <filter> elements, as well as methods to manipulate them. */
+interface SVGFilterElement extends SVGElement, SVGURIReference {
+ readonly filterUnits: SVGAnimatedEnumeration;
+ readonly height: SVGAnimatedLength;
+ readonly primitiveUnits: SVGAnimatedEnumeration;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFilterElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFilterElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFilterElement: {
+ prototype: SVGFilterElement;
+ new(): SVGFilterElement;
+};
+
+interface SVGFilterPrimitiveStandardAttributes {
+ readonly height: SVGAnimatedLength;
+ readonly result: SVGAnimatedString;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+}
+
+interface SVGFitToViewBox {
+ readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
+ readonly viewBox: SVGAnimatedRect;
+}
+
+/** Provides access to the properties of <foreignObject> elements, as well as methods to manipulate them. */
+interface SVGForeignObjectElement extends SVGGraphicsElement {
+ readonly height: SVGAnimatedLength;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGForeignObjectElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGForeignObjectElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGForeignObjectElement: {
+ prototype: SVGForeignObjectElement;
+ new(): SVGForeignObjectElement;
+};
+
+/** Corresponds to the <g> element. */
+interface SVGGElement extends SVGGraphicsElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGGElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGGElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGGElement: {
+ prototype: SVGGElement;
+ new(): SVGGElement;
+};
+
+interface SVGGeometryElement extends SVGGraphicsElement {
+ readonly pathLength: SVGAnimatedNumber;
+ getPointAtLength(distance: number): DOMPoint;
+ getTotalLength(): number;
+ isPointInFill(point?: DOMPointInit): boolean;
+ isPointInStroke(point?: DOMPointInit): boolean;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGGeometryElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGGeometryElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGGeometryElement: {
+ prototype: SVGGeometryElement;
+ new(): SVGGeometryElement;
+};
+
+/** The SVGGradient interface is a base interface used by SVGLinearGradientElement and SVGRadialGradientElement. */
+interface SVGGradientElement extends SVGElement, SVGURIReference {
+ readonly gradientTransform: SVGAnimatedTransformList;
+ readonly gradientUnits: SVGAnimatedEnumeration;
+ readonly spreadMethod: SVGAnimatedEnumeration;
+ readonly SVG_SPREADMETHOD_PAD: number;
+ readonly SVG_SPREADMETHOD_REFLECT: number;
+ readonly SVG_SPREADMETHOD_REPEAT: number;
+ readonly SVG_SPREADMETHOD_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGGradientElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGGradientElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGGradientElement: {
+ prototype: SVGGradientElement;
+ new(): SVGGradientElement;
+ readonly SVG_SPREADMETHOD_PAD: number;
+ readonly SVG_SPREADMETHOD_REFLECT: number;
+ readonly SVG_SPREADMETHOD_REPEAT: number;
+ readonly SVG_SPREADMETHOD_UNKNOWN: number;
+};
+
+/** SVG elements whose primary purpose is to directly render graphics into a group. */
+interface SVGGraphicsElement extends SVGElement, SVGTests {
+ readonly transform: SVGAnimatedTransformList;
+ getBBox(options?: SVGBoundingBoxOptions): DOMRect;
+ getCTM(): DOMMatrix | null;
+ getScreenCTM(): DOMMatrix | null;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGGraphicsElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGGraphicsElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGGraphicsElement: {
+ prototype: SVGGraphicsElement;
+ new(): SVGGraphicsElement;
+};
+
+/** Corresponds to the <image> element. */
+interface SVGImageElement extends SVGGraphicsElement, SVGURIReference {
+ readonly height: SVGAnimatedLength;
+ readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGImageElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGImageElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGImageElement: {
+ prototype: SVGImageElement;
+ new(): SVGImageElement;
+};
+
+/** Correspond to the <length> basic data type. */
+interface SVGLength {
+ readonly unitType: number;
+ value: number;
+ valueAsString: string;
+ valueInSpecifiedUnits: number;
+ convertToSpecifiedUnits(unitType: number): void;
+ newValueSpecifiedUnits(unitType: number, valueInSpecifiedUnits: number): void;
+ readonly SVG_LENGTHTYPE_CM: number;
+ readonly SVG_LENGTHTYPE_EMS: number;
+ readonly SVG_LENGTHTYPE_EXS: number;
+ readonly SVG_LENGTHTYPE_IN: number;
+ readonly SVG_LENGTHTYPE_MM: number;
+ readonly SVG_LENGTHTYPE_NUMBER: number;
+ readonly SVG_LENGTHTYPE_PC: number;
+ readonly SVG_LENGTHTYPE_PERCENTAGE: number;
+ readonly SVG_LENGTHTYPE_PT: number;
+ readonly SVG_LENGTHTYPE_PX: number;
+ readonly SVG_LENGTHTYPE_UNKNOWN: number;
+}
+
+declare var SVGLength: {
+ prototype: SVGLength;
+ new(): SVGLength;
+ readonly SVG_LENGTHTYPE_CM: number;
+ readonly SVG_LENGTHTYPE_EMS: number;
+ readonly SVG_LENGTHTYPE_EXS: number;
+ readonly SVG_LENGTHTYPE_IN: number;
+ readonly SVG_LENGTHTYPE_MM: number;
+ readonly SVG_LENGTHTYPE_NUMBER: number;
+ readonly SVG_LENGTHTYPE_PC: number;
+ readonly SVG_LENGTHTYPE_PERCENTAGE: number;
+ readonly SVG_LENGTHTYPE_PT: number;
+ readonly SVG_LENGTHTYPE_PX: number;
+ readonly SVG_LENGTHTYPE_UNKNOWN: number;
+};
+
+/** The SVGLengthList defines a list of SVGLength objects. */
+interface SVGLengthList {
+ readonly length: number;
+ readonly numberOfItems: number;
+ appendItem(newItem: SVGLength): SVGLength;
+ clear(): void;
+ getItem(index: number): SVGLength;
+ initialize(newItem: SVGLength): SVGLength;
+ insertItemBefore(newItem: SVGLength, index: number): SVGLength;
+ removeItem(index: number): SVGLength;
+ replaceItem(newItem: SVGLength, index: number): SVGLength;
+ [index: number]: SVGLength;
+}
+
+declare var SVGLengthList: {
+ prototype: SVGLengthList;
+ new(): SVGLengthList;
+};
+
+/** Provides access to the properties of <line> elements, as well as methods to manipulate them. */
+interface SVGLineElement extends SVGGeometryElement {
+ readonly x1: SVGAnimatedLength;
+ readonly x2: SVGAnimatedLength;
+ readonly y1: SVGAnimatedLength;
+ readonly y2: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGLineElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGLineElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGLineElement: {
+ prototype: SVGLineElement;
+ new(): SVGLineElement;
+};
+
+/** Corresponds to the <linearGradient> element. */
+interface SVGLinearGradientElement extends SVGGradientElement {
+ readonly x1: SVGAnimatedLength;
+ readonly x2: SVGAnimatedLength;
+ readonly y1: SVGAnimatedLength;
+ readonly y2: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGLinearGradientElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGLinearGradientElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGLinearGradientElement: {
+ prototype: SVGLinearGradientElement;
+ new(): SVGLinearGradientElement;
+};
+
+interface SVGMPathElement extends SVGElement, SVGURIReference {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGMPathElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGMPathElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGMPathElement: {
+ prototype: SVGMPathElement;
+ new(): SVGMPathElement;
+};
+
+interface SVGMarkerElement extends SVGElement, SVGFitToViewBox {
+ readonly markerHeight: SVGAnimatedLength;
+ readonly markerUnits: SVGAnimatedEnumeration;
+ readonly markerWidth: SVGAnimatedLength;
+ readonly orientAngle: SVGAnimatedAngle;
+ readonly orientType: SVGAnimatedEnumeration;
+ readonly refX: SVGAnimatedLength;
+ readonly refY: SVGAnimatedLength;
+ setOrientToAngle(angle: SVGAngle): void;
+ setOrientToAuto(): void;
+ readonly SVG_MARKERUNITS_STROKEWIDTH: number;
+ readonly SVG_MARKERUNITS_UNKNOWN: number;
+ readonly SVG_MARKERUNITS_USERSPACEONUSE: number;
+ readonly SVG_MARKER_ORIENT_ANGLE: number;
+ readonly SVG_MARKER_ORIENT_AUTO: number;
+ readonly SVG_MARKER_ORIENT_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGMarkerElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGMarkerElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGMarkerElement: {
+ prototype: SVGMarkerElement;
+ new(): SVGMarkerElement;
+ readonly SVG_MARKERUNITS_STROKEWIDTH: number;
+ readonly SVG_MARKERUNITS_UNKNOWN: number;
+ readonly SVG_MARKERUNITS_USERSPACEONUSE: number;
+ readonly SVG_MARKER_ORIENT_ANGLE: number;
+ readonly SVG_MARKER_ORIENT_AUTO: number;
+ readonly SVG_MARKER_ORIENT_UNKNOWN: number;
+};
+
+/** Provides access to the properties of <mask> elements, as well as methods to manipulate them. */
+interface SVGMaskElement extends SVGElement {
+ readonly height: SVGAnimatedLength;
+ readonly maskContentUnits: SVGAnimatedEnumeration;
+ readonly maskUnits: SVGAnimatedEnumeration;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGMaskElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGMaskElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGMaskElement: {
+ prototype: SVGMaskElement;
+ new(): SVGMaskElement;
+};
+
+/** Corresponds to the <metadata> element. */
+interface SVGMetadataElement extends SVGElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGMetadataElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGMetadataElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGMetadataElement: {
+ prototype: SVGMetadataElement;
+ new(): SVGMetadataElement;
+};
+
+/** Corresponds to the <number> basic data type. */
+interface SVGNumber {
+ value: number;
+}
+
+declare var SVGNumber: {
+ prototype: SVGNumber;
+ new(): SVGNumber;
+};
+
+/** The SVGNumberList defines a list of SVGNumber objects. */
+interface SVGNumberList {
+ readonly length: number;
+ readonly numberOfItems: number;
+ appendItem(newItem: SVGNumber): SVGNumber;
+ clear(): void;
+ getItem(index: number): SVGNumber;
+ initialize(newItem: SVGNumber): SVGNumber;
+ insertItemBefore(newItem: SVGNumber, index: number): SVGNumber;
+ removeItem(index: number): SVGNumber;
+ replaceItem(newItem: SVGNumber, index: number): SVGNumber;
+ [index: number]: SVGNumber;
+}
+
+declare var SVGNumberList: {
+ prototype: SVGNumberList;
+ new(): SVGNumberList;
+};
+
+/** Corresponds to the <path> element. */
+interface SVGPathElement extends SVGGeometryElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGPathElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGPathElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGPathElement: {
+ prototype: SVGPathElement;
+ new(): SVGPathElement;
+};
+
+/** Corresponds to the <pattern> element. */
+interface SVGPatternElement extends SVGElement, SVGFitToViewBox, SVGURIReference {
+ readonly height: SVGAnimatedLength;
+ readonly patternContentUnits: SVGAnimatedEnumeration;
+ readonly patternTransform: SVGAnimatedTransformList;
+ readonly patternUnits: SVGAnimatedEnumeration;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGPatternElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGPatternElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGPatternElement: {
+ prototype: SVGPatternElement;
+ new(): SVGPatternElement;
+};
+
+interface SVGPointList {
+ readonly length: number;
+ readonly numberOfItems: number;
+ appendItem(newItem: DOMPoint): DOMPoint;
+ clear(): void;
+ getItem(index: number): DOMPoint;
+ initialize(newItem: DOMPoint): DOMPoint;
+ insertItemBefore(newItem: DOMPoint, index: number): DOMPoint;
+ removeItem(index: number): DOMPoint;
+ replaceItem(newItem: DOMPoint, index: number): DOMPoint;
+ [index: number]: DOMPoint;
+}
+
+declare var SVGPointList: {
+ prototype: SVGPointList;
+ new(): SVGPointList;
+};
+
+/** Provides access to the properties of <polygon> elements, as well as methods to manipulate them. */
+interface SVGPolygonElement extends SVGGeometryElement, SVGAnimatedPoints {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGPolygonElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGPolygonElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGPolygonElement: {
+ prototype: SVGPolygonElement;
+ new(): SVGPolygonElement;
+};
+
+/** Provides access to the properties of <polyline> elements, as well as methods to manipulate them. */
+interface SVGPolylineElement extends SVGGeometryElement, SVGAnimatedPoints {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGPolylineElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGPolylineElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGPolylineElement: {
+ prototype: SVGPolylineElement;
+ new(): SVGPolylineElement;
+};
+
+/** Corresponds to the preserveAspectRatio attribute, which is available for some of SVG's elements. */
+interface SVGPreserveAspectRatio {
+ align: number;
+ meetOrSlice: number;
+ readonly SVG_MEETORSLICE_MEET: number;
+ readonly SVG_MEETORSLICE_SLICE: number;
+ readonly SVG_MEETORSLICE_UNKNOWN: number;
+ readonly SVG_PRESERVEASPECTRATIO_NONE: number;
+ readonly SVG_PRESERVEASPECTRATIO_UNKNOWN: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMAXYMAX: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMAXYMID: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMAXYMIN: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMIDYMAX: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMIDYMID: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMIDYMIN: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMINYMAX: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMINYMID: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMINYMIN: number;
+}
+
+declare var SVGPreserveAspectRatio: {
+ prototype: SVGPreserveAspectRatio;
+ new(): SVGPreserveAspectRatio;
+ readonly SVG_MEETORSLICE_MEET: number;
+ readonly SVG_MEETORSLICE_SLICE: number;
+ readonly SVG_MEETORSLICE_UNKNOWN: number;
+ readonly SVG_PRESERVEASPECTRATIO_NONE: number;
+ readonly SVG_PRESERVEASPECTRATIO_UNKNOWN: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMAXYMAX: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMAXYMID: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMAXYMIN: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMIDYMAX: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMIDYMID: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMIDYMIN: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMINYMAX: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMINYMID: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMINYMIN: number;
+};
+
+/** Corresponds to the <RadialGradient> element. */
+interface SVGRadialGradientElement extends SVGGradientElement {
+ readonly cx: SVGAnimatedLength;
+ readonly cy: SVGAnimatedLength;
+ readonly fr: SVGAnimatedLength;
+ readonly fx: SVGAnimatedLength;
+ readonly fy: SVGAnimatedLength;
+ readonly r: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGRadialGradientElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGRadialGradientElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGRadialGradientElement: {
+ prototype: SVGRadialGradientElement;
+ new(): SVGRadialGradientElement;
+};
+
+/** Provides access to the properties of <rect> elements, as well as methods to manipulate them. */
+interface SVGRectElement extends SVGGeometryElement {
+ readonly height: SVGAnimatedLength;
+ readonly rx: SVGAnimatedLength;
+ readonly ry: SVGAnimatedLength;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGRectElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGRectElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGRectElement: {
+ prototype: SVGRectElement;
+ new(): SVGRectElement;
+};
+
+interface SVGSVGElementEventMap extends SVGElementEventMap, WindowEventHandlersEventMap {
+}
+
+/** Provides access to the properties of <svg> elements, as well as methods to manipulate them. This interface contains also various miscellaneous commonly-used utility methods, such as matrix operations and the ability to control the time of redraw on visual rendering devices. */
+interface SVGSVGElement extends SVGGraphicsElement, SVGFitToViewBox, WindowEventHandlers {
+ currentScale: number;
+ readonly currentTranslate: DOMPointReadOnly;
+ readonly height: SVGAnimatedLength;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ animationsPaused(): boolean;
+ checkEnclosure(element: SVGElement, rect: DOMRectReadOnly): boolean;
+ checkIntersection(element: SVGElement, rect: DOMRectReadOnly): boolean;
+ createSVGAngle(): SVGAngle;
+ createSVGLength(): SVGLength;
+ createSVGMatrix(): DOMMatrix;
+ createSVGNumber(): SVGNumber;
+ createSVGPoint(): DOMPoint;
+ createSVGRect(): DOMRect;
+ createSVGTransform(): SVGTransform;
+ createSVGTransformFromMatrix(matrix?: DOMMatrix2DInit): SVGTransform;
+ deselectAll(): void;
+ /** @deprecated */
+ forceRedraw(): void;
+ getCurrentTime(): number;
+ getElementById(elementId: string): Element;
+ getEnclosureList(rect: DOMRectReadOnly, referenceElement: SVGElement | null): NodeListOf<SVGCircleElement | SVGEllipseElement | SVGImageElement | SVGLineElement | SVGPathElement | SVGPolygonElement | SVGPolylineElement | SVGRectElement | SVGTextElement | SVGUseElement>;
+ getIntersectionList(rect: DOMRectReadOnly, referenceElement: SVGElement | null): NodeListOf<SVGCircleElement | SVGEllipseElement | SVGImageElement | SVGLineElement | SVGPathElement | SVGPolygonElement | SVGPolylineElement | SVGRectElement | SVGTextElement | SVGUseElement>;
+ pauseAnimations(): void;
+ setCurrentTime(seconds: number): void;
+ /** @deprecated */
+ suspendRedraw(maxWaitMilliseconds: number): number;
+ unpauseAnimations(): void;
+ /** @deprecated */
+ unsuspendRedraw(suspendHandleID: number): void;
+ /** @deprecated */
+ unsuspendRedrawAll(): void;
+ addEventListener<K extends keyof SVGSVGElementEventMap>(type: K, listener: (this: SVGSVGElement, ev: SVGSVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGSVGElementEventMap>(type: K, listener: (this: SVGSVGElement, ev: SVGSVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGSVGElement: {
+ prototype: SVGSVGElement;
+ new(): SVGSVGElement;
+};
+
+/** Corresponds to the SVG <script> element. */
+interface SVGScriptElement extends SVGElement, SVGURIReference {
+ type: string;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGScriptElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGScriptElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGScriptElement: {
+ prototype: SVGScriptElement;
+ new(): SVGScriptElement;
+};
+
+interface SVGSetElement extends SVGAnimationElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGSetElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGSetElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGSetElement: {
+ prototype: SVGSetElement;
+ new(): SVGSetElement;
+};
+
+/** Corresponds to the <stop> element. */
+interface SVGStopElement extends SVGElement {
+ readonly offset: SVGAnimatedNumber;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGStopElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGStopElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGStopElement: {
+ prototype: SVGStopElement;
+ new(): SVGStopElement;
+};
+
+/** The SVGStringList defines a list of DOMString objects. */
+interface SVGStringList {
+ readonly length: number;
+ readonly numberOfItems: number;
+ appendItem(newItem: string): string;
+ clear(): void;
+ getItem(index: number): string;
+ initialize(newItem: string): string;
+ insertItemBefore(newItem: string, index: number): string;
+ removeItem(index: number): string;
+ replaceItem(newItem: string, index: number): string;
+ [index: number]: string;
+}
+
+declare var SVGStringList: {
+ prototype: SVGStringList;
+ new(): SVGStringList;
+};
+
+/** Corresponds to the SVG <style> element. */
+interface SVGStyleElement extends SVGElement, LinkStyle {
+ disabled: boolean;
+ media: string;
+ title: string;
+ type: string;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGStyleElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGStyleElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGStyleElement: {
+ prototype: SVGStyleElement;
+ new(): SVGStyleElement;
+};
+
+/** Corresponds to the <switch> element. */
+interface SVGSwitchElement extends SVGGraphicsElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGSwitchElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGSwitchElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGSwitchElement: {
+ prototype: SVGSwitchElement;
+ new(): SVGSwitchElement;
+};
+
+/** Corresponds to the <symbol> element. */
+interface SVGSymbolElement extends SVGElement, SVGFitToViewBox {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGSymbolElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGSymbolElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGSymbolElement: {
+ prototype: SVGSymbolElement;
+ new(): SVGSymbolElement;
+};
+
+/** A <tspan> element. */
+interface SVGTSpanElement extends SVGTextPositioningElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTSpanElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTSpanElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGTSpanElement: {
+ prototype: SVGTSpanElement;
+ new(): SVGTSpanElement;
+};
+
+interface SVGTests {
+ readonly requiredExtensions: SVGStringList;
+ readonly systemLanguage: SVGStringList;
+}
+
+/** Implemented by elements that support rendering child text content. It is inherited by various text-related interfaces, such as SVGTextElement, SVGTSpanElement, SVGTRefElement, SVGAltGlyphElement and SVGTextPathElement. */
+interface SVGTextContentElement extends SVGGraphicsElement {
+ readonly lengthAdjust: SVGAnimatedEnumeration;
+ readonly textLength: SVGAnimatedLength;
+ getCharNumAtPosition(point?: DOMPointInit): number;
+ getComputedTextLength(): number;
+ getEndPositionOfChar(charnum: number): DOMPoint;
+ getExtentOfChar(charnum: number): DOMRect;
+ getNumberOfChars(): number;
+ getRotationOfChar(charnum: number): number;
+ getStartPositionOfChar(charnum: number): DOMPoint;
+ getSubStringLength(charnum: number, nchars: number): number;
+ /** @deprecated */
+ selectSubString(charnum: number, nchars: number): void;
+ readonly LENGTHADJUST_SPACING: number;
+ readonly LENGTHADJUST_SPACINGANDGLYPHS: number;
+ readonly LENGTHADJUST_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTextContentElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTextContentElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGTextContentElement: {
+ prototype: SVGTextContentElement;
+ new(): SVGTextContentElement;
+ readonly LENGTHADJUST_SPACING: number;
+ readonly LENGTHADJUST_SPACINGANDGLYPHS: number;
+ readonly LENGTHADJUST_UNKNOWN: number;
+};
+
+/** Corresponds to the <text> elements. */
+interface SVGTextElement extends SVGTextPositioningElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTextElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTextElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGTextElement: {
+ prototype: SVGTextElement;
+ new(): SVGTextElement;
+};
+
+/** Corresponds to the <textPath> element. */
+interface SVGTextPathElement extends SVGTextContentElement, SVGURIReference {
+ readonly method: SVGAnimatedEnumeration;
+ readonly spacing: SVGAnimatedEnumeration;
+ readonly startOffset: SVGAnimatedLength;
+ readonly TEXTPATH_METHODTYPE_ALIGN: number;
+ readonly TEXTPATH_METHODTYPE_STRETCH: number;
+ readonly TEXTPATH_METHODTYPE_UNKNOWN: number;
+ readonly TEXTPATH_SPACINGTYPE_AUTO: number;
+ readonly TEXTPATH_SPACINGTYPE_EXACT: number;
+ readonly TEXTPATH_SPACINGTYPE_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTextPathElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTextPathElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGTextPathElement: {
+ prototype: SVGTextPathElement;
+ new(): SVGTextPathElement;
+ readonly TEXTPATH_METHODTYPE_ALIGN: number;
+ readonly TEXTPATH_METHODTYPE_STRETCH: number;
+ readonly TEXTPATH_METHODTYPE_UNKNOWN: number;
+ readonly TEXTPATH_SPACINGTYPE_AUTO: number;
+ readonly TEXTPATH_SPACINGTYPE_EXACT: number;
+ readonly TEXTPATH_SPACINGTYPE_UNKNOWN: number;
+};
+
+/** Implemented by elements that support attributes that position individual text glyphs. It is inherited by SVGTextElement, SVGTSpanElement, SVGTRefElement and SVGAltGlyphElement. */
+interface SVGTextPositioningElement extends SVGTextContentElement {
+ readonly dx: SVGAnimatedLengthList;
+ readonly dy: SVGAnimatedLengthList;
+ readonly rotate: SVGAnimatedNumberList;
+ readonly x: SVGAnimatedLengthList;
+ readonly y: SVGAnimatedLengthList;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTextPositioningElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTextPositioningElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGTextPositioningElement: {
+ prototype: SVGTextPositioningElement;
+ new(): SVGTextPositioningElement;
+};
+
+/** Corresponds to the <title> element. */
+interface SVGTitleElement extends SVGElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTitleElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTitleElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGTitleElement: {
+ prototype: SVGTitleElement;
+ new(): SVGTitleElement;
+};
+
+/** SVGTransform is the interface for one of the component transformations within an SVGTransformList; thus, an SVGTransform object corresponds to a single component (e.g., scale(…) or matrix(…)) within a transform attribute. */
+interface SVGTransform {
+ readonly angle: number;
+ readonly matrix: DOMMatrix;
+ readonly type: number;
+ setMatrix(matrix?: DOMMatrix2DInit): void;
+ setRotate(angle: number, cx: number, cy: number): void;
+ setScale(sx: number, sy: number): void;
+ setSkewX(angle: number): void;
+ setSkewY(angle: number): void;
+ setTranslate(tx: number, ty: number): void;
+ readonly SVG_TRANSFORM_MATRIX: number;
+ readonly SVG_TRANSFORM_ROTATE: number;
+ readonly SVG_TRANSFORM_SCALE: number;
+ readonly SVG_TRANSFORM_SKEWX: number;
+ readonly SVG_TRANSFORM_SKEWY: number;
+ readonly SVG_TRANSFORM_TRANSLATE: number;
+ readonly SVG_TRANSFORM_UNKNOWN: number;
+}
+
+declare var SVGTransform: {
+ prototype: SVGTransform;
+ new(): SVGTransform;
+ readonly SVG_TRANSFORM_MATRIX: number;
+ readonly SVG_TRANSFORM_ROTATE: number;
+ readonly SVG_TRANSFORM_SCALE: number;
+ readonly SVG_TRANSFORM_SKEWX: number;
+ readonly SVG_TRANSFORM_SKEWY: number;
+ readonly SVG_TRANSFORM_TRANSLATE: number;
+ readonly SVG_TRANSFORM_UNKNOWN: number;
+};
+
+/** The SVGTransformList defines a list of SVGTransform objects. */
+interface SVGTransformList {
+ readonly length: number;
+ readonly numberOfItems: number;
+ appendItem(newItem: SVGTransform): SVGTransform;
+ clear(): void;
+ consolidate(): SVGTransform | null;
+ createSVGTransformFromMatrix(matrix?: DOMMatrix2DInit): SVGTransform;
+ getItem(index: number): SVGTransform;
+ initialize(newItem: SVGTransform): SVGTransform;
+ insertItemBefore(newItem: SVGTransform, index: number): SVGTransform;
+ removeItem(index: number): SVGTransform;
+ replaceItem(newItem: SVGTransform, index: number): SVGTransform;
+ [index: number]: SVGTransform;
+}
+
+declare var SVGTransformList: {
+ prototype: SVGTransformList;
+ new(): SVGTransformList;
+};
+
+interface SVGURIReference {
+ readonly href: SVGAnimatedString;
+}
+
+/** A commonly used set of constants used for reflecting gradientUnits, patternContentUnits and other similar attributes. */
+interface SVGUnitTypes {
+ readonly SVG_UNIT_TYPE_OBJECTBOUNDINGBOX: number;
+ readonly SVG_UNIT_TYPE_UNKNOWN: number;
+ readonly SVG_UNIT_TYPE_USERSPACEONUSE: number;
+}
+
+declare var SVGUnitTypes: {
+ prototype: SVGUnitTypes;
+ new(): SVGUnitTypes;
+ readonly SVG_UNIT_TYPE_OBJECTBOUNDINGBOX: number;
+ readonly SVG_UNIT_TYPE_UNKNOWN: number;
+ readonly SVG_UNIT_TYPE_USERSPACEONUSE: number;
+};
+
+/** Corresponds to the <use> element. */
+interface SVGUseElement extends SVGGraphicsElement, SVGURIReference {
+ readonly height: SVGAnimatedLength;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGUseElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGUseElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGUseElement: {
+ prototype: SVGUseElement;
+ new(): SVGUseElement;
+};
+
+/** Provides access to the properties of <view> elements, as well as methods to manipulate them. */
+interface SVGViewElement extends SVGElement, SVGFitToViewBox {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGViewElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGViewElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGViewElement: {
+ prototype: SVGViewElement;
+ new(): SVGViewElement;
+};
+
+/** A screen, usually the one on which the current window is being rendered, and is obtained using window.screen. */
+interface Screen {
+ readonly availHeight: number;
+ readonly availWidth: number;
+ readonly colorDepth: number;
+ readonly height: number;
+ readonly orientation: ScreenOrientation;
+ readonly pixelDepth: number;
+ readonly width: number;
+}
+
+declare var Screen: {
+ prototype: Screen;
+ new(): Screen;
+};
+
+interface ScreenOrientationEventMap {
+ "change": Event;
+}
+
+interface ScreenOrientation extends EventTarget {
+ readonly angle: number;
+ onchange: ((this: ScreenOrientation, ev: Event) => any) | null;
+ readonly type: OrientationType;
+ lock(orientation: OrientationLockType): Promise<void>;
+ unlock(): void;
+ addEventListener<K extends keyof ScreenOrientationEventMap>(type: K, listener: (this: ScreenOrientation, ev: ScreenOrientationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof ScreenOrientationEventMap>(type: K, listener: (this: ScreenOrientation, ev: ScreenOrientationEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var ScreenOrientation: {
+ prototype: ScreenOrientation;
+ new(): ScreenOrientation;
+};
+
+interface ScriptProcessorNodeEventMap {
+ "audioprocess": AudioProcessingEvent;
+}
+
+/**
+ * Allows the generation, processing, or analyzing of audio using JavaScript.
+ * @deprecated As of the August 29 2014 Web Audio API spec publication, this feature has been marked as deprecated, and was replaced by AudioWorklet (see AudioWorkletNode).
+ */
+interface ScriptProcessorNode extends AudioNode {
+ /** @deprecated */
+ readonly bufferSize: number;
+ /** @deprecated */
+ onaudioprocess: ((this: ScriptProcessorNode, ev: AudioProcessingEvent) => any) | null;
+ addEventListener<K extends keyof ScriptProcessorNodeEventMap>(type: K, listener: (this: ScriptProcessorNode, ev: ScriptProcessorNodeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof ScriptProcessorNodeEventMap>(type: K, listener: (this: ScriptProcessorNode, ev: ScriptProcessorNodeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+/** @deprecated */
+declare var ScriptProcessorNode: {
+ prototype: ScriptProcessorNode;
+ new(): ScriptProcessorNode;
+};
+
+/** Inherits from Event, and represents the event object of an event sent on a document or worker when its content security policy is violated. */
+interface SecurityPolicyViolationEvent extends Event {
+ readonly blockedURI: string;
+ readonly columnNumber: number;
+ readonly disposition: SecurityPolicyViolationEventDisposition;
+ readonly documentURI: string;
+ readonly effectiveDirective: string;
+ readonly lineNumber: number;
+ readonly originalPolicy: string;
+ readonly referrer: string;
+ readonly sample: string;
+ readonly sourceFile: string;
+ readonly statusCode: number;
+ readonly violatedDirective: string;
+}
+
+declare var SecurityPolicyViolationEvent: {
+ prototype: SecurityPolicyViolationEvent;
+ new(type: string, eventInitDict?: SecurityPolicyViolationEventInit): SecurityPolicyViolationEvent;
+};
+
+/** A Selection object represents the range of text selected by the user or the current position of the caret. To obtain a Selection object for examination or modification, call Window.getSelection(). */
+interface Selection {
+ readonly anchorNode: Node | null;
+ readonly anchorOffset: number;
+ readonly focusNode: Node | null;
+ readonly focusOffset: number;
+ readonly isCollapsed: boolean;
+ readonly rangeCount: number;
+ readonly type: string;
+ addRange(range: Range): void;
+ collapse(node: Node | null, offset?: number): void;
+ collapseToEnd(): void;
+ collapseToStart(): void;
+ containsNode(node: Node, allowPartialContainment?: boolean): boolean;
+ deleteFromDocument(): void;
+ empty(): void;
+ extend(node: Node, offset?: number): void;
+ getRangeAt(index: number): Range;
+ removeAllRanges(): void;
+ removeRange(range: Range): void;
+ selectAllChildren(node: Node): void;
+ setBaseAndExtent(anchorNode: Node, anchorOffset: number, focusNode: Node, focusOffset: number): void;
+ setPosition(node: Node | null, offset?: number): void;
+ toString(): string;
+}
+
+declare var Selection: {
+ prototype: Selection;
+ new(): Selection;
+ toString(): string;
+};
+
+interface ServiceWorkerEventMap extends AbstractWorkerEventMap {
+ "statechange": Event;
+}
+
+/**
+ * This ServiceWorker API interface provides a reference to a service worker. Multiple browsing contexts (e.g. pages, workers, etc.) can be associated with the same service worker, each through a unique ServiceWorker object.
+ * Available only in secure contexts.
+ */
+interface ServiceWorker extends EventTarget, AbstractWorker {
+ onstatechange: ((this: ServiceWorker, ev: Event) => any) | null;
+ readonly scriptURL: string;
+ readonly state: ServiceWorkerState;
+ postMessage(message: any, transfer: Transferable[]): void;
+ postMessage(message: any, options?: StructuredSerializeOptions): void;
+ addEventListener<K extends keyof ServiceWorkerEventMap>(type: K, listener: (this: ServiceWorker, ev: ServiceWorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof ServiceWorkerEventMap>(type: K, listener: (this: ServiceWorker, ev: ServiceWorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var ServiceWorker: {
+ prototype: ServiceWorker;
+ new(): ServiceWorker;
+};
+
+interface ServiceWorkerContainerEventMap {
+ "controllerchange": Event;
+ "message": MessageEvent;
+ "messageerror": MessageEvent;
+}
+
+/**
+ * The ServiceWorkerContainer interface of the ServiceWorker API provides an object representing the service worker as an overall unit in the network ecosystem, including facilities to register, unregister and update service workers, and access the state of service workers and their registrations.
+ * Available only in secure contexts.
+ */
+interface ServiceWorkerContainer extends EventTarget {
+ readonly controller: ServiceWorker | null;
+ oncontrollerchange: ((this: ServiceWorkerContainer, ev: Event) => any) | null;
+ onmessage: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null;
+ onmessageerror: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null;
+ readonly ready: Promise<ServiceWorkerRegistration>;
+ getRegistration(clientURL?: string | URL): Promise<ServiceWorkerRegistration | undefined>;
+ getRegistrations(): Promise<ReadonlyArray<ServiceWorkerRegistration>>;
+ register(scriptURL: string | URL, options?: RegistrationOptions): Promise<ServiceWorkerRegistration>;
+ startMessages(): void;
+ addEventListener<K extends keyof ServiceWorkerContainerEventMap>(type: K, listener: (this: ServiceWorkerContainer, ev: ServiceWorkerContainerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof ServiceWorkerContainerEventMap>(type: K, listener: (this: ServiceWorkerContainer, ev: ServiceWorkerContainerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var ServiceWorkerContainer: {
+ prototype: ServiceWorkerContainer;
+ new(): ServiceWorkerContainer;
+};
+
+interface ServiceWorkerRegistrationEventMap {
+ "updatefound": Event;
+}
+
+/**
+ * This ServiceWorker API interface represents the service worker registration. You register a service worker to control one or more pages that share the same origin.
+ * Available only in secure contexts.
+ */
+interface ServiceWorkerRegistration extends EventTarget {
+ readonly active: ServiceWorker | null;
+ readonly installing: ServiceWorker | null;
+ readonly navigationPreload: NavigationPreloadManager;
+ onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null;
+ readonly pushManager: PushManager;
+ readonly scope: string;
+ readonly updateViaCache: ServiceWorkerUpdateViaCache;
+ readonly waiting: ServiceWorker | null;
+ getNotifications(filter?: GetNotificationOptions): Promise<Notification[]>;
+ showNotification(title: string, options?: NotificationOptions): Promise<void>;
+ unregister(): Promise<boolean>;
+ update(): Promise<void>;
+ addEventListener<K extends keyof ServiceWorkerRegistrationEventMap>(type: K, listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof ServiceWorkerRegistrationEventMap>(type: K, listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var ServiceWorkerRegistration: {
+ prototype: ServiceWorkerRegistration;
+ new(): ServiceWorkerRegistration;
+};
+
+interface ShadowRootEventMap {
+ "slotchange": Event;
+}
+
+interface ShadowRoot extends DocumentFragment, DocumentOrShadowRoot, InnerHTML {
+ readonly delegatesFocus: boolean;
+ readonly host: Element;
+ readonly mode: ShadowRootMode;
+ onslotchange: ((this: ShadowRoot, ev: Event) => any) | null;
+ readonly slotAssignment: SlotAssignmentMode;
+ /** Throws a "NotSupportedError" DOMException if context object is a shadow root. */
+ addEventListener<K extends keyof ShadowRootEventMap>(type: K, listener: (this: ShadowRoot, ev: ShadowRootEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof ShadowRootEventMap>(type: K, listener: (this: ShadowRoot, ev: ShadowRootEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var ShadowRoot: {
+ prototype: ShadowRoot;
+ new(): ShadowRoot;
+};
+
+interface SharedWorker extends EventTarget, AbstractWorker {
+ /** Returns sharedWorker's MessagePort object which can be used to communicate with the global environment. */
+ readonly port: MessagePort;
+ addEventListener<K extends keyof AbstractWorkerEventMap>(type: K, listener: (this: SharedWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof AbstractWorkerEventMap>(type: K, listener: (this: SharedWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SharedWorker: {
+ prototype: SharedWorker;
+ new(scriptURL: string | URL, options?: string | WorkerOptions): SharedWorker;
+};
+
+interface Slottable {
+ readonly assignedSlot: HTMLSlotElement | null;
+}
+
+interface SourceBufferEventMap {
+ "abort": Event;
+ "error": Event;
+ "update": Event;
+ "updateend": Event;
+ "updatestart": Event;
+}
+
+/** A chunk of media to be passed into an HTMLMediaElement and played, via a MediaSource object. This can be made up of one or several media segments. */
+interface SourceBuffer extends EventTarget {
+ appendWindowEnd: number;
+ appendWindowStart: number;
+ readonly buffered: TimeRanges;
+ mode: AppendMode;
+ onabort: ((this: SourceBuffer, ev: Event) => any) | null;
+ onerror: ((this: SourceBuffer, ev: Event) => any) | null;
+ onupdate: ((this: SourceBuffer, ev: Event) => any) | null;
+ onupdateend: ((this: SourceBuffer, ev: Event) => any) | null;
+ onupdatestart: ((this: SourceBuffer, ev: Event) => any) | null;
+ timestampOffset: number;
+ readonly updating: boolean;
+ abort(): void;
+ appendBuffer(data: BufferSource): void;
+ changeType(type: string): void;
+ remove(start: number, end: number): void;
+ addEventListener<K extends keyof SourceBufferEventMap>(type: K, listener: (this: SourceBuffer, ev: SourceBufferEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SourceBufferEventMap>(type: K, listener: (this: SourceBuffer, ev: SourceBufferEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SourceBuffer: {
+ prototype: SourceBuffer;
+ new(): SourceBuffer;
+};
+
+interface SourceBufferListEventMap {
+ "addsourcebuffer": Event;
+ "removesourcebuffer": Event;
+}
+
+/** A simple container list for multiple SourceBuffer objects. */
+interface SourceBufferList extends EventTarget {
+ readonly length: number;
+ onaddsourcebuffer: ((this: SourceBufferList, ev: Event) => any) | null;
+ onremovesourcebuffer: ((this: SourceBufferList, ev: Event) => any) | null;
+ addEventListener<K extends keyof SourceBufferListEventMap>(type: K, listener: (this: SourceBufferList, ev: SourceBufferListEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SourceBufferListEventMap>(type: K, listener: (this: SourceBufferList, ev: SourceBufferListEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+ [index: number]: SourceBuffer;
+}
+
+declare var SourceBufferList: {
+ prototype: SourceBufferList;
+ new(): SourceBufferList;
+};
+
+interface SpeechRecognitionAlternative {
+ readonly confidence: number;
+ readonly transcript: string;
+}
+
+declare var SpeechRecognitionAlternative: {
+ prototype: SpeechRecognitionAlternative;
+ new(): SpeechRecognitionAlternative;
+};
+
+interface SpeechRecognitionResult {
+ readonly isFinal: boolean;
+ readonly length: number;
+ item(index: number): SpeechRecognitionAlternative;
+ [index: number]: SpeechRecognitionAlternative;
+}
+
+declare var SpeechRecognitionResult: {
+ prototype: SpeechRecognitionResult;
+ new(): SpeechRecognitionResult;
+};
+
+interface SpeechRecognitionResultList {
+ readonly length: number;
+ item(index: number): SpeechRecognitionResult;
+ [index: number]: SpeechRecognitionResult;
+}
+
+declare var SpeechRecognitionResultList: {
+ prototype: SpeechRecognitionResultList;
+ new(): SpeechRecognitionResultList;
+};
+
+interface SpeechSynthesisEventMap {
+ "voiceschanged": Event;
+}
+
+/** This Web Speech API interface is the controller interface for the speech service; this can be used to retrieve information about the synthesis voices available on the device, start and pause speech, and other commands besides. */
+interface SpeechSynthesis extends EventTarget {
+ onvoiceschanged: ((this: SpeechSynthesis, ev: Event) => any) | null;
+ readonly paused: boolean;
+ readonly pending: boolean;
+ readonly speaking: boolean;
+ cancel(): void;
+ getVoices(): SpeechSynthesisVoice[];
+ pause(): void;
+ resume(): void;
+ speak(utterance: SpeechSynthesisUtterance): void;
+ addEventListener<K extends keyof SpeechSynthesisEventMap>(type: K, listener: (this: SpeechSynthesis, ev: SpeechSynthesisEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SpeechSynthesisEventMap>(type: K, listener: (this: SpeechSynthesis, ev: SpeechSynthesisEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SpeechSynthesis: {
+ prototype: SpeechSynthesis;
+ new(): SpeechSynthesis;
+};
+
+interface SpeechSynthesisErrorEvent extends SpeechSynthesisEvent {
+ readonly error: SpeechSynthesisErrorCode;
+}
+
+declare var SpeechSynthesisErrorEvent: {
+ prototype: SpeechSynthesisErrorEvent;
+ new(type: string, eventInitDict: SpeechSynthesisErrorEventInit): SpeechSynthesisErrorEvent;
+};
+
+/** This Web Speech API interface contains information about the current state of SpeechSynthesisUtterance objects that have been processed in the speech service. */
+interface SpeechSynthesisEvent extends Event {
+ readonly charIndex: number;
+ readonly charLength: number;
+ readonly elapsedTime: number;
+ readonly name: string;
+ readonly utterance: SpeechSynthesisUtterance;
+}
+
+declare var SpeechSynthesisEvent: {
+ prototype: SpeechSynthesisEvent;
+ new(type: string, eventInitDict: SpeechSynthesisEventInit): SpeechSynthesisEvent;
+};
+
+interface SpeechSynthesisUtteranceEventMap {
+ "boundary": SpeechSynthesisEvent;
+ "end": SpeechSynthesisEvent;
+ "error": SpeechSynthesisErrorEvent;
+ "mark": SpeechSynthesisEvent;
+ "pause": SpeechSynthesisEvent;
+ "resume": SpeechSynthesisEvent;
+ "start": SpeechSynthesisEvent;
+}
+
+/** This Web Speech API interface represents a speech request. It contains the content the speech service should read and information about how to read it (e.g. language, pitch and volume.) */
+interface SpeechSynthesisUtterance extends EventTarget {
+ lang: string;
+ onboundary: ((this: SpeechSynthesisUtterance, ev: SpeechSynthesisEvent) => any) | null;
+ onend: ((this: SpeechSynthesisUtterance, ev: SpeechSynthesisEvent) => any) | null;
+ onerror: ((this: SpeechSynthesisUtterance, ev: SpeechSynthesisErrorEvent) => any) | null;
+ onmark: ((this: SpeechSynthesisUtterance, ev: SpeechSynthesisEvent) => any) | null;
+ onpause: ((this: SpeechSynthesisUtterance, ev: SpeechSynthesisEvent) => any) | null;
+ onresume: ((this: SpeechSynthesisUtterance, ev: SpeechSynthesisEvent) => any) | null;
+ onstart: ((this: SpeechSynthesisUtterance, ev: SpeechSynthesisEvent) => any) | null;
+ pitch: number;
+ rate: number;
+ text: string;
+ voice: SpeechSynthesisVoice | null;
+ volume: number;
+ addEventListener<K extends keyof SpeechSynthesisUtteranceEventMap>(type: K, listener: (this: SpeechSynthesisUtterance, ev: SpeechSynthesisUtteranceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SpeechSynthesisUtteranceEventMap>(type: K, listener: (this: SpeechSynthesisUtterance, ev: SpeechSynthesisUtteranceEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SpeechSynthesisUtterance: {
+ prototype: SpeechSynthesisUtterance;
+ new(text?: string): SpeechSynthesisUtterance;
+};
+
+/** This Web Speech API interface represents a voice that the system supports. Every SpeechSynthesisVoice has its own relative speech service including information about language, name and URI. */
+interface SpeechSynthesisVoice {
+ readonly default: boolean;
+ readonly lang: string;
+ readonly localService: boolean;
+ readonly name: string;
+ readonly voiceURI: string;
+}
+
+declare var SpeechSynthesisVoice: {
+ prototype: SpeechSynthesisVoice;
+ new(): SpeechSynthesisVoice;
+};
+
+interface StaticRange extends AbstractRange {
+}
+
+declare var StaticRange: {
+ prototype: StaticRange;
+ new(init: StaticRangeInit): StaticRange;
+};
+
+/** The pan property takes a unitless value between -1 (full left pan) and 1 (full right pan). This interface was introduced as a much simpler way to apply a simple panning effect than having to use a full PannerNode. */
+interface StereoPannerNode extends AudioNode {
+ readonly pan: AudioParam;
+}
+
+declare var StereoPannerNode: {
+ prototype: StereoPannerNode;
+ new(context: BaseAudioContext, options?: StereoPannerOptions): StereoPannerNode;
+};
+
+/** This Web Storage API interface provides access to a particular domain's session or local storage. It allows, for example, the addition, modification, or deletion of stored data items. */
+interface Storage {
+ /** Returns the number of key/value pairs. */
+ readonly length: number;
+ /**
+ * Removes all key/value pairs, if there are any.
+ *
+ * Dispatches a storage event on Window objects holding an equivalent Storage object.
+ */
+ clear(): void;
+ /** Returns the current value associated with the given key, or null if the given key does not exist. */
+ getItem(key: string): string | null;
+ /** Returns the name of the nth key, or null if n is greater than or equal to the number of key/value pairs. */
+ key(index: number): string | null;
+ /**
+ * Removes the key/value pair with the given key, if a key/value pair with the given key exists.
+ *
+ * Dispatches a storage event on Window objects holding an equivalent Storage object.
+ */
+ removeItem(key: string): void;
+ /**
+ * Sets the value of the pair identified by key to value, creating a new key/value pair if none existed for key previously.
+ *
+ * Throws a "QuotaExceededError" DOMException exception if the new value couldn't be set. (Setting could fail if, e.g., the user has disabled storage for the site, or if the quota has been exceeded.)
+ *
+ * Dispatches a storage event on Window objects holding an equivalent Storage object.
+ */
+ setItem(key: string, value: string): void;
+ [name: string]: any;
+}
+
+declare var Storage: {
+ prototype: Storage;
+ new(): Storage;
+};
+
+/** A StorageEvent is sent to a window when a storage area it has access to is changed within the context of another document. */
+interface StorageEvent extends Event {
+ /** Returns the key of the storage item being changed. */
+ readonly key: string | null;
+ /** Returns the new value of the key of the storage item whose value is being changed. */
+ readonly newValue: string | null;
+ /** Returns the old value of the key of the storage item whose value is being changed. */
+ readonly oldValue: string | null;
+ /** Returns the Storage object that was affected. */
+ readonly storageArea: Storage | null;
+ /** Returns the URL of the document whose storage item changed. */
+ readonly url: string;
+ initStorageEvent(type: string, bubbles?: boolean, cancelable?: boolean, key?: string | null, oldValue?: string | null, newValue?: string | null, url?: string | URL, storageArea?: Storage | null): void;
+}
+
+declare var StorageEvent: {
+ prototype: StorageEvent;
+ new(type: string, eventInitDict?: StorageEventInit): StorageEvent;
+};
+
+/** Available only in secure contexts. */
+interface StorageManager {
+ estimate(): Promise<StorageEstimate>;
+ getDirectory(): Promise<FileSystemDirectoryHandle>;
+ persist(): Promise<boolean>;
+ persisted(): Promise<boolean>;
+}
+
+declare var StorageManager: {
+ prototype: StorageManager;
+ new(): StorageManager;
+};
+
+/** @deprecated */
+interface StyleMedia {
+ type: string;
+ matchMedium(mediaquery: string): boolean;
+}
+
+/** A single style sheet. CSS style sheets will further implement the more specialized CSSStyleSheet interface. */
+interface StyleSheet {
+ disabled: boolean;
+ readonly href: string | null;
+ readonly media: MediaList;
+ readonly ownerNode: Element | ProcessingInstruction | null;
+ readonly parentStyleSheet: CSSStyleSheet | null;
+ readonly title: string | null;
+ readonly type: string;
+}
+
+declare var StyleSheet: {
+ prototype: StyleSheet;
+ new(): StyleSheet;
+};
+
+/** A list of StyleSheet. */
+interface StyleSheetList {
+ readonly length: number;
+ item(index: number): CSSStyleSheet | null;
+ [index: number]: CSSStyleSheet;
+}
+
+declare var StyleSheetList: {
+ prototype: StyleSheetList;
+ new(): StyleSheetList;
+};
+
+interface SubmitEvent extends Event {
+ /** Returns the element representing the submit button that triggered the form submission, or null if the submission was not triggered by a button. */
+ readonly submitter: HTMLElement | null;
+}
+
+declare var SubmitEvent: {
+ prototype: SubmitEvent;
+ new(type: string, eventInitDict?: SubmitEventInit): SubmitEvent;
+};
+
+/**
+ * This Web Crypto API interface provides a number of low-level cryptographic functions. It is accessed via the Crypto.subtle properties available in a window context (via Window.crypto).
+ * Available only in secure contexts.
+ */
+interface SubtleCrypto {
+ decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
+ deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise<ArrayBuffer>;
+ deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
+ digest(algorithm: AlgorithmIdentifier, data: BufferSource): Promise<ArrayBuffer>;
+ encrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
+ exportKey(format: "jwk", key: CryptoKey): Promise<JsonWebKey>;
+ exportKey(format: Exclude<KeyFormat, "jwk">, key: CryptoKey): Promise<ArrayBuffer>;
+ generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKeyPair>;
+ generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
+ generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair | CryptoKey>;
+ importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
+ importKey(format: Exclude<KeyFormat, "jwk">, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
+ sign(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
+ unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
+ verify(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams, key: CryptoKey, signature: BufferSource, data: BufferSource): Promise<boolean>;
+ wrapKey(format: KeyFormat, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams): Promise<ArrayBuffer>;
+}
+
+declare var SubtleCrypto: {
+ prototype: SubtleCrypto;
+ new(): SubtleCrypto;
+};
+
+/** The textual content of Element or Attr. If an element has no markup within its content, it has a single child implementing Text that contains the element's text. However, if the element contains markup, it is parsed into information items and Text nodes that form its children. */
+interface Text extends CharacterData, Slottable {
+ /** Returns the combined data of all direct Text node siblings. */
+ readonly wholeText: string;
+ /** Splits data at the given offset and returns the remainder as Text node. */
+ splitText(offset: number): Text;
+}
+
+declare var Text: {
+ prototype: Text;
+ new(data?: string): Text;
+};
+
+/** A decoder for a specific method, that is a specific character encoding, like utf-8, iso-8859-2, koi8, cp1261, gbk, etc. A decoder takes a stream of bytes as input and emits a stream of code points. For a more scalable, non-native library, see StringView – a C-like representation of strings based on typed arrays. */
+interface TextDecoder extends TextDecoderCommon {
+ /**
+ * Returns the result of running encoding's decoder. The method can be invoked zero or more times with options's stream set to true, and then once without options's stream (or set to false), to process a fragmented input. If the invocation without options's stream (or set to false) has no input, it's clearest to omit both arguments.
+ *
+ * ```
+ * var string = "", decoder = new TextDecoder(encoding), buffer;
+ * while(buffer = next_chunk()) {
+ * string += decoder.decode(buffer, {stream:true});
+ * }
+ * string += decoder.decode(); // end-of-queue
+ * ```
+ *
+ * If the error mode is "fatal" and encoding's decoder returns error, throws a TypeError.
+ */
+ decode(input?: BufferSource, options?: TextDecodeOptions): string;
+}
+
+declare var TextDecoder: {
+ prototype: TextDecoder;
+ new(label?: string, options?: TextDecoderOptions): TextDecoder;
+};
+
+interface TextDecoderCommon {
+ /** Returns encoding's name, lowercased. */
+ readonly encoding: string;
+ /** Returns true if error mode is "fatal", otherwise false. */
+ readonly fatal: boolean;
+ /** Returns the value of ignore BOM. */
+ readonly ignoreBOM: boolean;
+}
+
+interface TextDecoderStream extends GenericTransformStream, TextDecoderCommon {
+ readonly readable: ReadableStream<string>;
+ readonly writable: WritableStream<BufferSource>;
+}
+
+declare var TextDecoderStream: {
+ prototype: TextDecoderStream;
+ new(label?: string, options?: TextDecoderOptions): TextDecoderStream;
+};
+
+/** TextEncoder takes a stream of code points as input and emits a stream of bytes. For a more scalable, non-native library, see StringView – a C-like representation of strings based on typed arrays. */
+interface TextEncoder extends TextEncoderCommon {
+ /** Returns the result of running UTF-8's encoder. */
+ encode(input?: string): Uint8Array;
+ /** Runs the UTF-8 encoder on source, stores the result of that operation into destination, and returns the progress made as an object wherein read is the number of converted code units of source and written is the number of bytes modified in destination. */
+ encodeInto(source: string, destination: Uint8Array): TextEncoderEncodeIntoResult;
+}
+
+declare var TextEncoder: {
+ prototype: TextEncoder;
+ new(): TextEncoder;
+};
+
+interface TextEncoderCommon {
+ /** Returns "utf-8". */
+ readonly encoding: string;
+}
+
+interface TextEncoderStream extends GenericTransformStream, TextEncoderCommon {
+ readonly readable: ReadableStream<Uint8Array>;
+ readonly writable: WritableStream<string>;
+}
+
+declare var TextEncoderStream: {
+ prototype: TextEncoderStream;
+ new(): TextEncoderStream;
+};
+
+/** The dimensions of a piece of text in the canvas, as created by the CanvasRenderingContext2D.measureText() method. */
+interface TextMetrics {
+ /** Returns the measurement described below. */
+ readonly actualBoundingBoxAscent: number;
+ /** Returns the measurement described below. */
+ readonly actualBoundingBoxDescent: number;
+ /** Returns the measurement described below. */
+ readonly actualBoundingBoxLeft: number;
+ /** Returns the measurement described below. */
+ readonly actualBoundingBoxRight: number;
+ /** Returns the measurement described below. */
+ readonly fontBoundingBoxAscent: number;
+ /** Returns the measurement described below. */
+ readonly fontBoundingBoxDescent: number;
+ /** Returns the measurement described below. */
+ readonly width: number;
+}
+
+declare var TextMetrics: {
+ prototype: TextMetrics;
+ new(): TextMetrics;
+};
+
+interface TextTrackEventMap {
+ "cuechange": Event;
+}
+
+/** This interface also inherits properties from EventTarget. */
+interface TextTrack extends EventTarget {
+ /** Returns the text track cues from the text track list of cues that are currently active (i.e. that start before the current playback position and end after it), as a TextTrackCueList object. */
+ readonly activeCues: TextTrackCueList | null;
+ /** Returns the text track list of cues, as a TextTrackCueList object. */
+ readonly cues: TextTrackCueList | null;
+ /**
+ * Returns the ID of the given track.
+ *
+ * For in-band tracks, this is the ID that can be used with a fragment if the format supports media fragment syntax, and that can be used with the getTrackById() method.
+ *
+ * For TextTrack objects corresponding to track elements, this is the ID of the track element.
+ */
+ readonly id: string;
+ /** Returns the text track in-band metadata track dispatch type string. */
+ readonly inBandMetadataTrackDispatchType: string;
+ /** Returns the text track kind string. */
+ readonly kind: TextTrackKind;
+ /** Returns the text track label, if there is one, or the empty string otherwise (indicating that a custom label probably needs to be generated from the other attributes of the object if the object is exposed to the user). */
+ readonly label: string;
+ /** Returns the text track language string. */
+ readonly language: string;
+ /**
+ * Returns the text track mode, represented by a string from the following list:
+ *
+ * Can be set, to change the mode.
+ */
+ mode: TextTrackMode;
+ oncuechange: ((this: TextTrack, ev: Event) => any) | null;
+ /** Adds the given cue to textTrack's text track list of cues. */
+ addCue(cue: TextTrackCue): void;
+ /** Removes the given cue from textTrack's text track list of cues. */
+ removeCue(cue: TextTrackCue): void;
+ addEventListener<K extends keyof TextTrackEventMap>(type: K, listener: (this: TextTrack, ev: TextTrackEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof TextTrackEventMap>(type: K, listener: (this: TextTrack, ev: TextTrackEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var TextTrack: {
+ prototype: TextTrack;
+ new(): TextTrack;
+};
+
+interface TextTrackCueEventMap {
+ "enter": Event;
+ "exit": Event;
+}
+
+/** TextTrackCues represent a string of text that will be displayed for some duration of time on a TextTrack. This includes the start and end times that the cue will be displayed. A TextTrackCue cannot be used directly, instead one of the derived types (e.g. VTTCue) must be used. */
+interface TextTrackCue extends EventTarget {
+ /**
+ * Returns the text track cue end time, in seconds.
+ *
+ * Can be set.
+ */
+ endTime: number;
+ /**
+ * Returns the text track cue identifier.
+ *
+ * Can be set.
+ */
+ id: string;
+ onenter: ((this: TextTrackCue, ev: Event) => any) | null;
+ onexit: ((this: TextTrackCue, ev: Event) => any) | null;
+ /**
+ * Returns true if the text track cue pause-on-exit flag is set, false otherwise.
+ *
+ * Can be set.
+ */
+ pauseOnExit: boolean;
+ /**
+ * Returns the text track cue start time, in seconds.
+ *
+ * Can be set.
+ */
+ startTime: number;
+ /** Returns the TextTrack object to which this text track cue belongs, if any, or null otherwise. */
+ readonly track: TextTrack | null;
+ addEventListener<K extends keyof TextTrackCueEventMap>(type: K, listener: (this: TextTrackCue, ev: TextTrackCueEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof TextTrackCueEventMap>(type: K, listener: (this: TextTrackCue, ev: TextTrackCueEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var TextTrackCue: {
+ prototype: TextTrackCue;
+ new(): TextTrackCue;
+};
+
+interface TextTrackCueList {
+ /** Returns the number of cues in the list. */
+ readonly length: number;
+ /**
+ * Returns the first text track cue (in text track cue order) with text track cue identifier id.
+ *
+ * Returns null if none of the cues have the given identifier or if the argument is the empty string.
+ */
+ getCueById(id: string): TextTrackCue | null;
+ [index: number]: TextTrackCue;
+}
+
+declare var TextTrackCueList: {
+ prototype: TextTrackCueList;
+ new(): TextTrackCueList;
+};
+
+interface TextTrackListEventMap {
+ "addtrack": TrackEvent;
+ "change": Event;
+ "removetrack": TrackEvent;
+}
+
+interface TextTrackList extends EventTarget {
+ readonly length: number;
+ onaddtrack: ((this: TextTrackList, ev: TrackEvent) => any) | null;
+ onchange: ((this: TextTrackList, ev: Event) => any) | null;
+ onremovetrack: ((this: TextTrackList, ev: TrackEvent) => any) | null;
+ getTrackById(id: string): TextTrack | null;
+ addEventListener<K extends keyof TextTrackListEventMap>(type: K, listener: (this: TextTrackList, ev: TextTrackListEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof TextTrackListEventMap>(type: K, listener: (this: TextTrackList, ev: TextTrackListEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+ [index: number]: TextTrack;
+}
+
+declare var TextTrackList: {
+ prototype: TextTrackList;
+ new(): TextTrackList;
+};
+
+/** Used to represent a set of time ranges, primarily for the purpose of tracking which portions of media have been buffered when loading it for use by the <audio> and <video> elements. */
+interface TimeRanges {
+ /** Returns the number of ranges in the object. */
+ readonly length: number;
+ /**
+ * Returns the time for the end of the range with the given index.
+ *
+ * Throws an "IndexSizeError" DOMException if the index is out of range.
+ */
+ end(index: number): number;
+ /**
+ * Returns the time for the start of the range with the given index.
+ *
+ * Throws an "IndexSizeError" DOMException if the index is out of range.
+ */
+ start(index: number): number;
+}
+
+declare var TimeRanges: {
+ prototype: TimeRanges;
+ new(): TimeRanges;
+};
+
+/** A single contact point on a touch-sensitive device. The contact point is commonly a finger or stylus and the device may be a touchscreen or trackpad. */
+interface Touch {
+ readonly clientX: number;
+ readonly clientY: number;
+ readonly force: number;
+ readonly identifier: number;
+ readonly pageX: number;
+ readonly pageY: number;
+ readonly radiusX: number;
+ readonly radiusY: number;
+ readonly rotationAngle: number;
+ readonly screenX: number;
+ readonly screenY: number;
+ readonly target: EventTarget;
+}
+
+declare var Touch: {
+ prototype: Touch;
+ new(touchInitDict: TouchInit): Touch;
+};
+
+/** An event sent when the state of contacts with a touch-sensitive surface changes. This surface can be a touch screen or trackpad, for example. The event can describe one or more points of contact with the screen and includes support for detecting movement, addition and removal of contact points, and so forth. */
+interface TouchEvent extends UIEvent {
+ readonly altKey: boolean;
+ readonly changedTouches: TouchList;
+ readonly ctrlKey: boolean;
+ readonly metaKey: boolean;
+ readonly shiftKey: boolean;
+ readonly targetTouches: TouchList;
+ readonly touches: TouchList;
+}
+
+declare var TouchEvent: {
+ prototype: TouchEvent;
+ new(type: string, eventInitDict?: TouchEventInit): TouchEvent;
+};
+
+/** A list of contact points on a touch surface. For example, if the user has three fingers on the touch surface (such as a screen or trackpad), the corresponding TouchList object would have one Touch object for each finger, for a total of three entries. */
+interface TouchList {
+ readonly length: number;
+ item(index: number): Touch | null;
+ [index: number]: Touch;
+}
+
+declare var TouchList: {
+ prototype: TouchList;
+ new(): TouchList;
+};
+
+/** The TrackEvent interface, part of the HTML DOM specification, is used for events which represent changes to the set of available tracks on an HTML media element; these events are addtrack and removetrack. */
+interface TrackEvent extends Event {
+ /** Returns the track object (TextTrack, AudioTrack, or VideoTrack) to which the event relates. */
+ readonly track: TextTrack | null;
+}
+
+declare var TrackEvent: {
+ prototype: TrackEvent;
+ new(type: string, eventInitDict?: TrackEventInit): TrackEvent;
+};
+
+interface TransformStream<I = any, O = any> {
+ readonly readable: ReadableStream<O>;
+ readonly writable: WritableStream<I>;
+}
+
+declare var TransformStream: {
+ prototype: TransformStream;
+ new<I = any, O = any>(transformer?: Transformer<I, O>, writableStrategy?: QueuingStrategy<I>, readableStrategy?: QueuingStrategy<O>): TransformStream<I, O>;
+};
+
+interface TransformStreamDefaultController<O = any> {
+ readonly desiredSize: number | null;
+ enqueue(chunk?: O): void;
+ error(reason?: any): void;
+ terminate(): void;
+}
+
+declare var TransformStreamDefaultController: {
+ prototype: TransformStreamDefaultController;
+ new(): TransformStreamDefaultController;
+};
+
+/** Events providing information related to transitions. */
+interface TransitionEvent extends Event {
+ readonly elapsedTime: number;
+ readonly propertyName: string;
+ readonly pseudoElement: string;
+}
+
+declare var TransitionEvent: {
+ prototype: TransitionEvent;
+ new(type: string, transitionEventInitDict?: TransitionEventInit): TransitionEvent;
+};
+
+/** The nodes of a document subtree and a position within them. */
+interface TreeWalker {
+ currentNode: Node;
+ readonly filter: NodeFilter | null;
+ readonly root: Node;
+ readonly whatToShow: number;
+ firstChild(): Node | null;
+ lastChild(): Node | null;
+ nextNode(): Node | null;
+ nextSibling(): Node | null;
+ parentNode(): Node | null;
+ previousNode(): Node | null;
+ previousSibling(): Node | null;
+}
+
+declare var TreeWalker: {
+ prototype: TreeWalker;
+ new(): TreeWalker;
+};
+
+/** Simple user interface events. */
+interface UIEvent extends Event {
+ readonly detail: number;
+ readonly view: Window | null;
+ /** @deprecated */
+ readonly which: number;
+ /** @deprecated */
+ initUIEvent(typeArg: string, bubblesArg?: boolean, cancelableArg?: boolean, viewArg?: Window | null, detailArg?: number): void;
+}
+
+declare var UIEvent: {
+ prototype: UIEvent;
+ new(type: string, eventInitDict?: UIEventInit): UIEvent;
+};
+
+/** The URL interface represents an object providing static methods used for creating object URLs. */
+interface URL {
+ hash: string;
+ host: string;
+ hostname: string;
+ href: string;
+ toString(): string;
+ readonly origin: string;
+ password: string;
+ pathname: string;
+ port: string;
+ protocol: string;
+ search: string;
+ readonly searchParams: URLSearchParams;
+ username: string;
+ toJSON(): string;
+}
+
+declare var URL: {
+ prototype: URL;
+ new(url: string | URL, base?: string | URL): URL;
+ createObjectURL(obj: Blob | MediaSource): string;
+ revokeObjectURL(url: string): void;
+};
+
+type webkitURL = URL;
+declare var webkitURL: typeof URL;
+
+interface URLSearchParams {
+ /** Appends a specified key/value pair as a new search parameter. */
+ append(name: string, value: string): void;
+ /** Deletes the given search parameter, and its associated value, from the list of all search parameters. */
+ delete(name: string): void;
+ /** Returns the first value associated to the given search parameter. */
+ get(name: string): string | null;
+ /** Returns all the values association with a given search parameter. */
+ getAll(name: string): string[];
+ /** Returns a Boolean indicating if such a search parameter exists. */
+ has(name: string): boolean;
+ /** Sets the value associated to a given search parameter to the given value. If there were several values, delete the others. */
+ set(name: string, value: string): void;
+ sort(): void;
+ /** Returns a string containing a query string suitable for use in a URL. Does not include the question mark. */
+ toString(): string;
+ forEach(callbackfn: (value: string, key: string, parent: URLSearchParams) => void, thisArg?: any): void;
+}
+
+declare var URLSearchParams: {
+ prototype: URLSearchParams;
+ new(init?: string[][] | Record<string, string> | string | URLSearchParams): URLSearchParams;
+ toString(): string;
+};
+
+interface VTTCue extends TextTrackCue {
+ align: AlignSetting;
+ line: LineAndPositionSetting;
+ lineAlign: LineAlignSetting;
+ position: LineAndPositionSetting;
+ positionAlign: PositionAlignSetting;
+ region: VTTRegion | null;
+ size: number;
+ snapToLines: boolean;
+ text: string;
+ vertical: DirectionSetting;
+ getCueAsHTML(): DocumentFragment;
+ addEventListener<K extends keyof TextTrackCueEventMap>(type: K, listener: (this: VTTCue, ev: TextTrackCueEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof TextTrackCueEventMap>(type: K, listener: (this: VTTCue, ev: TextTrackCueEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var VTTCue: {
+ prototype: VTTCue;
+ new(startTime: number, endTime: number, text: string): VTTCue;
+};
+
+interface VTTRegion {
+ id: string;
+ lines: number;
+ regionAnchorX: number;
+ regionAnchorY: number;
+ scroll: ScrollSetting;
+ viewportAnchorX: number;
+ viewportAnchorY: number;
+ width: number;
+}
+
+declare var VTTRegion: {
+ prototype: VTTRegion;
+ new(): VTTRegion;
+};
+
+/** The validity states that an element can be in, with respect to constraint validation. Together, they help explain why an element's value fails to validate, if it's not valid. */
+interface ValidityState {
+ readonly badInput: boolean;
+ readonly customError: boolean;
+ readonly patternMismatch: boolean;
+ readonly rangeOverflow: boolean;
+ readonly rangeUnderflow: boolean;
+ readonly stepMismatch: boolean;
+ readonly tooLong: boolean;
+ readonly tooShort: boolean;
+ readonly typeMismatch: boolean;
+ readonly valid: boolean;
+ readonly valueMissing: boolean;
+}
+
+declare var ValidityState: {
+ prototype: ValidityState;
+ new(): ValidityState;
+};
+
+interface VideoColorSpace {
+ readonly fullRange: boolean | null;
+ readonly matrix: VideoMatrixCoefficients | null;
+ readonly primaries: VideoColorPrimaries | null;
+ readonly transfer: VideoTransferCharacteristics | null;
+ toJSON(): VideoColorSpaceInit;
+}
+
+declare var VideoColorSpace: {
+ prototype: VideoColorSpace;
+ new(init?: VideoColorSpaceInit): VideoColorSpace;
+};
+
+/** Returned by the HTMLVideoElement.getVideoPlaybackQuality() method and contains metrics that can be used to determine the playback quality of a video. */
+interface VideoPlaybackQuality {
+ /** @deprecated */
+ readonly corruptedVideoFrames: number;
+ readonly creationTime: DOMHighResTimeStamp;
+ readonly droppedVideoFrames: number;
+ readonly totalVideoFrames: number;
+}
+
+declare var VideoPlaybackQuality: {
+ prototype: VideoPlaybackQuality;
+ new(): VideoPlaybackQuality;
+};
+
+interface VisualViewportEventMap {
+ "resize": Event;
+ "scroll": Event;
+}
+
+interface VisualViewport extends EventTarget {
+ readonly height: number;
+ readonly offsetLeft: number;
+ readonly offsetTop: number;
+ onresize: ((this: VisualViewport, ev: Event) => any) | null;
+ onscroll: ((this: VisualViewport, ev: Event) => any) | null;
+ readonly pageLeft: number;
+ readonly pageTop: number;
+ readonly scale: number;
+ readonly width: number;
+ addEventListener<K extends keyof VisualViewportEventMap>(type: K, listener: (this: VisualViewport, ev: VisualViewportEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof VisualViewportEventMap>(type: K, listener: (this: VisualViewport, ev: VisualViewportEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var VisualViewport: {
+ prototype: VisualViewport;
+ new(): VisualViewport;
+};
+
+interface WEBGL_color_buffer_float {
+ readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT: GLenum;
+ readonly RGBA32F_EXT: GLenum;
+ readonly UNSIGNED_NORMALIZED_EXT: GLenum;
+}
+
+interface WEBGL_compressed_texture_astc {
+ getSupportedProfiles(): string[];
+ readonly COMPRESSED_RGBA_ASTC_10x10_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_10x5_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_10x6_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_10x8_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_12x10_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_12x12_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_4x4_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_5x4_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_5x5_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_6x5_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_6x6_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_8x5_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_8x6_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_8x8_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR: GLenum;
+}
+
+interface WEBGL_compressed_texture_etc {
+ readonly COMPRESSED_R11_EAC: GLenum;
+ readonly COMPRESSED_RG11_EAC: GLenum;
+ readonly COMPRESSED_RGB8_ETC2: GLenum;
+ readonly COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2: GLenum;
+ readonly COMPRESSED_RGBA8_ETC2_EAC: GLenum;
+ readonly COMPRESSED_SIGNED_R11_EAC: GLenum;
+ readonly COMPRESSED_SIGNED_RG11_EAC: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ETC2_EAC: GLenum;
+ readonly COMPRESSED_SRGB8_ETC2: GLenum;
+ readonly COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2: GLenum;
+}
+
+interface WEBGL_compressed_texture_etc1 {
+ readonly COMPRESSED_RGB_ETC1_WEBGL: GLenum;
+}
+
+/** The WEBGL_compressed_texture_s3tc extension is part of the WebGL API and exposes four S3TC compressed texture formats. */
+interface WEBGL_compressed_texture_s3tc {
+ readonly COMPRESSED_RGBA_S3TC_DXT1_EXT: GLenum;
+ readonly COMPRESSED_RGBA_S3TC_DXT3_EXT: GLenum;
+ readonly COMPRESSED_RGBA_S3TC_DXT5_EXT: GLenum;
+ readonly COMPRESSED_RGB_S3TC_DXT1_EXT: GLenum;
+}
+
+interface WEBGL_compressed_texture_s3tc_srgb {
+ readonly COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT: GLenum;
+ readonly COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT: GLenum;
+ readonly COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT: GLenum;
+ readonly COMPRESSED_SRGB_S3TC_DXT1_EXT: GLenum;
+}
+
+/** The WEBGL_debug_renderer_info extension is part of the WebGL API and exposes two constants with information about the graphics driver for debugging purposes. */
+interface WEBGL_debug_renderer_info {
+ readonly UNMASKED_RENDERER_WEBGL: GLenum;
+ readonly UNMASKED_VENDOR_WEBGL: GLenum;
+}
+
+interface WEBGL_debug_shaders {
+ getTranslatedShaderSource(shader: WebGLShader): string;
+}
+
+/** The WEBGL_depth_texture extension is part of the WebGL API and defines 2D depth and depth-stencil textures. */
+interface WEBGL_depth_texture {
+ readonly UNSIGNED_INT_24_8_WEBGL: GLenum;
+}
+
+interface WEBGL_draw_buffers {
+ drawBuffersWEBGL(buffers: GLenum[]): void;
+ readonly COLOR_ATTACHMENT0_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT10_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT11_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT12_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT13_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT14_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT15_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT1_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT2_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT3_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT4_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT5_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT6_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT7_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT8_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT9_WEBGL: GLenum;
+ readonly DRAW_BUFFER0_WEBGL: GLenum;
+ readonly DRAW_BUFFER10_WEBGL: GLenum;
+ readonly DRAW_BUFFER11_WEBGL: GLenum;
+ readonly DRAW_BUFFER12_WEBGL: GLenum;
+ readonly DRAW_BUFFER13_WEBGL: GLenum;
+ readonly DRAW_BUFFER14_WEBGL: GLenum;
+ readonly DRAW_BUFFER15_WEBGL: GLenum;
+ readonly DRAW_BUFFER1_WEBGL: GLenum;
+ readonly DRAW_BUFFER2_WEBGL: GLenum;
+ readonly DRAW_BUFFER3_WEBGL: GLenum;
+ readonly DRAW_BUFFER4_WEBGL: GLenum;
+ readonly DRAW_BUFFER5_WEBGL: GLenum;
+ readonly DRAW_BUFFER6_WEBGL: GLenum;
+ readonly DRAW_BUFFER7_WEBGL: GLenum;
+ readonly DRAW_BUFFER8_WEBGL: GLenum;
+ readonly DRAW_BUFFER9_WEBGL: GLenum;
+ readonly MAX_COLOR_ATTACHMENTS_WEBGL: GLenum;
+ readonly MAX_DRAW_BUFFERS_WEBGL: GLenum;
+}
+
+interface WEBGL_lose_context {
+ loseContext(): void;
+ restoreContext(): void;
+}
+
+interface WEBGL_multi_draw {
+ multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | GLint[], firstsOffset: GLuint, countsList: Int32Array | GLsizei[], countsOffset: GLuint, instanceCountsList: Int32Array | GLsizei[], instanceCountsOffset: GLuint, drawcount: GLsizei): void;
+ multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | GLint[], firstsOffset: GLuint, countsList: Int32Array | GLsizei[], countsOffset: GLuint, drawcount: GLsizei): void;
+ multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | GLint[], countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: GLuint, instanceCountsList: Int32Array | GLsizei[], instanceCountsOffset: GLuint, drawcount: GLsizei): void;
+ multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | GLint[], countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: GLuint, drawcount: GLsizei): void;
+}
+
+/** A WaveShaperNode always has exactly one input and one output. */
+interface WaveShaperNode extends AudioNode {
+ curve: Float32Array | null;
+ oversample: OverSampleType;
+}
+
+declare var WaveShaperNode: {
+ prototype: WaveShaperNode;
+ new(context: BaseAudioContext, options?: WaveShaperOptions): WaveShaperNode;
+};
+
+interface WebGL2RenderingContext extends WebGL2RenderingContextBase, WebGL2RenderingContextOverloads, WebGLRenderingContextBase {
+}
+
+declare var WebGL2RenderingContext: {
+ prototype: WebGL2RenderingContext;
+ new(): WebGL2RenderingContext;
+ readonly ACTIVE_UNIFORM_BLOCKS: GLenum;
+ readonly ALREADY_SIGNALED: GLenum;
+ readonly ANY_SAMPLES_PASSED: GLenum;
+ readonly ANY_SAMPLES_PASSED_CONSERVATIVE: GLenum;
+ readonly COLOR: GLenum;
+ readonly COLOR_ATTACHMENT1: GLenum;
+ readonly COLOR_ATTACHMENT10: GLenum;
+ readonly COLOR_ATTACHMENT11: GLenum;
+ readonly COLOR_ATTACHMENT12: GLenum;
+ readonly COLOR_ATTACHMENT13: GLenum;
+ readonly COLOR_ATTACHMENT14: GLenum;
+ readonly COLOR_ATTACHMENT15: GLenum;
+ readonly COLOR_ATTACHMENT2: GLenum;
+ readonly COLOR_ATTACHMENT3: GLenum;
+ readonly COLOR_ATTACHMENT4: GLenum;
+ readonly COLOR_ATTACHMENT5: GLenum;
+ readonly COLOR_ATTACHMENT6: GLenum;
+ readonly COLOR_ATTACHMENT7: GLenum;
+ readonly COLOR_ATTACHMENT8: GLenum;
+ readonly COLOR_ATTACHMENT9: GLenum;
+ readonly COMPARE_REF_TO_TEXTURE: GLenum;
+ readonly CONDITION_SATISFIED: GLenum;
+ readonly COPY_READ_BUFFER: GLenum;
+ readonly COPY_READ_BUFFER_BINDING: GLenum;
+ readonly COPY_WRITE_BUFFER: GLenum;
+ readonly COPY_WRITE_BUFFER_BINDING: GLenum;
+ readonly CURRENT_QUERY: GLenum;
+ readonly DEPTH: GLenum;
+ readonly DEPTH24_STENCIL8: GLenum;
+ readonly DEPTH32F_STENCIL8: GLenum;
+ readonly DEPTH_COMPONENT24: GLenum;
+ readonly DEPTH_COMPONENT32F: GLenum;
+ readonly DRAW_BUFFER0: GLenum;
+ readonly DRAW_BUFFER1: GLenum;
+ readonly DRAW_BUFFER10: GLenum;
+ readonly DRAW_BUFFER11: GLenum;
+ readonly DRAW_BUFFER12: GLenum;
+ readonly DRAW_BUFFER13: GLenum;
+ readonly DRAW_BUFFER14: GLenum;
+ readonly DRAW_BUFFER15: GLenum;
+ readonly DRAW_BUFFER2: GLenum;
+ readonly DRAW_BUFFER3: GLenum;
+ readonly DRAW_BUFFER4: GLenum;
+ readonly DRAW_BUFFER5: GLenum;
+ readonly DRAW_BUFFER6: GLenum;
+ readonly DRAW_BUFFER7: GLenum;
+ readonly DRAW_BUFFER8: GLenum;
+ readonly DRAW_BUFFER9: GLenum;
+ readonly DRAW_FRAMEBUFFER: GLenum;
+ readonly DRAW_FRAMEBUFFER_BINDING: GLenum;
+ readonly DYNAMIC_COPY: GLenum;
+ readonly DYNAMIC_READ: GLenum;
+ readonly FLOAT_32_UNSIGNED_INT_24_8_REV: GLenum;
+ readonly FLOAT_MAT2x3: GLenum;
+ readonly FLOAT_MAT2x4: GLenum;
+ readonly FLOAT_MAT3x2: GLenum;
+ readonly FLOAT_MAT3x4: GLenum;
+ readonly FLOAT_MAT4x2: GLenum;
+ readonly FLOAT_MAT4x3: GLenum;
+ readonly FRAGMENT_SHADER_DERIVATIVE_HINT: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_RED_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: GLenum;
+ readonly FRAMEBUFFER_DEFAULT: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: GLenum;
+ readonly HALF_FLOAT: GLenum;
+ readonly INTERLEAVED_ATTRIBS: GLenum;
+ readonly INT_2_10_10_10_REV: GLenum;
+ readonly INT_SAMPLER_2D: GLenum;
+ readonly INT_SAMPLER_2D_ARRAY: GLenum;
+ readonly INT_SAMPLER_3D: GLenum;
+ readonly INT_SAMPLER_CUBE: GLenum;
+ readonly INVALID_INDEX: GLenum;
+ readonly MAX: GLenum;
+ readonly MAX_3D_TEXTURE_SIZE: GLenum;
+ readonly MAX_ARRAY_TEXTURE_LAYERS: GLenum;
+ readonly MAX_CLIENT_WAIT_TIMEOUT_WEBGL: GLenum;
+ readonly MAX_COLOR_ATTACHMENTS: GLenum;
+ readonly MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: GLenum;
+ readonly MAX_COMBINED_UNIFORM_BLOCKS: GLenum;
+ readonly MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: GLenum;
+ readonly MAX_DRAW_BUFFERS: GLenum;
+ readonly MAX_ELEMENTS_INDICES: GLenum;
+ readonly MAX_ELEMENTS_VERTICES: GLenum;
+ readonly MAX_ELEMENT_INDEX: GLenum;
+ readonly MAX_FRAGMENT_INPUT_COMPONENTS: GLenum;
+ readonly MAX_FRAGMENT_UNIFORM_BLOCKS: GLenum;
+ readonly MAX_FRAGMENT_UNIFORM_COMPONENTS: GLenum;
+ readonly MAX_PROGRAM_TEXEL_OFFSET: GLenum;
+ readonly MAX_SAMPLES: GLenum;
+ readonly MAX_SERVER_WAIT_TIMEOUT: GLenum;
+ readonly MAX_TEXTURE_LOD_BIAS: GLenum;
+ readonly MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: GLenum;
+ readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: GLenum;
+ readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: GLenum;
+ readonly MAX_UNIFORM_BLOCK_SIZE: GLenum;
+ readonly MAX_UNIFORM_BUFFER_BINDINGS: GLenum;
+ readonly MAX_VARYING_COMPONENTS: GLenum;
+ readonly MAX_VERTEX_OUTPUT_COMPONENTS: GLenum;
+ readonly MAX_VERTEX_UNIFORM_BLOCKS: GLenum;
+ readonly MAX_VERTEX_UNIFORM_COMPONENTS: GLenum;
+ readonly MIN: GLenum;
+ readonly MIN_PROGRAM_TEXEL_OFFSET: GLenum;
+ readonly OBJECT_TYPE: GLenum;
+ readonly PACK_ROW_LENGTH: GLenum;
+ readonly PACK_SKIP_PIXELS: GLenum;
+ readonly PACK_SKIP_ROWS: GLenum;
+ readonly PIXEL_PACK_BUFFER: GLenum;
+ readonly PIXEL_PACK_BUFFER_BINDING: GLenum;
+ readonly PIXEL_UNPACK_BUFFER: GLenum;
+ readonly PIXEL_UNPACK_BUFFER_BINDING: GLenum;
+ readonly QUERY_RESULT: GLenum;
+ readonly QUERY_RESULT_AVAILABLE: GLenum;
+ readonly R11F_G11F_B10F: GLenum;
+ readonly R16F: GLenum;
+ readonly R16I: GLenum;
+ readonly R16UI: GLenum;
+ readonly R32F: GLenum;
+ readonly R32I: GLenum;
+ readonly R32UI: GLenum;
+ readonly R8: GLenum;
+ readonly R8I: GLenum;
+ readonly R8UI: GLenum;
+ readonly R8_SNORM: GLenum;
+ readonly RASTERIZER_DISCARD: GLenum;
+ readonly READ_BUFFER: GLenum;
+ readonly READ_FRAMEBUFFER: GLenum;
+ readonly READ_FRAMEBUFFER_BINDING: GLenum;
+ readonly RED: GLenum;
+ readonly RED_INTEGER: GLenum;
+ readonly RENDERBUFFER_SAMPLES: GLenum;
+ readonly RG: GLenum;
+ readonly RG16F: GLenum;
+ readonly RG16I: GLenum;
+ readonly RG16UI: GLenum;
+ readonly RG32F: GLenum;
+ readonly RG32I: GLenum;
+ readonly RG32UI: GLenum;
+ readonly RG8: GLenum;
+ readonly RG8I: GLenum;
+ readonly RG8UI: GLenum;
+ readonly RG8_SNORM: GLenum;
+ readonly RGB10_A2: GLenum;
+ readonly RGB10_A2UI: GLenum;
+ readonly RGB16F: GLenum;
+ readonly RGB16I: GLenum;
+ readonly RGB16UI: GLenum;
+ readonly RGB32F: GLenum;
+ readonly RGB32I: GLenum;
+ readonly RGB32UI: GLenum;
+ readonly RGB8: GLenum;
+ readonly RGB8I: GLenum;
+ readonly RGB8UI: GLenum;
+ readonly RGB8_SNORM: GLenum;
+ readonly RGB9_E5: GLenum;
+ readonly RGBA16F: GLenum;
+ readonly RGBA16I: GLenum;
+ readonly RGBA16UI: GLenum;
+ readonly RGBA32F: GLenum;
+ readonly RGBA32I: GLenum;
+ readonly RGBA32UI: GLenum;
+ readonly RGBA8: GLenum;
+ readonly RGBA8I: GLenum;
+ readonly RGBA8UI: GLenum;
+ readonly RGBA8_SNORM: GLenum;
+ readonly RGBA_INTEGER: GLenum;
+ readonly RGB_INTEGER: GLenum;
+ readonly RG_INTEGER: GLenum;
+ readonly SAMPLER_2D_ARRAY: GLenum;
+ readonly SAMPLER_2D_ARRAY_SHADOW: GLenum;
+ readonly SAMPLER_2D_SHADOW: GLenum;
+ readonly SAMPLER_3D: GLenum;
+ readonly SAMPLER_BINDING: GLenum;
+ readonly SAMPLER_CUBE_SHADOW: GLenum;
+ readonly SEPARATE_ATTRIBS: GLenum;
+ readonly SIGNALED: GLenum;
+ readonly SIGNED_NORMALIZED: GLenum;
+ readonly SRGB: GLenum;
+ readonly SRGB8: GLenum;
+ readonly SRGB8_ALPHA8: GLenum;
+ readonly STATIC_COPY: GLenum;
+ readonly STATIC_READ: GLenum;
+ readonly STENCIL: GLenum;
+ readonly STREAM_COPY: GLenum;
+ readonly STREAM_READ: GLenum;
+ readonly SYNC_CONDITION: GLenum;
+ readonly SYNC_FENCE: GLenum;
+ readonly SYNC_FLAGS: GLenum;
+ readonly SYNC_FLUSH_COMMANDS_BIT: GLenum;
+ readonly SYNC_GPU_COMMANDS_COMPLETE: GLenum;
+ readonly SYNC_STATUS: GLenum;
+ readonly TEXTURE_2D_ARRAY: GLenum;
+ readonly TEXTURE_3D: GLenum;
+ readonly TEXTURE_BASE_LEVEL: GLenum;
+ readonly TEXTURE_BINDING_2D_ARRAY: GLenum;
+ readonly TEXTURE_BINDING_3D: GLenum;
+ readonly TEXTURE_COMPARE_FUNC: GLenum;
+ readonly TEXTURE_COMPARE_MODE: GLenum;
+ readonly TEXTURE_IMMUTABLE_FORMAT: GLenum;
+ readonly TEXTURE_IMMUTABLE_LEVELS: GLenum;
+ readonly TEXTURE_MAX_LEVEL: GLenum;
+ readonly TEXTURE_MAX_LOD: GLenum;
+ readonly TEXTURE_MIN_LOD: GLenum;
+ readonly TEXTURE_WRAP_R: GLenum;
+ readonly TIMEOUT_EXPIRED: GLenum;
+ readonly TIMEOUT_IGNORED: GLint64;
+ readonly TRANSFORM_FEEDBACK: GLenum;
+ readonly TRANSFORM_FEEDBACK_ACTIVE: GLenum;
+ readonly TRANSFORM_FEEDBACK_BINDING: GLenum;
+ readonly TRANSFORM_FEEDBACK_BUFFER: GLenum;
+ readonly TRANSFORM_FEEDBACK_BUFFER_BINDING: GLenum;
+ readonly TRANSFORM_FEEDBACK_BUFFER_MODE: GLenum;
+ readonly TRANSFORM_FEEDBACK_BUFFER_SIZE: GLenum;
+ readonly TRANSFORM_FEEDBACK_BUFFER_START: GLenum;
+ readonly TRANSFORM_FEEDBACK_PAUSED: GLenum;
+ readonly TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: GLenum;
+ readonly TRANSFORM_FEEDBACK_VARYINGS: GLenum;
+ readonly UNIFORM_ARRAY_STRIDE: GLenum;
+ readonly UNIFORM_BLOCK_ACTIVE_UNIFORMS: GLenum;
+ readonly UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: GLenum;
+ readonly UNIFORM_BLOCK_BINDING: GLenum;
+ readonly UNIFORM_BLOCK_DATA_SIZE: GLenum;
+ readonly UNIFORM_BLOCK_INDEX: GLenum;
+ readonly UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: GLenum;
+ readonly UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: GLenum;
+ readonly UNIFORM_BUFFER: GLenum;
+ readonly UNIFORM_BUFFER_BINDING: GLenum;
+ readonly UNIFORM_BUFFER_OFFSET_ALIGNMENT: GLenum;
+ readonly UNIFORM_BUFFER_SIZE: GLenum;
+ readonly UNIFORM_BUFFER_START: GLenum;
+ readonly UNIFORM_IS_ROW_MAJOR: GLenum;
+ readonly UNIFORM_MATRIX_STRIDE: GLenum;
+ readonly UNIFORM_OFFSET: GLenum;
+ readonly UNIFORM_SIZE: GLenum;
+ readonly UNIFORM_TYPE: GLenum;
+ readonly UNPACK_IMAGE_HEIGHT: GLenum;
+ readonly UNPACK_ROW_LENGTH: GLenum;
+ readonly UNPACK_SKIP_IMAGES: GLenum;
+ readonly UNPACK_SKIP_PIXELS: GLenum;
+ readonly UNPACK_SKIP_ROWS: GLenum;
+ readonly UNSIGNALED: GLenum;
+ readonly UNSIGNED_INT_10F_11F_11F_REV: GLenum;
+ readonly UNSIGNED_INT_24_8: GLenum;
+ readonly UNSIGNED_INT_2_10_10_10_REV: GLenum;
+ readonly UNSIGNED_INT_5_9_9_9_REV: GLenum;
+ readonly UNSIGNED_INT_SAMPLER_2D: GLenum;
+ readonly UNSIGNED_INT_SAMPLER_2D_ARRAY: GLenum;
+ readonly UNSIGNED_INT_SAMPLER_3D: GLenum;
+ readonly UNSIGNED_INT_SAMPLER_CUBE: GLenum;
+ readonly UNSIGNED_INT_VEC2: GLenum;
+ readonly UNSIGNED_INT_VEC3: GLenum;
+ readonly UNSIGNED_INT_VEC4: GLenum;
+ readonly UNSIGNED_NORMALIZED: GLenum;
+ readonly VERTEX_ARRAY_BINDING: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_DIVISOR: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_INTEGER: GLenum;
+ readonly WAIT_FAILED: GLenum;
+ readonly ACTIVE_ATTRIBUTES: GLenum;
+ readonly ACTIVE_TEXTURE: GLenum;
+ readonly ACTIVE_UNIFORMS: GLenum;
+ readonly ALIASED_LINE_WIDTH_RANGE: GLenum;
+ readonly ALIASED_POINT_SIZE_RANGE: GLenum;
+ readonly ALPHA: GLenum;
+ readonly ALPHA_BITS: GLenum;
+ readonly ALWAYS: GLenum;
+ readonly ARRAY_BUFFER: GLenum;
+ readonly ARRAY_BUFFER_BINDING: GLenum;
+ readonly ATTACHED_SHADERS: GLenum;
+ readonly BACK: GLenum;
+ readonly BLEND: GLenum;
+ readonly BLEND_COLOR: GLenum;
+ readonly BLEND_DST_ALPHA: GLenum;
+ readonly BLEND_DST_RGB: GLenum;
+ readonly BLEND_EQUATION: GLenum;
+ readonly BLEND_EQUATION_ALPHA: GLenum;
+ readonly BLEND_EQUATION_RGB: GLenum;
+ readonly BLEND_SRC_ALPHA: GLenum;
+ readonly BLEND_SRC_RGB: GLenum;
+ readonly BLUE_BITS: GLenum;
+ readonly BOOL: GLenum;
+ readonly BOOL_VEC2: GLenum;
+ readonly BOOL_VEC3: GLenum;
+ readonly BOOL_VEC4: GLenum;
+ readonly BROWSER_DEFAULT_WEBGL: GLenum;
+ readonly BUFFER_SIZE: GLenum;
+ readonly BUFFER_USAGE: GLenum;
+ readonly BYTE: GLenum;
+ readonly CCW: GLenum;
+ readonly CLAMP_TO_EDGE: GLenum;
+ readonly COLOR_ATTACHMENT0: GLenum;
+ readonly COLOR_BUFFER_BIT: GLenum;
+ readonly COLOR_CLEAR_VALUE: GLenum;
+ readonly COLOR_WRITEMASK: GLenum;
+ readonly COMPILE_STATUS: GLenum;
+ readonly COMPRESSED_TEXTURE_FORMATS: GLenum;
+ readonly CONSTANT_ALPHA: GLenum;
+ readonly CONSTANT_COLOR: GLenum;
+ readonly CONTEXT_LOST_WEBGL: GLenum;
+ readonly CULL_FACE: GLenum;
+ readonly CULL_FACE_MODE: GLenum;
+ readonly CURRENT_PROGRAM: GLenum;
+ readonly CURRENT_VERTEX_ATTRIB: GLenum;
+ readonly CW: GLenum;
+ readonly DECR: GLenum;
+ readonly DECR_WRAP: GLenum;
+ readonly DELETE_STATUS: GLenum;
+ readonly DEPTH_ATTACHMENT: GLenum;
+ readonly DEPTH_BITS: GLenum;
+ readonly DEPTH_BUFFER_BIT: GLenum;
+ readonly DEPTH_CLEAR_VALUE: GLenum;
+ readonly DEPTH_COMPONENT: GLenum;
+ readonly DEPTH_COMPONENT16: GLenum;
+ readonly DEPTH_FUNC: GLenum;
+ readonly DEPTH_RANGE: GLenum;
+ readonly DEPTH_STENCIL: GLenum;
+ readonly DEPTH_STENCIL_ATTACHMENT: GLenum;
+ readonly DEPTH_TEST: GLenum;
+ readonly DEPTH_WRITEMASK: GLenum;
+ readonly DITHER: GLenum;
+ readonly DONT_CARE: GLenum;
+ readonly DST_ALPHA: GLenum;
+ readonly DST_COLOR: GLenum;
+ readonly DYNAMIC_DRAW: GLenum;
+ readonly ELEMENT_ARRAY_BUFFER: GLenum;
+ readonly ELEMENT_ARRAY_BUFFER_BINDING: GLenum;
+ readonly EQUAL: GLenum;
+ readonly FASTEST: GLenum;
+ readonly FLOAT: GLenum;
+ readonly FLOAT_MAT2: GLenum;
+ readonly FLOAT_MAT3: GLenum;
+ readonly FLOAT_MAT4: GLenum;
+ readonly FLOAT_VEC2: GLenum;
+ readonly FLOAT_VEC3: GLenum;
+ readonly FLOAT_VEC4: GLenum;
+ readonly FRAGMENT_SHADER: GLenum;
+ readonly FRAMEBUFFER: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: GLenum;
+ readonly FRAMEBUFFER_BINDING: GLenum;
+ readonly FRAMEBUFFER_COMPLETE: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: GLenum;
+ readonly FRAMEBUFFER_UNSUPPORTED: GLenum;
+ readonly FRONT: GLenum;
+ readonly FRONT_AND_BACK: GLenum;
+ readonly FRONT_FACE: GLenum;
+ readonly FUNC_ADD: GLenum;
+ readonly FUNC_REVERSE_SUBTRACT: GLenum;
+ readonly FUNC_SUBTRACT: GLenum;
+ readonly GENERATE_MIPMAP_HINT: GLenum;
+ readonly GEQUAL: GLenum;
+ readonly GREATER: GLenum;
+ readonly GREEN_BITS: GLenum;
+ readonly HIGH_FLOAT: GLenum;
+ readonly HIGH_INT: GLenum;
+ readonly IMPLEMENTATION_COLOR_READ_FORMAT: GLenum;
+ readonly IMPLEMENTATION_COLOR_READ_TYPE: GLenum;
+ readonly INCR: GLenum;
+ readonly INCR_WRAP: GLenum;
+ readonly INT: GLenum;
+ readonly INT_VEC2: GLenum;
+ readonly INT_VEC3: GLenum;
+ readonly INT_VEC4: GLenum;
+ readonly INVALID_ENUM: GLenum;
+ readonly INVALID_FRAMEBUFFER_OPERATION: GLenum;
+ readonly INVALID_OPERATION: GLenum;
+ readonly INVALID_VALUE: GLenum;
+ readonly INVERT: GLenum;
+ readonly KEEP: GLenum;
+ readonly LEQUAL: GLenum;
+ readonly LESS: GLenum;
+ readonly LINEAR: GLenum;
+ readonly LINEAR_MIPMAP_LINEAR: GLenum;
+ readonly LINEAR_MIPMAP_NEAREST: GLenum;
+ readonly LINES: GLenum;
+ readonly LINE_LOOP: GLenum;
+ readonly LINE_STRIP: GLenum;
+ readonly LINE_WIDTH: GLenum;
+ readonly LINK_STATUS: GLenum;
+ readonly LOW_FLOAT: GLenum;
+ readonly LOW_INT: GLenum;
+ readonly LUMINANCE: GLenum;
+ readonly LUMINANCE_ALPHA: GLenum;
+ readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: GLenum;
+ readonly MAX_CUBE_MAP_TEXTURE_SIZE: GLenum;
+ readonly MAX_FRAGMENT_UNIFORM_VECTORS: GLenum;
+ readonly MAX_RENDERBUFFER_SIZE: GLenum;
+ readonly MAX_TEXTURE_IMAGE_UNITS: GLenum;
+ readonly MAX_TEXTURE_SIZE: GLenum;
+ readonly MAX_VARYING_VECTORS: GLenum;
+ readonly MAX_VERTEX_ATTRIBS: GLenum;
+ readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: GLenum;
+ readonly MAX_VERTEX_UNIFORM_VECTORS: GLenum;
+ readonly MAX_VIEWPORT_DIMS: GLenum;
+ readonly MEDIUM_FLOAT: GLenum;
+ readonly MEDIUM_INT: GLenum;
+ readonly MIRRORED_REPEAT: GLenum;
+ readonly NEAREST: GLenum;
+ readonly NEAREST_MIPMAP_LINEAR: GLenum;
+ readonly NEAREST_MIPMAP_NEAREST: GLenum;
+ readonly NEVER: GLenum;
+ readonly NICEST: GLenum;
+ readonly NONE: GLenum;
+ readonly NOTEQUAL: GLenum;
+ readonly NO_ERROR: GLenum;
+ readonly ONE: GLenum;
+ readonly ONE_MINUS_CONSTANT_ALPHA: GLenum;
+ readonly ONE_MINUS_CONSTANT_COLOR: GLenum;
+ readonly ONE_MINUS_DST_ALPHA: GLenum;
+ readonly ONE_MINUS_DST_COLOR: GLenum;
+ readonly ONE_MINUS_SRC_ALPHA: GLenum;
+ readonly ONE_MINUS_SRC_COLOR: GLenum;
+ readonly OUT_OF_MEMORY: GLenum;
+ readonly PACK_ALIGNMENT: GLenum;
+ readonly POINTS: GLenum;
+ readonly POLYGON_OFFSET_FACTOR: GLenum;
+ readonly POLYGON_OFFSET_FILL: GLenum;
+ readonly POLYGON_OFFSET_UNITS: GLenum;
+ readonly RED_BITS: GLenum;
+ readonly RENDERBUFFER: GLenum;
+ readonly RENDERBUFFER_ALPHA_SIZE: GLenum;
+ readonly RENDERBUFFER_BINDING: GLenum;
+ readonly RENDERBUFFER_BLUE_SIZE: GLenum;
+ readonly RENDERBUFFER_DEPTH_SIZE: GLenum;
+ readonly RENDERBUFFER_GREEN_SIZE: GLenum;
+ readonly RENDERBUFFER_HEIGHT: GLenum;
+ readonly RENDERBUFFER_INTERNAL_FORMAT: GLenum;
+ readonly RENDERBUFFER_RED_SIZE: GLenum;
+ readonly RENDERBUFFER_STENCIL_SIZE: GLenum;
+ readonly RENDERBUFFER_WIDTH: GLenum;
+ readonly RENDERER: GLenum;
+ readonly REPEAT: GLenum;
+ readonly REPLACE: GLenum;
+ readonly RGB: GLenum;
+ readonly RGB565: GLenum;
+ readonly RGB5_A1: GLenum;
+ readonly RGBA: GLenum;
+ readonly RGBA4: GLenum;
+ readonly SAMPLER_2D: GLenum;
+ readonly SAMPLER_CUBE: GLenum;
+ readonly SAMPLES: GLenum;
+ readonly SAMPLE_ALPHA_TO_COVERAGE: GLenum;
+ readonly SAMPLE_BUFFERS: GLenum;
+ readonly SAMPLE_COVERAGE: GLenum;
+ readonly SAMPLE_COVERAGE_INVERT: GLenum;
+ readonly SAMPLE_COVERAGE_VALUE: GLenum;
+ readonly SCISSOR_BOX: GLenum;
+ readonly SCISSOR_TEST: GLenum;
+ readonly SHADER_TYPE: GLenum;
+ readonly SHADING_LANGUAGE_VERSION: GLenum;
+ readonly SHORT: GLenum;
+ readonly SRC_ALPHA: GLenum;
+ readonly SRC_ALPHA_SATURATE: GLenum;
+ readonly SRC_COLOR: GLenum;
+ readonly STATIC_DRAW: GLenum;
+ readonly STENCIL_ATTACHMENT: GLenum;
+ readonly STENCIL_BACK_FAIL: GLenum;
+ readonly STENCIL_BACK_FUNC: GLenum;
+ readonly STENCIL_BACK_PASS_DEPTH_FAIL: GLenum;
+ readonly STENCIL_BACK_PASS_DEPTH_PASS: GLenum;
+ readonly STENCIL_BACK_REF: GLenum;
+ readonly STENCIL_BACK_VALUE_MASK: GLenum;
+ readonly STENCIL_BACK_WRITEMASK: GLenum;
+ readonly STENCIL_BITS: GLenum;
+ readonly STENCIL_BUFFER_BIT: GLenum;
+ readonly STENCIL_CLEAR_VALUE: GLenum;
+ readonly STENCIL_FAIL: GLenum;
+ readonly STENCIL_FUNC: GLenum;
+ readonly STENCIL_INDEX8: GLenum;
+ readonly STENCIL_PASS_DEPTH_FAIL: GLenum;
+ readonly STENCIL_PASS_DEPTH_PASS: GLenum;
+ readonly STENCIL_REF: GLenum;
+ readonly STENCIL_TEST: GLenum;
+ readonly STENCIL_VALUE_MASK: GLenum;
+ readonly STENCIL_WRITEMASK: GLenum;
+ readonly STREAM_DRAW: GLenum;
+ readonly SUBPIXEL_BITS: GLenum;
+ readonly TEXTURE: GLenum;
+ readonly TEXTURE0: GLenum;
+ readonly TEXTURE1: GLenum;
+ readonly TEXTURE10: GLenum;
+ readonly TEXTURE11: GLenum;
+ readonly TEXTURE12: GLenum;
+ readonly TEXTURE13: GLenum;
+ readonly TEXTURE14: GLenum;
+ readonly TEXTURE15: GLenum;
+ readonly TEXTURE16: GLenum;
+ readonly TEXTURE17: GLenum;
+ readonly TEXTURE18: GLenum;
+ readonly TEXTURE19: GLenum;
+ readonly TEXTURE2: GLenum;
+ readonly TEXTURE20: GLenum;
+ readonly TEXTURE21: GLenum;
+ readonly TEXTURE22: GLenum;
+ readonly TEXTURE23: GLenum;
+ readonly TEXTURE24: GLenum;
+ readonly TEXTURE25: GLenum;
+ readonly TEXTURE26: GLenum;
+ readonly TEXTURE27: GLenum;
+ readonly TEXTURE28: GLenum;
+ readonly TEXTURE29: GLenum;
+ readonly TEXTURE3: GLenum;
+ readonly TEXTURE30: GLenum;
+ readonly TEXTURE31: GLenum;
+ readonly TEXTURE4: GLenum;
+ readonly TEXTURE5: GLenum;
+ readonly TEXTURE6: GLenum;
+ readonly TEXTURE7: GLenum;
+ readonly TEXTURE8: GLenum;
+ readonly TEXTURE9: GLenum;
+ readonly TEXTURE_2D: GLenum;
+ readonly TEXTURE_BINDING_2D: GLenum;
+ readonly TEXTURE_BINDING_CUBE_MAP: GLenum;
+ readonly TEXTURE_CUBE_MAP: GLenum;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_X: GLenum;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: GLenum;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: GLenum;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_X: GLenum;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Y: GLenum;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Z: GLenum;
+ readonly TEXTURE_MAG_FILTER: GLenum;
+ readonly TEXTURE_MIN_FILTER: GLenum;
+ readonly TEXTURE_WRAP_S: GLenum;
+ readonly TEXTURE_WRAP_T: GLenum;
+ readonly TRIANGLES: GLenum;
+ readonly TRIANGLE_FAN: GLenum;
+ readonly TRIANGLE_STRIP: GLenum;
+ readonly UNPACK_ALIGNMENT: GLenum;
+ readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: GLenum;
+ readonly UNPACK_FLIP_Y_WEBGL: GLenum;
+ readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: GLenum;
+ readonly UNSIGNED_BYTE: GLenum;
+ readonly UNSIGNED_INT: GLenum;
+ readonly UNSIGNED_SHORT: GLenum;
+ readonly UNSIGNED_SHORT_4_4_4_4: GLenum;
+ readonly UNSIGNED_SHORT_5_5_5_1: GLenum;
+ readonly UNSIGNED_SHORT_5_6_5: GLenum;
+ readonly VALIDATE_STATUS: GLenum;
+ readonly VENDOR: GLenum;
+ readonly VERSION: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_ENABLED: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_POINTER: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_SIZE: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_STRIDE: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_TYPE: GLenum;
+ readonly VERTEX_SHADER: GLenum;
+ readonly VIEWPORT: GLenum;
+ readonly ZERO: GLenum;
+};
+
+interface WebGL2RenderingContextBase {
+ beginQuery(target: GLenum, query: WebGLQuery): void;
+ beginTransformFeedback(primitiveMode: GLenum): void;
+ bindBufferBase(target: GLenum, index: GLuint, buffer: WebGLBuffer | null): void;
+ bindBufferRange(target: GLenum, index: GLuint, buffer: WebGLBuffer | null, offset: GLintptr, size: GLsizeiptr): void;
+ bindSampler(unit: GLuint, sampler: WebGLSampler | null): void;
+ bindTransformFeedback(target: GLenum, tf: WebGLTransformFeedback | null): void;
+ bindVertexArray(array: WebGLVertexArrayObject | null): void;
+ blitFramebuffer(srcX0: GLint, srcY0: GLint, srcX1: GLint, srcY1: GLint, dstX0: GLint, dstY0: GLint, dstX1: GLint, dstY1: GLint, mask: GLbitfield, filter: GLenum): void;
+ clearBufferfi(buffer: GLenum, drawbuffer: GLint, depth: GLfloat, stencil: GLint): void;
+ clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Float32List, srcOffset?: GLuint): void;
+ clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Int32List, srcOffset?: GLuint): void;
+ clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Uint32List, srcOffset?: GLuint): void;
+ clientWaitSync(sync: WebGLSync, flags: GLbitfield, timeout: GLuint64): GLenum;
+ compressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, imageSize: GLsizei, offset: GLintptr): void;
+ compressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void;
+ compressedTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, imageSize: GLsizei, offset: GLintptr): void;
+ compressedTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void;
+ copyBufferSubData(readTarget: GLenum, writeTarget: GLenum, readOffset: GLintptr, writeOffset: GLintptr, size: GLsizeiptr): void;
+ copyTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
+ createQuery(): WebGLQuery | null;
+ createSampler(): WebGLSampler | null;
+ createTransformFeedback(): WebGLTransformFeedback | null;
+ createVertexArray(): WebGLVertexArrayObject | null;
+ deleteQuery(query: WebGLQuery | null): void;
+ deleteSampler(sampler: WebGLSampler | null): void;
+ deleteSync(sync: WebGLSync | null): void;
+ deleteTransformFeedback(tf: WebGLTransformFeedback | null): void;
+ deleteVertexArray(vertexArray: WebGLVertexArrayObject | null): void;
+ drawArraysInstanced(mode: GLenum, first: GLint, count: GLsizei, instanceCount: GLsizei): void;
+ drawBuffers(buffers: GLenum[]): void;
+ drawElementsInstanced(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr, instanceCount: GLsizei): void;
+ drawRangeElements(mode: GLenum, start: GLuint, end: GLuint, count: GLsizei, type: GLenum, offset: GLintptr): void;
+ endQuery(target: GLenum): void;
+ endTransformFeedback(): void;
+ fenceSync(condition: GLenum, flags: GLbitfield): WebGLSync | null;
+ framebufferTextureLayer(target: GLenum, attachment: GLenum, texture: WebGLTexture | null, level: GLint, layer: GLint): void;
+ getActiveUniformBlockName(program: WebGLProgram, uniformBlockIndex: GLuint): string | null;
+ getActiveUniformBlockParameter(program: WebGLProgram, uniformBlockIndex: GLuint, pname: GLenum): any;
+ getActiveUniforms(program: WebGLProgram, uniformIndices: GLuint[], pname: GLenum): any;
+ getBufferSubData(target: GLenum, srcByteOffset: GLintptr, dstBuffer: ArrayBufferView, dstOffset?: GLuint, length?: GLuint): void;
+ getFragDataLocation(program: WebGLProgram, name: string): GLint;
+ getIndexedParameter(target: GLenum, index: GLuint): any;
+ getInternalformatParameter(target: GLenum, internalformat: GLenum, pname: GLenum): any;
+ getQuery(target: GLenum, pname: GLenum): WebGLQuery | null;
+ getQueryParameter(query: WebGLQuery, pname: GLenum): any;
+ getSamplerParameter(sampler: WebGLSampler, pname: GLenum): any;
+ getSyncParameter(sync: WebGLSync, pname: GLenum): any;
+ getTransformFeedbackVarying(program: WebGLProgram, index: GLuint): WebGLActiveInfo | null;
+ getUniformBlockIndex(program: WebGLProgram, uniformBlockName: string): GLuint;
+ getUniformIndices(program: WebGLProgram, uniformNames: string[]): GLuint[] | null;
+ invalidateFramebuffer(target: GLenum, attachments: GLenum[]): void;
+ invalidateSubFramebuffer(target: GLenum, attachments: GLenum[], x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
+ isQuery(query: WebGLQuery | null): GLboolean;
+ isSampler(sampler: WebGLSampler | null): GLboolean;
+ isSync(sync: WebGLSync | null): GLboolean;
+ isTransformFeedback(tf: WebGLTransformFeedback | null): GLboolean;
+ isVertexArray(vertexArray: WebGLVertexArrayObject | null): GLboolean;
+ pauseTransformFeedback(): void;
+ readBuffer(src: GLenum): void;
+ renderbufferStorageMultisample(target: GLenum, samples: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei): void;
+ resumeTransformFeedback(): void;
+ samplerParameterf(sampler: WebGLSampler, pname: GLenum, param: GLfloat): void;
+ samplerParameteri(sampler: WebGLSampler, pname: GLenum, param: GLint): void;
+ texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, pboOffset: GLintptr): void;
+ texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
+ texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView | null): void;
+ texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint): void;
+ texStorage2D(target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei): void;
+ texStorage3D(target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei): void;
+ texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, pboOffset: GLintptr): void;
+ texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, source: TexImageSource): void;
+ texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView | null, srcOffset?: GLuint): void;
+ transformFeedbackVaryings(program: WebGLProgram, varyings: string[], bufferMode: GLenum): void;
+ uniform1ui(location: WebGLUniformLocation | null, v0: GLuint): void;
+ uniform1uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform2ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint): void;
+ uniform2uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform3ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint, v2: GLuint): void;
+ uniform3uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform4ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint, v2: GLuint, v3: GLuint): void;
+ uniform4uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformBlockBinding(program: WebGLProgram, uniformBlockIndex: GLuint, uniformBlockBinding: GLuint): void;
+ uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ vertexAttribDivisor(index: GLuint, divisor: GLuint): void;
+ vertexAttribI4i(index: GLuint, x: GLint, y: GLint, z: GLint, w: GLint): void;
+ vertexAttribI4iv(index: GLuint, values: Int32List): void;
+ vertexAttribI4ui(index: GLuint, x: GLuint, y: GLuint, z: GLuint, w: GLuint): void;
+ vertexAttribI4uiv(index: GLuint, values: Uint32List): void;
+ vertexAttribIPointer(index: GLuint, size: GLint, type: GLenum, stride: GLsizei, offset: GLintptr): void;
+ waitSync(sync: WebGLSync, flags: GLbitfield, timeout: GLint64): void;
+ readonly ACTIVE_UNIFORM_BLOCKS: GLenum;
+ readonly ALREADY_SIGNALED: GLenum;
+ readonly ANY_SAMPLES_PASSED: GLenum;
+ readonly ANY_SAMPLES_PASSED_CONSERVATIVE: GLenum;
+ readonly COLOR: GLenum;
+ readonly COLOR_ATTACHMENT1: GLenum;
+ readonly COLOR_ATTACHMENT10: GLenum;
+ readonly COLOR_ATTACHMENT11: GLenum;
+ readonly COLOR_ATTACHMENT12: GLenum;
+ readonly COLOR_ATTACHMENT13: GLenum;
+ readonly COLOR_ATTACHMENT14: GLenum;
+ readonly COLOR_ATTACHMENT15: GLenum;
+ readonly COLOR_ATTACHMENT2: GLenum;
+ readonly COLOR_ATTACHMENT3: GLenum;
+ readonly COLOR_ATTACHMENT4: GLenum;
+ readonly COLOR_ATTACHMENT5: GLenum;
+ readonly COLOR_ATTACHMENT6: GLenum;
+ readonly COLOR_ATTACHMENT7: GLenum;
+ readonly COLOR_ATTACHMENT8: GLenum;
+ readonly COLOR_ATTACHMENT9: GLenum;
+ readonly COMPARE_REF_TO_TEXTURE: GLenum;
+ readonly CONDITION_SATISFIED: GLenum;
+ readonly COPY_READ_BUFFER: GLenum;
+ readonly COPY_READ_BUFFER_BINDING: GLenum;
+ readonly COPY_WRITE_BUFFER: GLenum;
+ readonly COPY_WRITE_BUFFER_BINDING: GLenum;
+ readonly CURRENT_QUERY: GLenum;
+ readonly DEPTH: GLenum;
+ readonly DEPTH24_STENCIL8: GLenum;
+ readonly DEPTH32F_STENCIL8: GLenum;
+ readonly DEPTH_COMPONENT24: GLenum;
+ readonly DEPTH_COMPONENT32F: GLenum;
+ readonly DRAW_BUFFER0: GLenum;
+ readonly DRAW_BUFFER1: GLenum;
+ readonly DRAW_BUFFER10: GLenum;
+ readonly DRAW_BUFFER11: GLenum;
+ readonly DRAW_BUFFER12: GLenum;
+ readonly DRAW_BUFFER13: GLenum;
+ readonly DRAW_BUFFER14: GLenum;
+ readonly DRAW_BUFFER15: GLenum;
+ readonly DRAW_BUFFER2: GLenum;
+ readonly DRAW_BUFFER3: GLenum;
+ readonly DRAW_BUFFER4: GLenum;
+ readonly DRAW_BUFFER5: GLenum;
+ readonly DRAW_BUFFER6: GLenum;
+ readonly DRAW_BUFFER7: GLenum;
+ readonly DRAW_BUFFER8: GLenum;
+ readonly DRAW_BUFFER9: GLenum;
+ readonly DRAW_FRAMEBUFFER: GLenum;
+ readonly DRAW_FRAMEBUFFER_BINDING: GLenum;
+ readonly DYNAMIC_COPY: GLenum;
+ readonly DYNAMIC_READ: GLenum;
+ readonly FLOAT_32_UNSIGNED_INT_24_8_REV: GLenum;
+ readonly FLOAT_MAT2x3: GLenum;
+ readonly FLOAT_MAT2x4: GLenum;
+ readonly FLOAT_MAT3x2: GLenum;
+ readonly FLOAT_MAT3x4: GLenum;
+ readonly FLOAT_MAT4x2: GLenum;
+ readonly FLOAT_MAT4x3: GLenum;
+ readonly FRAGMENT_SHADER_DERIVATIVE_HINT: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_RED_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: GLenum;
+ readonly FRAMEBUFFER_DEFAULT: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: GLenum;
+ readonly HALF_FLOAT: GLenum;
+ readonly INTERLEAVED_ATTRIBS: GLenum;
+ readonly INT_2_10_10_10_REV: GLenum;
+ readonly INT_SAMPLER_2D: GLenum;
+ readonly INT_SAMPLER_2D_ARRAY: GLenum;
+ readonly INT_SAMPLER_3D: GLenum;
+ readonly INT_SAMPLER_CUBE: GLenum;
+ readonly INVALID_INDEX: GLenum;
+ readonly MAX: GLenum;
+ readonly MAX_3D_TEXTURE_SIZE: GLenum;
+ readonly MAX_ARRAY_TEXTURE_LAYERS: GLenum;
+ readonly MAX_CLIENT_WAIT_TIMEOUT_WEBGL: GLenum;
+ readonly MAX_COLOR_ATTACHMENTS: GLenum;
+ readonly MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: GLenum;
+ readonly MAX_COMBINED_UNIFORM_BLOCKS: GLenum;
+ readonly MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: GLenum;
+ readonly MAX_DRAW_BUFFERS: GLenum;
+ readonly MAX_ELEMENTS_INDICES: GLenum;
+ readonly MAX_ELEMENTS_VERTICES: GLenum;
+ readonly MAX_ELEMENT_INDEX: GLenum;
+ readonly MAX_FRAGMENT_INPUT_COMPONENTS: GLenum;
+ readonly MAX_FRAGMENT_UNIFORM_BLOCKS: GLenum;
+ readonly MAX_FRAGMENT_UNIFORM_COMPONENTS: GLenum;
+ readonly MAX_PROGRAM_TEXEL_OFFSET: GLenum;
+ readonly MAX_SAMPLES: GLenum;
+ readonly MAX_SERVER_WAIT_TIMEOUT: GLenum;
+ readonly MAX_TEXTURE_LOD_BIAS: GLenum;
+ readonly MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: GLenum;
+ readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: GLenum;
+ readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: GLenum;
+ readonly MAX_UNIFORM_BLOCK_SIZE: GLenum;
+ readonly MAX_UNIFORM_BUFFER_BINDINGS: GLenum;
+ readonly MAX_VARYING_COMPONENTS: GLenum;
+ readonly MAX_VERTEX_OUTPUT_COMPONENTS: GLenum;
+ readonly MAX_VERTEX_UNIFORM_BLOCKS: GLenum;
+ readonly MAX_VERTEX_UNIFORM_COMPONENTS: GLenum;
+ readonly MIN: GLenum;
+ readonly MIN_PROGRAM_TEXEL_OFFSET: GLenum;
+ readonly OBJECT_TYPE: GLenum;
+ readonly PACK_ROW_LENGTH: GLenum;
+ readonly PACK_SKIP_PIXELS: GLenum;
+ readonly PACK_SKIP_ROWS: GLenum;
+ readonly PIXEL_PACK_BUFFER: GLenum;
+ readonly PIXEL_PACK_BUFFER_BINDING: GLenum;
+ readonly PIXEL_UNPACK_BUFFER: GLenum;
+ readonly PIXEL_UNPACK_BUFFER_BINDING: GLenum;
+ readonly QUERY_RESULT: GLenum;
+ readonly QUERY_RESULT_AVAILABLE: GLenum;
+ readonly R11F_G11F_B10F: GLenum;
+ readonly R16F: GLenum;
+ readonly R16I: GLenum;
+ readonly R16UI: GLenum;
+ readonly R32F: GLenum;
+ readonly R32I: GLenum;
+ readonly R32UI: GLenum;
+ readonly R8: GLenum;
+ readonly R8I: GLenum;
+ readonly R8UI: GLenum;
+ readonly R8_SNORM: GLenum;
+ readonly RASTERIZER_DISCARD: GLenum;
+ readonly READ_BUFFER: GLenum;
+ readonly READ_FRAMEBUFFER: GLenum;
+ readonly READ_FRAMEBUFFER_BINDING: GLenum;
+ readonly RED: GLenum;
+ readonly RED_INTEGER: GLenum;
+ readonly RENDERBUFFER_SAMPLES: GLenum;
+ readonly RG: GLenum;
+ readonly RG16F: GLenum;
+ readonly RG16I: GLenum;
+ readonly RG16UI: GLenum;
+ readonly RG32F: GLenum;
+ readonly RG32I: GLenum;
+ readonly RG32UI: GLenum;
+ readonly RG8: GLenum;
+ readonly RG8I: GLenum;
+ readonly RG8UI: GLenum;
+ readonly RG8_SNORM: GLenum;
+ readonly RGB10_A2: GLenum;
+ readonly RGB10_A2UI: GLenum;
+ readonly RGB16F: GLenum;
+ readonly RGB16I: GLenum;
+ readonly RGB16UI: GLenum;
+ readonly RGB32F: GLenum;
+ readonly RGB32I: GLenum;
+ readonly RGB32UI: GLenum;
+ readonly RGB8: GLenum;
+ readonly RGB8I: GLenum;
+ readonly RGB8UI: GLenum;
+ readonly RGB8_SNORM: GLenum;
+ readonly RGB9_E5: GLenum;
+ readonly RGBA16F: GLenum;
+ readonly RGBA16I: GLenum;
+ readonly RGBA16UI: GLenum;
+ readonly RGBA32F: GLenum;
+ readonly RGBA32I: GLenum;
+ readonly RGBA32UI: GLenum;
+ readonly RGBA8: GLenum;
+ readonly RGBA8I: GLenum;
+ readonly RGBA8UI: GLenum;
+ readonly RGBA8_SNORM: GLenum;
+ readonly RGBA_INTEGER: GLenum;
+ readonly RGB_INTEGER: GLenum;
+ readonly RG_INTEGER: GLenum;
+ readonly SAMPLER_2D_ARRAY: GLenum;
+ readonly SAMPLER_2D_ARRAY_SHADOW: GLenum;
+ readonly SAMPLER_2D_SHADOW: GLenum;
+ readonly SAMPLER_3D: GLenum;
+ readonly SAMPLER_BINDING: GLenum;
+ readonly SAMPLER_CUBE_SHADOW: GLenum;
+ readonly SEPARATE_ATTRIBS: GLenum;
+ readonly SIGNALED: GLenum;
+ readonly SIGNED_NORMALIZED: GLenum;
+ readonly SRGB: GLenum;
+ readonly SRGB8: GLenum;
+ readonly SRGB8_ALPHA8: GLenum;
+ readonly STATIC_COPY: GLenum;
+ readonly STATIC_READ: GLenum;
+ readonly STENCIL: GLenum;
+ readonly STREAM_COPY: GLenum;
+ readonly STREAM_READ: GLenum;
+ readonly SYNC_CONDITION: GLenum;
+ readonly SYNC_FENCE: GLenum;
+ readonly SYNC_FLAGS: GLenum;
+ readonly SYNC_FLUSH_COMMANDS_BIT: GLenum;
+ readonly SYNC_GPU_COMMANDS_COMPLETE: GLenum;
+ readonly SYNC_STATUS: GLenum;
+ readonly TEXTURE_2D_ARRAY: GLenum;
+ readonly TEXTURE_3D: GLenum;
+ readonly TEXTURE_BASE_LEVEL: GLenum;
+ readonly TEXTURE_BINDING_2D_ARRAY: GLenum;
+ readonly TEXTURE_BINDING_3D: GLenum;
+ readonly TEXTURE_COMPARE_FUNC: GLenum;
+ readonly TEXTURE_COMPARE_MODE: GLenum;
+ readonly TEXTURE_IMMUTABLE_FORMAT: GLenum;
+ readonly TEXTURE_IMMUTABLE_LEVELS: GLenum;
+ readonly TEXTURE_MAX_LEVEL: GLenum;
+ readonly TEXTURE_MAX_LOD: GLenum;
+ readonly TEXTURE_MIN_LOD: GLenum;
+ readonly TEXTURE_WRAP_R: GLenum;
+ readonly TIMEOUT_EXPIRED: GLenum;
+ readonly TIMEOUT_IGNORED: GLint64;
+ readonly TRANSFORM_FEEDBACK: GLenum;
+ readonly TRANSFORM_FEEDBACK_ACTIVE: GLenum;
+ readonly TRANSFORM_FEEDBACK_BINDING: GLenum;
+ readonly TRANSFORM_FEEDBACK_BUFFER: GLenum;
+ readonly TRANSFORM_FEEDBACK_BUFFER_BINDING: GLenum;
+ readonly TRANSFORM_FEEDBACK_BUFFER_MODE: GLenum;
+ readonly TRANSFORM_FEEDBACK_BUFFER_SIZE: GLenum;
+ readonly TRANSFORM_FEEDBACK_BUFFER_START: GLenum;
+ readonly TRANSFORM_FEEDBACK_PAUSED: GLenum;
+ readonly TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: GLenum;
+ readonly TRANSFORM_FEEDBACK_VARYINGS: GLenum;
+ readonly UNIFORM_ARRAY_STRIDE: GLenum;
+ readonly UNIFORM_BLOCK_ACTIVE_UNIFORMS: GLenum;
+ readonly UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: GLenum;
+ readonly UNIFORM_BLOCK_BINDING: GLenum;
+ readonly UNIFORM_BLOCK_DATA_SIZE: GLenum;
+ readonly UNIFORM_BLOCK_INDEX: GLenum;
+ readonly UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: GLenum;
+ readonly UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: GLenum;
+ readonly UNIFORM_BUFFER: GLenum;
+ readonly UNIFORM_BUFFER_BINDING: GLenum;
+ readonly UNIFORM_BUFFER_OFFSET_ALIGNMENT: GLenum;
+ readonly UNIFORM_BUFFER_SIZE: GLenum;
+ readonly UNIFORM_BUFFER_START: GLenum;
+ readonly UNIFORM_IS_ROW_MAJOR: GLenum;
+ readonly UNIFORM_MATRIX_STRIDE: GLenum;
+ readonly UNIFORM_OFFSET: GLenum;
+ readonly UNIFORM_SIZE: GLenum;
+ readonly UNIFORM_TYPE: GLenum;
+ readonly UNPACK_IMAGE_HEIGHT: GLenum;
+ readonly UNPACK_ROW_LENGTH: GLenum;
+ readonly UNPACK_SKIP_IMAGES: GLenum;
+ readonly UNPACK_SKIP_PIXELS: GLenum;
+ readonly UNPACK_SKIP_ROWS: GLenum;
+ readonly UNSIGNALED: GLenum;
+ readonly UNSIGNED_INT_10F_11F_11F_REV: GLenum;
+ readonly UNSIGNED_INT_24_8: GLenum;
+ readonly UNSIGNED_INT_2_10_10_10_REV: GLenum;
+ readonly UNSIGNED_INT_5_9_9_9_REV: GLenum;
+ readonly UNSIGNED_INT_SAMPLER_2D: GLenum;
+ readonly UNSIGNED_INT_SAMPLER_2D_ARRAY: GLenum;
+ readonly UNSIGNED_INT_SAMPLER_3D: GLenum;
+ readonly UNSIGNED_INT_SAMPLER_CUBE: GLenum;
+ readonly UNSIGNED_INT_VEC2: GLenum;
+ readonly UNSIGNED_INT_VEC3: GLenum;
+ readonly UNSIGNED_INT_VEC4: GLenum;
+ readonly UNSIGNED_NORMALIZED: GLenum;
+ readonly VERTEX_ARRAY_BINDING: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_DIVISOR: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_INTEGER: GLenum;
+ readonly WAIT_FAILED: GLenum;
+}
+
+interface WebGL2RenderingContextOverloads {
+ bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum): void;
+ bufferData(target: GLenum, srcData: BufferSource | null, usage: GLenum): void;
+ bufferData(target: GLenum, srcData: ArrayBufferView, usage: GLenum, srcOffset: GLuint, length?: GLuint): void;
+ bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: BufferSource): void;
+ bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: ArrayBufferView, srcOffset: GLuint, length?: GLuint): void;
+ compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, imageSize: GLsizei, offset: GLintptr): void;
+ compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void;
+ compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, imageSize: GLsizei, offset: GLintptr): void;
+ compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void;
+ readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, dstData: ArrayBufferView | null): void;
+ readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, offset: GLintptr): void;
+ readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, dstData: ArrayBufferView, dstOffset: GLuint): void;
+ texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
+ texImage2D(target: GLenum, level: GLint, internalformat: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
+ texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pboOffset: GLintptr): void;
+ texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
+ texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint): void;
+ texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
+ texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
+ texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pboOffset: GLintptr): void;
+ texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, source: TexImageSource): void;
+ texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint): void;
+ uniform1fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform1iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform2fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform2iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform3fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform3iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform4fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform4iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+}
+
+/** Part of the WebGL API and represents the information returned by calling the WebGLRenderingContext.getActiveAttrib() and WebGLRenderingContext.getActiveUniform() methods. */
+interface WebGLActiveInfo {
+ readonly name: string;
+ readonly size: GLint;
+ readonly type: GLenum;
+}
+
+declare var WebGLActiveInfo: {
+ prototype: WebGLActiveInfo;
+ new(): WebGLActiveInfo;
+};
+
+/** Part of the WebGL API and represents an opaque buffer object storing data such as vertices or colors. */
+interface WebGLBuffer {
+}
+
+declare var WebGLBuffer: {
+ prototype: WebGLBuffer;
+ new(): WebGLBuffer;
+};
+
+/** The WebContextEvent interface is part of the WebGL API and is an interface for an event that is generated in response to a status change to the WebGL rendering context. */
+interface WebGLContextEvent extends Event {
+ readonly statusMessage: string;
+}
+
+declare var WebGLContextEvent: {
+ prototype: WebGLContextEvent;
+ new(type: string, eventInit?: WebGLContextEventInit): WebGLContextEvent;
+};
+
+/** Part of the WebGL API and represents a collection of buffers that serve as a rendering destination. */
+interface WebGLFramebuffer {
+}
+
+declare var WebGLFramebuffer: {
+ prototype: WebGLFramebuffer;
+ new(): WebGLFramebuffer;
+};
+
+/** The WebGLProgram is part of the WebGL API and is a combination of two compiled WebGLShaders consisting of a vertex shader and a fragment shader (both written in GLSL). */
+interface WebGLProgram {
+}
+
+declare var WebGLProgram: {
+ prototype: WebGLProgram;
+ new(): WebGLProgram;
+};
+
+interface WebGLQuery {
+}
+
+declare var WebGLQuery: {
+ prototype: WebGLQuery;
+ new(): WebGLQuery;
+};
+
+/** Part of the WebGL API and represents a buffer that can contain an image, or can be source or target of an rendering operation. */
+interface WebGLRenderbuffer {
+}
+
+declare var WebGLRenderbuffer: {
+ prototype: WebGLRenderbuffer;
+ new(): WebGLRenderbuffer;
+};
+
+/** Provides an interface to the OpenGL ES 2.0 graphics rendering context for the drawing surface of an HTML <canvas> element. */
+interface WebGLRenderingContext extends WebGLRenderingContextBase, WebGLRenderingContextOverloads {
+}
+
+declare var WebGLRenderingContext: {
+ prototype: WebGLRenderingContext;
+ new(): WebGLRenderingContext;
+ readonly ACTIVE_ATTRIBUTES: GLenum;
+ readonly ACTIVE_TEXTURE: GLenum;
+ readonly ACTIVE_UNIFORMS: GLenum;
+ readonly ALIASED_LINE_WIDTH_RANGE: GLenum;
+ readonly ALIASED_POINT_SIZE_RANGE: GLenum;
+ readonly ALPHA: GLenum;
+ readonly ALPHA_BITS: GLenum;
+ readonly ALWAYS: GLenum;
+ readonly ARRAY_BUFFER: GLenum;
+ readonly ARRAY_BUFFER_BINDING: GLenum;
+ readonly ATTACHED_SHADERS: GLenum;
+ readonly BACK: GLenum;
+ readonly BLEND: GLenum;
+ readonly BLEND_COLOR: GLenum;
+ readonly BLEND_DST_ALPHA: GLenum;
+ readonly BLEND_DST_RGB: GLenum;
+ readonly BLEND_EQUATION: GLenum;
+ readonly BLEND_EQUATION_ALPHA: GLenum;
+ readonly BLEND_EQUATION_RGB: GLenum;
+ readonly BLEND_SRC_ALPHA: GLenum;
+ readonly BLEND_SRC_RGB: GLenum;
+ readonly BLUE_BITS: GLenum;
+ readonly BOOL: GLenum;
+ readonly BOOL_VEC2: GLenum;
+ readonly BOOL_VEC3: GLenum;
+ readonly BOOL_VEC4: GLenum;
+ readonly BROWSER_DEFAULT_WEBGL: GLenum;
+ readonly BUFFER_SIZE: GLenum;
+ readonly BUFFER_USAGE: GLenum;
+ readonly BYTE: GLenum;
+ readonly CCW: GLenum;
+ readonly CLAMP_TO_EDGE: GLenum;
+ readonly COLOR_ATTACHMENT0: GLenum;
+ readonly COLOR_BUFFER_BIT: GLenum;
+ readonly COLOR_CLEAR_VALUE: GLenum;
+ readonly COLOR_WRITEMASK: GLenum;
+ readonly COMPILE_STATUS: GLenum;
+ readonly COMPRESSED_TEXTURE_FORMATS: GLenum;
+ readonly CONSTANT_ALPHA: GLenum;
+ readonly CONSTANT_COLOR: GLenum;
+ readonly CONTEXT_LOST_WEBGL: GLenum;
+ readonly CULL_FACE: GLenum;
+ readonly CULL_FACE_MODE: GLenum;
+ readonly CURRENT_PROGRAM: GLenum;
+ readonly CURRENT_VERTEX_ATTRIB: GLenum;
+ readonly CW: GLenum;
+ readonly DECR: GLenum;
+ readonly DECR_WRAP: GLenum;
+ readonly DELETE_STATUS: GLenum;
+ readonly DEPTH_ATTACHMENT: GLenum;
+ readonly DEPTH_BITS: GLenum;
+ readonly DEPTH_BUFFER_BIT: GLenum;
+ readonly DEPTH_CLEAR_VALUE: GLenum;
+ readonly DEPTH_COMPONENT: GLenum;
+ readonly DEPTH_COMPONENT16: GLenum;
+ readonly DEPTH_FUNC: GLenum;
+ readonly DEPTH_RANGE: GLenum;
+ readonly DEPTH_STENCIL: GLenum;
+ readonly DEPTH_STENCIL_ATTACHMENT: GLenum;
+ readonly DEPTH_TEST: GLenum;
+ readonly DEPTH_WRITEMASK: GLenum;
+ readonly DITHER: GLenum;
+ readonly DONT_CARE: GLenum;
+ readonly DST_ALPHA: GLenum;
+ readonly DST_COLOR: GLenum;
+ readonly DYNAMIC_DRAW: GLenum;
+ readonly ELEMENT_ARRAY_BUFFER: GLenum;
+ readonly ELEMENT_ARRAY_BUFFER_BINDING: GLenum;
+ readonly EQUAL: GLenum;
+ readonly FASTEST: GLenum;
+ readonly FLOAT: GLenum;
+ readonly FLOAT_MAT2: GLenum;
+ readonly FLOAT_MAT3: GLenum;
+ readonly FLOAT_MAT4: GLenum;
+ readonly FLOAT_VEC2: GLenum;
+ readonly FLOAT_VEC3: GLenum;
+ readonly FLOAT_VEC4: GLenum;
+ readonly FRAGMENT_SHADER: GLenum;
+ readonly FRAMEBUFFER: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: GLenum;
+ readonly FRAMEBUFFER_BINDING: GLenum;
+ readonly FRAMEBUFFER_COMPLETE: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: GLenum;
+ readonly FRAMEBUFFER_UNSUPPORTED: GLenum;
+ readonly FRONT: GLenum;
+ readonly FRONT_AND_BACK: GLenum;
+ readonly FRONT_FACE: GLenum;
+ readonly FUNC_ADD: GLenum;
+ readonly FUNC_REVERSE_SUBTRACT: GLenum;
+ readonly FUNC_SUBTRACT: GLenum;
+ readonly GENERATE_MIPMAP_HINT: GLenum;
+ readonly GEQUAL: GLenum;
+ readonly GREATER: GLenum;
+ readonly GREEN_BITS: GLenum;
+ readonly HIGH_FLOAT: GLenum;
+ readonly HIGH_INT: GLenum;
+ readonly IMPLEMENTATION_COLOR_READ_FORMAT: GLenum;
+ readonly IMPLEMENTATION_COLOR_READ_TYPE: GLenum;
+ readonly INCR: GLenum;
+ readonly INCR_WRAP: GLenum;
+ readonly INT: GLenum;
+ readonly INT_VEC2: GLenum;
+ readonly INT_VEC3: GLenum;
+ readonly INT_VEC4: GLenum;
+ readonly INVALID_ENUM: GLenum;
+ readonly INVALID_FRAMEBUFFER_OPERATION: GLenum;
+ readonly INVALID_OPERATION: GLenum;
+ readonly INVALID_VALUE: GLenum;
+ readonly INVERT: GLenum;
+ readonly KEEP: GLenum;
+ readonly LEQUAL: GLenum;
+ readonly LESS: GLenum;
+ readonly LINEAR: GLenum;
+ readonly LINEAR_MIPMAP_LINEAR: GLenum;
+ readonly LINEAR_MIPMAP_NEAREST: GLenum;
+ readonly LINES: GLenum;
+ readonly LINE_LOOP: GLenum;
+ readonly LINE_STRIP: GLenum;
+ readonly LINE_WIDTH: GLenum;
+ readonly LINK_STATUS: GLenum;
+ readonly LOW_FLOAT: GLenum;
+ readonly LOW_INT: GLenum;
+ readonly LUMINANCE: GLenum;
+ readonly LUMINANCE_ALPHA: GLenum;
+ readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: GLenum;
+ readonly MAX_CUBE_MAP_TEXTURE_SIZE: GLenum;
+ readonly MAX_FRAGMENT_UNIFORM_VECTORS: GLenum;
+ readonly MAX_RENDERBUFFER_SIZE: GLenum;
+ readonly MAX_TEXTURE_IMAGE_UNITS: GLenum;
+ readonly MAX_TEXTURE_SIZE: GLenum;
+ readonly MAX_VARYING_VECTORS: GLenum;
+ readonly MAX_VERTEX_ATTRIBS: GLenum;
+ readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: GLenum;
+ readonly MAX_VERTEX_UNIFORM_VECTORS: GLenum;
+ readonly MAX_VIEWPORT_DIMS: GLenum;
+ readonly MEDIUM_FLOAT: GLenum;
+ readonly MEDIUM_INT: GLenum;
+ readonly MIRRORED_REPEAT: GLenum;
+ readonly NEAREST: GLenum;
+ readonly NEAREST_MIPMAP_LINEAR: GLenum;
+ readonly NEAREST_MIPMAP_NEAREST: GLenum;
+ readonly NEVER: GLenum;
+ readonly NICEST: GLenum;
+ readonly NONE: GLenum;
+ readonly NOTEQUAL: GLenum;
+ readonly NO_ERROR: GLenum;
+ readonly ONE: GLenum;
+ readonly ONE_MINUS_CONSTANT_ALPHA: GLenum;
+ readonly ONE_MINUS_CONSTANT_COLOR: GLenum;
+ readonly ONE_MINUS_DST_ALPHA: GLenum;
+ readonly ONE_MINUS_DST_COLOR: GLenum;
+ readonly ONE_MINUS_SRC_ALPHA: GLenum;
+ readonly ONE_MINUS_SRC_COLOR: GLenum;
+ readonly OUT_OF_MEMORY: GLenum;
+ readonly PACK_ALIGNMENT: GLenum;
+ readonly POINTS: GLenum;
+ readonly POLYGON_OFFSET_FACTOR: GLenum;
+ readonly POLYGON_OFFSET_FILL: GLenum;
+ readonly POLYGON_OFFSET_UNITS: GLenum;
+ readonly RED_BITS: GLenum;
+ readonly RENDERBUFFER: GLenum;
+ readonly RENDERBUFFER_ALPHA_SIZE: GLenum;
+ readonly RENDERBUFFER_BINDING: GLenum;
+ readonly RENDERBUFFER_BLUE_SIZE: GLenum;
+ readonly RENDERBUFFER_DEPTH_SIZE: GLenum;
+ readonly RENDERBUFFER_GREEN_SIZE: GLenum;
+ readonly RENDERBUFFER_HEIGHT: GLenum;
+ readonly RENDERBUFFER_INTERNAL_FORMAT: GLenum;
+ readonly RENDERBUFFER_RED_SIZE: GLenum;
+ readonly RENDERBUFFER_STENCIL_SIZE: GLenum;
+ readonly RENDERBUFFER_WIDTH: GLenum;
+ readonly RENDERER: GLenum;
+ readonly REPEAT: GLenum;
+ readonly REPLACE: GLenum;
+ readonly RGB: GLenum;
+ readonly RGB565: GLenum;
+ readonly RGB5_A1: GLenum;
+ readonly RGBA: GLenum;
+ readonly RGBA4: GLenum;
+ readonly SAMPLER_2D: GLenum;
+ readonly SAMPLER_CUBE: GLenum;
+ readonly SAMPLES: GLenum;
+ readonly SAMPLE_ALPHA_TO_COVERAGE: GLenum;
+ readonly SAMPLE_BUFFERS: GLenum;
+ readonly SAMPLE_COVERAGE: GLenum;
+ readonly SAMPLE_COVERAGE_INVERT: GLenum;
+ readonly SAMPLE_COVERAGE_VALUE: GLenum;
+ readonly SCISSOR_BOX: GLenum;
+ readonly SCISSOR_TEST: GLenum;
+ readonly SHADER_TYPE: GLenum;
+ readonly SHADING_LANGUAGE_VERSION: GLenum;
+ readonly SHORT: GLenum;
+ readonly SRC_ALPHA: GLenum;
+ readonly SRC_ALPHA_SATURATE: GLenum;
+ readonly SRC_COLOR: GLenum;
+ readonly STATIC_DRAW: GLenum;
+ readonly STENCIL_ATTACHMENT: GLenum;
+ readonly STENCIL_BACK_FAIL: GLenum;
+ readonly STENCIL_BACK_FUNC: GLenum;
+ readonly STENCIL_BACK_PASS_DEPTH_FAIL: GLenum;
+ readonly STENCIL_BACK_PASS_DEPTH_PASS: GLenum;
+ readonly STENCIL_BACK_REF: GLenum;
+ readonly STENCIL_BACK_VALUE_MASK: GLenum;
+ readonly STENCIL_BACK_WRITEMASK: GLenum;
+ readonly STENCIL_BITS: GLenum;
+ readonly STENCIL_BUFFER_BIT: GLenum;
+ readonly STENCIL_CLEAR_VALUE: GLenum;
+ readonly STENCIL_FAIL: GLenum;
+ readonly STENCIL_FUNC: GLenum;
+ readonly STENCIL_INDEX8: GLenum;
+ readonly STENCIL_PASS_DEPTH_FAIL: GLenum;
+ readonly STENCIL_PASS_DEPTH_PASS: GLenum;
+ readonly STENCIL_REF: GLenum;
+ readonly STENCIL_TEST: GLenum;
+ readonly STENCIL_VALUE_MASK: GLenum;
+ readonly STENCIL_WRITEMASK: GLenum;
+ readonly STREAM_DRAW: GLenum;
+ readonly SUBPIXEL_BITS: GLenum;
+ readonly TEXTURE: GLenum;
+ readonly TEXTURE0: GLenum;
+ readonly TEXTURE1: GLenum;
+ readonly TEXTURE10: GLenum;
+ readonly TEXTURE11: GLenum;
+ readonly TEXTURE12: GLenum;
+ readonly TEXTURE13: GLenum;
+ readonly TEXTURE14: GLenum;
+ readonly TEXTURE15: GLenum;
+ readonly TEXTURE16: GLenum;
+ readonly TEXTURE17: GLenum;
+ readonly TEXTURE18: GLenum;
+ readonly TEXTURE19: GLenum;
+ readonly TEXTURE2: GLenum;
+ readonly TEXTURE20: GLenum;
+ readonly TEXTURE21: GLenum;
+ readonly TEXTURE22: GLenum;
+ readonly TEXTURE23: GLenum;
+ readonly TEXTURE24: GLenum;
+ readonly TEXTURE25: GLenum;
+ readonly TEXTURE26: GLenum;
+ readonly TEXTURE27: GLenum;
+ readonly TEXTURE28: GLenum;
+ readonly TEXTURE29: GLenum;
+ readonly TEXTURE3: GLenum;
+ readonly TEXTURE30: GLenum;
+ readonly TEXTURE31: GLenum;
+ readonly TEXTURE4: GLenum;
+ readonly TEXTURE5: GLenum;
+ readonly TEXTURE6: GLenum;
+ readonly TEXTURE7: GLenum;
+ readonly TEXTURE8: GLenum;
+ readonly TEXTURE9: GLenum;
+ readonly TEXTURE_2D: GLenum;
+ readonly TEXTURE_BINDING_2D: GLenum;
+ readonly TEXTURE_BINDING_CUBE_MAP: GLenum;
+ readonly TEXTURE_CUBE_MAP: GLenum;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_X: GLenum;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: GLenum;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: GLenum;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_X: GLenum;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Y: GLenum;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Z: GLenum;
+ readonly TEXTURE_MAG_FILTER: GLenum;
+ readonly TEXTURE_MIN_FILTER: GLenum;
+ readonly TEXTURE_WRAP_S: GLenum;
+ readonly TEXTURE_WRAP_T: GLenum;
+ readonly TRIANGLES: GLenum;
+ readonly TRIANGLE_FAN: GLenum;
+ readonly TRIANGLE_STRIP: GLenum;
+ readonly UNPACK_ALIGNMENT: GLenum;
+ readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: GLenum;
+ readonly UNPACK_FLIP_Y_WEBGL: GLenum;
+ readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: GLenum;
+ readonly UNSIGNED_BYTE: GLenum;
+ readonly UNSIGNED_INT: GLenum;
+ readonly UNSIGNED_SHORT: GLenum;
+ readonly UNSIGNED_SHORT_4_4_4_4: GLenum;
+ readonly UNSIGNED_SHORT_5_5_5_1: GLenum;
+ readonly UNSIGNED_SHORT_5_6_5: GLenum;
+ readonly VALIDATE_STATUS: GLenum;
+ readonly VENDOR: GLenum;
+ readonly VERSION: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_ENABLED: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_POINTER: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_SIZE: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_STRIDE: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_TYPE: GLenum;
+ readonly VERTEX_SHADER: GLenum;
+ readonly VIEWPORT: GLenum;
+ readonly ZERO: GLenum;
+};
+
+interface WebGLRenderingContextBase {
+ readonly canvas: HTMLCanvasElement;
+ readonly drawingBufferHeight: GLsizei;
+ readonly drawingBufferWidth: GLsizei;
+ activeTexture(texture: GLenum): void;
+ attachShader(program: WebGLProgram, shader: WebGLShader): void;
+ bindAttribLocation(program: WebGLProgram, index: GLuint, name: string): void;
+ bindBuffer(target: GLenum, buffer: WebGLBuffer | null): void;
+ bindFramebuffer(target: GLenum, framebuffer: WebGLFramebuffer | null): void;
+ bindRenderbuffer(target: GLenum, renderbuffer: WebGLRenderbuffer | null): void;
+ bindTexture(target: GLenum, texture: WebGLTexture | null): void;
+ blendColor(red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf): void;
+ blendEquation(mode: GLenum): void;
+ blendEquationSeparate(modeRGB: GLenum, modeAlpha: GLenum): void;
+ blendFunc(sfactor: GLenum, dfactor: GLenum): void;
+ blendFuncSeparate(srcRGB: GLenum, dstRGB: GLenum, srcAlpha: GLenum, dstAlpha: GLenum): void;
+ checkFramebufferStatus(target: GLenum): GLenum;
+ clear(mask: GLbitfield): void;
+ clearColor(red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf): void;
+ clearDepth(depth: GLclampf): void;
+ clearStencil(s: GLint): void;
+ colorMask(red: GLboolean, green: GLboolean, blue: GLboolean, alpha: GLboolean): void;
+ compileShader(shader: WebGLShader): void;
+ copyTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, x: GLint, y: GLint, width: GLsizei, height: GLsizei, border: GLint): void;
+ copyTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
+ createBuffer(): WebGLBuffer | null;
+ createFramebuffer(): WebGLFramebuffer | null;
+ createProgram(): WebGLProgram | null;
+ createRenderbuffer(): WebGLRenderbuffer | null;
+ createShader(type: GLenum): WebGLShader | null;
+ createTexture(): WebGLTexture | null;
+ cullFace(mode: GLenum): void;
+ deleteBuffer(buffer: WebGLBuffer | null): void;
+ deleteFramebuffer(framebuffer: WebGLFramebuffer | null): void;
+ deleteProgram(program: WebGLProgram | null): void;
+ deleteRenderbuffer(renderbuffer: WebGLRenderbuffer | null): void;
+ deleteShader(shader: WebGLShader | null): void;
+ deleteTexture(texture: WebGLTexture | null): void;
+ depthFunc(func: GLenum): void;
+ depthMask(flag: GLboolean): void;
+ depthRange(zNear: GLclampf, zFar: GLclampf): void;
+ detachShader(program: WebGLProgram, shader: WebGLShader): void;
+ disable(cap: GLenum): void;
+ disableVertexAttribArray(index: GLuint): void;
+ drawArrays(mode: GLenum, first: GLint, count: GLsizei): void;
+ drawElements(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr): void;
+ enable(cap: GLenum): void;
+ enableVertexAttribArray(index: GLuint): void;
+ finish(): void;
+ flush(): void;
+ framebufferRenderbuffer(target: GLenum, attachment: GLenum, renderbuffertarget: GLenum, renderbuffer: WebGLRenderbuffer | null): void;
+ framebufferTexture2D(target: GLenum, attachment: GLenum, textarget: GLenum, texture: WebGLTexture | null, level: GLint): void;
+ frontFace(mode: GLenum): void;
+ generateMipmap(target: GLenum): void;
+ getActiveAttrib(program: WebGLProgram, index: GLuint): WebGLActiveInfo | null;
+ getActiveUniform(program: WebGLProgram, index: GLuint): WebGLActiveInfo | null;
+ getAttachedShaders(program: WebGLProgram): WebGLShader[] | null;
+ getAttribLocation(program: WebGLProgram, name: string): GLint;
+ getBufferParameter(target: GLenum, pname: GLenum): any;
+ getContextAttributes(): WebGLContextAttributes | null;
+ getError(): GLenum;
+ getExtension(extensionName: "EXT_blend_minmax"): EXT_blend_minmax | null;
+ getExtension(extensionName: "EXT_color_buffer_float"): EXT_color_buffer_float | null;
+ getExtension(extensionName: "EXT_color_buffer_half_float"): EXT_color_buffer_half_float | null;
+ getExtension(extensionName: "EXT_float_blend"): EXT_float_blend | null;
+ getExtension(extensionName: "EXT_texture_filter_anisotropic"): EXT_texture_filter_anisotropic | null;
+ getExtension(extensionName: "EXT_frag_depth"): EXT_frag_depth | null;
+ getExtension(extensionName: "EXT_shader_texture_lod"): EXT_shader_texture_lod | null;
+ getExtension(extensionName: "EXT_sRGB"): EXT_sRGB | null;
+ getExtension(extensionName: "KHR_parallel_shader_compile"): KHR_parallel_shader_compile | null;
+ getExtension(extensionName: "OES_vertex_array_object"): OES_vertex_array_object | null;
+ getExtension(extensionName: "OVR_multiview2"): OVR_multiview2 | null;
+ getExtension(extensionName: "WEBGL_color_buffer_float"): WEBGL_color_buffer_float | null;
+ getExtension(extensionName: "WEBGL_compressed_texture_astc"): WEBGL_compressed_texture_astc | null;
+ getExtension(extensionName: "WEBGL_compressed_texture_etc"): WEBGL_compressed_texture_etc | null;
+ getExtension(extensionName: "WEBGL_compressed_texture_etc1"): WEBGL_compressed_texture_etc1 | null;
+ getExtension(extensionName: "WEBGL_compressed_texture_s3tc_srgb"): WEBGL_compressed_texture_s3tc_srgb | null;
+ getExtension(extensionName: "WEBGL_debug_shaders"): WEBGL_debug_shaders | null;
+ getExtension(extensionName: "WEBGL_draw_buffers"): WEBGL_draw_buffers | null;
+ getExtension(extensionName: "WEBGL_lose_context"): WEBGL_lose_context | null;
+ getExtension(extensionName: "WEBGL_depth_texture"): WEBGL_depth_texture | null;
+ getExtension(extensionName: "WEBGL_debug_renderer_info"): WEBGL_debug_renderer_info | null;
+ getExtension(extensionName: "WEBGL_compressed_texture_s3tc"): WEBGL_compressed_texture_s3tc | null;
+ getExtension(extensionName: "OES_texture_half_float_linear"): OES_texture_half_float_linear | null;
+ getExtension(extensionName: "OES_texture_half_float"): OES_texture_half_float | null;
+ getExtension(extensionName: "OES_texture_float_linear"): OES_texture_float_linear | null;
+ getExtension(extensionName: "OES_texture_float"): OES_texture_float | null;
+ getExtension(extensionName: "OES_standard_derivatives"): OES_standard_derivatives | null;
+ getExtension(extensionName: "OES_element_index_uint"): OES_element_index_uint | null;
+ getExtension(extensionName: "ANGLE_instanced_arrays"): ANGLE_instanced_arrays | null;
+ getExtension(name: string): any;
+ getFramebufferAttachmentParameter(target: GLenum, attachment: GLenum, pname: GLenum): any;
+ getParameter(pname: GLenum): any;
+ getProgramInfoLog(program: WebGLProgram): string | null;
+ getProgramParameter(program: WebGLProgram, pname: GLenum): any;
+ getRenderbufferParameter(target: GLenum, pname: GLenum): any;
+ getShaderInfoLog(shader: WebGLShader): string | null;
+ getShaderParameter(shader: WebGLShader, pname: GLenum): any;
+ getShaderPrecisionFormat(shadertype: GLenum, precisiontype: GLenum): WebGLShaderPrecisionFormat | null;
+ getShaderSource(shader: WebGLShader): string | null;
+ getSupportedExtensions(): string[] | null;
+ getTexParameter(target: GLenum, pname: GLenum): any;
+ getUniform(program: WebGLProgram, location: WebGLUniformLocation): any;
+ getUniformLocation(program: WebGLProgram, name: string): WebGLUniformLocation | null;
+ getVertexAttrib(index: GLuint, pname: GLenum): any;
+ getVertexAttribOffset(index: GLuint, pname: GLenum): GLintptr;
+ hint(target: GLenum, mode: GLenum): void;
+ isBuffer(buffer: WebGLBuffer | null): GLboolean;
+ isContextLost(): boolean;
+ isEnabled(cap: GLenum): GLboolean;
+ isFramebuffer(framebuffer: WebGLFramebuffer | null): GLboolean;
+ isProgram(program: WebGLProgram | null): GLboolean;
+ isRenderbuffer(renderbuffer: WebGLRenderbuffer | null): GLboolean;
+ isShader(shader: WebGLShader | null): GLboolean;
+ isTexture(texture: WebGLTexture | null): GLboolean;
+ lineWidth(width: GLfloat): void;
+ linkProgram(program: WebGLProgram): void;
+ pixelStorei(pname: GLenum, param: GLint | GLboolean): void;
+ polygonOffset(factor: GLfloat, units: GLfloat): void;
+ renderbufferStorage(target: GLenum, internalformat: GLenum, width: GLsizei, height: GLsizei): void;
+ sampleCoverage(value: GLclampf, invert: GLboolean): void;
+ scissor(x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
+ shaderSource(shader: WebGLShader, source: string): void;
+ stencilFunc(func: GLenum, ref: GLint, mask: GLuint): void;
+ stencilFuncSeparate(face: GLenum, func: GLenum, ref: GLint, mask: GLuint): void;
+ stencilMask(mask: GLuint): void;
+ stencilMaskSeparate(face: GLenum, mask: GLuint): void;
+ stencilOp(fail: GLenum, zfail: GLenum, zpass: GLenum): void;
+ stencilOpSeparate(face: GLenum, fail: GLenum, zfail: GLenum, zpass: GLenum): void;
+ texParameterf(target: GLenum, pname: GLenum, param: GLfloat): void;
+ texParameteri(target: GLenum, pname: GLenum, param: GLint): void;
+ uniform1f(location: WebGLUniformLocation | null, x: GLfloat): void;
+ uniform1i(location: WebGLUniformLocation | null, x: GLint): void;
+ uniform2f(location: WebGLUniformLocation | null, x: GLfloat, y: GLfloat): void;
+ uniform2i(location: WebGLUniformLocation | null, x: GLint, y: GLint): void;
+ uniform3f(location: WebGLUniformLocation | null, x: GLfloat, y: GLfloat, z: GLfloat): void;
+ uniform3i(location: WebGLUniformLocation | null, x: GLint, y: GLint, z: GLint): void;
+ uniform4f(location: WebGLUniformLocation | null, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat): void;
+ uniform4i(location: WebGLUniformLocation | null, x: GLint, y: GLint, z: GLint, w: GLint): void;
+ useProgram(program: WebGLProgram | null): void;
+ validateProgram(program: WebGLProgram): void;
+ vertexAttrib1f(index: GLuint, x: GLfloat): void;
+ vertexAttrib1fv(index: GLuint, values: Float32List): void;
+ vertexAttrib2f(index: GLuint, x: GLfloat, y: GLfloat): void;
+ vertexAttrib2fv(index: GLuint, values: Float32List): void;
+ vertexAttrib3f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat): void;
+ vertexAttrib3fv(index: GLuint, values: Float32List): void;
+ vertexAttrib4f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat): void;
+ vertexAttrib4fv(index: GLuint, values: Float32List): void;
+ vertexAttribPointer(index: GLuint, size: GLint, type: GLenum, normalized: GLboolean, stride: GLsizei, offset: GLintptr): void;
+ viewport(x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
+ readonly ACTIVE_ATTRIBUTES: GLenum;
+ readonly ACTIVE_TEXTURE: GLenum;
+ readonly ACTIVE_UNIFORMS: GLenum;
+ readonly ALIASED_LINE_WIDTH_RANGE: GLenum;
+ readonly ALIASED_POINT_SIZE_RANGE: GLenum;
+ readonly ALPHA: GLenum;
+ readonly ALPHA_BITS: GLenum;
+ readonly ALWAYS: GLenum;
+ readonly ARRAY_BUFFER: GLenum;
+ readonly ARRAY_BUFFER_BINDING: GLenum;
+ readonly ATTACHED_SHADERS: GLenum;
+ readonly BACK: GLenum;
+ readonly BLEND: GLenum;
+ readonly BLEND_COLOR: GLenum;
+ readonly BLEND_DST_ALPHA: GLenum;
+ readonly BLEND_DST_RGB: GLenum;
+ readonly BLEND_EQUATION: GLenum;
+ readonly BLEND_EQUATION_ALPHA: GLenum;
+ readonly BLEND_EQUATION_RGB: GLenum;
+ readonly BLEND_SRC_ALPHA: GLenum;
+ readonly BLEND_SRC_RGB: GLenum;
+ readonly BLUE_BITS: GLenum;
+ readonly BOOL: GLenum;
+ readonly BOOL_VEC2: GLenum;
+ readonly BOOL_VEC3: GLenum;
+ readonly BOOL_VEC4: GLenum;
+ readonly BROWSER_DEFAULT_WEBGL: GLenum;
+ readonly BUFFER_SIZE: GLenum;
+ readonly BUFFER_USAGE: GLenum;
+ readonly BYTE: GLenum;
+ readonly CCW: GLenum;
+ readonly CLAMP_TO_EDGE: GLenum;
+ readonly COLOR_ATTACHMENT0: GLenum;
+ readonly COLOR_BUFFER_BIT: GLenum;
+ readonly COLOR_CLEAR_VALUE: GLenum;
+ readonly COLOR_WRITEMASK: GLenum;
+ readonly COMPILE_STATUS: GLenum;
+ readonly COMPRESSED_TEXTURE_FORMATS: GLenum;
+ readonly CONSTANT_ALPHA: GLenum;
+ readonly CONSTANT_COLOR: GLenum;
+ readonly CONTEXT_LOST_WEBGL: GLenum;
+ readonly CULL_FACE: GLenum;
+ readonly CULL_FACE_MODE: GLenum;
+ readonly CURRENT_PROGRAM: GLenum;
+ readonly CURRENT_VERTEX_ATTRIB: GLenum;
+ readonly CW: GLenum;
+ readonly DECR: GLenum;
+ readonly DECR_WRAP: GLenum;
+ readonly DELETE_STATUS: GLenum;
+ readonly DEPTH_ATTACHMENT: GLenum;
+ readonly DEPTH_BITS: GLenum;
+ readonly DEPTH_BUFFER_BIT: GLenum;
+ readonly DEPTH_CLEAR_VALUE: GLenum;
+ readonly DEPTH_COMPONENT: GLenum;
+ readonly DEPTH_COMPONENT16: GLenum;
+ readonly DEPTH_FUNC: GLenum;
+ readonly DEPTH_RANGE: GLenum;
+ readonly DEPTH_STENCIL: GLenum;
+ readonly DEPTH_STENCIL_ATTACHMENT: GLenum;
+ readonly DEPTH_TEST: GLenum;
+ readonly DEPTH_WRITEMASK: GLenum;
+ readonly DITHER: GLenum;
+ readonly DONT_CARE: GLenum;
+ readonly DST_ALPHA: GLenum;
+ readonly DST_COLOR: GLenum;
+ readonly DYNAMIC_DRAW: GLenum;
+ readonly ELEMENT_ARRAY_BUFFER: GLenum;
+ readonly ELEMENT_ARRAY_BUFFER_BINDING: GLenum;
+ readonly EQUAL: GLenum;
+ readonly FASTEST: GLenum;
+ readonly FLOAT: GLenum;
+ readonly FLOAT_MAT2: GLenum;
+ readonly FLOAT_MAT3: GLenum;
+ readonly FLOAT_MAT4: GLenum;
+ readonly FLOAT_VEC2: GLenum;
+ readonly FLOAT_VEC3: GLenum;
+ readonly FLOAT_VEC4: GLenum;
+ readonly FRAGMENT_SHADER: GLenum;
+ readonly FRAMEBUFFER: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: GLenum;
+ readonly FRAMEBUFFER_BINDING: GLenum;
+ readonly FRAMEBUFFER_COMPLETE: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: GLenum;
+ readonly FRAMEBUFFER_UNSUPPORTED: GLenum;
+ readonly FRONT: GLenum;
+ readonly FRONT_AND_BACK: GLenum;
+ readonly FRONT_FACE: GLenum;
+ readonly FUNC_ADD: GLenum;
+ readonly FUNC_REVERSE_SUBTRACT: GLenum;
+ readonly FUNC_SUBTRACT: GLenum;
+ readonly GENERATE_MIPMAP_HINT: GLenum;
+ readonly GEQUAL: GLenum;
+ readonly GREATER: GLenum;
+ readonly GREEN_BITS: GLenum;
+ readonly HIGH_FLOAT: GLenum;
+ readonly HIGH_INT: GLenum;
+ readonly IMPLEMENTATION_COLOR_READ_FORMAT: GLenum;
+ readonly IMPLEMENTATION_COLOR_READ_TYPE: GLenum;
+ readonly INCR: GLenum;
+ readonly INCR_WRAP: GLenum;
+ readonly INT: GLenum;
+ readonly INT_VEC2: GLenum;
+ readonly INT_VEC3: GLenum;
+ readonly INT_VEC4: GLenum;
+ readonly INVALID_ENUM: GLenum;
+ readonly INVALID_FRAMEBUFFER_OPERATION: GLenum;
+ readonly INVALID_OPERATION: GLenum;
+ readonly INVALID_VALUE: GLenum;
+ readonly INVERT: GLenum;
+ readonly KEEP: GLenum;
+ readonly LEQUAL: GLenum;
+ readonly LESS: GLenum;
+ readonly LINEAR: GLenum;
+ readonly LINEAR_MIPMAP_LINEAR: GLenum;
+ readonly LINEAR_MIPMAP_NEAREST: GLenum;
+ readonly LINES: GLenum;
+ readonly LINE_LOOP: GLenum;
+ readonly LINE_STRIP: GLenum;
+ readonly LINE_WIDTH: GLenum;
+ readonly LINK_STATUS: GLenum;
+ readonly LOW_FLOAT: GLenum;
+ readonly LOW_INT: GLenum;
+ readonly LUMINANCE: GLenum;
+ readonly LUMINANCE_ALPHA: GLenum;
+ readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: GLenum;
+ readonly MAX_CUBE_MAP_TEXTURE_SIZE: GLenum;
+ readonly MAX_FRAGMENT_UNIFORM_VECTORS: GLenum;
+ readonly MAX_RENDERBUFFER_SIZE: GLenum;
+ readonly MAX_TEXTURE_IMAGE_UNITS: GLenum;
+ readonly MAX_TEXTURE_SIZE: GLenum;
+ readonly MAX_VARYING_VECTORS: GLenum;
+ readonly MAX_VERTEX_ATTRIBS: GLenum;
+ readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: GLenum;
+ readonly MAX_VERTEX_UNIFORM_VECTORS: GLenum;
+ readonly MAX_VIEWPORT_DIMS: GLenum;
+ readonly MEDIUM_FLOAT: GLenum;
+ readonly MEDIUM_INT: GLenum;
+ readonly MIRRORED_REPEAT: GLenum;
+ readonly NEAREST: GLenum;
+ readonly NEAREST_MIPMAP_LINEAR: GLenum;
+ readonly NEAREST_MIPMAP_NEAREST: GLenum;
+ readonly NEVER: GLenum;
+ readonly NICEST: GLenum;
+ readonly NONE: GLenum;
+ readonly NOTEQUAL: GLenum;
+ readonly NO_ERROR: GLenum;
+ readonly ONE: GLenum;
+ readonly ONE_MINUS_CONSTANT_ALPHA: GLenum;
+ readonly ONE_MINUS_CONSTANT_COLOR: GLenum;
+ readonly ONE_MINUS_DST_ALPHA: GLenum;
+ readonly ONE_MINUS_DST_COLOR: GLenum;
+ readonly ONE_MINUS_SRC_ALPHA: GLenum;
+ readonly ONE_MINUS_SRC_COLOR: GLenum;
+ readonly OUT_OF_MEMORY: GLenum;
+ readonly PACK_ALIGNMENT: GLenum;
+ readonly POINTS: GLenum;
+ readonly POLYGON_OFFSET_FACTOR: GLenum;
+ readonly POLYGON_OFFSET_FILL: GLenum;
+ readonly POLYGON_OFFSET_UNITS: GLenum;
+ readonly RED_BITS: GLenum;
+ readonly RENDERBUFFER: GLenum;
+ readonly RENDERBUFFER_ALPHA_SIZE: GLenum;
+ readonly RENDERBUFFER_BINDING: GLenum;
+ readonly RENDERBUFFER_BLUE_SIZE: GLenum;
+ readonly RENDERBUFFER_DEPTH_SIZE: GLenum;
+ readonly RENDERBUFFER_GREEN_SIZE: GLenum;
+ readonly RENDERBUFFER_HEIGHT: GLenum;
+ readonly RENDERBUFFER_INTERNAL_FORMAT: GLenum;
+ readonly RENDERBUFFER_RED_SIZE: GLenum;
+ readonly RENDERBUFFER_STENCIL_SIZE: GLenum;
+ readonly RENDERBUFFER_WIDTH: GLenum;
+ readonly RENDERER: GLenum;
+ readonly REPEAT: GLenum;
+ readonly REPLACE: GLenum;
+ readonly RGB: GLenum;
+ readonly RGB565: GLenum;
+ readonly RGB5_A1: GLenum;
+ readonly RGBA: GLenum;
+ readonly RGBA4: GLenum;
+ readonly SAMPLER_2D: GLenum;
+ readonly SAMPLER_CUBE: GLenum;
+ readonly SAMPLES: GLenum;
+ readonly SAMPLE_ALPHA_TO_COVERAGE: GLenum;
+ readonly SAMPLE_BUFFERS: GLenum;
+ readonly SAMPLE_COVERAGE: GLenum;
+ readonly SAMPLE_COVERAGE_INVERT: GLenum;
+ readonly SAMPLE_COVERAGE_VALUE: GLenum;
+ readonly SCISSOR_BOX: GLenum;
+ readonly SCISSOR_TEST: GLenum;
+ readonly SHADER_TYPE: GLenum;
+ readonly SHADING_LANGUAGE_VERSION: GLenum;
+ readonly SHORT: GLenum;
+ readonly SRC_ALPHA: GLenum;
+ readonly SRC_ALPHA_SATURATE: GLenum;
+ readonly SRC_COLOR: GLenum;
+ readonly STATIC_DRAW: GLenum;
+ readonly STENCIL_ATTACHMENT: GLenum;
+ readonly STENCIL_BACK_FAIL: GLenum;
+ readonly STENCIL_BACK_FUNC: GLenum;
+ readonly STENCIL_BACK_PASS_DEPTH_FAIL: GLenum;
+ readonly STENCIL_BACK_PASS_DEPTH_PASS: GLenum;
+ readonly STENCIL_BACK_REF: GLenum;
+ readonly STENCIL_BACK_VALUE_MASK: GLenum;
+ readonly STENCIL_BACK_WRITEMASK: GLenum;
+ readonly STENCIL_BITS: GLenum;
+ readonly STENCIL_BUFFER_BIT: GLenum;
+ readonly STENCIL_CLEAR_VALUE: GLenum;
+ readonly STENCIL_FAIL: GLenum;
+ readonly STENCIL_FUNC: GLenum;
+ readonly STENCIL_INDEX8: GLenum;
+ readonly STENCIL_PASS_DEPTH_FAIL: GLenum;
+ readonly STENCIL_PASS_DEPTH_PASS: GLenum;
+ readonly STENCIL_REF: GLenum;
+ readonly STENCIL_TEST: GLenum;
+ readonly STENCIL_VALUE_MASK: GLenum;
+ readonly STENCIL_WRITEMASK: GLenum;
+ readonly STREAM_DRAW: GLenum;
+ readonly SUBPIXEL_BITS: GLenum;
+ readonly TEXTURE: GLenum;
+ readonly TEXTURE0: GLenum;
+ readonly TEXTURE1: GLenum;
+ readonly TEXTURE10: GLenum;
+ readonly TEXTURE11: GLenum;
+ readonly TEXTURE12: GLenum;
+ readonly TEXTURE13: GLenum;
+ readonly TEXTURE14: GLenum;
+ readonly TEXTURE15: GLenum;
+ readonly TEXTURE16: GLenum;
+ readonly TEXTURE17: GLenum;
+ readonly TEXTURE18: GLenum;
+ readonly TEXTURE19: GLenum;
+ readonly TEXTURE2: GLenum;
+ readonly TEXTURE20: GLenum;
+ readonly TEXTURE21: GLenum;
+ readonly TEXTURE22: GLenum;
+ readonly TEXTURE23: GLenum;
+ readonly TEXTURE24: GLenum;
+ readonly TEXTURE25: GLenum;
+ readonly TEXTURE26: GLenum;
+ readonly TEXTURE27: GLenum;
+ readonly TEXTURE28: GLenum;
+ readonly TEXTURE29: GLenum;
+ readonly TEXTURE3: GLenum;
+ readonly TEXTURE30: GLenum;
+ readonly TEXTURE31: GLenum;
+ readonly TEXTURE4: GLenum;
+ readonly TEXTURE5: GLenum;
+ readonly TEXTURE6: GLenum;
+ readonly TEXTURE7: GLenum;
+ readonly TEXTURE8: GLenum;
+ readonly TEXTURE9: GLenum;
+ readonly TEXTURE_2D: GLenum;
+ readonly TEXTURE_BINDING_2D: GLenum;
+ readonly TEXTURE_BINDING_CUBE_MAP: GLenum;
+ readonly TEXTURE_CUBE_MAP: GLenum;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_X: GLenum;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: GLenum;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: GLenum;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_X: GLenum;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Y: GLenum;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Z: GLenum;
+ readonly TEXTURE_MAG_FILTER: GLenum;
+ readonly TEXTURE_MIN_FILTER: GLenum;
+ readonly TEXTURE_WRAP_S: GLenum;
+ readonly TEXTURE_WRAP_T: GLenum;
+ readonly TRIANGLES: GLenum;
+ readonly TRIANGLE_FAN: GLenum;
+ readonly TRIANGLE_STRIP: GLenum;
+ readonly UNPACK_ALIGNMENT: GLenum;
+ readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: GLenum;
+ readonly UNPACK_FLIP_Y_WEBGL: GLenum;
+ readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: GLenum;
+ readonly UNSIGNED_BYTE: GLenum;
+ readonly UNSIGNED_INT: GLenum;
+ readonly UNSIGNED_SHORT: GLenum;
+ readonly UNSIGNED_SHORT_4_4_4_4: GLenum;
+ readonly UNSIGNED_SHORT_5_5_5_1: GLenum;
+ readonly UNSIGNED_SHORT_5_6_5: GLenum;
+ readonly VALIDATE_STATUS: GLenum;
+ readonly VENDOR: GLenum;
+ readonly VERSION: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_ENABLED: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_POINTER: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_SIZE: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_STRIDE: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_TYPE: GLenum;
+ readonly VERTEX_SHADER: GLenum;
+ readonly VIEWPORT: GLenum;
+ readonly ZERO: GLenum;
+}
+
+interface WebGLRenderingContextOverloads {
+ bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum): void;
+ bufferData(target: GLenum, data: BufferSource | null, usage: GLenum): void;
+ bufferSubData(target: GLenum, offset: GLintptr, data: BufferSource): void;
+ compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, data: ArrayBufferView): void;
+ compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, data: ArrayBufferView): void;
+ readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
+ texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
+ texImage2D(target: GLenum, level: GLint, internalformat: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
+ texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
+ texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
+ uniform1fv(location: WebGLUniformLocation | null, v: Float32List): void;
+ uniform1iv(location: WebGLUniformLocation | null, v: Int32List): void;
+ uniform2fv(location: WebGLUniformLocation | null, v: Float32List): void;
+ uniform2iv(location: WebGLUniformLocation | null, v: Int32List): void;
+ uniform3fv(location: WebGLUniformLocation | null, v: Float32List): void;
+ uniform3iv(location: WebGLUniformLocation | null, v: Int32List): void;
+ uniform4fv(location: WebGLUniformLocation | null, v: Float32List): void;
+ uniform4iv(location: WebGLUniformLocation | null, v: Int32List): void;
+ uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void;
+ uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void;
+ uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void;
+}
+
+interface WebGLSampler {
+}
+
+declare var WebGLSampler: {
+ prototype: WebGLSampler;
+ new(): WebGLSampler;
+};
+
+/** The WebGLShader is part of the WebGL API and can either be a vertex or a fragment shader. A WebGLProgram requires both types of shaders. */
+interface WebGLShader {
+}
+
+declare var WebGLShader: {
+ prototype: WebGLShader;
+ new(): WebGLShader;
+};
+
+/** Part of the WebGL API and represents the information returned by calling the WebGLRenderingContext.getShaderPrecisionFormat() method. */
+interface WebGLShaderPrecisionFormat {
+ readonly precision: GLint;
+ readonly rangeMax: GLint;
+ readonly rangeMin: GLint;
+}
+
+declare var WebGLShaderPrecisionFormat: {
+ prototype: WebGLShaderPrecisionFormat;
+ new(): WebGLShaderPrecisionFormat;
+};
+
+interface WebGLSync {
+}
+
+declare var WebGLSync: {
+ prototype: WebGLSync;
+ new(): WebGLSync;
+};
+
+/** Part of the WebGL API and represents an opaque texture object providing storage and state for texturing operations. */
+interface WebGLTexture {
+}
+
+declare var WebGLTexture: {
+ prototype: WebGLTexture;
+ new(): WebGLTexture;
+};
+
+interface WebGLTransformFeedback {
+}
+
+declare var WebGLTransformFeedback: {
+ prototype: WebGLTransformFeedback;
+ new(): WebGLTransformFeedback;
+};
+
+/** Part of the WebGL API and represents the location of a uniform variable in a shader program. */
+interface WebGLUniformLocation {
+}
+
+declare var WebGLUniformLocation: {
+ prototype: WebGLUniformLocation;
+ new(): WebGLUniformLocation;
+};
+
+interface WebGLVertexArrayObject {
+}
+
+declare var WebGLVertexArrayObject: {
+ prototype: WebGLVertexArrayObject;
+ new(): WebGLVertexArrayObject;
+};
+
+interface WebGLVertexArrayObjectOES {
+}
+
+interface WebSocketEventMap {
+ "close": CloseEvent;
+ "error": Event;
+ "message": MessageEvent;
+ "open": Event;
+}
+
+/** Provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection. */
+interface WebSocket extends EventTarget {
+ /**
+ * Returns a string that indicates how binary data from the WebSocket object is exposed to scripts:
+ *
+ * Can be set, to change how binary data is returned. The default is "blob".
+ */
+ binaryType: BinaryType;
+ /**
+ * Returns the number of bytes of application data (UTF-8 text and binary data) that have been queued using send() but not yet been transmitted to the network.
+ *
+ * If the WebSocket connection is closed, this attribute's value will only increase with each call to the send() method. (The number does not reset to zero once the connection closes.)
+ */
+ readonly bufferedAmount: number;
+ /** Returns the extensions selected by the server, if any. */
+ readonly extensions: string;
+ onclose: ((this: WebSocket, ev: CloseEvent) => any) | null;
+ onerror: ((this: WebSocket, ev: Event) => any) | null;
+ onmessage: ((this: WebSocket, ev: MessageEvent) => any) | null;
+ onopen: ((this: WebSocket, ev: Event) => any) | null;
+ /** Returns the subprotocol selected by the server, if any. It can be used in conjunction with the array form of the constructor's second argument to perform subprotocol negotiation. */
+ readonly protocol: string;
+ /** Returns the state of the WebSocket object's connection. It can have the values described below. */
+ readonly readyState: number;
+ /** Returns the URL that was used to establish the WebSocket connection. */
+ readonly url: string;
+ /** Closes the WebSocket connection, optionally using code as the the WebSocket connection close code and reason as the the WebSocket connection close reason. */
+ close(code?: number, reason?: string): void;
+ /** Transmits data using the WebSocket connection. data can be a string, a Blob, an ArrayBuffer, or an ArrayBufferView. */
+ send(data: string | ArrayBufferLike | Blob | ArrayBufferView): void;
+ readonly CLOSED: number;
+ readonly CLOSING: number;
+ readonly CONNECTING: number;
+ readonly OPEN: number;
+ addEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var WebSocket: {
+ prototype: WebSocket;
+ new(url: string | URL, protocols?: string | string[]): WebSocket;
+ readonly CLOSED: number;
+ readonly CLOSING: number;
+ readonly CONNECTING: number;
+ readonly OPEN: number;
+};
+
+/** Events that occur due to the user moving a mouse wheel or similar input device. */
+interface WheelEvent extends MouseEvent {
+ readonly deltaMode: number;
+ readonly deltaX: number;
+ readonly deltaY: number;
+ readonly deltaZ: number;
+ readonly DOM_DELTA_LINE: number;
+ readonly DOM_DELTA_PAGE: number;
+ readonly DOM_DELTA_PIXEL: number;
+}
+
+declare var WheelEvent: {
+ prototype: WheelEvent;
+ new(type: string, eventInitDict?: WheelEventInit): WheelEvent;
+ readonly DOM_DELTA_LINE: number;
+ readonly DOM_DELTA_PAGE: number;
+ readonly DOM_DELTA_PIXEL: number;
+};
+
+interface WindowEventMap extends GlobalEventHandlersEventMap, WindowEventHandlersEventMap {
+ "DOMContentLoaded": Event;
+ "devicemotion": DeviceMotionEvent;
+ "deviceorientation": DeviceOrientationEvent;
+ "gamepadconnected": GamepadEvent;
+ "gamepaddisconnected": GamepadEvent;
+ "orientationchange": Event;
+}
+
+/** A window containing a DOM document; the document property points to the DOM document loaded in that window. */
+interface Window extends EventTarget, AnimationFrameProvider, GlobalEventHandlers, WindowEventHandlers, WindowLocalStorage, WindowOrWorkerGlobalScope, WindowSessionStorage {
+ /** @deprecated This is a legacy alias of `navigator`. */
+ readonly clientInformation: Navigator;
+ /** Returns true if the window has been closed, false otherwise. */
+ readonly closed: boolean;
+ /** Defines a new custom element, mapping the given name to the given constructor as an autonomous custom element. */
+ readonly customElements: CustomElementRegistry;
+ readonly devicePixelRatio: number;
+ readonly document: Document;
+ /** @deprecated */
+ readonly event: Event | undefined;
+ /** @deprecated */
+ readonly external: External;
+ readonly frameElement: Element | null;
+ readonly frames: WindowProxy;
+ readonly history: History;
+ readonly innerHeight: number;
+ readonly innerWidth: number;
+ readonly length: number;
+ get location(): Location;
+ set location(href: string | Location);
+ /** Returns true if the location bar is visible; otherwise, returns false. */
+ readonly locationbar: BarProp;
+ /** Returns true if the menu bar is visible; otherwise, returns false. */
+ readonly menubar: BarProp;
+ name: string;
+ readonly navigator: Navigator;
+ /** Available only in secure contexts. */
+ ondevicemotion: ((this: Window, ev: DeviceMotionEvent) => any) | null;
+ /** Available only in secure contexts. */
+ ondeviceorientation: ((this: Window, ev: DeviceOrientationEvent) => any) | null;
+ /** @deprecated */
+ onorientationchange: ((this: Window, ev: Event) => any) | null;
+ opener: any;
+ /** @deprecated */
+ readonly orientation: number;
+ readonly outerHeight: number;
+ readonly outerWidth: number;
+ /** @deprecated This is a legacy alias of `scrollX`. */
+ readonly pageXOffset: number;
+ /** @deprecated This is a legacy alias of `scrollY`. */
+ readonly pageYOffset: number;
+ /**
+ * Refers to either the parent WindowProxy, or itself.
+ *
+ * It can rarely be null e.g. for contentWindow of an iframe that is already removed from the parent.
+ */
+ readonly parent: WindowProxy;
+ /** Returns true if the personal bar is visible; otherwise, returns false. */
+ readonly personalbar: BarProp;
+ readonly screen: Screen;
+ readonly screenLeft: number;
+ readonly screenTop: number;
+ readonly screenX: number;
+ readonly screenY: number;
+ readonly scrollX: number;
+ readonly scrollY: number;
+ /** Returns true if the scrollbars are visible; otherwise, returns false. */
+ readonly scrollbars: BarProp;
+ readonly self: Window & typeof globalThis;
+ readonly speechSynthesis: SpeechSynthesis;
+ /** @deprecated */
+ status: string;
+ /** Returns true if the status bar is visible; otherwise, returns false. */
+ readonly statusbar: BarProp;
+ /** Returns true if the toolbar is visible; otherwise, returns false. */
+ readonly toolbar: BarProp;
+ readonly top: WindowProxy | null;
+ readonly visualViewport: VisualViewport | null;
+ readonly window: Window & typeof globalThis;
+ alert(message?: any): void;
+ blur(): void;
+ cancelIdleCallback(handle: number): void;
+ /** @deprecated */
+ captureEvents(): void;
+ /** Closes the window. */
+ close(): void;
+ confirm(message?: string): boolean;
+ /** Moves the focus to the window's browsing context, if any. */
+ focus(): void;
+ getComputedStyle(elt: Element, pseudoElt?: string | null): CSSStyleDeclaration;
+ getSelection(): Selection | null;
+ matchMedia(query: string): MediaQueryList;
+ moveBy(x: number, y: number): void;
+ moveTo(x: number, y: number): void;
+ open(url?: string | URL, target?: string, features?: string): WindowProxy | null;
+ /**
+ * Posts a message to the given window. Messages can be structured objects, e.g. nested objects and arrays, can contain JavaScript values (strings, numbers, Date objects, etc), and can contain certain data objects such as File Blob, FileList, and ArrayBuffer objects.
+ *
+ * Objects listed in the transfer member of options are transferred, not just cloned, meaning that they are no longer usable on the sending side.
+ *
+ * A target origin can be specified using the targetOrigin member of options. If not provided, it defaults to "/". This default restricts the message to same-origin targets only.
+ *
+ * If the origin of the target window doesn't match the given target origin, the message is discarded, to avoid information leakage. To send the message to the target regardless of origin, set the target origin to "*".
+ *
+ * Throws a "DataCloneError" DOMException if transfer array contains duplicate objects or if message could not be cloned.
+ */
+ postMessage(message: any, targetOrigin: string, transfer?: Transferable[]): void;
+ postMessage(message: any, options?: WindowPostMessageOptions): void;
+ print(): void;
+ prompt(message?: string, _default?: string): string | null;
+ /** @deprecated */
+ releaseEvents(): void;
+ requestIdleCallback(callback: IdleRequestCallback, options?: IdleRequestOptions): number;
+ resizeBy(x: number, y: number): void;
+ resizeTo(width: number, height: number): void;
+ scroll(options?: ScrollToOptions): void;
+ scroll(x: number, y: number): void;
+ scrollBy(options?: ScrollToOptions): void;
+ scrollBy(x: number, y: number): void;
+ scrollTo(options?: ScrollToOptions): void;
+ scrollTo(x: number, y: number): void;
+ /** Cancels the document load. */
+ stop(): void;
+ addEventListener<K extends keyof WindowEventMap>(type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof WindowEventMap>(type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+ [index: number]: Window;
+}
+
+declare var Window: {
+ prototype: Window;
+ new(): Window;
+};
+
+interface WindowEventHandlersEventMap {
+ "afterprint": Event;
+ "beforeprint": Event;
+ "beforeunload": BeforeUnloadEvent;
+ "gamepadconnected": GamepadEvent;
+ "gamepaddisconnected": GamepadEvent;
+ "hashchange": HashChangeEvent;
+ "languagechange": Event;
+ "message": MessageEvent;
+ "messageerror": MessageEvent;
+ "offline": Event;
+ "online": Event;
+ "pagehide": PageTransitionEvent;
+ "pageshow": PageTransitionEvent;
+ "popstate": PopStateEvent;
+ "rejectionhandled": PromiseRejectionEvent;
+ "storage": StorageEvent;
+ "unhandledrejection": PromiseRejectionEvent;
+ "unload": Event;
+}
+
+interface WindowEventHandlers {
+ onafterprint: ((this: WindowEventHandlers, ev: Event) => any) | null;
+ onbeforeprint: ((this: WindowEventHandlers, ev: Event) => any) | null;
+ onbeforeunload: ((this: WindowEventHandlers, ev: BeforeUnloadEvent) => any) | null;
+ ongamepadconnected: ((this: WindowEventHandlers, ev: GamepadEvent) => any) | null;
+ ongamepaddisconnected: ((this: WindowEventHandlers, ev: GamepadEvent) => any) | null;
+ onhashchange: ((this: WindowEventHandlers, ev: HashChangeEvent) => any) | null;
+ onlanguagechange: ((this: WindowEventHandlers, ev: Event) => any) | null;
+ onmessage: ((this: WindowEventHandlers, ev: MessageEvent) => any) | null;
+ onmessageerror: ((this: WindowEventHandlers, ev: MessageEvent) => any) | null;
+ onoffline: ((this: WindowEventHandlers, ev: Event) => any) | null;
+ ononline: ((this: WindowEventHandlers, ev: Event) => any) | null;
+ onpagehide: ((this: WindowEventHandlers, ev: PageTransitionEvent) => any) | null;
+ onpageshow: ((this: WindowEventHandlers, ev: PageTransitionEvent) => any) | null;
+ onpopstate: ((this: WindowEventHandlers, ev: PopStateEvent) => any) | null;
+ onrejectionhandled: ((this: WindowEventHandlers, ev: PromiseRejectionEvent) => any) | null;
+ onstorage: ((this: WindowEventHandlers, ev: StorageEvent) => any) | null;
+ onunhandledrejection: ((this: WindowEventHandlers, ev: PromiseRejectionEvent) => any) | null;
+ onunload: ((this: WindowEventHandlers, ev: Event) => any) | null;
+ addEventListener<K extends keyof WindowEventHandlersEventMap>(type: K, listener: (this: WindowEventHandlers, ev: WindowEventHandlersEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof WindowEventHandlersEventMap>(type: K, listener: (this: WindowEventHandlers, ev: WindowEventHandlersEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+interface WindowLocalStorage {
+ readonly localStorage: Storage;
+}
+
+interface WindowOrWorkerGlobalScope {
+ /** Available only in secure contexts. */
+ readonly caches: CacheStorage;
+ readonly crossOriginIsolated: boolean;
+ readonly crypto: Crypto;
+ readonly indexedDB: IDBFactory;
+ readonly isSecureContext: boolean;
+ readonly origin: string;
+ readonly performance: Performance;
+ atob(data: string): string;
+ btoa(data: string): string;
+ clearInterval(id: number | undefined): void;
+ clearTimeout(id: number | undefined): void;
+ createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
+ createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
+ fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
+ queueMicrotask(callback: VoidFunction): void;
+ reportError(e: any): void;
+ setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
+ setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
+ structuredClone(value: any, options?: StructuredSerializeOptions): any;
+}
+
+interface WindowSessionStorage {
+ readonly sessionStorage: Storage;
+}
+
+interface WorkerEventMap extends AbstractWorkerEventMap {
+ "message": MessageEvent;
+ "messageerror": MessageEvent;
+}
+
+/** This Web Workers API interface represents a background task that can be easily created and can send messages back to its creator. Creating a worker is as simple as calling the Worker() constructor and specifying a script to be run in the worker thread. */
+interface Worker extends EventTarget, AbstractWorker {
+ onmessage: ((this: Worker, ev: MessageEvent) => any) | null;
+ onmessageerror: ((this: Worker, ev: MessageEvent) => any) | null;
+ /** Clones message and transmits it to worker's global environment. transfer can be passed as a list of objects that are to be transferred rather than cloned. */
+ postMessage(message: any, transfer: Transferable[]): void;
+ postMessage(message: any, options?: StructuredSerializeOptions): void;
+ /** Aborts worker's associated global environment. */
+ terminate(): void;
+ addEventListener<K extends keyof WorkerEventMap>(type: K, listener: (this: Worker, ev: WorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof WorkerEventMap>(type: K, listener: (this: Worker, ev: WorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var Worker: {
+ prototype: Worker;
+ new(scriptURL: string | URL, options?: WorkerOptions): Worker;
+};
+
+/** Available only in secure contexts. */
+interface Worklet {
+ /**
+ * Loads and executes the module script given by moduleURL into all of worklet's global scopes. It can also create additional global scopes as part of this process, depending on the worklet type. The returned promise will fulfill once the script has been successfully loaded and run in all global scopes.
+ *
+ * The credentials option can be set to a credentials mode to modify the script-fetching process. It defaults to "same-origin".
+ *
+ * Any failures in fetching the script or its dependencies will cause the returned promise to be rejected with an "AbortError" DOMException. Any errors in parsing the script or its dependencies will cause the returned promise to be rejected with the exception generated during parsing.
+ */
+ addModule(moduleURL: string | URL, options?: WorkletOptions): Promise<void>;
+}
+
+declare var Worklet: {
+ prototype: Worklet;
+ new(): Worklet;
+};
+
+/** This Streams API interface provides a standard abstraction for writing streaming data to a destination, known as a sink. This object comes with built-in backpressure and queuing. */
+interface WritableStream<W = any> {
+ readonly locked: boolean;
+ abort(reason?: any): Promise<void>;
+ close(): Promise<void>;
+ getWriter(): WritableStreamDefaultWriter<W>;
+}
+
+declare var WritableStream: {
+ prototype: WritableStream;
+ new<W = any>(underlyingSink?: UnderlyingSink<W>, strategy?: QueuingStrategy<W>): WritableStream<W>;
+};
+
+/** This Streams API interface represents a controller allowing control of a WritableStream's state. When constructing a WritableStream, the underlying sink is given a corresponding WritableStreamDefaultController instance to manipulate. */
+interface WritableStreamDefaultController {
+ readonly signal: AbortSignal;
+ error(e?: any): void;
+}
+
+declare var WritableStreamDefaultController: {
+ prototype: WritableStreamDefaultController;
+ new(): WritableStreamDefaultController;
+};
+
+/** This Streams API interface is the object returned by WritableStream.getWriter() and once created locks the < writer to the WritableStream ensuring that no other streams can write to the underlying sink. */
+interface WritableStreamDefaultWriter<W = any> {
+ readonly closed: Promise<undefined>;
+ readonly desiredSize: number | null;
+ readonly ready: Promise<undefined>;
+ abort(reason?: any): Promise<void>;
+ close(): Promise<void>;
+ releaseLock(): void;
+ write(chunk?: W): Promise<void>;
+}
+
+declare var WritableStreamDefaultWriter: {
+ prototype: WritableStreamDefaultWriter;
+ new<W = any>(stream: WritableStream<W>): WritableStreamDefaultWriter<W>;
+};
+
+/** An XML document. It inherits from the generic Document and does not add any specific methods or properties to it: nevertheless, several algorithms behave differently with the two types of documents. */
+interface XMLDocument extends Document {
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: XMLDocument, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: XMLDocument, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var XMLDocument: {
+ prototype: XMLDocument;
+ new(): XMLDocument;
+};
+
+interface XMLHttpRequestEventMap extends XMLHttpRequestEventTargetEventMap {
+ "readystatechange": Event;
+}
+
+/** Use XMLHttpRequest (XHR) objects to interact with servers. You can retrieve data from a URL without having to do a full page refresh. This enables a Web page to update just part of a page without disrupting what the user is doing. */
+interface XMLHttpRequest extends XMLHttpRequestEventTarget {
+ onreadystatechange: ((this: XMLHttpRequest, ev: Event) => any) | null;
+ /** Returns client's state. */
+ readonly readyState: number;
+ /** Returns the response body. */
+ readonly response: any;
+ /**
+ * Returns response as text.
+ *
+ * Throws an "InvalidStateError" DOMException if responseType is not the empty string or "text".
+ */
+ readonly responseText: string;
+ /**
+ * Returns the response type.
+ *
+ * Can be set to change the response type. Values are: the empty string (default), "arraybuffer", "blob", "document", "json", and "text".
+ *
+ * When set: setting to "document" is ignored if current global object is not a Window object.
+ *
+ * When set: throws an "InvalidStateError" DOMException if state is loading or done.
+ *
+ * When set: throws an "InvalidAccessError" DOMException if the synchronous flag is set and current global object is a Window object.
+ */
+ responseType: XMLHttpRequestResponseType;
+ readonly responseURL: string;
+ /**
+ * Returns the response as document.
+ *
+ * Throws an "InvalidStateError" DOMException if responseType is not the empty string or "document".
+ */
+ readonly responseXML: Document | null;
+ readonly status: number;
+ readonly statusText: string;
+ /**
+ * Can be set to a time in milliseconds. When set to a non-zero value will cause fetching to terminate after the given time has passed. When the time has passed, the request has not yet completed, and this's synchronous flag is unset, a timeout event will then be dispatched, or a "TimeoutError" DOMException will be thrown otherwise (for the send() method).
+ *
+ * When set: throws an "InvalidAccessError" DOMException if the synchronous flag is set and current global object is a Window object.
+ */
+ timeout: number;
+ /** Returns the associated XMLHttpRequestUpload object. It can be used to gather transmission information when data is transferred to a server. */
+ readonly upload: XMLHttpRequestUpload;
+ /**
+ * True when credentials are to be included in a cross-origin request. False when they are to be excluded in a cross-origin request and when cookies are to be ignored in its response. Initially false.
+ *
+ * When set: throws an "InvalidStateError" DOMException if state is not unsent or opened, or if the send() flag is set.
+ */
+ withCredentials: boolean;
+ /** Cancels any network activity. */
+ abort(): void;
+ getAllResponseHeaders(): string;
+ getResponseHeader(name: string): string | null;
+ /**
+ * Sets the request method, request URL, and synchronous flag.
+ *
+ * Throws a "SyntaxError" DOMException if either method is not a valid method or url cannot be parsed.
+ *
+ * Throws a "SecurityError" DOMException if method is a case-insensitive match for `CONNECT`, `TRACE`, or `TRACK`.
+ *
+ * Throws an "InvalidAccessError" DOMException if async is false, current global object is a Window object, and the timeout attribute is not zero or the responseType attribute is not the empty string.
+ */
+ open(method: string, url: string | URL): void;
+ open(method: string, url: string | URL, async: boolean, username?: string | null, password?: string | null): void;
+ /**
+ * Acts as if the `Content-Type` header value for a response is mime. (It does not change the header.)
+ *
+ * Throws an "InvalidStateError" DOMException if state is loading or done.
+ */
+ overrideMimeType(mime: string): void;
+ /**
+ * Initiates the request. The body argument provides the request body, if any, and is ignored if the request method is GET or HEAD.
+ *
+ * Throws an "InvalidStateError" DOMException if either state is not opened or the send() flag is set.
+ */
+ send(body?: Document | XMLHttpRequestBodyInit | null): void;
+ /**
+ * Combines a header in author request headers.
+ *
+ * Throws an "InvalidStateError" DOMException if either state is not opened or the send() flag is set.
+ *
+ * Throws a "SyntaxError" DOMException if name is not a header name or if value is not a header value.
+ */
+ setRequestHeader(name: string, value: string): void;
+ readonly DONE: number;
+ readonly HEADERS_RECEIVED: number;
+ readonly LOADING: number;
+ readonly OPENED: number;
+ readonly UNSENT: number;
+ addEventListener<K extends keyof XMLHttpRequestEventMap>(type: K, listener: (this: XMLHttpRequest, ev: XMLHttpRequestEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof XMLHttpRequestEventMap>(type: K, listener: (this: XMLHttpRequest, ev: XMLHttpRequestEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var XMLHttpRequest: {
+ prototype: XMLHttpRequest;
+ new(): XMLHttpRequest;
+ readonly DONE: number;
+ readonly HEADERS_RECEIVED: number;
+ readonly LOADING: number;
+ readonly OPENED: number;
+ readonly UNSENT: number;
+};
+
+interface XMLHttpRequestEventTargetEventMap {
+ "abort": ProgressEvent<XMLHttpRequestEventTarget>;
+ "error": ProgressEvent<XMLHttpRequestEventTarget>;
+ "load": ProgressEvent<XMLHttpRequestEventTarget>;
+ "loadend": ProgressEvent<XMLHttpRequestEventTarget>;
+ "loadstart": ProgressEvent<XMLHttpRequestEventTarget>;
+ "progress": ProgressEvent<XMLHttpRequestEventTarget>;
+ "timeout": ProgressEvent<XMLHttpRequestEventTarget>;
+}
+
+interface XMLHttpRequestEventTarget extends EventTarget {
+ onabort: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
+ onerror: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
+ onload: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
+ onloadend: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
+ onloadstart: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
+ onprogress: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
+ ontimeout: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
+ addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestEventTarget, ev: XMLHttpRequestEventTargetEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestEventTarget, ev: XMLHttpRequestEventTargetEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var XMLHttpRequestEventTarget: {
+ prototype: XMLHttpRequestEventTarget;
+ new(): XMLHttpRequestEventTarget;
+};
+
+interface XMLHttpRequestUpload extends XMLHttpRequestEventTarget {
+ addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestUpload, ev: XMLHttpRequestEventTargetEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestUpload, ev: XMLHttpRequestEventTargetEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var XMLHttpRequestUpload: {
+ prototype: XMLHttpRequestUpload;
+ new(): XMLHttpRequestUpload;
+};
+
+/** Provides the serializeToString() method to construct an XML string representing a DOM tree. */
+interface XMLSerializer {
+ serializeToString(root: Node): string;
+}
+
+declare var XMLSerializer: {
+ prototype: XMLSerializer;
+ new(): XMLSerializer;
+};
+
+/** The XPathEvaluator interface allows to compile and evaluate XPath expressions. */
+interface XPathEvaluator extends XPathEvaluatorBase {
+}
+
+declare var XPathEvaluator: {
+ prototype: XPathEvaluator;
+ new(): XPathEvaluator;
+};
+
+interface XPathEvaluatorBase {
+ createExpression(expression: string, resolver?: XPathNSResolver | null): XPathExpression;
+ createNSResolver(nodeResolver: Node): XPathNSResolver;
+ evaluate(expression: string, contextNode: Node, resolver?: XPathNSResolver | null, type?: number, result?: XPathResult | null): XPathResult;
+}
+
+/** This interface is a compiled XPath expression that can be evaluated on a document or specific node to return information its DOM tree. */
+interface XPathExpression {
+ evaluate(contextNode: Node, type?: number, result?: XPathResult | null): XPathResult;
+}
+
+declare var XPathExpression: {
+ prototype: XPathExpression;
+ new(): XPathExpression;
+};
+
+/** The results generated by evaluating an XPath expression within the context of a given node. */
+interface XPathResult {
+ readonly booleanValue: boolean;
+ readonly invalidIteratorState: boolean;
+ readonly numberValue: number;
+ readonly resultType: number;
+ readonly singleNodeValue: Node | null;
+ readonly snapshotLength: number;
+ readonly stringValue: string;
+ iterateNext(): Node | null;
+ snapshotItem(index: number): Node | null;
+ readonly ANY_TYPE: number;
+ readonly ANY_UNORDERED_NODE_TYPE: number;
+ readonly BOOLEAN_TYPE: number;
+ readonly FIRST_ORDERED_NODE_TYPE: number;
+ readonly NUMBER_TYPE: number;
+ readonly ORDERED_NODE_ITERATOR_TYPE: number;
+ readonly ORDERED_NODE_SNAPSHOT_TYPE: number;
+ readonly STRING_TYPE: number;
+ readonly UNORDERED_NODE_ITERATOR_TYPE: number;
+ readonly UNORDERED_NODE_SNAPSHOT_TYPE: number;
+}
+
+declare var XPathResult: {
+ prototype: XPathResult;
+ new(): XPathResult;
+ readonly ANY_TYPE: number;
+ readonly ANY_UNORDERED_NODE_TYPE: number;
+ readonly BOOLEAN_TYPE: number;
+ readonly FIRST_ORDERED_NODE_TYPE: number;
+ readonly NUMBER_TYPE: number;
+ readonly ORDERED_NODE_ITERATOR_TYPE: number;
+ readonly ORDERED_NODE_SNAPSHOT_TYPE: number;
+ readonly STRING_TYPE: number;
+ readonly UNORDERED_NODE_ITERATOR_TYPE: number;
+ readonly UNORDERED_NODE_SNAPSHOT_TYPE: number;
+};
+
+/** An XSLTProcessor applies an XSLT stylesheet transformation to an XML document to produce a new XML document as output. It has methods to load the XSLT stylesheet, to manipulate <xsl:param> parameter values, and to apply the transformation to documents. */
+interface XSLTProcessor {
+ clearParameters(): void;
+ getParameter(namespaceURI: string | null, localName: string): any;
+ importStylesheet(style: Node): void;
+ removeParameter(namespaceURI: string | null, localName: string): void;
+ reset(): void;
+ setParameter(namespaceURI: string | null, localName: string, value: any): void;
+ transformToDocument(source: Node): Document;
+ transformToFragment(source: Node, output: Document): DocumentFragment;
+}
+
+declare var XSLTProcessor: {
+ prototype: XSLTProcessor;
+ new(): XSLTProcessor;
+};
+
+interface Console {
+ assert(condition?: boolean, ...data: any[]): void;
+ clear(): void;
+ count(label?: string): void;
+ countReset(label?: string): void;
+ debug(...data: any[]): void;
+ dir(item?: any, options?: any): void;
+ dirxml(...data: any[]): void;
+ error(...data: any[]): void;
+ group(...data: any[]): void;
+ groupCollapsed(...data: any[]): void;
+ groupEnd(): void;
+ info(...data: any[]): void;
+ log(...data: any[]): void;
+ table(tabularData?: any, properties?: string[]): void;
+ time(label?: string): void;
+ timeEnd(label?: string): void;
+ timeLog(label?: string, ...data: any[]): void;
+ timeStamp(label?: string): void;
+ trace(...data: any[]): void;
+ warn(...data: any[]): void;
+}
+
+declare var console: Console;
+
+/** Holds useful CSS-related methods. No object with this interface are implemented: it contains only static methods and therefore is a utilitarian interface. */
+declare namespace CSS {
+ function escape(ident: string): string;
+ function supports(property: string, value: string): boolean;
+ function supports(conditionText: string): boolean;
+}
+
+declare namespace WebAssembly {
+ interface CompileError extends Error {
+ }
+
+ var CompileError: {
+ prototype: CompileError;
+ new(message?: string): CompileError;
+ (message?: string): CompileError;
+ };
+
+ interface Global {
+ value: any;
+ valueOf(): any;
+ }
+
+ var Global: {
+ prototype: Global;
+ new(descriptor: GlobalDescriptor, v?: any): Global;
+ };
+
+ interface Instance {
+ readonly exports: Exports;
+ }
+
+ var Instance: {
+ prototype: Instance;
+ new(module: Module, importObject?: Imports): Instance;
+ };
+
+ interface LinkError extends Error {
+ }
+
+ var LinkError: {
+ prototype: LinkError;
+ new(message?: string): LinkError;
+ (message?: string): LinkError;
+ };
+
+ interface Memory {
+ readonly buffer: ArrayBuffer;
+ grow(delta: number): number;
+ }
+
+ var Memory: {
+ prototype: Memory;
+ new(descriptor: MemoryDescriptor): Memory;
+ };
+
+ interface Module {
+ }
+
+ var Module: {
+ prototype: Module;
+ new(bytes: BufferSource): Module;
+ customSections(moduleObject: Module, sectionName: string): ArrayBuffer[];
+ exports(moduleObject: Module): ModuleExportDescriptor[];
+ imports(moduleObject: Module): ModuleImportDescriptor[];
+ };
+
+ interface RuntimeError extends Error {
+ }
+
+ var RuntimeError: {
+ prototype: RuntimeError;
+ new(message?: string): RuntimeError;
+ (message?: string): RuntimeError;
+ };
+
+ interface Table {
+ readonly length: number;
+ get(index: number): any;
+ grow(delta: number, value?: any): number;
+ set(index: number, value?: any): void;
+ }
+
+ var Table: {
+ prototype: Table;
+ new(descriptor: TableDescriptor, value?: any): Table;
+ };
+
+ interface GlobalDescriptor {
+ mutable?: boolean;
+ value: ValueType;
+ }
+
+ interface MemoryDescriptor {
+ initial: number;
+ maximum?: number;
+ shared?: boolean;
+ }
+
+ interface ModuleExportDescriptor {
+ kind: ImportExportKind;
+ name: string;
+ }
+
+ interface ModuleImportDescriptor {
+ kind: ImportExportKind;
+ module: string;
+ name: string;
+ }
+
+ interface TableDescriptor {
+ element: TableKind;
+ initial: number;
+ maximum?: number;
+ }
+
+ interface WebAssemblyInstantiatedSource {
+ instance: Instance;
+ module: Module;
+ }
+
+ type ImportExportKind = "function" | "global" | "memory" | "table";
+ type TableKind = "anyfunc" | "externref";
+ type ValueType = "anyfunc" | "externref" | "f32" | "f64" | "i32" | "i64" | "v128";
+ type ExportValue = Function | Global | Memory | Table;
+ type Exports = Record<string, ExportValue>;
+ type ImportValue = ExportValue | number;
+ type Imports = Record<string, ModuleImports>;
+ type ModuleImports = Record<string, ImportValue>;
+ function compile(bytes: BufferSource): Promise<Module>;
+ function compileStreaming(source: Response | PromiseLike<Response>): Promise<Module>;
+ function instantiate(bytes: BufferSource, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
+ function instantiate(moduleObject: Module, importObject?: Imports): Promise<Instance>;
+ function instantiateStreaming(source: Response | PromiseLike<Response>, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
+ function validate(bytes: BufferSource): boolean;
+}
+
+interface BlobCallback {
+ (blob: Blob | null): void;
+}
+
+interface CustomElementConstructor {
+ new (...params: any[]): HTMLElement;
+}
+
+interface DecodeErrorCallback {
+ (error: DOMException): void;
+}
+
+interface DecodeSuccessCallback {
+ (decodedData: AudioBuffer): void;
+}
+
+interface ErrorCallback {
+ (err: DOMException): void;
+}
+
+interface FileCallback {
+ (file: File): void;
+}
+
+interface FileSystemEntriesCallback {
+ (entries: FileSystemEntry[]): void;
+}
+
+interface FileSystemEntryCallback {
+ (entry: FileSystemEntry): void;
+}
+
+interface FrameRequestCallback {
+ (time: DOMHighResTimeStamp): void;
+}
+
+interface FunctionStringCallback {
+ (data: string): void;
+}
+
+interface IdleRequestCallback {
+ (deadline: IdleDeadline): void;
+}
+
+interface IntersectionObserverCallback {
+ (entries: IntersectionObserverEntry[], observer: IntersectionObserver): void;
+}
+
+interface LockGrantedCallback {
+ (lock: Lock | null): any;
+}
+
+interface MediaSessionActionHandler {
+ (details: MediaSessionActionDetails): void;
+}
+
+interface MutationCallback {
+ (mutations: MutationRecord[], observer: MutationObserver): void;
+}
+
+interface NotificationPermissionCallback {
+ (permission: NotificationPermission): void;
+}
+
+interface OnBeforeUnloadEventHandlerNonNull {
+ (event: Event): string | null;
+}
+
+interface OnErrorEventHandlerNonNull {
+ (event: Event | string, source?: string, lineno?: number, colno?: number, error?: Error): any;
+}
+
+interface PerformanceObserverCallback {
+ (entries: PerformanceObserverEntryList, observer: PerformanceObserver): void;
+}
+
+interface PositionCallback {
+ (position: GeolocationPosition): void;
+}
+
+interface PositionErrorCallback {
+ (positionError: GeolocationPositionError): void;
+}
+
+interface QueuingStrategySize<T = any> {
+ (chunk: T): number;
+}
+
+interface RTCPeerConnectionErrorCallback {
+ (error: DOMException): void;
+}
+
+interface RTCSessionDescriptionCallback {
+ (description: RTCSessionDescriptionInit): void;
+}
+
+interface RemotePlaybackAvailabilityCallback {
+ (available: boolean): void;
+}
+
+interface ResizeObserverCallback {
+ (entries: ResizeObserverEntry[], observer: ResizeObserver): void;
+}
+
+interface TransformerFlushCallback<O> {
+ (controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
+}
+
+interface TransformerStartCallback<O> {
+ (controller: TransformStreamDefaultController<O>): any;
+}
+
+interface TransformerTransformCallback<I, O> {
+ (chunk: I, controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
+}
+
+interface UnderlyingSinkAbortCallback {
+ (reason?: any): void | PromiseLike<void>;
+}
+
+interface UnderlyingSinkCloseCallback {
+ (): void | PromiseLike<void>;
+}
+
+interface UnderlyingSinkStartCallback {
+ (controller: WritableStreamDefaultController): any;
+}
+
+interface UnderlyingSinkWriteCallback<W> {
+ (chunk: W, controller: WritableStreamDefaultController): void | PromiseLike<void>;
+}
+
+interface UnderlyingSourceCancelCallback {
+ (reason?: any): void | PromiseLike<void>;
+}
+
+interface UnderlyingSourcePullCallback<R> {
+ (controller: ReadableStreamController<R>): void | PromiseLike<void>;
+}
+
+interface UnderlyingSourceStartCallback<R> {
+ (controller: ReadableStreamController<R>): any;
+}
+
+interface VideoFrameRequestCallback {
+ (now: DOMHighResTimeStamp, metadata: VideoFrameMetadata): void;
+}
+
+interface VoidFunction {
+ (): void;
+}
+
+interface HTMLElementTagNameMap {
+ "a": HTMLAnchorElement;
+ "abbr": HTMLElement;
+ "address": HTMLElement;
+ "area": HTMLAreaElement;
+ "article": HTMLElement;
+ "aside": HTMLElement;
+ "audio": HTMLAudioElement;
+ "b": HTMLElement;
+ "base": HTMLBaseElement;
+ "bdi": HTMLElement;
+ "bdo": HTMLElement;
+ "blockquote": HTMLQuoteElement;
+ "body": HTMLBodyElement;
+ "br": HTMLBRElement;
+ "button": HTMLButtonElement;
+ "canvas": HTMLCanvasElement;
+ "caption": HTMLTableCaptionElement;
+ "cite": HTMLElement;
+ "code": HTMLElement;
+ "col": HTMLTableColElement;
+ "colgroup": HTMLTableColElement;
+ "data": HTMLDataElement;
+ "datalist": HTMLDataListElement;
+ "dd": HTMLElement;
+ "del": HTMLModElement;
+ "details": HTMLDetailsElement;
+ "dfn": HTMLElement;
+ "dialog": HTMLDialogElement;
+ "div": HTMLDivElement;
+ "dl": HTMLDListElement;
+ "dt": HTMLElement;
+ "em": HTMLElement;
+ "embed": HTMLEmbedElement;
+ "fieldset": HTMLFieldSetElement;
+ "figcaption": HTMLElement;
+ "figure": HTMLElement;
+ "footer": HTMLElement;
+ "form": HTMLFormElement;
+ "h1": HTMLHeadingElement;
+ "h2": HTMLHeadingElement;
+ "h3": HTMLHeadingElement;
+ "h4": HTMLHeadingElement;
+ "h5": HTMLHeadingElement;
+ "h6": HTMLHeadingElement;
+ "head": HTMLHeadElement;
+ "header": HTMLElement;
+ "hgroup": HTMLElement;
+ "hr": HTMLHRElement;
+ "html": HTMLHtmlElement;
+ "i": HTMLElement;
+ "iframe": HTMLIFrameElement;
+ "img": HTMLImageElement;
+ "input": HTMLInputElement;
+ "ins": HTMLModElement;
+ "kbd": HTMLElement;
+ "label": HTMLLabelElement;
+ "legend": HTMLLegendElement;
+ "li": HTMLLIElement;
+ "link": HTMLLinkElement;
+ "main": HTMLElement;
+ "map": HTMLMapElement;
+ "mark": HTMLElement;
+ "menu": HTMLMenuElement;
+ "meta": HTMLMetaElement;
+ "meter": HTMLMeterElement;
+ "nav": HTMLElement;
+ "noscript": HTMLElement;
+ "object": HTMLObjectElement;
+ "ol": HTMLOListElement;
+ "optgroup": HTMLOptGroupElement;
+ "option": HTMLOptionElement;
+ "output": HTMLOutputElement;
+ "p": HTMLParagraphElement;
+ "picture": HTMLPictureElement;
+ "pre": HTMLPreElement;
+ "progress": HTMLProgressElement;
+ "q": HTMLQuoteElement;
+ "rp": HTMLElement;
+ "rt": HTMLElement;
+ "ruby": HTMLElement;
+ "s": HTMLElement;
+ "samp": HTMLElement;
+ "script": HTMLScriptElement;
+ "section": HTMLElement;
+ "select": HTMLSelectElement;
+ "slot": HTMLSlotElement;
+ "small": HTMLElement;
+ "source": HTMLSourceElement;
+ "span": HTMLSpanElement;
+ "strong": HTMLElement;
+ "style": HTMLStyleElement;
+ "sub": HTMLElement;
+ "summary": HTMLElement;
+ "sup": HTMLElement;
+ "table": HTMLTableElement;
+ "tbody": HTMLTableSectionElement;
+ "td": HTMLTableCellElement;
+ "template": HTMLTemplateElement;
+ "textarea": HTMLTextAreaElement;
+ "tfoot": HTMLTableSectionElement;
+ "th": HTMLTableCellElement;
+ "thead": HTMLTableSectionElement;
+ "time": HTMLTimeElement;
+ "title": HTMLTitleElement;
+ "tr": HTMLTableRowElement;
+ "track": HTMLTrackElement;
+ "u": HTMLElement;
+ "ul": HTMLUListElement;
+ "var": HTMLElement;
+ "video": HTMLVideoElement;
+ "wbr": HTMLElement;
+}
+
+interface HTMLElementDeprecatedTagNameMap {
+ "acronym": HTMLElement;
+ "applet": HTMLUnknownElement;
+ "basefont": HTMLElement;
+ "bgsound": HTMLUnknownElement;
+ "big": HTMLElement;
+ "blink": HTMLUnknownElement;
+ "center": HTMLElement;
+ "dir": HTMLDirectoryElement;
+ "font": HTMLFontElement;
+ "frame": HTMLFrameElement;
+ "frameset": HTMLFrameSetElement;
+ "isindex": HTMLUnknownElement;
+ "keygen": HTMLUnknownElement;
+ "listing": HTMLPreElement;
+ "marquee": HTMLMarqueeElement;
+ "menuitem": HTMLElement;
+ "multicol": HTMLUnknownElement;
+ "nextid": HTMLUnknownElement;
+ "nobr": HTMLElement;
+ "noembed": HTMLElement;
+ "noframes": HTMLElement;
+ "param": HTMLParamElement;
+ "plaintext": HTMLElement;
+ "rb": HTMLElement;
+ "rtc": HTMLElement;
+ "spacer": HTMLUnknownElement;
+ "strike": HTMLElement;
+ "tt": HTMLElement;
+ "xmp": HTMLPreElement;
+}
+
+interface SVGElementTagNameMap {
+ "a": SVGAElement;
+ "animate": SVGAnimateElement;
+ "animateMotion": SVGAnimateMotionElement;
+ "animateTransform": SVGAnimateTransformElement;
+ "circle": SVGCircleElement;
+ "clipPath": SVGClipPathElement;
+ "defs": SVGDefsElement;
+ "desc": SVGDescElement;
+ "ellipse": SVGEllipseElement;
+ "feBlend": SVGFEBlendElement;
+ "feColorMatrix": SVGFEColorMatrixElement;
+ "feComponentTransfer": SVGFEComponentTransferElement;
+ "feComposite": SVGFECompositeElement;
+ "feConvolveMatrix": SVGFEConvolveMatrixElement;
+ "feDiffuseLighting": SVGFEDiffuseLightingElement;
+ "feDisplacementMap": SVGFEDisplacementMapElement;
+ "feDistantLight": SVGFEDistantLightElement;
+ "feDropShadow": SVGFEDropShadowElement;
+ "feFlood": SVGFEFloodElement;
+ "feFuncA": SVGFEFuncAElement;
+ "feFuncB": SVGFEFuncBElement;
+ "feFuncG": SVGFEFuncGElement;
+ "feFuncR": SVGFEFuncRElement;
+ "feGaussianBlur": SVGFEGaussianBlurElement;
+ "feImage": SVGFEImageElement;
+ "feMerge": SVGFEMergeElement;
+ "feMergeNode": SVGFEMergeNodeElement;
+ "feMorphology": SVGFEMorphologyElement;
+ "feOffset": SVGFEOffsetElement;
+ "fePointLight": SVGFEPointLightElement;
+ "feSpecularLighting": SVGFESpecularLightingElement;
+ "feSpotLight": SVGFESpotLightElement;
+ "feTile": SVGFETileElement;
+ "feTurbulence": SVGFETurbulenceElement;
+ "filter": SVGFilterElement;
+ "foreignObject": SVGForeignObjectElement;
+ "g": SVGGElement;
+ "image": SVGImageElement;
+ "line": SVGLineElement;
+ "linearGradient": SVGLinearGradientElement;
+ "marker": SVGMarkerElement;
+ "mask": SVGMaskElement;
+ "metadata": SVGMetadataElement;
+ "mpath": SVGMPathElement;
+ "path": SVGPathElement;
+ "pattern": SVGPatternElement;
+ "polygon": SVGPolygonElement;
+ "polyline": SVGPolylineElement;
+ "radialGradient": SVGRadialGradientElement;
+ "rect": SVGRectElement;
+ "script": SVGScriptElement;
+ "set": SVGSetElement;
+ "stop": SVGStopElement;
+ "style": SVGStyleElement;
+ "svg": SVGSVGElement;
+ "switch": SVGSwitchElement;
+ "symbol": SVGSymbolElement;
+ "text": SVGTextElement;
+ "textPath": SVGTextPathElement;
+ "title": SVGTitleElement;
+ "tspan": SVGTSpanElement;
+ "use": SVGUseElement;
+ "view": SVGViewElement;
+}
+
+/** @deprecated Directly use HTMLElementTagNameMap or SVGElementTagNameMap as appropriate, instead. */
+type ElementTagNameMap = HTMLElementTagNameMap & Pick<SVGElementTagNameMap, Exclude<keyof SVGElementTagNameMap, keyof HTMLElementTagNameMap>>;
+
+declare var Audio: {
+ new(src?: string): HTMLAudioElement;
+};
+declare var Image: {
+ new(width?: number, height?: number): HTMLImageElement;
+};
+declare var Option: {
+ new(text?: string, value?: string, defaultSelected?: boolean, selected?: boolean): HTMLOptionElement;
+};
+/** @deprecated This is a legacy alias of `navigator`. */
+declare var clientInformation: Navigator;
+/** Returns true if the window has been closed, false otherwise. */
+declare var closed: boolean;
+/** Defines a new custom element, mapping the given name to the given constructor as an autonomous custom element. */
+declare var customElements: CustomElementRegistry;
+declare var devicePixelRatio: number;
+declare var document: Document;
+/** @deprecated */
+declare var event: Event | undefined;
+/** @deprecated */
+declare var external: External;
+declare var frameElement: Element | null;
+declare var frames: WindowProxy;
+declare var history: History;
+declare var innerHeight: number;
+declare var innerWidth: number;
+declare var length: number;
+declare var location: Location;
+/** Returns true if the location bar is visible; otherwise, returns false. */
+declare var locationbar: BarProp;
+/** Returns true if the menu bar is visible; otherwise, returns false. */
+declare var menubar: BarProp;
+/** @deprecated */
+declare const name: void;
+declare var navigator: Navigator;
+/** Available only in secure contexts. */
+declare var ondevicemotion: ((this: Window, ev: DeviceMotionEvent) => any) | null;
+/** Available only in secure contexts. */
+declare var ondeviceorientation: ((this: Window, ev: DeviceOrientationEvent) => any) | null;
+/** @deprecated */
+declare var onorientationchange: ((this: Window, ev: Event) => any) | null;
+declare var opener: any;
+/** @deprecated */
+declare var orientation: number;
+declare var outerHeight: number;
+declare var outerWidth: number;
+/** @deprecated This is a legacy alias of `scrollX`. */
+declare var pageXOffset: number;
+/** @deprecated This is a legacy alias of `scrollY`. */
+declare var pageYOffset: number;
+/**
+ * Refers to either the parent WindowProxy, or itself.
+ *
+ * It can rarely be null e.g. for contentWindow of an iframe that is already removed from the parent.
+ */
+declare var parent: WindowProxy;
+/** Returns true if the personal bar is visible; otherwise, returns false. */
+declare var personalbar: BarProp;
+declare var screen: Screen;
+declare var screenLeft: number;
+declare var screenTop: number;
+declare var screenX: number;
+declare var screenY: number;
+declare var scrollX: number;
+declare var scrollY: number;
+/** Returns true if the scrollbars are visible; otherwise, returns false. */
+declare var scrollbars: BarProp;
+declare var self: Window & typeof globalThis;
+declare var speechSynthesis: SpeechSynthesis;
+/** @deprecated */
+declare var status: string;
+/** Returns true if the status bar is visible; otherwise, returns false. */
+declare var statusbar: BarProp;
+/** Returns true if the toolbar is visible; otherwise, returns false. */
+declare var toolbar: BarProp;
+declare var top: WindowProxy | null;
+declare var visualViewport: VisualViewport | null;
+declare var window: Window & typeof globalThis;
+declare function alert(message?: any): void;
+declare function blur(): void;
+declare function cancelIdleCallback(handle: number): void;
+/** @deprecated */
+declare function captureEvents(): void;
+/** Closes the window. */
+declare function close(): void;
+declare function confirm(message?: string): boolean;
+/** Moves the focus to the window's browsing context, if any. */
+declare function focus(): void;
+declare function getComputedStyle(elt: Element, pseudoElt?: string | null): CSSStyleDeclaration;
+declare function getSelection(): Selection | null;
+declare function matchMedia(query: string): MediaQueryList;
+declare function moveBy(x: number, y: number): void;
+declare function moveTo(x: number, y: number): void;
+declare function open(url?: string | URL, target?: string, features?: string): WindowProxy | null;
+/**
+ * Posts a message to the given window. Messages can be structured objects, e.g. nested objects and arrays, can contain JavaScript values (strings, numbers, Date objects, etc), and can contain certain data objects such as File Blob, FileList, and ArrayBuffer objects.
+ *
+ * Objects listed in the transfer member of options are transferred, not just cloned, meaning that they are no longer usable on the sending side.
+ *
+ * A target origin can be specified using the targetOrigin member of options. If not provided, it defaults to "/". This default restricts the message to same-origin targets only.
+ *
+ * If the origin of the target window doesn't match the given target origin, the message is discarded, to avoid information leakage. To send the message to the target regardless of origin, set the target origin to "*".
+ *
+ * Throws a "DataCloneError" DOMException if transfer array contains duplicate objects or if message could not be cloned.
+ */
+declare function postMessage(message: any, targetOrigin: string, transfer?: Transferable[]): void;
+declare function postMessage(message: any, options?: WindowPostMessageOptions): void;
+declare function print(): void;
+declare function prompt(message?: string, _default?: string): string | null;
+/** @deprecated */
+declare function releaseEvents(): void;
+declare function requestIdleCallback(callback: IdleRequestCallback, options?: IdleRequestOptions): number;
+declare function resizeBy(x: number, y: number): void;
+declare function resizeTo(width: number, height: number): void;
+declare function scroll(options?: ScrollToOptions): void;
+declare function scroll(x: number, y: number): void;
+declare function scrollBy(options?: ScrollToOptions): void;
+declare function scrollBy(x: number, y: number): void;
+declare function scrollTo(options?: ScrollToOptions): void;
+declare function scrollTo(x: number, y: number): void;
+/** Cancels the document load. */
+declare function stop(): void;
+declare function toString(): string;
+/** Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise. */
+declare function dispatchEvent(event: Event): boolean;
+declare function cancelAnimationFrame(handle: number): void;
+declare function requestAnimationFrame(callback: FrameRequestCallback): number;
+/**
+ * Fires when the user aborts the download.
+ * @param ev The event.
+ */
+declare var onabort: ((this: Window, ev: UIEvent) => any) | null;
+declare var onanimationcancel: ((this: Window, ev: AnimationEvent) => any) | null;
+declare var onanimationend: ((this: Window, ev: AnimationEvent) => any) | null;
+declare var onanimationiteration: ((this: Window, ev: AnimationEvent) => any) | null;
+declare var onanimationstart: ((this: Window, ev: AnimationEvent) => any) | null;
+declare var onauxclick: ((this: Window, ev: MouseEvent) => any) | null;
+/**
+ * Fires when the object loses the input focus.
+ * @param ev The focus event.
+ */
+declare var onblur: ((this: Window, ev: FocusEvent) => any) | null;
+/**
+ * Occurs when playback is possible, but would require further buffering.
+ * @param ev The event.
+ */
+declare var oncanplay: ((this: Window, ev: Event) => any) | null;
+declare var oncanplaythrough: ((this: Window, ev: Event) => any) | null;
+/**
+ * Fires when the contents of the object or selection have changed.
+ * @param ev The event.
+ */
+declare var onchange: ((this: Window, ev: Event) => any) | null;
+/**
+ * Fires when the user clicks the left mouse button on the object
+ * @param ev The mouse event.
+ */
+declare var onclick: ((this: Window, ev: MouseEvent) => any) | null;
+declare var onclose: ((this: Window, ev: Event) => any) | null;
+/**
+ * Fires when the user clicks the right mouse button in the client area, opening the context menu.
+ * @param ev The mouse event.
+ */
+declare var oncontextmenu: ((this: Window, ev: MouseEvent) => any) | null;
+declare var oncuechange: ((this: Window, ev: Event) => any) | null;
+/**
+ * Fires when the user double-clicks the object.
+ * @param ev The mouse event.
+ */
+declare var ondblclick: ((this: Window, ev: MouseEvent) => any) | null;
+/**
+ * Fires on the source object continuously during a drag operation.
+ * @param ev The event.
+ */
+declare var ondrag: ((this: Window, ev: DragEvent) => any) | null;
+/**
+ * Fires on the source object when the user releases the mouse at the close of a drag operation.
+ * @param ev The event.
+ */
+declare var ondragend: ((this: Window, ev: DragEvent) => any) | null;
+/**
+ * Fires on the target element when the user drags the object to a valid drop target.
+ * @param ev The drag event.
+ */
+declare var ondragenter: ((this: Window, ev: DragEvent) => any) | null;
+/**
+ * Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation.
+ * @param ev The drag event.
+ */
+declare var ondragleave: ((this: Window, ev: DragEvent) => any) | null;
+/**
+ * Fires on the target element continuously while the user drags the object over a valid drop target.
+ * @param ev The event.
+ */
+declare var ondragover: ((this: Window, ev: DragEvent) => any) | null;
+/**
+ * Fires on the source object when the user starts to drag a text selection or selected object.
+ * @param ev The event.
+ */
+declare var ondragstart: ((this: Window, ev: DragEvent) => any) | null;
+declare var ondrop: ((this: Window, ev: DragEvent) => any) | null;
+/**
+ * Occurs when the duration attribute is updated.
+ * @param ev The event.
+ */
+declare var ondurationchange: ((this: Window, ev: Event) => any) | null;
+/**
+ * Occurs when the media element is reset to its initial state.
+ * @param ev The event.
+ */
+declare var onemptied: ((this: Window, ev: Event) => any) | null;
+/**
+ * Occurs when the end of playback is reached.
+ * @param ev The event
+ */
+declare var onended: ((this: Window, ev: Event) => any) | null;
+/**
+ * Fires when an error occurs during object loading.
+ * @param ev The event.
+ */
+declare var onerror: OnErrorEventHandler;
+/**
+ * Fires when the object receives focus.
+ * @param ev The event.
+ */
+declare var onfocus: ((this: Window, ev: FocusEvent) => any) | null;
+declare var onformdata: ((this: Window, ev: FormDataEvent) => any) | null;
+declare var ongotpointercapture: ((this: Window, ev: PointerEvent) => any) | null;
+declare var oninput: ((this: Window, ev: Event) => any) | null;
+declare var oninvalid: ((this: Window, ev: Event) => any) | null;
+/**
+ * Fires when the user presses a key.
+ * @param ev The keyboard event
+ */
+declare var onkeydown: ((this: Window, ev: KeyboardEvent) => any) | null;
+/**
+ * Fires when the user presses an alphanumeric key.
+ * @param ev The event.
+ * @deprecated
+ */
+declare var onkeypress: ((this: Window, ev: KeyboardEvent) => any) | null;
+/**
+ * Fires when the user releases a key.
+ * @param ev The keyboard event
+ */
+declare var onkeyup: ((this: Window, ev: KeyboardEvent) => any) | null;
+/**
+ * Fires immediately after the browser loads the object.
+ * @param ev The event.
+ */
+declare var onload: ((this: Window, ev: Event) => any) | null;
+/**
+ * Occurs when media data is loaded at the current playback position.
+ * @param ev The event.
+ */
+declare var onloadeddata: ((this: Window, ev: Event) => any) | null;
+/**
+ * Occurs when the duration and dimensions of the media have been determined.
+ * @param ev The event.
+ */
+declare var onloadedmetadata: ((this: Window, ev: Event) => any) | null;
+/**
+ * Occurs when Internet Explorer begins looking for media data.
+ * @param ev The event.
+ */
+declare var onloadstart: ((this: Window, ev: Event) => any) | null;
+declare var onlostpointercapture: ((this: Window, ev: PointerEvent) => any) | null;
+/**
+ * Fires when the user clicks the object with either mouse button.
+ * @param ev The mouse event.
+ */
+declare var onmousedown: ((this: Window, ev: MouseEvent) => any) | null;
+declare var onmouseenter: ((this: Window, ev: MouseEvent) => any) | null;
+declare var onmouseleave: ((this: Window, ev: MouseEvent) => any) | null;
+/**
+ * Fires when the user moves the mouse over the object.
+ * @param ev The mouse event.
+ */
+declare var onmousemove: ((this: Window, ev: MouseEvent) => any) | null;
+/**
+ * Fires when the user moves the mouse pointer outside the boundaries of the object.
+ * @param ev The mouse event.
+ */
+declare var onmouseout: ((this: Window, ev: MouseEvent) => any) | null;
+/**
+ * Fires when the user moves the mouse pointer into the object.
+ * @param ev The mouse event.
+ */
+declare var onmouseover: ((this: Window, ev: MouseEvent) => any) | null;
+/**
+ * Fires when the user releases a mouse button while the mouse is over the object.
+ * @param ev The mouse event.
+ */
+declare var onmouseup: ((this: Window, ev: MouseEvent) => any) | null;
+/**
+ * Occurs when playback is paused.
+ * @param ev The event.
+ */
+declare var onpause: ((this: Window, ev: Event) => any) | null;
+/**
+ * Occurs when the play method is requested.
+ * @param ev The event.
+ */
+declare var onplay: ((this: Window, ev: Event) => any) | null;
+/**
+ * Occurs when the audio or video has started playing.
+ * @param ev The event.
+ */
+declare var onplaying: ((this: Window, ev: Event) => any) | null;
+declare var onpointercancel: ((this: Window, ev: PointerEvent) => any) | null;
+declare var onpointerdown: ((this: Window, ev: PointerEvent) => any) | null;
+declare var onpointerenter: ((this: Window, ev: PointerEvent) => any) | null;
+declare var onpointerleave: ((this: Window, ev: PointerEvent) => any) | null;
+declare var onpointermove: ((this: Window, ev: PointerEvent) => any) | null;
+declare var onpointerout: ((this: Window, ev: PointerEvent) => any) | null;
+declare var onpointerover: ((this: Window, ev: PointerEvent) => any) | null;
+declare var onpointerup: ((this: Window, ev: PointerEvent) => any) | null;
+/**
+ * Occurs to indicate progress while downloading media data.
+ * @param ev The event.
+ */
+declare var onprogress: ((this: Window, ev: ProgressEvent) => any) | null;
+/**
+ * Occurs when the playback rate is increased or decreased.
+ * @param ev The event.
+ */
+declare var onratechange: ((this: Window, ev: Event) => any) | null;
+/**
+ * Fires when the user resets a form.
+ * @param ev The event.
+ */
+declare var onreset: ((this: Window, ev: Event) => any) | null;
+declare var onresize: ((this: Window, ev: UIEvent) => any) | null;
+/**
+ * Fires when the user repositions the scroll box in the scroll bar on the object.
+ * @param ev The event.
+ */
+declare var onscroll: ((this: Window, ev: Event) => any) | null;
+declare var onsecuritypolicyviolation: ((this: Window, ev: SecurityPolicyViolationEvent) => any) | null;
+/**
+ * Occurs when the seek operation ends.
+ * @param ev The event.
+ */
+declare var onseeked: ((this: Window, ev: Event) => any) | null;
+/**
+ * Occurs when the current playback position is moved.
+ * @param ev The event.
+ */
+declare var onseeking: ((this: Window, ev: Event) => any) | null;
+/**
+ * Fires when the current selection changes.
+ * @param ev The event.
+ */
+declare var onselect: ((this: Window, ev: Event) => any) | null;
+declare var onselectionchange: ((this: Window, ev: Event) => any) | null;
+declare var onselectstart: ((this: Window, ev: Event) => any) | null;
+declare var onslotchange: ((this: Window, ev: Event) => any) | null;
+/**
+ * Occurs when the download has stopped.
+ * @param ev The event.
+ */
+declare var onstalled: ((this: Window, ev: Event) => any) | null;
+declare var onsubmit: ((this: Window, ev: SubmitEvent) => any) | null;
+/**
+ * Occurs if the load operation has been intentionally halted.
+ * @param ev The event.
+ */
+declare var onsuspend: ((this: Window, ev: Event) => any) | null;
+/**
+ * Occurs to indicate the current playback position.
+ * @param ev The event.
+ */
+declare var ontimeupdate: ((this: Window, ev: Event) => any) | null;
+declare var ontoggle: ((this: Window, ev: Event) => any) | null;
+declare var ontouchcancel: ((this: Window, ev: TouchEvent) => any) | null | undefined;
+declare var ontouchend: ((this: Window, ev: TouchEvent) => any) | null | undefined;
+declare var ontouchmove: ((this: Window, ev: TouchEvent) => any) | null | undefined;
+declare var ontouchstart: ((this: Window, ev: TouchEvent) => any) | null | undefined;
+declare var ontransitioncancel: ((this: Window, ev: TransitionEvent) => any) | null;
+declare var ontransitionend: ((this: Window, ev: TransitionEvent) => any) | null;
+declare var ontransitionrun: ((this: Window, ev: TransitionEvent) => any) | null;
+declare var ontransitionstart: ((this: Window, ev: TransitionEvent) => any) | null;
+/**
+ * Occurs when the volume is changed, or playback is muted or unmuted.
+ * @param ev The event.
+ */
+declare var onvolumechange: ((this: Window, ev: Event) => any) | null;
+/**
+ * Occurs when playback stops because the next frame of a video resource is not available.
+ * @param ev The event.
+ */
+declare var onwaiting: ((this: Window, ev: Event) => any) | null;
+/** @deprecated This is a legacy alias of `onanimationend`. */
+declare var onwebkitanimationend: ((this: Window, ev: Event) => any) | null;
+/** @deprecated This is a legacy alias of `onanimationiteration`. */
+declare var onwebkitanimationiteration: ((this: Window, ev: Event) => any) | null;
+/** @deprecated This is a legacy alias of `onanimationstart`. */
+declare var onwebkitanimationstart: ((this: Window, ev: Event) => any) | null;
+/** @deprecated This is a legacy alias of `ontransitionend`. */
+declare var onwebkittransitionend: ((this: Window, ev: Event) => any) | null;
+declare var onwheel: ((this: Window, ev: WheelEvent) => any) | null;
+declare var onafterprint: ((this: Window, ev: Event) => any) | null;
+declare var onbeforeprint: ((this: Window, ev: Event) => any) | null;
+declare var onbeforeunload: ((this: Window, ev: BeforeUnloadEvent) => any) | null;
+declare var ongamepadconnected: ((this: Window, ev: GamepadEvent) => any) | null;
+declare var ongamepaddisconnected: ((this: Window, ev: GamepadEvent) => any) | null;
+declare var onhashchange: ((this: Window, ev: HashChangeEvent) => any) | null;
+declare var onlanguagechange: ((this: Window, ev: Event) => any) | null;
+declare var onmessage: ((this: Window, ev: MessageEvent) => any) | null;
+declare var onmessageerror: ((this: Window, ev: MessageEvent) => any) | null;
+declare var onoffline: ((this: Window, ev: Event) => any) | null;
+declare var ononline: ((this: Window, ev: Event) => any) | null;
+declare var onpagehide: ((this: Window, ev: PageTransitionEvent) => any) | null;
+declare var onpageshow: ((this: Window, ev: PageTransitionEvent) => any) | null;
+declare var onpopstate: ((this: Window, ev: PopStateEvent) => any) | null;
+declare var onrejectionhandled: ((this: Window, ev: PromiseRejectionEvent) => any) | null;
+declare var onstorage: ((this: Window, ev: StorageEvent) => any) | null;
+declare var onunhandledrejection: ((this: Window, ev: PromiseRejectionEvent) => any) | null;
+declare var onunload: ((this: Window, ev: Event) => any) | null;
+declare var localStorage: Storage;
+/** Available only in secure contexts. */
+declare var caches: CacheStorage;
+declare var crossOriginIsolated: boolean;
+declare var crypto: Crypto;
+declare var indexedDB: IDBFactory;
+declare var isSecureContext: boolean;
+declare var origin: string;
+declare var performance: Performance;
+declare function atob(data: string): string;
+declare function btoa(data: string): string;
+declare function clearInterval(id: number | undefined): void;
+declare function clearTimeout(id: number | undefined): void;
+declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
+declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
+declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
+declare function queueMicrotask(callback: VoidFunction): void;
+declare function reportError(e: any): void;
+declare function setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
+declare function setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
+declare function structuredClone(value: any, options?: StructuredSerializeOptions): any;
+declare var sessionStorage: Storage;
+declare function addEventListener<K extends keyof WindowEventMap>(type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+declare function removeEventListener<K extends keyof WindowEventMap>(type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+declare function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+type AlgorithmIdentifier = Algorithm | string;
+type BigInteger = Uint8Array;
+type BinaryData = ArrayBuffer | ArrayBufferView;
+type BlobPart = BufferSource | Blob | string;
+type BodyInit = ReadableStream | XMLHttpRequestBodyInit;
+type BufferSource = ArrayBufferView | ArrayBuffer;
+type COSEAlgorithmIdentifier = number;
+type CSSNumberish = number;
+type CanvasImageSource = HTMLOrSVGImageElement | HTMLVideoElement | HTMLCanvasElement | ImageBitmap;
+type ClipboardItemData = Promise<string | Blob>;
+type ClipboardItems = ClipboardItem[];
+type ConstrainBoolean = boolean | ConstrainBooleanParameters;
+type ConstrainDOMString = string | string[] | ConstrainDOMStringParameters;
+type ConstrainDouble = number | ConstrainDoubleRange;
+type ConstrainULong = number | ConstrainULongRange;
+type DOMHighResTimeStamp = number;
+type EpochTimeStamp = number;
+type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
+type Float32List = Float32Array | GLfloat[];
+type FormDataEntryValue = File | string;
+type GLbitfield = number;
+type GLboolean = boolean;
+type GLclampf = number;
+type GLenum = number;
+type GLfloat = number;
+type GLint = number;
+type GLint64 = number;
+type GLintptr = number;
+type GLsizei = number;
+type GLsizeiptr = number;
+type GLuint = number;
+type GLuint64 = number;
+type HTMLOrSVGImageElement = HTMLImageElement | SVGImageElement;
+type HTMLOrSVGScriptElement = HTMLScriptElement | SVGScriptElement;
+type HashAlgorithmIdentifier = AlgorithmIdentifier;
+type HeadersInit = [string, string][] | Record<string, string> | Headers;
+type IDBValidKey = number | string | Date | BufferSource | IDBValidKey[];
+type ImageBitmapSource = CanvasImageSource | Blob | ImageData;
+type InsertPosition = "beforebegin" | "afterbegin" | "beforeend" | "afterend";
+type Int32List = Int32Array | GLint[];
+type LineAndPositionSetting = number | AutoKeyword;
+type MediaProvider = MediaStream | MediaSource | Blob;
+type MessageEventSource = WindowProxy | MessagePort | ServiceWorker;
+type MutationRecordType = "attributes" | "characterData" | "childList";
+type NamedCurve = string;
+type OnBeforeUnloadEventHandler = OnBeforeUnloadEventHandlerNonNull | null;
+type OnErrorEventHandler = OnErrorEventHandlerNonNull | null;
+type PerformanceEntryList = PerformanceEntry[];
+type ReadableStreamController<T> = ReadableStreamDefaultController<T>;
+type ReadableStreamReadResult<T> = ReadableStreamReadValueResult<T> | ReadableStreamReadDoneResult;
+type ReadableStreamReader<T> = ReadableStreamDefaultReader<T>;
+type RenderingContext = CanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext;
+type RequestInfo = Request | string;
+type TexImageSource = ImageBitmap | ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement;
+type TimerHandler = string | Function;
+type Transferable = ArrayBuffer | MessagePort | ImageBitmap;
+type Uint32List = Uint32Array | GLuint[];
+type UvmEntries = UvmEntry[];
+type UvmEntry = number[];
+type VibratePattern = number | number[];
+type WindowProxy = Window;
+type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string;
+type AlignSetting = "center" | "end" | "left" | "right" | "start";
+type AnimationPlayState = "finished" | "idle" | "paused" | "running";
+type AnimationReplaceState = "active" | "persisted" | "removed";
+type AppendMode = "segments" | "sequence";
+type AttestationConveyancePreference = "direct" | "enterprise" | "indirect" | "none";
+type AudioContextLatencyCategory = "balanced" | "interactive" | "playback";
+type AudioContextState = "closed" | "running" | "suspended";
+type AuthenticatorAttachment = "cross-platform" | "platform";
+type AuthenticatorTransport = "ble" | "internal" | "nfc" | "usb";
+type AutoKeyword = "auto";
+type AutomationRate = "a-rate" | "k-rate";
+type BinaryType = "arraybuffer" | "blob";
+type BiquadFilterType = "allpass" | "bandpass" | "highpass" | "highshelf" | "lowpass" | "lowshelf" | "notch" | "peaking";
+type CanPlayTypeResult = "" | "maybe" | "probably";
+type CanvasDirection = "inherit" | "ltr" | "rtl";
+type CanvasFillRule = "evenodd" | "nonzero";
+type CanvasFontKerning = "auto" | "none" | "normal";
+type CanvasFontStretch = "condensed" | "expanded" | "extra-condensed" | "extra-expanded" | "normal" | "semi-condensed" | "semi-expanded" | "ultra-condensed" | "ultra-expanded";
+type CanvasFontVariantCaps = "all-petite-caps" | "all-small-caps" | "normal" | "petite-caps" | "small-caps" | "titling-caps" | "unicase";
+type CanvasLineCap = "butt" | "round" | "square";
+type CanvasLineJoin = "bevel" | "miter" | "round";
+type CanvasTextAlign = "center" | "end" | "left" | "right" | "start";
+type CanvasTextBaseline = "alphabetic" | "bottom" | "hanging" | "ideographic" | "middle" | "top";
+type CanvasTextRendering = "auto" | "geometricPrecision" | "optimizeLegibility" | "optimizeSpeed";
+type ChannelCountMode = "clamped-max" | "explicit" | "max";
+type ChannelInterpretation = "discrete" | "speakers";
+type ClientTypes = "all" | "sharedworker" | "window" | "worker";
+type ColorGamut = "p3" | "rec2020" | "srgb";
+type ColorSpaceConversion = "default" | "none";
+type CompositeOperation = "accumulate" | "add" | "replace";
+type CompositeOperationOrAuto = "accumulate" | "add" | "auto" | "replace";
+type CredentialMediationRequirement = "optional" | "required" | "silent";
+type DOMParserSupportedType = "application/xhtml+xml" | "application/xml" | "image/svg+xml" | "text/html" | "text/xml";
+type DirectionSetting = "" | "lr" | "rl";
+type DisplayCaptureSurfaceType = "browser" | "monitor" | "window";
+type DistanceModelType = "exponential" | "inverse" | "linear";
+type DocumentReadyState = "complete" | "interactive" | "loading";
+type DocumentVisibilityState = "hidden" | "visible";
+type EndOfStreamError = "decode" | "network";
+type EndingType = "native" | "transparent";
+type FileSystemHandleKind = "directory" | "file";
+type FillMode = "auto" | "backwards" | "both" | "forwards" | "none";
+type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
+type FontFaceSetLoadStatus = "loaded" | "loading";
+type FullscreenNavigationUI = "auto" | "hide" | "show";
+type GamepadHapticActuatorType = "vibration";
+type GamepadMappingType = "" | "standard" | "xr-standard";
+type GlobalCompositeOperation = "color" | "color-burn" | "color-dodge" | "copy" | "darken" | "destination-atop" | "destination-in" | "destination-out" | "destination-over" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "lighter" | "luminosity" | "multiply" | "overlay" | "saturation" | "screen" | "soft-light" | "source-atop" | "source-in" | "source-out" | "source-over" | "xor";
+type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40";
+type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique";
+type IDBRequestReadyState = "done" | "pending";
+type IDBTransactionDurability = "default" | "relaxed" | "strict";
+type IDBTransactionMode = "readonly" | "readwrite" | "versionchange";
+type ImageOrientation = "flipY" | "none";
+type ImageSmoothingQuality = "high" | "low" | "medium";
+type IterationCompositeOperation = "accumulate" | "replace";
+type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki";
+type KeyType = "private" | "public" | "secret";
+type KeyUsage = "decrypt" | "deriveBits" | "deriveKey" | "encrypt" | "sign" | "unwrapKey" | "verify" | "wrapKey";
+type LineAlignSetting = "center" | "end" | "start";
+type LockMode = "exclusive" | "shared";
+type MediaDecodingType = "file" | "media-source" | "webrtc";
+type MediaDeviceKind = "audioinput" | "audiooutput" | "videoinput";
+type MediaEncodingType = "record" | "webrtc";
+type MediaKeyMessageType = "individualization-request" | "license-release" | "license-renewal" | "license-request";
+type MediaKeySessionClosedReason = "closed-by-application" | "hardware-context-reset" | "internal-error" | "release-acknowledged" | "resource-evicted";
+type MediaKeySessionType = "persistent-license" | "temporary";
+type MediaKeyStatus = "expired" | "internal-error" | "output-downscaled" | "output-restricted" | "released" | "status-pending" | "usable" | "usable-in-future";
+type MediaKeysRequirement = "not-allowed" | "optional" | "required";
+type MediaSessionAction = "hangup" | "nexttrack" | "pause" | "play" | "previoustrack" | "seekbackward" | "seekforward" | "seekto" | "skipad" | "stop" | "togglecamera" | "togglemicrophone";
+type MediaSessionPlaybackState = "none" | "paused" | "playing";
+type MediaStreamTrackState = "ended" | "live";
+type NavigationTimingType = "back_forward" | "navigate" | "prerender" | "reload";
+type NotificationDirection = "auto" | "ltr" | "rtl";
+type NotificationPermission = "default" | "denied" | "granted";
+type OrientationLockType = "any" | "landscape" | "landscape-primary" | "landscape-secondary" | "natural" | "portrait" | "portrait-primary" | "portrait-secondary";
+type OrientationType = "landscape-primary" | "landscape-secondary" | "portrait-primary" | "portrait-secondary";
+type OscillatorType = "custom" | "sawtooth" | "sine" | "square" | "triangle";
+type OverSampleType = "2x" | "4x" | "none";
+type PanningModelType = "HRTF" | "equalpower";
+type PaymentComplete = "fail" | "success" | "unknown";
+type PermissionName = "geolocation" | "notifications" | "persistent-storage" | "push" | "screen-wake-lock" | "xr-spatial-tracking";
+type PermissionState = "denied" | "granted" | "prompt";
+type PlaybackDirection = "alternate" | "alternate-reverse" | "normal" | "reverse";
+type PositionAlignSetting = "auto" | "center" | "line-left" | "line-right";
+type PredefinedColorSpace = "display-p3" | "srgb";
+type PremultiplyAlpha = "default" | "none" | "premultiply";
+type PresentationStyle = "attachment" | "inline" | "unspecified";
+type PublicKeyCredentialType = "public-key";
+type PushEncryptionKeyName = "auth" | "p256dh";
+type RTCBundlePolicy = "balanced" | "max-bundle" | "max-compat";
+type RTCDataChannelState = "closed" | "closing" | "connecting" | "open";
+type RTCDegradationPreference = "balanced" | "maintain-framerate" | "maintain-resolution";
+type RTCDtlsTransportState = "closed" | "connected" | "connecting" | "failed" | "new";
+type RTCEncodedVideoFrameType = "delta" | "empty" | "key";
+type RTCErrorDetailType = "data-channel-failure" | "dtls-failure" | "fingerprint-failure" | "hardware-encoder-error" | "hardware-encoder-not-available" | "sctp-failure" | "sdp-syntax-error";
+type RTCIceCandidateType = "host" | "prflx" | "relay" | "srflx";
+type RTCIceComponent = "rtcp" | "rtp";
+type RTCIceConnectionState = "checking" | "closed" | "completed" | "connected" | "disconnected" | "failed" | "new";
+type RTCIceCredentialType = "password";
+type RTCIceGathererState = "complete" | "gathering" | "new";
+type RTCIceGatheringState = "complete" | "gathering" | "new";
+type RTCIceProtocol = "tcp" | "udp";
+type RTCIceTcpCandidateType = "active" | "passive" | "so";
+type RTCIceTransportPolicy = "all" | "relay";
+type RTCIceTransportState = "checking" | "closed" | "completed" | "connected" | "disconnected" | "failed" | "new";
+type RTCPeerConnectionState = "closed" | "connected" | "connecting" | "disconnected" | "failed" | "new";
+type RTCPriorityType = "high" | "low" | "medium" | "very-low";
+type RTCRtcpMuxPolicy = "require";
+type RTCRtpTransceiverDirection = "inactive" | "recvonly" | "sendonly" | "sendrecv" | "stopped";
+type RTCSctpTransportState = "closed" | "connected" | "connecting";
+type RTCSdpType = "answer" | "offer" | "pranswer" | "rollback";
+type RTCSignalingState = "closed" | "have-local-offer" | "have-local-pranswer" | "have-remote-offer" | "have-remote-pranswer" | "stable";
+type RTCStatsIceCandidatePairState = "failed" | "frozen" | "in-progress" | "inprogress" | "succeeded" | "waiting";
+type RTCStatsType = "candidate-pair" | "certificate" | "codec" | "csrc" | "data-channel" | "inbound-rtp" | "local-candidate" | "media-source" | "outbound-rtp" | "peer-connection" | "remote-candidate" | "remote-inbound-rtp" | "remote-outbound-rtp" | "track" | "transport";
+type ReadyState = "closed" | "ended" | "open";
+type RecordingState = "inactive" | "paused" | "recording";
+type ReferrerPolicy = "" | "no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url";
+type RemotePlaybackState = "connected" | "connecting" | "disconnected";
+type RequestCache = "default" | "force-cache" | "no-cache" | "no-store" | "only-if-cached" | "reload";
+type RequestCredentials = "include" | "omit" | "same-origin";
+type RequestDestination = "" | "audio" | "audioworklet" | "document" | "embed" | "font" | "frame" | "iframe" | "image" | "manifest" | "object" | "paintworklet" | "report" | "script" | "sharedworker" | "style" | "track" | "video" | "worker" | "xslt";
+type RequestMode = "cors" | "navigate" | "no-cors" | "same-origin";
+type RequestRedirect = "error" | "follow" | "manual";
+type ResidentKeyRequirement = "discouraged" | "preferred" | "required";
+type ResizeObserverBoxOptions = "border-box" | "content-box" | "device-pixel-content-box";
+type ResizeQuality = "high" | "low" | "medium" | "pixelated";
+type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect";
+type ScrollBehavior = "auto" | "smooth";
+type ScrollLogicalPosition = "center" | "end" | "nearest" | "start";
+type ScrollRestoration = "auto" | "manual";
+type ScrollSetting = "" | "up";
+type SecurityPolicyViolationEventDisposition = "enforce" | "report";
+type SelectionMode = "end" | "preserve" | "select" | "start";
+type ServiceWorkerState = "activated" | "activating" | "installed" | "installing" | "parsed" | "redundant";
+type ServiceWorkerUpdateViaCache = "all" | "imports" | "none";
+type ShadowRootMode = "closed" | "open";
+type SlotAssignmentMode = "manual" | "named";
+type SpeechSynthesisErrorCode = "audio-busy" | "audio-hardware" | "canceled" | "interrupted" | "invalid-argument" | "language-unavailable" | "network" | "not-allowed" | "synthesis-failed" | "synthesis-unavailable" | "text-too-long" | "voice-unavailable";
+type TextTrackKind = "captions" | "chapters" | "descriptions" | "metadata" | "subtitles";
+type TextTrackMode = "disabled" | "hidden" | "showing";
+type TouchType = "direct" | "stylus";
+type TransferFunction = "hlg" | "pq" | "srgb";
+type UserVerificationRequirement = "discouraged" | "preferred" | "required";
+type VideoColorPrimaries = "bt470bg" | "bt709" | "smpte170m";
+type VideoFacingModeEnum = "environment" | "left" | "right" | "user";
+type VideoMatrixCoefficients = "bt470bg" | "bt709" | "rgb" | "smpte170m";
+type VideoTransferCharacteristics = "bt709" | "iec61966-2-1" | "smpte170m";
+type WebGLPowerPreference = "default" | "high-performance" | "low-power";
+type WorkerType = "classic" | "module";
+type XMLHttpRequestResponseType = "" | "arraybuffer" | "blob" | "document" | "json" | "text";
diff --git a/cli/tsc/dts/lib.dom.extras.d.ts b/cli/tsc/dts/lib.dom.extras.d.ts
new file mode 100644
index 000000000..b80435a78
--- /dev/null
+++ b/cli/tsc/dts/lib.dom.extras.d.ts
@@ -0,0 +1,149 @@
+// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
+
+/*
+ * This library contains DOM standards that are not currently included in the
+ * distributed `lib.dom.d.ts` file with TypeScript.
+ */
+
+/// <reference no-default-lib="true"/>
+
+declare interface URLPatternInit {
+ protocol?: string;
+ username?: string;
+ password?: string;
+ hostname?: string;
+ port?: string;
+ pathname?: string;
+ search?: string;
+ hash?: string;
+ baseURL?: string;
+}
+
+declare type URLPatternInput = string | URLPatternInit;
+
+declare interface URLPatternComponentResult {
+ input: string;
+ groups: Record<string, string>;
+}
+
+/** `URLPatternResult` is the object returned from `URLPattern.exec`. */
+declare interface URLPatternResult {
+ /** The inputs provided when matching. */
+ inputs: [URLPatternInit] | [URLPatternInit, string];
+
+ /** The matched result for the `protocol` matcher. */
+ protocol: URLPatternComponentResult;
+ /** The matched result for the `username` matcher. */
+ username: URLPatternComponentResult;
+ /** The matched result for the `password` matcher. */
+ password: URLPatternComponentResult;
+ /** The matched result for the `hostname` matcher. */
+ hostname: URLPatternComponentResult;
+ /** The matched result for the `port` matcher. */
+ port: URLPatternComponentResult;
+ /** The matched result for the `pathname` matcher. */
+ pathname: URLPatternComponentResult;
+ /** The matched result for the `search` matcher. */
+ search: URLPatternComponentResult;
+ /** The matched result for the `hash` matcher. */
+ hash: URLPatternComponentResult;
+}
+
+/**
+ * The URLPattern API provides a web platform primitive for matching URLs based
+ * on a convenient pattern syntax.
+ *
+ * The syntax is based on path-to-regexp. Wildcards, named capture groups,
+ * regular groups, and group modifiers are all supported.
+ *
+ * ```ts
+ * // Specify the pattern as structured data.
+ * const pattern = new URLPattern({ pathname: "/users/:user" });
+ * const match = pattern.exec("/users/joe");
+ * console.log(match.pathname.groups.user); // joe
+ * ```
+ *
+ * ```ts
+ * // Specify a fully qualified string pattern.
+ * const pattern = new URLPattern("https://example.com/books/:id");
+ * console.log(pattern.test("https://example.com/books/123")); // true
+ * console.log(pattern.test("https://deno.land/books/123")); // false
+ * ```
+ *
+ * ```ts
+ * // Specify a relative string pattern with a base URL.
+ * const pattern = new URLPattern("/:article", "https://blog.example.com");
+ * console.log(pattern.test("https://blog.example.com/article")); // true
+ * console.log(pattern.test("https://blog.example.com/article/123")); // false
+ * ```
+ */
+declare class URLPattern {
+ constructor(input: URLPatternInput, baseURL?: string);
+
+ /**
+ * Test if the given input matches the stored pattern.
+ *
+ * The input can either be provided as a url string (with an optional base),
+ * or as individual components in the form of an object.
+ *
+ * ```ts
+ * const pattern = new URLPattern("https://example.com/books/:id");
+ *
+ * // Test a url string.
+ * console.log(pattern.test("https://example.com/books/123")); // true
+ *
+ * // Test a relative url with a base.
+ * console.log(pattern.test("/books/123", "https://example.com")); // true
+ *
+ * // Test an object of url components.
+ * console.log(pattern.test({ pathname: "/books/123" })); // true
+ * ```
+ */
+ test(input: URLPatternInput, baseURL?: string): boolean;
+
+ /**
+ * Match the given input against the stored pattern.
+ *
+ * The input can either be provided as a url string (with an optional base),
+ * or as individual components in the form of an object.
+ *
+ * ```ts
+ * const pattern = new URLPattern("https://example.com/books/:id");
+ *
+ * // Match a url string.
+ * let match = pattern.exec("https://example.com/books/123");
+ * console.log(match.pathname.groups.id); // 123
+ *
+ * // Match a relative url with a base.
+ * match = pattern.exec("/books/123", "https://example.com");
+ * console.log(match.pathname.groups.id); // 123
+ *
+ * // Match an object of url components.
+ * match = pattern.exec({ pathname: "/books/123" });
+ * console.log(match.pathname.groups.id); // 123
+ * ```
+ */
+ exec(input: URLPatternInput, baseURL?: string): URLPatternResult | null;
+
+ /** The pattern string for the `protocol`. */
+ readonly protocol: string;
+ /** The pattern string for the `username`. */
+ readonly username: string;
+ /** The pattern string for the `password`. */
+ readonly password: string;
+ /** The pattern string for the `hostname`. */
+ readonly hostname: string;
+ /** The pattern string for the `port`. */
+ readonly port: string;
+ /** The pattern string for the `pathname`. */
+ readonly pathname: string;
+ /** The pattern string for the `search`. */
+ readonly search: string;
+ /** The pattern string for the `hash`. */
+ readonly hash: string;
+}
+
+interface ErrorConstructor {
+ /** See https://v8.dev/docs/stack-trace-api#stack-trace-collection-for-custom-exceptions. */
+ captureStackTrace(error: Object, constructor?: Function): void;
+}
diff --git a/cli/tsc/dts/lib.dom.iterable.d.ts b/cli/tsc/dts/lib.dom.iterable.d.ts
new file mode 100644
index 000000000..cde428dfc
--- /dev/null
+++ b/cli/tsc/dts/lib.dom.iterable.d.ts
@@ -0,0 +1,337 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/////////////////////////////
+/// Window Iterable APIs
+/////////////////////////////
+
+interface AudioParam {
+ setValueCurveAtTime(values: Iterable<number>, startTime: number, duration: number): AudioParam;
+}
+
+interface AudioParamMap extends ReadonlyMap<string, AudioParam> {
+}
+
+interface BaseAudioContext {
+ createIIRFilter(feedforward: Iterable<number>, feedback: Iterable<number>): IIRFilterNode;
+ createPeriodicWave(real: Iterable<number>, imag: Iterable<number>, constraints?: PeriodicWaveConstraints): PeriodicWave;
+}
+
+interface CSSRuleList {
+ [Symbol.iterator](): IterableIterator<CSSRule>;
+}
+
+interface CSSStyleDeclaration {
+ [Symbol.iterator](): IterableIterator<string>;
+}
+
+interface Cache {
+ addAll(requests: Iterable<RequestInfo>): Promise<void>;
+}
+
+interface CanvasPathDrawingStyles {
+ setLineDash(segments: Iterable<number>): void;
+}
+
+interface DOMRectList {
+ [Symbol.iterator](): IterableIterator<DOMRect>;
+}
+
+interface DOMStringList {
+ [Symbol.iterator](): IterableIterator<string>;
+}
+
+interface DOMTokenList {
+ [Symbol.iterator](): IterableIterator<string>;
+ entries(): IterableIterator<[number, string]>;
+ keys(): IterableIterator<number>;
+ values(): IterableIterator<string>;
+}
+
+interface DataTransferItemList {
+ [Symbol.iterator](): IterableIterator<DataTransferItem>;
+}
+
+interface EventCounts extends ReadonlyMap<string, number> {
+}
+
+interface FileList {
+ [Symbol.iterator](): IterableIterator<File>;
+}
+
+interface FontFaceSet extends Set<FontFace> {
+}
+
+interface FormData {
+ [Symbol.iterator](): IterableIterator<[string, FormDataEntryValue]>;
+ /** Returns an array of key, value pairs for every entry in the list. */
+ entries(): IterableIterator<[string, FormDataEntryValue]>;
+ /** Returns a list of keys in the list. */
+ keys(): IterableIterator<string>;
+ /** Returns a list of values in the list. */
+ values(): IterableIterator<FormDataEntryValue>;
+}
+
+interface HTMLAllCollection {
+ [Symbol.iterator](): IterableIterator<Element>;
+}
+
+interface HTMLCollectionBase {
+ [Symbol.iterator](): IterableIterator<Element>;
+}
+
+interface HTMLCollectionOf<T extends Element> {
+ [Symbol.iterator](): IterableIterator<T>;
+}
+
+interface HTMLFormElement {
+ [Symbol.iterator](): IterableIterator<Element>;
+}
+
+interface HTMLSelectElement {
+ [Symbol.iterator](): IterableIterator<HTMLOptionElement>;
+}
+
+interface Headers {
+ [Symbol.iterator](): IterableIterator<[string, string]>;
+ /** Returns an iterator allowing to go through all key/value pairs contained in this object. */
+ entries(): IterableIterator<[string, string]>;
+ /** Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. */
+ keys(): IterableIterator<string>;
+ /** Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */
+ values(): IterableIterator<string>;
+}
+
+interface IDBDatabase {
+ /** Returns a new transaction with the given mode ("readonly" or "readwrite") and scope which can be a single object store name or an array of names. */
+ transaction(storeNames: string | Iterable<string>, mode?: IDBTransactionMode, options?: IDBTransactionOptions): IDBTransaction;
+}
+
+interface IDBObjectStore {
+ /**
+ * Creates a new index in store with the given name, keyPath and options and returns a new IDBIndex. If the keyPath and options define constraints that cannot be satisfied with the data already in store the upgrade transaction will abort with a "ConstraintError" DOMException.
+ *
+ * Throws an "InvalidStateError" DOMException if not called within an upgrade transaction.
+ */
+ createIndex(name: string, keyPath: string | Iterable<string>, options?: IDBIndexParameters): IDBIndex;
+}
+
+interface MediaKeyStatusMap {
+ [Symbol.iterator](): IterableIterator<[BufferSource, MediaKeyStatus]>;
+ entries(): IterableIterator<[BufferSource, MediaKeyStatus]>;
+ keys(): IterableIterator<BufferSource>;
+ values(): IterableIterator<MediaKeyStatus>;
+}
+
+interface MediaList {
+ [Symbol.iterator](): IterableIterator<string>;
+}
+
+interface MessageEvent<T = any> {
+ /** @deprecated */
+ initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable<MessagePort>): void;
+}
+
+interface MimeTypeArray {
+ [Symbol.iterator](): IterableIterator<MimeType>;
+}
+
+interface NamedNodeMap {
+ [Symbol.iterator](): IterableIterator<Attr>;
+}
+
+interface Navigator {
+ /** Available only in secure contexts. */
+ requestMediaKeySystemAccess(keySystem: string, supportedConfigurations: Iterable<MediaKeySystemConfiguration>): Promise<MediaKeySystemAccess>;
+ vibrate(pattern: Iterable<number>): boolean;
+}
+
+interface NodeList {
+ [Symbol.iterator](): IterableIterator<Node>;
+ /** Returns an array of key, value pairs for every entry in the list. */
+ entries(): IterableIterator<[number, Node]>;
+ /** Returns an list of keys in the list. */
+ keys(): IterableIterator<number>;
+ /** Returns an list of values in the list. */
+ values(): IterableIterator<Node>;
+}
+
+interface NodeListOf<TNode extends Node> {
+ [Symbol.iterator](): IterableIterator<TNode>;
+ /** Returns an array of key, value pairs for every entry in the list. */
+ entries(): IterableIterator<[number, TNode]>;
+ /** Returns an list of keys in the list. */
+ keys(): IterableIterator<number>;
+ /** Returns an list of values in the list. */
+ values(): IterableIterator<TNode>;
+}
+
+interface Plugin {
+ [Symbol.iterator](): IterableIterator<MimeType>;
+}
+
+interface PluginArray {
+ [Symbol.iterator](): IterableIterator<Plugin>;
+}
+
+interface RTCRtpTransceiver {
+ setCodecPreferences(codecs: Iterable<RTCRtpCodecCapability>): void;
+}
+
+interface RTCStatsReport extends ReadonlyMap<string, any> {
+}
+
+interface SVGLengthList {
+ [Symbol.iterator](): IterableIterator<SVGLength>;
+}
+
+interface SVGNumberList {
+ [Symbol.iterator](): IterableIterator<SVGNumber>;
+}
+
+interface SVGPointList {
+ [Symbol.iterator](): IterableIterator<DOMPoint>;
+}
+
+interface SVGStringList {
+ [Symbol.iterator](): IterableIterator<string>;
+}
+
+interface SVGTransformList {
+ [Symbol.iterator](): IterableIterator<SVGTransform>;
+}
+
+interface SourceBufferList {
+ [Symbol.iterator](): IterableIterator<SourceBuffer>;
+}
+
+interface SpeechRecognitionResult {
+ [Symbol.iterator](): IterableIterator<SpeechRecognitionAlternative>;
+}
+
+interface SpeechRecognitionResultList {
+ [Symbol.iterator](): IterableIterator<SpeechRecognitionResult>;
+}
+
+interface StyleSheetList {
+ [Symbol.iterator](): IterableIterator<CSSStyleSheet>;
+}
+
+interface SubtleCrypto {
+ deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
+ generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKeyPair>;
+ generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
+ generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKeyPair | CryptoKey>;
+ importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
+ importKey(format: Exclude<KeyFormat, "jwk">, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
+ unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
+}
+
+interface TextTrackCueList {
+ [Symbol.iterator](): IterableIterator<TextTrackCue>;
+}
+
+interface TextTrackList {
+ [Symbol.iterator](): IterableIterator<TextTrack>;
+}
+
+interface TouchList {
+ [Symbol.iterator](): IterableIterator<Touch>;
+}
+
+interface URLSearchParams {
+ [Symbol.iterator](): IterableIterator<[string, string]>;
+ /** Returns an array of key, value pairs for every entry in the search params. */
+ entries(): IterableIterator<[string, string]>;
+ /** Returns a list of keys in the search params. */
+ keys(): IterableIterator<string>;
+ /** Returns a list of values in the search params. */
+ values(): IterableIterator<string>;
+}
+
+interface WEBGL_draw_buffers {
+ drawBuffersWEBGL(buffers: Iterable<GLenum>): void;
+}
+
+interface WEBGL_multi_draw {
+ multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | Iterable<GLint>, firstsOffset: GLuint, countsList: Int32Array | Iterable<GLsizei>, countsOffset: GLuint, instanceCountsList: Int32Array | Iterable<GLsizei>, instanceCountsOffset: GLuint, drawcount: GLsizei): void;
+ multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | Iterable<GLint>, firstsOffset: GLuint, countsList: Int32Array | Iterable<GLsizei>, countsOffset: GLuint, drawcount: GLsizei): void;
+ multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | Iterable<GLint>, countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | Iterable<GLsizei>, offsetsOffset: GLuint, instanceCountsList: Int32Array | Iterable<GLsizei>, instanceCountsOffset: GLuint, drawcount: GLsizei): void;
+ multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | Iterable<GLint>, countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | Iterable<GLsizei>, offsetsOffset: GLuint, drawcount: GLsizei): void;
+}
+
+interface WebGL2RenderingContextBase {
+ clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLfloat>, srcOffset?: GLuint): void;
+ clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLint>, srcOffset?: GLuint): void;
+ clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLuint>, srcOffset?: GLuint): void;
+ drawBuffers(buffers: Iterable<GLenum>): void;
+ getActiveUniforms(program: WebGLProgram, uniformIndices: Iterable<GLuint>, pname: GLenum): any;
+ getUniformIndices(program: WebGLProgram, uniformNames: Iterable<string>): Iterable<GLuint> | null;
+ invalidateFramebuffer(target: GLenum, attachments: Iterable<GLenum>): void;
+ invalidateSubFramebuffer(target: GLenum, attachments: Iterable<GLenum>, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
+ transformFeedbackVaryings(program: WebGLProgram, varyings: Iterable<string>, bufferMode: GLenum): void;
+ uniform1uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform2uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform3uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform4uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ vertexAttribI4iv(index: GLuint, values: Iterable<GLint>): void;
+ vertexAttribI4uiv(index: GLuint, values: Iterable<GLuint>): void;
+}
+
+interface WebGL2RenderingContextOverloads {
+ uniform1fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform1iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform2fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform2iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform3fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform3iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform4fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform4iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
+}
+
+interface WebGLRenderingContextBase {
+ vertexAttrib1fv(index: GLuint, values: Iterable<GLfloat>): void;
+ vertexAttrib2fv(index: GLuint, values: Iterable<GLfloat>): void;
+ vertexAttrib3fv(index: GLuint, values: Iterable<GLfloat>): void;
+ vertexAttrib4fv(index: GLuint, values: Iterable<GLfloat>): void;
+}
+
+interface WebGLRenderingContextOverloads {
+ uniform1fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void;
+ uniform1iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void;
+ uniform2fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void;
+ uniform2iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void;
+ uniform3fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void;
+ uniform3iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void;
+ uniform4fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void;
+ uniform4iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void;
+ uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable<GLfloat>): void;
+ uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable<GLfloat>): void;
+ uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable<GLfloat>): void;
+}
diff --git a/cli/tsc/dts/lib.es2015.collection.d.ts b/cli/tsc/dts/lib.es2015.collection.d.ts
new file mode 100644
index 000000000..c2e7733ae
--- /dev/null
+++ b/cli/tsc/dts/lib.es2015.collection.d.ts
@@ -0,0 +1,150 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface Map<K, V> {
+
+ 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<K, V>) => 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<any, any>;
+ new <K, V>(entries?: readonly (readonly [K, V])[] | null): Map<K, V>;
+ readonly prototype: Map<any, any>;
+}
+declare var Map: MapConstructor;
+
+interface ReadonlyMap<K, V> {
+ forEach(callbackfn: (value: V, key: K, map: ReadonlyMap<K, V>) => void, thisArg?: any): void;
+ get(key: K): V | undefined;
+ has(key: K): boolean;
+ readonly size: number;
+}
+
+interface WeakMap<K extends object, V> {
+ /**
+ * 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.
+ */
+ set(key: K, value: V): this;
+}
+
+interface WeakMapConstructor {
+ new <K extends object = object, V = any>(entries?: readonly [K, V][] | null): WeakMap<K, V>;
+ readonly prototype: WeakMap<object, any>;
+}
+declare var WeakMap: WeakMapConstructor;
+
+interface Set<T> {
+ /**
+ * Appends a new element with a specified value to the end of the Set.
+ */
+ add(value: T): this;
+
+ 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<T>) => 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 Set.
+ */
+ readonly size: number;
+}
+
+interface SetConstructor {
+ new <T = any>(values?: readonly T[] | null): Set<T>;
+ readonly prototype: Set<any>;
+}
+declare var Set: SetConstructor;
+
+interface ReadonlySet<T> {
+ forEach(callbackfn: (value: T, value2: T, set: ReadonlySet<T>) => void, thisArg?: any): void;
+ has(value: T): boolean;
+ readonly size: number;
+}
+
+interface WeakSet<T extends object> {
+ /**
+ * Appends a new object 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 an object exists in the WeakSet or not.
+ */
+ has(value: T): boolean;
+}
+
+interface WeakSetConstructor {
+ new <T extends object = object>(values?: readonly T[] | null): WeakSet<T>;
+ readonly prototype: WeakSet<object>;
+}
+declare var WeakSet: WeakSetConstructor;
diff --git a/cli/tsc/dts/lib.es2015.core.d.ts b/cli/tsc/dts/lib.es2015.core.d.ts
new file mode 100644
index 000000000..e55dc65c8
--- /dev/null
+++ b/cli/tsc/dts/lib.es2015.core.d.ts
@@ -0,0 +1,559 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface Array<T> {
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find<S extends T>(predicate: (this: void, value: T, index: number, obj: T[]) => value is S, thisArg?: any): S | undefined;
+ find(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): T | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): number;
+
+ /**
+ * 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;
+}
+
+interface ArrayConstructor {
+ /**
+ * Creates an array from an array-like object.
+ * @param arrayLike An array-like object to convert to an array.
+ */
+ from<T>(arrayLike: ArrayLike<T>): T[];
+
+ /**
+ * Creates an array from an iterable object.
+ * @param arrayLike An array-like object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of<T>(...items: T[]): T[];
+}
+
+interface DateConstructor {
+ new (value: number | string | Date): Date;
+}
+
+interface Function {
+ /**
+ * Returns the name of the function. Function names are read-only and can not be changed.
+ */
+ readonly name: string;
+}
+
+interface Math {
+ /**
+ * Returns the number of leading zero bits in the 32-bit binary representation of a number.
+ * @param x A numeric expression.
+ */
+ clz32(x: number): number;
+
+ /**
+ * Returns the result of 32-bit multiplication of two numbers.
+ * @param x First number
+ * @param y Second number
+ */
+ imul(x: number, y: number): number;
+
+ /**
+ * Returns the sign of the x, indicating whether x is positive, negative or zero.
+ * @param x The numeric expression to test
+ */
+ sign(x: number): number;
+
+ /**
+ * Returns the base 10 logarithm of a number.
+ * @param x A numeric expression.
+ */
+ log10(x: number): number;
+
+ /**
+ * Returns the base 2 logarithm of a number.
+ * @param x A numeric expression.
+ */
+ log2(x: number): number;
+
+ /**
+ * Returns the natural logarithm of 1 + x.
+ * @param x A numeric expression.
+ */
+ log1p(x: number): number;
+
+ /**
+ * Returns the result of (e^x - 1), which is an implementation-dependent approximation to
+ * subtracting 1 from the exponential function of x (e raised to the power of x, where e
+ * is the base of the natural logarithms).
+ * @param x A numeric expression.
+ */
+ expm1(x: number): number;
+
+ /**
+ * Returns the hyperbolic cosine of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ cosh(x: number): number;
+
+ /**
+ * Returns the hyperbolic sine of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ sinh(x: number): number;
+
+ /**
+ * Returns the hyperbolic tangent of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ tanh(x: number): number;
+
+ /**
+ * Returns the inverse hyperbolic cosine of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ acosh(x: number): number;
+
+ /**
+ * Returns the inverse hyperbolic sine of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ asinh(x: number): number;
+
+ /**
+ * Returns the inverse hyperbolic tangent of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ atanh(x: number): number;
+
+ /**
+ * Returns the square root of the sum of squares of its arguments.
+ * @param values Values to compute the square root for.
+ * If no arguments are passed, the result is +0.
+ * If there is only one argument, the result is the absolute value.
+ * If any argument is +Infinity or -Infinity, the result is +Infinity.
+ * If any argument is NaN, the result is NaN.
+ * If all arguments are either +0 or −0, the result is +0.
+ */
+ hypot(...values: number[]): number;
+
+ /**
+ * Returns the integral part of the a numeric expression, x, removing any fractional digits.
+ * If x is already an integer, the result is x.
+ * @param x A numeric expression.
+ */
+ trunc(x: number): number;
+
+ /**
+ * Returns the nearest single precision float representation of a number.
+ * @param x A numeric expression.
+ */
+ fround(x: number): number;
+
+ /**
+ * Returns an implementation-dependent approximation to the cube root of number.
+ * @param x A numeric expression.
+ */
+ cbrt(x: number): number;
+}
+
+interface NumberConstructor {
+ /**
+ * The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1
+ * that is representable as a Number value, which is approximately:
+ * 2.2204460492503130808472633361816 x 10‍−‍16.
+ */
+ readonly EPSILON: number;
+
+ /**
+ * Returns true if passed value is finite.
+ * Unlike the global isFinite, Number.isFinite doesn't forcibly convert the parameter to a
+ * number. Only finite values of the type number, result in true.
+ * @param number A numeric value.
+ */
+ isFinite(number: unknown): boolean;
+
+ /**
+ * Returns true if the value passed is an integer, false otherwise.
+ * @param number A numeric value.
+ */
+ isInteger(number: unknown): boolean;
+
+ /**
+ * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a
+ * number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter
+ * to a number. Only values of the type number, that are also NaN, result in true.
+ * @param number A numeric value.
+ */
+ isNaN(number: unknown): boolean;
+
+ /**
+ * Returns true if the value passed is a safe integer.
+ * @param number A numeric value.
+ */
+ isSafeInteger(number: unknown): boolean;
+
+ /**
+ * The value of the largest integer n such that n and n + 1 are both exactly representable as
+ * a Number value.
+ * The value of Number.MAX_SAFE_INTEGER is 9007199254740991 2^53 − 1.
+ */
+ readonly MAX_SAFE_INTEGER: number;
+
+ /**
+ * The value of the smallest integer n such that n and n − 1 are both exactly representable as
+ * a Number value.
+ * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)).
+ */
+ readonly MIN_SAFE_INTEGER: number;
+
+ /**
+ * Converts a string to a floating-point number.
+ * @param string A string that contains a floating-point number.
+ */
+ parseFloat(string: string): number;
+
+ /**
+ * Converts A string to an integer.
+ * @param 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<T extends {}, U>(target: T, source: U): T & U;
+
+ /**
+ * Copy the values of all of the enumerable own properties from one or more source objects to a
+ * target object. Returns the target object.
+ * @param target The target object to copy to.
+ * @param source1 The first source object from which to copy properties.
+ * @param source2 The second source object from which to copy properties.
+ */
+ assign<T extends {}, U, V>(target: T, source1: U, source2: V): T & U & V;
+
+ /**
+ * Copy the values of all of the enumerable own properties from one or more source objects to a
+ * target object. Returns the target object.
+ * @param target The target object to copy to.
+ * @param source1 The first source object from which to copy properties.
+ * @param source2 The second source object from which to copy properties.
+ * @param source3 The third source object from which to copy properties.
+ */
+ assign<T extends {}, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W;
+
+ /**
+ * Copy the values of all of the enumerable own properties from one or more source objects to a
+ * target object. Returns the target object.
+ * @param target The target object to copy to.
+ * @param sources One or more source objects from which to copy properties
+ */
+ assign(target: object, ...sources: any[]): any;
+
+ /**
+ * Returns an array of all symbol properties found directly on object o.
+ * @param o Object to retrieve the symbols from.
+ */
+ getOwnPropertySymbols(o: any): symbol[];
+
+ /**
+ * Returns the names of the enumerable string properties and methods of an object.
+ * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
+ */
+ keys(o: {}): string[];
+
+ /**
+ * Returns true if the values are the same value, false otherwise.
+ * @param value1 The first value.
+ * @param value2 The second value.
+ */
+ is(value1: any, value2: any): boolean;
+
+ /**
+ * Sets the prototype of a specified object o to object proto or null. Returns the object o.
+ * @param o The object to change its prototype.
+ * @param proto The value of the new prototype or null.
+ */
+ setPrototypeOf(o: any, proto: object | null): any;
+}
+
+interface ReadonlyArray<T> {
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find<S extends T>(predicate: (this: void, value: T, index: number, obj: readonly T[]) => value is S, thisArg?: any): S | undefined;
+ find(predicate: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): T | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): number;
+}
+
+interface RegExp {
+ /**
+ * Returns a string indicating the flags of the regular expression in question. This field is read-only.
+ * The characters in this string are sequenced and concatenated in the following order:
+ *
+ * - "g" for global
+ * - "i" for ignoreCase
+ * - "m" for multiline
+ * - "u" for unicode
+ * - "y" for sticky
+ *
+ * If no flags are set, the value is the empty string.
+ */
+ readonly flags: string;
+
+ /**
+ * Returns a Boolean value indicating the state of the sticky flag (y) used with a regular
+ * expression. Default is false. Read-only.
+ */
+ readonly sticky: boolean;
+
+ /**
+ * Returns a Boolean value indicating the state of the Unicode flag (u) used with a regular
+ * expression. Default is false. Read-only.
+ */
+ readonly unicode: boolean;
+}
+
+interface RegExpConstructor {
+ new (pattern: RegExp | string, flags?: string): RegExp;
+ (pattern: RegExp | string, flags?: string): RegExp;
+}
+
+interface String {
+ /**
+ * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point
+ * value of the UTF-16 encoded code point starting at the string element at position pos in
+ * the String resulting from converting this object to a String.
+ * If there is no element at that position, the result is undefined.
+ * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.
+ */
+ codePointAt(pos: number): number | undefined;
+
+ /**
+ * Returns true if searchString appears as a substring of the result of converting this
+ * object to a String, at one or more positions that are
+ * greater than or equal to position; otherwise, returns false.
+ * @param searchString search string
+ * @param position If position is undefined, 0 is assumed, so as to search all of the String.
+ */
+ includes(searchString: string, position?: number): boolean;
+
+ /**
+ * Returns true if the sequence of elements of searchString converted to a String is the
+ * same as the corresponding elements of this object (converted to a String) starting at
+ * endPosition – length(this). Otherwise returns false.
+ */
+ endsWith(searchString: string, endPosition?: number): boolean;
+
+ /**
+ * Returns the String value result of normalizing the string into the normalization form
+ * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.
+ * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default
+ * is "NFC"
+ */
+ normalize(form: "NFC" | "NFD" | "NFKC" | "NFKD"): string;
+
+ /**
+ * Returns the String value result of normalizing the string into the normalization form
+ * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.
+ * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default
+ * is "NFC"
+ */
+ normalize(form?: string): string;
+
+ /**
+ * Returns a String value that is made from count copies appended together. If count is 0,
+ * the empty string is returned.
+ * @param count number of copies to append
+ */
+ repeat(count: number): string;
+
+ /**
+ * Returns true if the sequence of elements of searchString converted to a String is the
+ * same as the corresponding elements of this object (converted to a String) starting at
+ * position. Otherwise returns false.
+ */
+ startsWith(searchString: string, position?: number): boolean;
+
+ /**
+ * Returns an `<a>` HTML anchor element and sets the name attribute to the text value
+ * @deprecated A legacy feature for browser compatibility
+ * @param name
+ */
+ anchor(name: string): string;
+
+ /**
+ * Returns a `<big>` HTML element
+ * @deprecated A legacy feature for browser compatibility
+ */
+ big(): string;
+
+ /**
+ * Returns a `<blink>` HTML element
+ * @deprecated A legacy feature for browser compatibility
+ */
+ blink(): string;
+
+ /**
+ * Returns a `<b>` HTML element
+ * @deprecated A legacy feature for browser compatibility
+ */
+ bold(): string;
+
+ /**
+ * Returns a `<tt>` HTML element
+ * @deprecated A legacy feature for browser compatibility
+ */
+ fixed(): string;
+
+ /**
+ * Returns a `<font>` HTML element and sets the color attribute value
+ * @deprecated A legacy feature for browser compatibility
+ */
+ fontcolor(color: string): string;
+
+ /**
+ * Returns a `<font>` HTML element and sets the size attribute value
+ * @deprecated A legacy feature for browser compatibility
+ */
+ fontsize(size: number): string;
+
+ /**
+ * Returns a `<font>` HTML element and sets the size attribute value
+ * @deprecated A legacy feature for browser compatibility
+ */
+ fontsize(size: string): string;
+
+ /**
+ * Returns an `<i>` HTML element
+ * @deprecated A legacy feature for browser compatibility
+ */
+ italics(): string;
+
+ /**
+ * Returns an `<a>` HTML element and sets the href attribute value
+ * @deprecated A legacy feature for browser compatibility
+ */
+ link(url: string): string;
+
+ /**
+ * Returns a `<small>` HTML element
+ * @deprecated A legacy feature for browser compatibility
+ */
+ small(): string;
+
+ /**
+ * Returns a `<strike>` HTML element
+ * @deprecated A legacy feature for browser compatibility
+ */
+ strike(): string;
+
+ /**
+ * Returns a `<sub>` HTML element
+ * @deprecated A legacy feature for browser compatibility
+ */
+ sub(): string;
+
+ /**
+ * Returns a `<sup>` HTML element
+ * @deprecated A legacy feature for browser compatibility
+ */
+ sup(): string;
+}
+
+interface StringConstructor {
+ /**
+ * Return the String value whose elements are, in order, the elements in the List elements.
+ * If length is 0, the empty string is returned.
+ */
+ fromCodePoint(...codePoints: number[]): string;
+
+ /**
+ * String.raw is 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<string>}, ...substitutions: any[]): string;
+}
diff --git a/cli/tsc/dts/lib.es2015.d.ts b/cli/tsc/dts/lib.es2015.d.ts
new file mode 100644
index 000000000..791284b6d
--- /dev/null
+++ b/cli/tsc/dts/lib.es2015.d.ts
@@ -0,0 +1,30 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es5" />
+/// <reference lib="es2015.core" />
+/// <reference lib="es2015.collection" />
+/// <reference lib="es2015.iterable" />
+/// <reference lib="es2015.generator" />
+/// <reference lib="es2015.promise" />
+/// <reference lib="es2015.proxy" />
+/// <reference lib="es2015.reflect" />
+/// <reference lib="es2015.symbol" />
+/// <reference lib="es2015.symbol.wellknown" />
diff --git a/cli/tsc/dts/lib.es2015.generator.d.ts b/cli/tsc/dts/lib.es2015.generator.d.ts
new file mode 100644
index 000000000..78f9fd5bd
--- /dev/null
+++ b/cli/tsc/dts/lib.es2015.generator.d.ts
@@ -0,0 +1,79 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2015.iterable" />
+
+interface Generator<T = unknown, TReturn = any, TNext = unknown> extends Iterator<T, TReturn, TNext> {
+ // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.
+ next(...args: [] | [TNext]): IteratorResult<T, TReturn>;
+ return(value: TReturn): IteratorResult<T, TReturn>;
+ throw(e: any): IteratorResult<T, TReturn>;
+ [Symbol.iterator](): Generator<T, TReturn, TNext>;
+}
+
+interface GeneratorFunction {
+ /**
+ * Creates a new Generator object.
+ * @param args A list of arguments the function accepts.
+ */
+ new (...args: any[]): Generator;
+ /**
+ * Creates a new Generator object.
+ * @param args A list of arguments the function accepts.
+ */
+ (...args: any[]): Generator;
+ /**
+ * The length of the arguments.
+ */
+ readonly length: number;
+ /**
+ * Returns the name of the function.
+ */
+ readonly name: string;
+ /**
+ * A reference to the prototype.
+ */
+ readonly prototype: Generator;
+}
+
+interface GeneratorFunctionConstructor {
+ /**
+ * Creates a new Generator function.
+ * @param args A list of arguments the function accepts.
+ */
+ new (...args: string[]): GeneratorFunction;
+ /**
+ * Creates a new Generator function.
+ * @param args A list of arguments the function accepts.
+ */
+ (...args: string[]): GeneratorFunction;
+ /**
+ * The length of the arguments.
+ */
+ readonly length: number;
+ /**
+ * Returns the name of the function.
+ */
+ readonly name: string;
+ /**
+ * A reference to the prototype.
+ */
+ readonly prototype: GeneratorFunction;
+}
diff --git a/cli/tsc/dts/lib.es2015.iterable.d.ts b/cli/tsc/dts/lib.es2015.iterable.d.ts
new file mode 100644
index 000000000..8a7292383
--- /dev/null
+++ b/cli/tsc/dts/lib.es2015.iterable.d.ts
@@ -0,0 +1,498 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2015.symbol" />
+
+interface SymbolConstructor {
+ /**
+ * A method that returns the default iterator for an object. Called by the semantics of the
+ * for-of statement.
+ */
+ readonly iterator: unique symbol;
+}
+
+interface IteratorYieldResult<TYield> {
+ done?: false;
+ value: TYield;
+}
+
+interface IteratorReturnResult<TReturn> {
+ done: true;
+ value: TReturn;
+}
+
+type IteratorResult<T, TReturn = any> = IteratorYieldResult<T> | IteratorReturnResult<TReturn>;
+
+interface Iterator<T, TReturn = any, TNext = undefined> {
+ // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.
+ next(...args: [] | [TNext]): IteratorResult<T, TReturn>;
+ return?(value?: TReturn): IteratorResult<T, TReturn>;
+ throw?(e?: any): IteratorResult<T, TReturn>;
+}
+
+interface Iterable<T> {
+ [Symbol.iterator](): Iterator<T>;
+}
+
+interface IterableIterator<T> extends Iterator<T> {
+ [Symbol.iterator](): IterableIterator<T>;
+}
+
+interface Array<T> {
+ /** Iterator */
+ [Symbol.iterator](): IterableIterator<T>;
+
+ /**
+ * Returns an iterable of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, T]>;
+
+ /**
+ * Returns an iterable of keys in the array
+ */
+ keys(): IterableIterator<number>;
+
+ /**
+ * Returns an iterable of values in the array
+ */
+ values(): IterableIterator<T>;
+}
+
+interface ArrayConstructor {
+ /**
+ * Creates an array from an iterable object.
+ * @param iterable An iterable object to convert to an array.
+ */
+ from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
+
+ /**
+ * Creates an array from an iterable object.
+ * @param iterable An iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
+}
+
+interface ReadonlyArray<T> {
+ /** Iterator of values in the array. */
+ [Symbol.iterator](): IterableIterator<T>;
+
+ /**
+ * Returns an iterable of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, T]>;
+
+ /**
+ * Returns an iterable of keys in the array
+ */
+ keys(): IterableIterator<number>;
+
+ /**
+ * Returns an iterable of values in the array
+ */
+ values(): IterableIterator<T>;
+}
+
+interface IArguments {
+ /** Iterator */
+ [Symbol.iterator](): IterableIterator<any>;
+}
+
+interface Map<K, V> {
+ /** Returns an iterable of entries in the map. */
+ [Symbol.iterator](): IterableIterator<[K, V]>;
+
+ /**
+ * Returns an iterable of key, value pairs for every entry in the map.
+ */
+ entries(): IterableIterator<[K, V]>;
+
+ /**
+ * Returns an iterable of keys in the map
+ */
+ keys(): IterableIterator<K>;
+
+ /**
+ * Returns an iterable of values in the map
+ */
+ values(): IterableIterator<V>;
+}
+
+interface ReadonlyMap<K, V> {
+ /** Returns an iterable of entries in the map. */
+ [Symbol.iterator](): IterableIterator<[K, V]>;
+
+ /**
+ * Returns an iterable of key, value pairs for every entry in the map.
+ */
+ entries(): IterableIterator<[K, V]>;
+
+ /**
+ * Returns an iterable of keys in the map
+ */
+ keys(): IterableIterator<K>;
+
+ /**
+ * Returns an iterable of values in the map
+ */
+ values(): IterableIterator<V>;
+}
+
+interface MapConstructor {
+ new(): Map<any, any>;
+ new <K, V>(iterable?: Iterable<readonly [K, V]> | null): Map<K, V>;
+}
+
+interface WeakMap<K extends object, V> { }
+
+interface WeakMapConstructor {
+ new <K extends object, V>(iterable: Iterable<readonly [K, V]>): WeakMap<K, V>;
+}
+
+interface Set<T> {
+ /** Iterates over values in the set. */
+ [Symbol.iterator](): IterableIterator<T>;
+ /**
+ * Returns an iterable of [v,v] pairs for every value `v` in the set.
+ */
+ entries(): IterableIterator<[T, T]>;
+ /**
+ * Despite its name, returns an iterable of the values in the set.
+ */
+ keys(): IterableIterator<T>;
+
+ /**
+ * Returns an iterable of values in the set.
+ */
+ values(): IterableIterator<T>;
+}
+
+interface ReadonlySet<T> {
+ /** Iterates over values in the set. */
+ [Symbol.iterator](): IterableIterator<T>;
+
+ /**
+ * Returns an iterable of [v,v] pairs for every value `v` in the set.
+ */
+ entries(): IterableIterator<[T, T]>;
+
+ /**
+ * Despite its name, returns an iterable of the values in the set.
+ */
+ keys(): IterableIterator<T>;
+
+ /**
+ * Returns an iterable of values in the set.
+ */
+ values(): IterableIterator<T>;
+}
+
+interface SetConstructor {
+ new <T>(iterable?: Iterable<T> | null): Set<T>;
+}
+
+interface WeakSet<T extends object> { }
+
+interface WeakSetConstructor {
+ new <T extends object = object>(iterable: Iterable<T>): WeakSet<T>;
+}
+
+interface Promise<T> { }
+
+interface PromiseConstructor {
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An iterable of Promises.
+ * @returns A new Promise.
+ */
+ all<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>[]>;
+
+ /**
+ * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
+ * or rejected.
+ * @param values An iterable of Promises.
+ * @returns A new Promise.
+ */
+ race<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>;
+}
+
+interface String {
+ /** Iterator */
+ [Symbol.iterator](): IterableIterator<string>;
+}
+
+interface Int8Array {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Int8ArrayConstructor {
+ new (elements: Iterable<number>): Int8Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array;
+}
+
+interface Uint8Array {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Uint8ArrayConstructor {
+ new (elements: Iterable<number>): Uint8Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array;
+}
+
+interface Uint8ClampedArray {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Uint8ClampedArrayConstructor {
+ new (elements: Iterable<number>): Uint8ClampedArray;
+
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray;
+}
+
+interface Int16Array {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Int16ArrayConstructor {
+ new (elements: Iterable<number>): Int16Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array;
+}
+
+interface Uint16Array {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Uint16ArrayConstructor {
+ new (elements: Iterable<number>): Uint16Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array;
+}
+
+interface Int32Array {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Int32ArrayConstructor {
+ new (elements: Iterable<number>): Int32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array;
+}
+
+interface Uint32Array {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Uint32ArrayConstructor {
+ new (elements: Iterable<number>): Uint32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array;
+}
+
+interface Float32Array {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Float32ArrayConstructor {
+ new (elements: Iterable<number>): Float32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array;
+}
+
+interface Float64Array {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Float64ArrayConstructor {
+ new (elements: Iterable<number>): Float64Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array;
+}
diff --git a/cli/tsc/dts/lib.es2015.promise.d.ts b/cli/tsc/dts/lib.es2015.promise.d.ts
new file mode 100644
index 000000000..57eea0f6b
--- /dev/null
+++ b/cli/tsc/dts/lib.es2015.promise.d.ts
@@ -0,0 +1,78 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface PromiseConstructor {
+ /**
+ * A reference to the prototype.
+ */
+ readonly prototype: Promise<any>;
+
+ /**
+ * Creates a new Promise.
+ * @param executor A callback used to initialize the promise. This callback is passed two arguments:
+ * a resolve callback used to resolve the promise with a value or the result of another promise,
+ * and a reject callback used to reject the promise with a provided reason or error.
+ */
+ new <T>(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): Promise<T>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T extends readonly unknown[] | []>(values: T): Promise<{ -readonly [P in keyof T]: Awaited<T[P]> }>;
+
+ // see: lib.es2015.iterable.d.ts
+ // all<T>(values: Iterable<T | PromiseLike<T>>): Promise<T[]>;
+
+ /**
+ * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
+ * or rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ race<T extends readonly unknown[] | []>(values: T): Promise<Awaited<T[number]>>;
+
+ // see: lib.es2015.iterable.d.ts
+ // race<T>(values: Iterable<T>): Promise<T extends PromiseLike<infer U> ? U : T>;
+
+ /**
+ * Creates a new rejected promise for the provided reason.
+ * @param reason The reason the promise was rejected.
+ * @returns A new rejected Promise.
+ */
+ reject<T = never>(reason?: any): Promise<T>;
+
+ /**
+ * Creates a new resolved promise.
+ * @returns A resolved promise.
+ */
+ resolve(): Promise<void>;
+
+ /**
+ * Creates a new resolved promise for the provided value.
+ * @param value A promise.
+ * @returns A promise whose internal state matches the provided promise.
+ */
+ resolve<T>(value: T | PromiseLike<T>): Promise<T>;
+}
+
+declare var Promise: PromiseConstructor;
diff --git a/cli/tsc/dts/lib.es2015.proxy.d.ts b/cli/tsc/dts/lib.es2015.proxy.d.ts
new file mode 100644
index 000000000..c24186615
--- /dev/null
+++ b/cli/tsc/dts/lib.es2015.proxy.d.ts
@@ -0,0 +1,130 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface ProxyHandler<T extends object> {
+ /**
+ * 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<string | symbol>;
+
+ /**
+ * 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<T extends object>(target: T, handler: ProxyHandler<T>): { 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 <T extends object>(target: T, handler: ProxyHandler<T>): T;
+}
+declare var Proxy: ProxyConstructor;
diff --git a/cli/tsc/dts/lib.es2015.reflect.d.ts b/cli/tsc/dts/lib.es2015.reflect.d.ts
new file mode 100644
index 000000000..d1beb6862
--- /dev/null
+++ b/cli/tsc/dts/lib.es2015.reflect.d.ts
@@ -0,0 +1,123 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+declare namespace Reflect {
+ /**
+ * 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: Function, thisArgument: any, argumentsList: ArrayLike<any>): 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: Function, argumentsList: ArrayLike<any>, 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<any>): 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: object, propertyKey: PropertyKey, receiver?: 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 target Object that contains the property.
+ * @param propertyKey The property name.
+ */
+ function getOwnPropertyDescriptor(target: object, propertyKey: PropertyKey): PropertyDescriptor | 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: 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;
+}
diff --git a/cli/tsc/dts/lib.es2015.symbol.d.ts b/cli/tsc/dts/lib.es2015.symbol.d.ts
new file mode 100644
index 000000000..253d2806c
--- /dev/null
+++ b/cli/tsc/dts/lib.es2015.symbol.d.ts
@@ -0,0 +1,48 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface SymbolConstructor {
+ /**
+ * A reference to the prototype.
+ */
+ readonly prototype: Symbol;
+
+ /**
+ * Returns a new unique Symbol value.
+ * @param description Description of the new Symbol object.
+ */
+ (description?: string | number): symbol;
+
+ /**
+ * Returns a Symbol object from the global symbol registry matching the given key if found.
+ * Otherwise, returns a new symbol with this key.
+ * @param key key to search for.
+ */
+ for(key: string): symbol;
+
+ /**
+ * Returns a key from the global symbol registry matching the given Symbol if found.
+ * Otherwise, returns a undefined.
+ * @param sym Symbol to find the key for.
+ */
+ keyFor(sym: symbol): string | undefined;
+}
+
+declare var Symbol: SymbolConstructor; \ No newline at end of file
diff --git a/cli/tsc/dts/lib.es2015.symbol.wellknown.d.ts b/cli/tsc/dts/lib.es2015.symbol.wellknown.d.ts
new file mode 100644
index 000000000..b1e326436
--- /dev/null
+++ b/cli/tsc/dts/lib.es2015.symbol.wellknown.d.ts
@@ -0,0 +1,324 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2015.symbol" />
+
+interface SymbolConstructor {
+ /**
+ * A method that determines if a constructor object recognizes an object as one of the
+ * constructor’s instances. Called by the semantics of the instanceof operator.
+ */
+ readonly hasInstance: 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 own property names are property names 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;
+
+ readonly [Symbol.toStringTag]: string;
+}
+
+interface Array<T> {
+ /**
+ * Returns an object whose properties have the value 'true'
+ * when they will be absent when used in a 'with' statement.
+ */
+ [Symbol.unscopables](): {
+ copyWithin: boolean;
+ entries: boolean;
+ fill: boolean;
+ find: boolean;
+ findIndex: boolean;
+ keys: boolean;
+ values: boolean;
+ };
+}
+
+interface Date {
+ /**
+ * Converts a Date object to a string.
+ */
+ [Symbol.toPrimitive](hint: "default"): string;
+ /**
+ * Converts a Date object to a string.
+ */
+ [Symbol.toPrimitive](hint: "string"): string;
+ /**
+ * Converts a Date object to a number.
+ */
+ [Symbol.toPrimitive](hint: "number"): number;
+ /**
+ * Converts a Date object to a string or number.
+ *
+ * @param hint The strings "number", "string", or "default" to specify what primitive to return.
+ *
+ * @throws {TypeError} If 'hint' was given something other than "number", "string", or "default".
+ * @returns A number if 'hint' was "number", a string if 'hint' was "string" or "default".
+ */
+ [Symbol.toPrimitive](hint: string): string | number;
+}
+
+interface Map<K, V> {
+ readonly [Symbol.toStringTag]: string;
+}
+
+interface WeakMap<K extends object, V> {
+ readonly [Symbol.toStringTag]: string;
+}
+
+interface Set<T> {
+ readonly [Symbol.toStringTag]: string;
+}
+
+interface WeakSet<T extends object> {
+ readonly [Symbol.toStringTag]: string;
+}
+
+interface JSON {
+ readonly [Symbol.toStringTag]: string;
+}
+
+interface Function {
+ /**
+ * Determines whether the given value inherits from this function if this function was used
+ * as a constructor function.
+ *
+ * A constructor function can control which objects are recognized as its instances by
+ * 'instanceof' by overriding this method.
+ */
+ [Symbol.hasInstance](value: any): boolean;
+}
+
+interface GeneratorFunction {
+ readonly [Symbol.toStringTag]: string;
+}
+
+interface Math {
+ readonly [Symbol.toStringTag]: string;
+}
+
+interface Promise<T> {
+ readonly [Symbol.toStringTag]: string;
+}
+
+interface PromiseConstructor {
+ readonly [Symbol.species]: PromiseConstructor;
+}
+
+interface RegExp {
+ /**
+ * Matches a string with this regular expression, and returns an array containing the results of
+ * that search.
+ * @param string A string to search within.
+ */
+ [Symbol.match](string: string): RegExpMatchArray | null;
+
+ /**
+ * Replaces text in a string, using this regular expression.
+ * @param string A String object or string literal whose contents matching against
+ * this regular expression will be replaced
+ * @param replaceValue A String object or string literal containing the text to replace for every
+ * successful match of this regular expression.
+ */
+ [Symbol.replace](string: string, replaceValue: string): string;
+
+ /**
+ * Replaces text in a string, using this regular expression.
+ * @param string A String object or string literal whose contents matching against
+ * this regular expression will be replaced
+ * @param replacer A function that returns the replacement text.
+ */
+ [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string;
+
+ /**
+ * Finds the position beginning first substring match in a regular expression search
+ * using this regular expression.
+ *
+ * @param string The string to search within.
+ */
+ [Symbol.search](string: string): number;
+
+ /**
+ * Returns an array of substrings that were delimited by strings in the original input that
+ * match against this regular expression.
+ *
+ * If the regular expression contains capturing parentheses, then each time this
+ * regular expression matches, the results (including any undefined results) of the
+ * capturing parentheses are spliced.
+ *
+ * @param string string value to split
+ * @param limit if not undefined, the output array is truncated so that it contains no more
+ * than 'limit' elements.
+ */
+ [Symbol.split](string: string, limit?: number): string[];
+}
+
+interface RegExpConstructor {
+ readonly [Symbol.species]: RegExpConstructor;
+}
+
+interface String {
+ /**
+ * Matches a string or an object that supports being matched against, and returns an array
+ * containing the results of that search, or null if no matches are found.
+ * @param matcher An object that supports being matched against.
+ */
+ match(matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null;
+
+ /**
+ * Replaces first match with string or all matches with RegExp.
+ * @param searchValue A string or RegExp search value.
+ * @param replaceValue A string containing the text to replace for match.
+ */
+ replace(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string;
+
+ /**
+ * Replaces text in a string, using an object that supports replacement within a string.
+ * @param searchValue A object can search for and replace matches within a string.
+ * @param replacer A function that returns the replacement text.
+ */
+ replace(searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string;
+
+ /**
+ * Finds the first substring match in a regular expression search.
+ * @param searcher An object which supports searching within a string.
+ */
+ search(searcher: { [Symbol.search](string: string): number; }): number;
+
+ /**
+ * Split a string into substrings using the specified separator and return them as an array.
+ * @param splitter An object that can split a string.
+ * @param limit A value used to limit the number of elements returned in the array.
+ */
+ split(splitter: { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number): string[];
+}
+
+interface ArrayBuffer {
+ readonly [Symbol.toStringTag]: string;
+}
+
+interface DataView {
+ readonly [Symbol.toStringTag]: string;
+}
+
+interface Int8Array {
+ readonly [Symbol.toStringTag]: "Int8Array";
+}
+
+interface Uint8Array {
+ readonly [Symbol.toStringTag]: "Uint8Array";
+}
+
+interface Uint8ClampedArray {
+ readonly [Symbol.toStringTag]: "Uint8ClampedArray";
+}
+
+interface Int16Array {
+ readonly [Symbol.toStringTag]: "Int16Array";
+}
+
+interface Uint16Array {
+ readonly [Symbol.toStringTag]: "Uint16Array";
+}
+
+interface Int32Array {
+ readonly [Symbol.toStringTag]: "Int32Array";
+}
+
+interface Uint32Array {
+ readonly [Symbol.toStringTag]: "Uint32Array";
+}
+
+interface Float32Array {
+ readonly [Symbol.toStringTag]: "Float32Array";
+}
+
+interface Float64Array {
+ readonly [Symbol.toStringTag]: "Float64Array";
+}
+
+interface ArrayConstructor {
+ readonly [Symbol.species]: ArrayConstructor;
+}
+interface MapConstructor {
+ readonly [Symbol.species]: MapConstructor;
+}
+interface SetConstructor {
+ readonly [Symbol.species]: SetConstructor;
+}
+interface ArrayBufferConstructor {
+ readonly [Symbol.species]: ArrayBufferConstructor;
+}
diff --git a/cli/tsc/dts/lib.es2016.array.include.d.ts b/cli/tsc/dts/lib.es2016.array.include.d.ts
new file mode 100644
index 000000000..6bc6ef30e
--- /dev/null
+++ b/cli/tsc/dts/lib.es2016.array.include.d.ts
@@ -0,0 +1,118 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface Array<T> {
+ /**
+ * Determines whether an array includes a certain element, returning true or false as appropriate.
+ * @param searchElement The element to search for.
+ * @param fromIndex The position in this array at which to begin searching for searchElement.
+ */
+ includes(searchElement: T, fromIndex?: number): boolean;
+}
+
+interface ReadonlyArray<T> {
+ /**
+ * Determines whether an array includes a certain element, returning true or false as appropriate.
+ * @param searchElement The element to search for.
+ * @param fromIndex The position in this array at which to begin searching for searchElement.
+ */
+ includes(searchElement: T, fromIndex?: number): boolean;
+}
+
+interface Int8Array {
+ /**
+ * Determines whether an array includes a certain element, returning true or false as appropriate.
+ * @param searchElement The element to search for.
+ * @param fromIndex The position in this array at which to begin searching for searchElement.
+ */
+ includes(searchElement: number, fromIndex?: number): boolean;
+}
+
+interface Uint8Array {
+ /**
+ * Determines whether an array includes a certain element, returning true or false as appropriate.
+ * @param searchElement The element to search for.
+ * @param fromIndex The position in this array at which to begin searching for searchElement.
+ */
+ includes(searchElement: number, fromIndex?: number): boolean;
+}
+
+interface Uint8ClampedArray {
+ /**
+ * Determines whether an array includes a certain element, returning true or false as appropriate.
+ * @param searchElement The element to search for.
+ * @param fromIndex The position in this array at which to begin searching for searchElement.
+ */
+ includes(searchElement: number, fromIndex?: number): boolean;
+}
+
+interface Int16Array {
+ /**
+ * Determines whether an array includes a certain element, returning true or false as appropriate.
+ * @param searchElement The element to search for.
+ * @param fromIndex The position in this array at which to begin searching for searchElement.
+ */
+ includes(searchElement: number, fromIndex?: number): boolean;
+}
+
+interface Uint16Array {
+ /**
+ * Determines whether an array includes a certain element, returning true or false as appropriate.
+ * @param searchElement The element to search for.
+ * @param fromIndex The position in this array at which to begin searching for searchElement.
+ */
+ includes(searchElement: number, fromIndex?: number): boolean;
+}
+
+interface Int32Array {
+ /**
+ * Determines whether an array includes a certain element, returning true or false as appropriate.
+ * @param searchElement The element to search for.
+ * @param fromIndex The position in this array at which to begin searching for searchElement.
+ */
+ includes(searchElement: number, fromIndex?: number): boolean;
+}
+
+interface Uint32Array {
+ /**
+ * Determines whether an array includes a certain element, returning true or false as appropriate.
+ * @param searchElement The element to search for.
+ * @param fromIndex The position in this array at which to begin searching for searchElement.
+ */
+ includes(searchElement: number, fromIndex?: number): boolean;
+}
+
+interface Float32Array {
+ /**
+ * Determines whether an array includes a certain element, returning true or false as appropriate.
+ * @param searchElement The element to search for.
+ * @param fromIndex The position in this array at which to begin searching for searchElement.
+ */
+ includes(searchElement: number, fromIndex?: number): boolean;
+}
+
+interface Float64Array {
+ /**
+ * Determines whether an array includes a certain element, returning true or false as appropriate.
+ * @param searchElement The element to search for.
+ * @param fromIndex The position in this array at which to begin searching for searchElement.
+ */
+ includes(searchElement: number, fromIndex?: number): boolean;
+} \ No newline at end of file
diff --git a/cli/tsc/dts/lib.es2016.d.ts b/cli/tsc/dts/lib.es2016.d.ts
new file mode 100644
index 000000000..ade8175f5
--- /dev/null
+++ b/cli/tsc/dts/lib.es2016.d.ts
@@ -0,0 +1,22 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2015" />
+/// <reference lib="es2016.array.include" /> \ No newline at end of file
diff --git a/cli/tsc/dts/lib.es2016.full.d.ts b/cli/tsc/dts/lib.es2016.full.d.ts
new file mode 100644
index 000000000..ad61d2325
--- /dev/null
+++ b/cli/tsc/dts/lib.es2016.full.d.ts
@@ -0,0 +1,25 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2016" />
+/// <reference lib="dom" />
+/// <reference lib="webworker.importscripts" />
+/// <reference lib="scripthost" />
+/// <reference lib="dom.iterable" /> \ No newline at end of file
diff --git a/cli/tsc/dts/lib.es2017.d.ts b/cli/tsc/dts/lib.es2017.d.ts
new file mode 100644
index 000000000..d89f58071
--- /dev/null
+++ b/cli/tsc/dts/lib.es2017.d.ts
@@ -0,0 +1,26 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2016" />
+/// <reference lib="es2017.object" />
+/// <reference lib="es2017.sharedmemory" />
+/// <reference lib="es2017.string" />
+/// <reference lib="es2017.intl" />
+/// <reference lib="es2017.typedarrays" />
diff --git a/cli/tsc/dts/lib.es2017.full.d.ts b/cli/tsc/dts/lib.es2017.full.d.ts
new file mode 100644
index 000000000..f57c645c5
--- /dev/null
+++ b/cli/tsc/dts/lib.es2017.full.d.ts
@@ -0,0 +1,25 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2017" />
+/// <reference lib="dom" />
+/// <reference lib="webworker.importscripts" />
+/// <reference lib="scripthost" />
+/// <reference lib="dom.iterable" /> \ No newline at end of file
diff --git a/cli/tsc/dts/lib.es2017.intl.d.ts b/cli/tsc/dts/lib.es2017.intl.d.ts
new file mode 100644
index 000000000..c2ab43e8f
--- /dev/null
+++ b/cli/tsc/dts/lib.es2017.intl.d.ts
@@ -0,0 +1,47 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+declare 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[];
+ }
+}
diff --git a/cli/tsc/dts/lib.es2017.object.d.ts b/cli/tsc/dts/lib.es2017.object.d.ts
new file mode 100644
index 000000000..4900d9261
--- /dev/null
+++ b/cli/tsc/dts/lib.es2017.object.d.ts
@@ -0,0 +1,51 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface ObjectConstructor {
+ /**
+ * Returns an array of values of the enumerable properties of an object
+ * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
+ */
+ values<T>(o: { [s: string]: T } | ArrayLike<T>): T[];
+
+ /**
+ * Returns an array of values of the enumerable properties of an object
+ * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
+ */
+ values(o: {}): any[];
+
+ /**
+ * Returns an array of key/values of the enumerable properties of an object
+ * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
+ */
+ entries<T>(o: { [s: string]: T } | ArrayLike<T>): [string, T][];
+
+ /**
+ * Returns an array of key/values of the enumerable properties of an object
+ * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
+ */
+ entries(o: {}): [string, any][];
+
+ /**
+ * Returns an object containing all own property descriptors of an object
+ * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
+ */
+ getOwnPropertyDescriptors<T>(o: T): {[P in keyof T]: TypedPropertyDescriptor<T[P]>} & { [x: string]: PropertyDescriptor };
+}
diff --git a/cli/tsc/dts/lib.es2017.sharedmemory.d.ts b/cli/tsc/dts/lib.es2017.sharedmemory.d.ts
new file mode 100644
index 000000000..3a4ea26bd
--- /dev/null
+++ b/cli/tsc/dts/lib.es2017.sharedmemory.d.ts
@@ -0,0 +1,137 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2015.symbol" />
+/// <reference lib="es2015.symbol.wellknown" />
+
+interface SharedArrayBuffer {
+ /**
+ * Read-only. The length of the ArrayBuffer (in bytes).
+ */
+ readonly byteLength: number;
+
+ /**
+ * Returns a section of an SharedArrayBuffer.
+ */
+ slice(begin: number, end?: number): SharedArrayBuffer;
+ readonly [Symbol.species]: SharedArrayBuffer;
+ readonly [Symbol.toStringTag]: "SharedArrayBuffer";
+}
+
+interface SharedArrayBufferConstructor {
+ readonly prototype: SharedArrayBuffer;
+ new (byteLength: number): SharedArrayBuffer;
+}
+declare var SharedArrayBuffer: SharedArrayBufferConstructor;
+
+interface ArrayBufferTypes {
+ SharedArrayBuffer: SharedArrayBuffer;
+}
+
+interface Atomics {
+ /**
+ * Adds a value to the value at the given position in the array, returning the original value.
+ * Until this atomic operation completes, any other read or write operation against the array
+ * will block.
+ */
+ add(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number;
+
+ /**
+ * Stores the bitwise AND of a value with the value at the given position in the array,
+ * returning the original value. Until this atomic operation completes, any other read or
+ * write operation against the array will block.
+ */
+ and(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number;
+
+ /**
+ * Replaces the value at the given position in the array if the original value equals the given
+ * expected value, returning the original value. Until this atomic operation completes, any
+ * other read or write operation against the array will block.
+ */
+ compareExchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, expectedValue: number, replacementValue: number): number;
+
+ /**
+ * Replaces the value at the given position in the array, returning the original value. Until
+ * this atomic operation completes, any other read or write operation against the array will
+ * block.
+ */
+ exchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number;
+
+ /**
+ * Returns a value indicating whether high-performance algorithms can use atomic operations
+ * (`true`) or must use locks (`false`) for the given number of bytes-per-element of a typed
+ * array.
+ */
+ isLockFree(size: number): boolean;
+
+ /**
+ * Returns the value at the given position in the array. Until this atomic operation completes,
+ * any other read or write operation against the array will block.
+ */
+ load(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number): number;
+
+ /**
+ * Stores the bitwise OR of a value with the value at the given position in the array,
+ * returning the original value. Until this atomic operation completes, any other read or write
+ * operation against the array will block.
+ */
+ or(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number;
+
+ /**
+ * Stores a value at the given position in the array, returning the new value. Until this
+ * atomic operation completes, any other read or write operation against the array will block.
+ */
+ store(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number;
+
+ /**
+ * Subtracts a value from the value at the given position in the array, returning the original
+ * value. Until this atomic operation completes, any other read or write operation against the
+ * array will block.
+ */
+ sub(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number;
+
+ /**
+ * If the value at the given position in the array is equal to the provided value, the current
+ * agent is put to sleep causing execution to suspend until the timeout expires (returning
+ * `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns
+ * `"not-equal"`.
+ */
+ wait(typedArray: Int32Array, index: number, value: number, timeout?: number): "ok" | "not-equal" | "timed-out";
+
+ /**
+ * Wakes up sleeping agents that are waiting on the given index of the array, returning the
+ * number of agents that were awoken.
+ * @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";
+}
+
+declare var Atomics: Atomics;
diff --git a/cli/tsc/dts/lib.es2017.string.d.ts b/cli/tsc/dts/lib.es2017.string.d.ts
new file mode 100644
index 000000000..4b219e6c5
--- /dev/null
+++ b/cli/tsc/dts/lib.es2017.string.d.ts
@@ -0,0 +1,47 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface String {
+ /**
+ * Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length.
+ * The padding is applied from the start (left) of the current string.
+ *
+ * @param maxLength The length of the resulting string once the current string has been padded.
+ * If this parameter is smaller than the current string's length, the current string will be returned as it is.
+ *
+ * @param fillString The string to pad the current string with.
+ * If this string is too long, it will be truncated and the left-most part will be applied.
+ * The default value for this parameter is " " (U+0020).
+ */
+ padStart(maxLength: number, fillString?: string): string;
+
+ /**
+ * Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length.
+ * The padding is applied from the end (right) of the current string.
+ *
+ * @param maxLength The length of the resulting string once the current string has been padded.
+ * If this parameter is smaller than the current string's length, the current string will be returned as it is.
+ *
+ * @param fillString The string to pad the current string with.
+ * If this string is too long, it will be truncated and the left-most part will be applied.
+ * The default value for this parameter is " " (U+0020).
+ */
+ padEnd(maxLength: number, fillString?: string): string;
+}
diff --git a/cli/tsc/dts/lib.es2017.typedarrays.d.ts b/cli/tsc/dts/lib.es2017.typedarrays.d.ts
new file mode 100644
index 000000000..ac6984100
--- /dev/null
+++ b/cli/tsc/dts/lib.es2017.typedarrays.d.ts
@@ -0,0 +1,55 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface Int8ArrayConstructor {
+ new (): Int8Array;
+}
+
+interface Uint8ArrayConstructor {
+ new (): Uint8Array;
+}
+
+interface Uint8ClampedArrayConstructor {
+ new (): Uint8ClampedArray;
+}
+
+interface Int16ArrayConstructor {
+ new (): Int16Array;
+}
+
+interface Uint16ArrayConstructor {
+ new (): Uint16Array;
+}
+
+interface Int32ArrayConstructor {
+ new (): Int32Array;
+}
+
+interface Uint32ArrayConstructor {
+ new (): Uint32Array;
+}
+
+interface Float32ArrayConstructor {
+ new (): Float32Array;
+}
+
+interface Float64ArrayConstructor {
+ new (): Float64Array;
+}
diff --git a/cli/tsc/dts/lib.es2018.asyncgenerator.d.ts b/cli/tsc/dts/lib.es2018.asyncgenerator.d.ts
new file mode 100644
index 000000000..546a8c2e9
--- /dev/null
+++ b/cli/tsc/dts/lib.es2018.asyncgenerator.d.ts
@@ -0,0 +1,79 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2018.asynciterable" />
+
+interface AsyncGenerator<T = unknown, TReturn = any, TNext = unknown> extends AsyncIterator<T, TReturn, TNext> {
+ // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.
+ next(...args: [] | [TNext]): Promise<IteratorResult<T, TReturn>>;
+ return(value: TReturn | PromiseLike<TReturn>): Promise<IteratorResult<T, TReturn>>;
+ throw(e: any): Promise<IteratorResult<T, TReturn>>;
+ [Symbol.asyncIterator](): AsyncGenerator<T, TReturn, TNext>;
+}
+
+interface AsyncGeneratorFunction {
+ /**
+ * Creates a new AsyncGenerator object.
+ * @param args A list of arguments the function accepts.
+ */
+ new (...args: any[]): AsyncGenerator;
+ /**
+ * Creates a new AsyncGenerator object.
+ * @param args A list of arguments the function accepts.
+ */
+ (...args: any[]): AsyncGenerator;
+ /**
+ * The length of the arguments.
+ */
+ readonly length: number;
+ /**
+ * Returns the name of the function.
+ */
+ readonly name: string;
+ /**
+ * A reference to the prototype.
+ */
+ readonly prototype: AsyncGenerator;
+}
+
+interface AsyncGeneratorFunctionConstructor {
+ /**
+ * Creates a new AsyncGenerator function.
+ * @param args A list of arguments the function accepts.
+ */
+ new (...args: string[]): AsyncGeneratorFunction;
+ /**
+ * Creates a new AsyncGenerator function.
+ * @param args A list of arguments the function accepts.
+ */
+ (...args: string[]): AsyncGeneratorFunction;
+ /**
+ * The length of the arguments.
+ */
+ readonly length: number;
+ /**
+ * Returns the name of the function.
+ */
+ readonly name: string;
+ /**
+ * A reference to the prototype.
+ */
+ readonly prototype: AsyncGeneratorFunction;
+}
diff --git a/cli/tsc/dts/lib.es2018.asynciterable.d.ts b/cli/tsc/dts/lib.es2018.asynciterable.d.ts
new file mode 100644
index 000000000..88f9d8fba
--- /dev/null
+++ b/cli/tsc/dts/lib.es2018.asynciterable.d.ts
@@ -0,0 +1,45 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2015.symbol" />
+/// <reference lib="es2015.iterable" />
+
+interface SymbolConstructor {
+ /**
+ * A method that returns the default async iterator for an object. Called by the semantics of
+ * the for-await-of statement.
+ */
+ readonly asyncIterator: unique symbol;
+}
+
+interface AsyncIterator<T, TReturn = any, TNext = undefined> {
+ // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.
+ next(...args: [] | [TNext]): Promise<IteratorResult<T, TReturn>>;
+ return?(value?: TReturn | PromiseLike<TReturn>): Promise<IteratorResult<T, TReturn>>;
+ throw?(e?: any): Promise<IteratorResult<T, TReturn>>;
+}
+
+interface AsyncIterable<T> {
+ [Symbol.asyncIterator](): AsyncIterator<T>;
+}
+
+interface AsyncIterableIterator<T> extends AsyncIterator<T> {
+ [Symbol.asyncIterator](): AsyncIterableIterator<T>;
+} \ No newline at end of file
diff --git a/cli/tsc/dts/lib.es2018.d.ts b/cli/tsc/dts/lib.es2018.d.ts
new file mode 100644
index 000000000..db0a3d1b0
--- /dev/null
+++ b/cli/tsc/dts/lib.es2018.d.ts
@@ -0,0 +1,26 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2017" />
+/// <reference lib="es2018.asynciterable" />
+/// <reference lib="es2018.asyncgenerator" />
+/// <reference lib="es2018.promise" />
+/// <reference lib="es2018.regexp" />
+/// <reference lib="es2018.intl" />
diff --git a/cli/tsc/dts/lib.es2018.full.d.ts b/cli/tsc/dts/lib.es2018.full.d.ts
new file mode 100644
index 000000000..b517dc590
--- /dev/null
+++ b/cli/tsc/dts/lib.es2018.full.d.ts
@@ -0,0 +1,25 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2018" />
+/// <reference lib="dom" />
+/// <reference lib="webworker.importscripts" />
+/// <reference lib="scripthost" />
+/// <reference lib="dom.iterable" /> \ No newline at end of file
diff --git a/cli/tsc/dts/lib.es2018.intl.d.ts b/cli/tsc/dts/lib.es2018.intl.d.ts
new file mode 100644
index 000000000..97c0eedb0
--- /dev/null
+++ b/cli/tsc/dts/lib.es2018.intl.d.ts
@@ -0,0 +1,73 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+declare namespace Intl {
+
+ // http://cldr.unicode.org/index/cldr-spec/plural-rules#TOC-Determining-Plural-Categories
+ type LDMLPluralRule = "zero" | "one" | "two" | "few" | "many" | "other";
+ type PluralRuleType = "cardinal" | "ordinal";
+
+ interface PluralRulesOptions {
+ localeMatcher?: "lookup" | "best fit" | 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;
+ }
+
+ const PluralRules: {
+ new (locales?: string | string[], options?: PluralRulesOptions): PluralRules;
+ (locales?: string | string[], options?: PluralRulesOptions): PluralRules;
+
+ supportedLocalesOf(locales: string | string[], options?: { localeMatcher?: "lookup" | "best fit" }): string[];
+ };
+
+ // We can only have one definition for 'type' in TypeScript, and so you can learn where the keys come from here:
+ type ES2018NumberFormatPartType = "literal" | "nan" | "infinity" | "percent" | "integer" | "group" | "decimal" | "fraction" | "plusSign" | "minusSign" | "percentSign" | "currency" | "code" | "symbol" | "name";
+ type ES2020NumberFormatPartType = "compact" | "exponentInteger" | "exponentMinusSign" | "exponentSeparator" | "unit" | "unknown";
+ type NumberFormatPartTypes = ES2018NumberFormatPartType | ES2020NumberFormatPartType;
+
+ interface NumberFormatPart {
+ type: NumberFormatPartTypes;
+ value: string;
+ }
+
+ interface NumberFormat {
+ formatToParts(number?: number | bigint): NumberFormatPart[];
+ }
+}
diff --git a/cli/tsc/dts/lib.es2018.promise.d.ts b/cli/tsc/dts/lib.es2018.promise.d.ts
new file mode 100644
index 000000000..1a95d7c87
--- /dev/null
+++ b/cli/tsc/dts/lib.es2018.promise.d.ts
@@ -0,0 +1,32 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/**
+ * Represents the completion of an asynchronous operation
+ */
+interface Promise<T> {
+ /**
+ * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
+ * resolved value cannot be modified from the callback.
+ * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
+ * @returns A Promise for the completion of the callback.
+ */
+ finally(onfinally?: (() => void) | undefined | null): Promise<T>
+}
diff --git a/cli/tsc/dts/lib.es2018.regexp.d.ts b/cli/tsc/dts/lib.es2018.regexp.d.ts
new file mode 100644
index 000000000..9cb3710b5
--- /dev/null
+++ b/cli/tsc/dts/lib.es2018.regexp.d.ts
@@ -0,0 +1,39 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface RegExpMatchArray {
+ groups?: {
+ [key: string]: string
+ }
+}
+
+interface RegExpExecArray {
+ groups?: {
+ [key: string]: string
+ }
+}
+
+interface RegExp {
+ /**
+ * Returns a Boolean value indicating the state of the dotAll flag (s) used with a regular expression.
+ * Default is false. Read-only.
+ */
+ readonly dotAll: boolean;
+} \ No newline at end of file
diff --git a/cli/tsc/dts/lib.es2019.array.d.ts b/cli/tsc/dts/lib.es2019.array.d.ts
new file mode 100644
index 000000000..160748346
--- /dev/null
+++ b/cli/tsc/dts/lib.es2019.array.d.ts
@@ -0,0 +1,85 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+type FlatArray<Arr, Depth extends number> = {
+ "done": Arr,
+ "recur": Arr extends ReadonlyArray<infer InnerArr>
+ ? FlatArray<InnerArr, [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][Depth]>
+ : Arr
+}[Depth extends -1 ? "done" : "recur"];
+
+interface ReadonlyArray<T> {
+
+ /**
+ * Calls a defined callback function on each element of an array. Then, flattens the result into
+ * a new array.
+ * This is identical to a map followed by flat with depth 1.
+ *
+ * @param callback A function that accepts up to three arguments. The flatMap method calls the
+ * callback function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callback function. If
+ * thisArg is omitted, undefined is used as the this value.
+ */
+ flatMap<U, This = undefined> (
+ callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray<U>,
+ thisArg?: This
+ ): U[]
+
+
+ /**
+ * Returns a new array with all sub-array elements concatenated into it recursively up to the
+ * specified depth.
+ *
+ * @param depth The maximum recursion depth
+ */
+ flat<A, D extends number = 1>(
+ this: A,
+ depth?: D
+ ): FlatArray<A, D>[]
+ }
+
+interface Array<T> {
+
+ /**
+ * Calls a defined callback function on each element of an array. Then, flattens the result into
+ * a new array.
+ * This is identical to a map followed by flat with depth 1.
+ *
+ * @param callback A function that accepts up to three arguments. The flatMap method calls the
+ * callback function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callback function. If
+ * thisArg is omitted, undefined is used as the this value.
+ */
+ flatMap<U, This = undefined> (
+ callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray<U>,
+ thisArg?: This
+ ): U[]
+
+ /**
+ * Returns a new array with all sub-array elements concatenated into it recursively up to the
+ * specified depth.
+ *
+ * @param depth The maximum recursion depth
+ */
+ flat<A, D extends number = 1>(
+ this: A,
+ depth?: D
+ ): FlatArray<A, D>[]
+}
diff --git a/cli/tsc/dts/lib.es2019.d.ts b/cli/tsc/dts/lib.es2019.d.ts
new file mode 100644
index 000000000..5eab0e2c2
--- /dev/null
+++ b/cli/tsc/dts/lib.es2019.d.ts
@@ -0,0 +1,25 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2018" />
+/// <reference lib="es2019.array" />
+/// <reference lib="es2019.object" />
+/// <reference lib="es2019.string" />
+/// <reference lib="es2019.symbol" />
diff --git a/cli/tsc/dts/lib.es2019.full.d.ts b/cli/tsc/dts/lib.es2019.full.d.ts
new file mode 100644
index 000000000..1ebdb1fe0
--- /dev/null
+++ b/cli/tsc/dts/lib.es2019.full.d.ts
@@ -0,0 +1,25 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2019" />
+/// <reference lib="dom" />
+/// <reference lib="webworker.importscripts" />
+/// <reference lib="scripthost" />
+/// <reference lib="dom.iterable" />
diff --git a/cli/tsc/dts/lib.es2019.object.d.ts b/cli/tsc/dts/lib.es2019.object.d.ts
new file mode 100644
index 000000000..09b937af0
--- /dev/null
+++ b/cli/tsc/dts/lib.es2019.object.d.ts
@@ -0,0 +1,35 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2015.iterable" />
+
+interface ObjectConstructor {
+ /**
+ * Returns an object created by key-value entries for properties and methods
+ * @param entries An iterable object that contains key-value entries for properties and methods.
+ */
+ fromEntries<T = any>(entries: Iterable<readonly [PropertyKey, T]>): { [k: string]: T };
+
+ /**
+ * Returns an object created by key-value entries for properties and methods
+ * @param entries An iterable object that contains key-value entries for properties and methods.
+ */
+ fromEntries(entries: Iterable<readonly any[]>): any;
+}
diff --git a/cli/tsc/dts/lib.es2019.string.d.ts b/cli/tsc/dts/lib.es2019.string.d.ts
new file mode 100644
index 000000000..c7150833b
--- /dev/null
+++ b/cli/tsc/dts/lib.es2019.string.d.ts
@@ -0,0 +1,39 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface 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.
+ * @deprecated A legacy feature for browser compatibility. Use `trimStart` instead
+ */
+ trimLeft(): string;
+
+ /**
+ * Removes the trailing white space and line terminator characters from a string.
+ * @deprecated A legacy feature for browser compatibility. Use `trimEnd` instead
+ */
+ trimRight(): string;
+}
diff --git a/cli/tsc/dts/lib.es2019.symbol.d.ts b/cli/tsc/dts/lib.es2019.symbol.d.ts
new file mode 100644
index 000000000..58b38d5f9
--- /dev/null
+++ b/cli/tsc/dts/lib.es2019.symbol.d.ts
@@ -0,0 +1,26 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface Symbol {
+ /**
+ * Expose the [[Description]] internal slot of a symbol directly.
+ */
+ readonly description: string | undefined;
+}
diff --git a/cli/tsc/dts/lib.es2020.bigint.d.ts b/cli/tsc/dts/lib.es2020.bigint.d.ts
new file mode 100644
index 000000000..a0ebccaf9
--- /dev/null
+++ b/cli/tsc/dts/lib.es2020.bigint.d.ts
@@ -0,0 +1,730 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2020.intl" />
+
+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/en-US/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;
+}
+
+declare var BigInt: BigIntConstructor;
+
+/**
+ * A typed array of 64-bit signed integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated, an exception is raised.
+ */
+interface BigInt64Array {
+ /** The size in bytes of each element in the array. */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /** The ArrayBuffer instance referenced by the array. */
+ readonly buffer: ArrayBufferLike;
+
+ /** The length in bytes of the array. */
+ readonly byteLength: number;
+
+ /** The offset in bytes of the array. */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /** Yields index, value pairs for every entry in the array. */
+ entries(): IterableIterator<[number, bigint]>;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param 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.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: bigint, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /** Yields each index in the array. */
+ keys(): IterableIterator<number>;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: bigint, fromIndex?: number): number;
+
+ /** The length of the array. */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (value: bigint, index: number, array: BigInt64Array) => bigint, thisArg?: any): BigInt64Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U;
+
+ /** Reverses the elements in the array. */
+ reverse(): this;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<bigint>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): BigInt64Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param 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(): string;
+
+ /** Returns a string representation of the array. */
+ toString(): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): BigInt64Array;
+
+ /** Yields each value in the array. */
+ values(): IterableIterator<bigint>;
+
+ [Symbol.iterator](): IterableIterator<bigint>;
+
+ readonly [Symbol.toStringTag]: "BigInt64Array";
+
+ [index: number]: bigint;
+}
+
+interface BigInt64ArrayConstructor {
+ readonly prototype: BigInt64Array;
+ new(length?: number): BigInt64Array;
+ new(array: Iterable<bigint>): BigInt64Array;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigInt64Array;
+
+ /** The size in bytes of each element in the array. */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: bigint[]): BigInt64Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<bigint>): BigInt64Array;
+ from<U>(arrayLike: ArrayLike<U>, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigInt64Array;
+}
+
+declare var BigInt64Array: BigInt64ArrayConstructor;
+
+/**
+ * A typed array of 64-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated, an exception is raised.
+ */
+interface BigUint64Array {
+ /** The size in bytes of each element in the array. */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /** The ArrayBuffer instance referenced by the array. */
+ readonly buffer: ArrayBufferLike;
+
+ /** The length in bytes of the array. */
+ readonly byteLength: number;
+
+ /** The offset in bytes of the array. */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /** Yields index, value pairs for every entry in the array. */
+ entries(): IterableIterator<[number, bigint]>;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param 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.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: bigint, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /** Yields each index in the array. */
+ keys(): IterableIterator<number>;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: bigint, fromIndex?: number): number;
+
+ /** The length of the array. */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (value: bigint, index: number, array: BigUint64Array) => bigint, thisArg?: any): BigUint64Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U;
+
+ /** Reverses the elements in the array. */
+ reverse(): this;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<bigint>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): BigUint64Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param 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(): string;
+
+ /** Returns a string representation of the array. */
+ toString(): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): BigUint64Array;
+
+ /** Yields each value in the array. */
+ values(): IterableIterator<bigint>;
+
+ [Symbol.iterator](): IterableIterator<bigint>;
+
+ readonly [Symbol.toStringTag]: "BigUint64Array";
+
+ [index: number]: bigint;
+}
+
+interface BigUint64ArrayConstructor {
+ readonly prototype: BigUint64Array;
+ new(length?: number): BigUint64Array;
+ new(array: Iterable<bigint>): BigUint64Array;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigUint64Array;
+
+ /** The size in bytes of each element in the array. */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: bigint[]): BigUint64Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<bigint>): BigUint64Array;
+ from<U>(arrayLike: ArrayLike<U>, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigUint64Array;
+}
+
+declare var BigUint64Array: BigUint64ArrayConstructor;
+
+interface DataView {
+ /**
+ * Gets the BigInt64 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ * @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;
+}
+
+declare namespace Intl{
+ interface NumberFormat {
+ format(value: number | bigint): string;
+ resolvedOptions(): ResolvedNumberFormatOptions;
+ }
+}
diff --git a/cli/tsc/dts/lib.es2020.d.ts b/cli/tsc/dts/lib.es2020.d.ts
new file mode 100644
index 000000000..ae81c40b4
--- /dev/null
+++ b/cli/tsc/dts/lib.es2020.d.ts
@@ -0,0 +1,29 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2019" />
+/// <reference lib="es2020.bigint" />
+/// <reference lib="es2020.date" />
+/// <reference lib="es2020.number" />
+/// <reference lib="es2020.promise" />
+/// <reference lib="es2020.sharedmemory" />
+/// <reference lib="es2020.string" />
+/// <reference lib="es2020.symbol.wellknown" />
+/// <reference lib="es2020.intl" />
diff --git a/cli/tsc/dts/lib.es2020.date.d.ts b/cli/tsc/dts/lib.es2020.date.d.ts
new file mode 100644
index 000000000..8eeb6b981
--- /dev/null
+++ b/cli/tsc/dts/lib.es2020.date.d.ts
@@ -0,0 +1,44 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2020.intl" />
+
+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;
+} \ No newline at end of file
diff --git a/cli/tsc/dts/lib.es2020.full.d.ts b/cli/tsc/dts/lib.es2020.full.d.ts
new file mode 100644
index 000000000..165b566d2
--- /dev/null
+++ b/cli/tsc/dts/lib.es2020.full.d.ts
@@ -0,0 +1,25 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2020" />
+/// <reference lib="dom" />
+/// <reference lib="webworker.importscripts" />
+/// <reference lib="scripthost" />
+/// <reference lib="dom.iterable" />
diff --git a/cli/tsc/dts/lib.es2020.intl.d.ts b/cli/tsc/dts/lib.es2020.intl.d.ts
new file mode 100644
index 000000000..5bce3812d
--- /dev/null
+++ b/cli/tsc/dts/lib.es2020.intl.d.ts
@@ -0,0 +1,433 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2018.intl" />
+declare namespace Intl {
+
+ /**
+ * [Unicode BCP 47 Locale Identifiers](https://unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers) definition.
+ *
+ * [MDN](https://developer.mozilla.org/en-US/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/en-US/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/en-US/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/en-US/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/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters).
+ */
+ type RelativeTimeFormatStyle = "long" | "short" | "narrow";
+
+ /**
+ * [BCP 47 language tag](http://tools.ietf.org/html/rfc5646) definition.
+ *
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument).
+ */
+ type BCP47LanguageTag = string;
+
+ /**
+ * The locale(s) to use
+ *
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument).
+ */
+ type LocalesArgument = UnicodeBCP47LocaleIdentifier | Locale | (UnicodeBCP47LocaleIdentifier | Locale)[] | undefined;
+
+ /**
+ * An object with some or all of properties of `options` parameter
+ * of `Intl.RelativeTimeFormat` constructor.
+ *
+ * [MDN](https://developer.mozilla.org/en-US/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;
+ /** The length of the internationalized message. */
+ style?: RelativeTimeFormatStyle;
+ }
+
+ /**
+ * An object with properties reflecting the locale
+ * and formatting options computed during initialization
+ * of the `Intl.RelativeTimeFormat` object
+ *
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions#Description).
+ */
+ interface ResolvedRelativeTimeFormatOptions {
+ locale: UnicodeBCP47LocaleIdentifier;
+ style: RelativeTimeFormatStyle;
+ 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/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts).
+ */
+ type RelativeTimeFormatPart =
+ | {
+ type: "literal";
+ value: string;
+ }
+ | {
+ type: Exclude<NumberFormatPartTypes, "literal">;
+ 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/en-US/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/en-US/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/en-US/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/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat#Browser_compatibility).
+ */
+ const RelativeTimeFormat: {
+ /**
+ * Creates [Intl.RelativeTimeFormat](https://developer.mozilla.org/en-US/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/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).
+ *
+ * @param options - An [object](https://developer.mozilla.org/en-US/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/en-US/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) object.
+ *
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat).
+ */
+ new(
+ locales?: UnicodeBCP47LocaleIdentifier | UnicodeBCP47LocaleIdentifier[],
+ 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/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).
+ *
+ * @param options - An [object](https://developer.mozilla.org/en-US/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/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/supportedLocalesOf).
+ */
+ supportedLocalesOf(
+ locales?: UnicodeBCP47LocaleIdentifier | UnicodeBCP47LocaleIdentifier[],
+ options?: RelativeTimeFormatOptions,
+ ): UnicodeBCP47LocaleIdentifier[];
+ };
+
+ interface NumberFormatOptions {
+ compactDisplay?: "short" | "long" | undefined;
+ notation?: "standard" | "scientific" | "engineering" | "compact" | undefined;
+ signDisplay?: "auto" | "never" | "always" | "exceptZero" | undefined;
+ unit?: string | undefined;
+ unitDisplay?: "short" | "long" | "narrow" | undefined;
+ currencyDisplay?: string | undefined;
+ currencySign?: string | undefined;
+ }
+
+ interface ResolvedNumberFormatOptions {
+ compactDisplay?: "short" | "long";
+ notation?: "standard" | "scientific" | "engineering" | "compact";
+ signDisplay?: "auto" | "never" | "always" | "exceptZero";
+ unit?: string;
+ unitDisplay?: "short" | "long" | "narrow";
+ currencyDisplay?: string;
+ currencySign?: string;
+ }
+
+ interface DateTimeFormatOptions {
+ calendar?: string | undefined;
+ dayPeriod?: "narrow" | "short" | "long" | undefined;
+ numberingSystem?: string | undefined;
+
+ dateStyle?: "full" | "long" | "medium" | "short" | undefined;
+ timeStyle?: "full" | "long" | "medium" | "short" | undefined;
+ hourCycle?: "h11" | "h12" | "h23" | "h24" | undefined;
+ }
+
+ type LocaleHourCycleKey = "h12" | "h23" | "h11" | "h24";
+ type LocaleCollationCaseFirst = "upper" | "lower" | "false";
+
+ interface LocaleOptions {
+ /** A string containing the language, and the script and region if available. */
+ baseName?: string;
+ /** 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 primary language subtag associated with the locale. */
+ language?: 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;
+ /** 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(): BCP47LanguageTag;
+ }
+
+ /**
+ * Constructor creates [Intl.Locale](https://developer.mozilla.org/en-US/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/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).
+ *
+ * @param options - An [object](https://developer.mozilla.org/en-US/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/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) object.
+ *
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale).
+ */
+ const Locale: {
+ new (tag: BCP47LanguageTag | 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/en-US/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/en-US/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/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) object.
+ *
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/resolvedOptions).
+ */
+ resolvedOptions(): ResolvedDisplayNamesOptions;
+ }
+
+ /**
+ * The [`Intl.DisplayNames()`](https://developer.mozilla.org/en-US/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/en-US/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/en-US/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/en-US/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/en-US/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/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/supportedLocalesOf).
+ */
+ supportedLocalesOf(locales?: LocalesArgument, options?: { localeMatcher?: RelativeTimeFormatLocaleMatcher }): BCP47LanguageTag[];
+ };
+
+}
diff --git a/cli/tsc/dts/lib.es2020.number.d.ts b/cli/tsc/dts/lib.es2020.number.d.ts
new file mode 100644
index 000000000..89f6a2723
--- /dev/null
+++ b/cli/tsc/dts/lib.es2020.number.d.ts
@@ -0,0 +1,30 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2020.intl" />
+
+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;
+}
diff --git a/cli/tsc/dts/lib.es2020.promise.d.ts b/cli/tsc/dts/lib.es2020.promise.d.ts
new file mode 100644
index 000000000..8107144ef
--- /dev/null
+++ b/cli/tsc/dts/lib.es2020.promise.d.ts
@@ -0,0 +1,49 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface PromiseFulfilledResult<T> {
+ status: "fulfilled";
+ value: T;
+}
+
+interface PromiseRejectedResult {
+ status: "rejected";
+ reason: any;
+}
+
+type PromiseSettledResult<T> = PromiseFulfilledResult<T> | PromiseRejectedResult;
+
+interface PromiseConstructor {
+ /**
+ * Creates a Promise that is resolved with an array of results when all
+ * of the provided Promises resolve or reject.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ allSettled<T extends readonly unknown[] | []>(values: T): Promise<{ -readonly [P in keyof T]: PromiseSettledResult<Awaited<T[P]>> }>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all
+ * of the provided Promises resolve or reject.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ allSettled<T>(values: Iterable<T | PromiseLike<T>>): Promise<PromiseSettledResult<Awaited<T>>[]>;
+}
diff --git a/cli/tsc/dts/lib.es2020.sharedmemory.d.ts b/cli/tsc/dts/lib.es2020.sharedmemory.d.ts
new file mode 100644
index 000000000..f86c5ad50
--- /dev/null
+++ b/cli/tsc/dts/lib.es2020.sharedmemory.d.ts
@@ -0,0 +1,99 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface 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;
+}
diff --git a/cli/tsc/dts/lib.es2020.string.d.ts b/cli/tsc/dts/lib.es2020.string.d.ts
new file mode 100644
index 000000000..19c730752
--- /dev/null
+++ b/cli/tsc/dts/lib.es2020.string.d.ts
@@ -0,0 +1,30 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2015.iterable" />
+
+interface String {
+ /**
+ * Matches a string with a regular expression, and returns an iterable of matches
+ * containing the results of that search.
+ * @param regexp A variable name or string literal containing the regular expression pattern and flags.
+ */
+ matchAll(regexp: RegExp): IterableIterator<RegExpMatchArray>;
+}
diff --git a/cli/tsc/dts/lib.es2020.symbol.wellknown.d.ts b/cli/tsc/dts/lib.es2020.symbol.wellknown.d.ts
new file mode 100644
index 000000000..7df0a2f45
--- /dev/null
+++ b/cli/tsc/dts/lib.es2020.symbol.wellknown.d.ts
@@ -0,0 +1,39 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2015.iterable" />
+/// <reference lib="es2015.symbol" />
+
+interface SymbolConstructor {
+ /**
+ * A regular expression method that matches the regular expression against a string. Called
+ * by the String.prototype.matchAll method.
+ */
+ readonly matchAll: unique symbol;
+}
+
+interface RegExp {
+ /**
+ * Matches a string with this regular expression, and returns an iterable of matches
+ * containing the results of that search.
+ * @param string A string to search within.
+ */
+ [Symbol.matchAll](str: string): IterableIterator<RegExpMatchArray>;
+}
diff --git a/cli/tsc/dts/lib.es2021.d.ts b/cli/tsc/dts/lib.es2021.d.ts
new file mode 100644
index 000000000..74b5288d1
--- /dev/null
+++ b/cli/tsc/dts/lib.es2021.d.ts
@@ -0,0 +1,25 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2020" />
+/// <reference lib="es2021.promise" />
+/// <reference lib="es2021.string" />
+/// <reference lib="es2021.weakref" />
+/// <reference lib="es2021.intl" />
diff --git a/cli/tsc/dts/lib.es2021.full.d.ts b/cli/tsc/dts/lib.es2021.full.d.ts
new file mode 100644
index 000000000..534887377
--- /dev/null
+++ b/cli/tsc/dts/lib.es2021.full.d.ts
@@ -0,0 +1,25 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2021" />
+/// <reference lib="dom" />
+/// <reference lib="webworker.importscripts" />
+/// <reference lib="scripthost" />
+/// <reference lib="dom.iterable" />
diff --git a/cli/tsc/dts/lib.es2021.intl.d.ts b/cli/tsc/dts/lib.es2021.intl.d.ts
new file mode 100644
index 000000000..e66ebb1af
--- /dev/null
+++ b/cli/tsc/dts/lib.es2021.intl.d.ts
@@ -0,0 +1,154 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+declare namespace Intl {
+
+ interface DateTimeFormatPartTypesRegistry {
+ fractionalSecond: any
+ }
+
+ interface DateTimeFormatOptions {
+ formatMatcher?: "basic" | "best fit" | "best fit" | undefined;
+ 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 {
+ formatMatcher?: "basic" | "best fit" | "best fit";
+ 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/en-US/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/en-US/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/en-US/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/en-US/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 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/en-US/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/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/format).
+ */
+ format(list: Iterable<string>): 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/en-US/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/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/formatToParts).
+ */
+ formatToParts(list: Iterable<string>): { type: "element" | "literal", value: string; }[];
+ }
+
+ const ListFormat: {
+ prototype: ListFormat;
+
+ /**
+ * Creates [Intl.ListFormat](https://developer.mozilla.org/en-US/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/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).
+ *
+ * @param options - An [object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters)
+ * with some or all options of `ListFormatOptions`.
+ *
+ * @returns [Intl.ListFormatOptions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat) object.
+ *
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat).
+ */
+ new(locales?: BCP47LanguageTag | BCP47LanguageTag[], 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/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).
+ *
+ * @param options - An [object](https://developer.mozilla.org/en-US/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/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf).
+ */
+ supportedLocalesOf(locales: BCP47LanguageTag | BCP47LanguageTag[], options?: Pick<ListFormatOptions, "localeMatcher">): BCP47LanguageTag[];
+ };
+}
diff --git a/cli/tsc/dts/lib.es2021.promise.d.ts b/cli/tsc/dts/lib.es2021.promise.d.ts
new file mode 100644
index 000000000..e3db43ffa
--- /dev/null
+++ b/cli/tsc/dts/lib.es2021.promise.d.ts
@@ -0,0 +1,50 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface AggregateError extends Error {
+ errors: any[]
+}
+
+interface AggregateErrorConstructor {
+ new(errors: Iterable<any>, message?: string): AggregateError;
+ (errors: Iterable<any>, message?: string): AggregateError;
+ readonly prototype: AggregateError;
+}
+
+declare var AggregateError: AggregateErrorConstructor;
+
+/**
+ * Represents the completion of an asynchronous operation
+ */
+interface PromiseConstructor {
+ /**
+ * The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm.
+ * @param values An array or iterable of Promises.
+ * @returns A new Promise.
+ */
+ any<T extends readonly unknown[] | []>(values: T): Promise<Awaited<T[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<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>
+}
diff --git a/cli/tsc/dts/lib.es2021.string.d.ts b/cli/tsc/dts/lib.es2021.string.d.ts
new file mode 100644
index 000000000..89b27e2fe
--- /dev/null
+++ b/cli/tsc/dts/lib.es2021.string.d.ts
@@ -0,0 +1,35 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface String {
+ /**
+ * Replace all instances of a substring in a string, using a regular expression or search string.
+ * @param searchValue A string to search for.
+ * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
+ */
+ replaceAll(searchValue: string | RegExp, replaceValue: string): string;
+
+ /**
+ * Replace all instances of a substring in a string, using a regular expression or search string.
+ * @param searchValue A string to search for.
+ * @param replacer A function that returns the replacement text.
+ */
+ replaceAll(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
+}
diff --git a/cli/tsc/dts/lib.es2021.weakref.d.ts b/cli/tsc/dts/lib.es2021.weakref.d.ts
new file mode 100644
index 000000000..eb7764242
--- /dev/null
+++ b/cli/tsc/dts/lib.es2021.weakref.d.ts
@@ -0,0 +1,75 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface WeakRef<T extends object> {
+ readonly [Symbol.toStringTag]: "WeakRef";
+
+ /**
+ * Returns the WeakRef instance's target object, or undefined if the target object has been
+ * reclaimed.
+ */
+ deref(): T | undefined;
+}
+
+interface WeakRefConstructor {
+ readonly prototype: WeakRef<any>;
+
+ /**
+ * Creates a WeakRef instance for the given target object.
+ * @param target The target object for the WeakRef instance.
+ */
+ new<T extends object>(target: T): WeakRef<T>;
+}
+
+declare var WeakRef: WeakRefConstructor;
+
+interface FinalizationRegistry<T> {
+ readonly [Symbol.toStringTag]: "FinalizationRegistry";
+
+ /**
+ * Registers an object with the registry.
+ * @param target The target object to register.
+ * @param heldValue The value to pass to the finalizer for this object. This cannot be the
+ * target object.
+ * @param unregisterToken The token to pass to the unregister method to unregister the target
+ * object. If provided (and not undefined), this must be an object. If not provided, the target
+ * cannot be unregistered.
+ */
+ register(target: object, heldValue: T, unregisterToken?: object): void;
+
+ /**
+ * Unregisters an object from the registry.
+ * @param unregisterToken The token that was used as the unregisterToken argument when calling
+ * register to register the target object.
+ */
+ unregister(unregisterToken: object): void;
+}
+
+interface FinalizationRegistryConstructor {
+ readonly prototype: FinalizationRegistry<any>;
+
+ /**
+ * Creates a finalization registry with an associated cleanup callback
+ * @param cleanupCallback The callback to call after an object in the registry has been reclaimed.
+ */
+ new<T>(cleanupCallback: (heldValue: T) => void): FinalizationRegistry<T>;
+}
+
+declare var FinalizationRegistry: FinalizationRegistryConstructor;
diff --git a/cli/tsc/dts/lib.es2022.array.d.ts b/cli/tsc/dts/lib.es2022.array.d.ts
new file mode 100644
index 000000000..1c117c530
--- /dev/null
+++ b/cli/tsc/dts/lib.es2022.array.d.ts
@@ -0,0 +1,123 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface Array<T> {
+ /**
+ * Returns the 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<T> {
+ /**
+ * 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;
+}
diff --git a/cli/tsc/dts/lib.es2022.d.ts b/cli/tsc/dts/lib.es2022.d.ts
new file mode 100644
index 000000000..83eb960c4
--- /dev/null
+++ b/cli/tsc/dts/lib.es2022.d.ts
@@ -0,0 +1,27 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2021" />
+/// <reference lib="es2022.array" />
+/// <reference lib="es2022.error" />
+/// <reference lib="es2022.intl" />
+/// <reference lib="es2022.object" />
+/// <reference lib="es2022.sharedmemory" />
+/// <reference lib="es2022.string" />
diff --git a/cli/tsc/dts/lib.es2022.error.d.ts b/cli/tsc/dts/lib.es2022.error.d.ts
new file mode 100644
index 000000000..4b16e0912
--- /dev/null
+++ b/cli/tsc/dts/lib.es2022.error.d.ts
@@ -0,0 +1,75 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface 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<any>,
+ message?: string,
+ options?: ErrorOptions
+ ): AggregateError;
+ (
+ errors: Iterable<any>,
+ message?: string,
+ options?: ErrorOptions
+ ): AggregateError;
+}
diff --git a/cli/tsc/dts/lib.es2022.full.d.ts b/cli/tsc/dts/lib.es2022.full.d.ts
new file mode 100644
index 000000000..19e78d48d
--- /dev/null
+++ b/cli/tsc/dts/lib.es2022.full.d.ts
@@ -0,0 +1,25 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2022" />
+/// <reference lib="dom" />
+/// <reference lib="webworker.importscripts" />
+/// <reference lib="scripthost" />
+/// <reference lib="dom.iterable" />
diff --git a/cli/tsc/dts/lib.es2022.intl.d.ts b/cli/tsc/dts/lib.es2022.intl.d.ts
new file mode 100644
index 000000000..ff487a11c
--- /dev/null
+++ b/cli/tsc/dts/lib.es2022.intl.d.ts
@@ -0,0 +1,111 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+declare namespace Intl {
+
+ /**
+ * An object with some or all properties of the `Intl.Segmenter` constructor `options` parameter.
+ *
+ * [MDN](https://developer.mozilla.org/en-US/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;
+ }
+
+ interface Segmenter {
+ /**
+ * Returns `Segments` object containing the segments of the input string, using the segmenter's locale and granularity.
+ *
+ * @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;
+ resolvedOptions(): ResolvedSegmenterOptions;
+ }
+
+ interface ResolvedSegmenterOptions {
+ locale: string;
+ granularity: "grapheme" | "word" | "sentence";
+ }
+
+ interface Segments {
+ /**
+ * Returns an object describing the segment in the original string that includes the code unit at a specified index.
+ *
+ * @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;
+
+ /** Returns an iterator to iterate over the segments. */
+ [Symbol.iterator](): IterableIterator<SegmentData>;
+ }
+
+ 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;
+ }
+
+ 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/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).
+ *
+ * @param options - An [object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/Segmenter#parameters)
+ * with some or all options of `SegmenterOptions`.
+ *
+ * @returns [Intl.Segmenter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segments) object.
+ *
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter).
+ */
+ new(locales?: BCP47LanguageTag | BCP47LanguageTag[], 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/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).
+ *
+ * @param options An [object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/supportedLocalesOf#parameters).
+ * with some or all possible options.
+ *
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/supportedLocalesOf)
+ */
+ supportedLocalesOf(locales: BCP47LanguageTag | BCP47LanguageTag[], options?: Pick<SegmenterOptions, "localeMatcher">): BCP47LanguageTag[];
+ };
+}
diff --git a/cli/tsc/dts/lib.es2022.object.d.ts b/cli/tsc/dts/lib.es2022.object.d.ts
new file mode 100644
index 000000000..2fe2a1917
--- /dev/null
+++ b/cli/tsc/dts/lib.es2022.object.d.ts
@@ -0,0 +1,28 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface ObjectConstructor {
+ /**
+ * 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;
+}
diff --git a/cli/tsc/dts/lib.es2022.sharedmemory.d.ts b/cli/tsc/dts/lib.es2022.sharedmemory.d.ts
new file mode 100644
index 000000000..43b9b88dc
--- /dev/null
+++ b/cli/tsc/dts/lib.es2022.sharedmemory.d.ts
@@ -0,0 +1,27 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface 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
+ */
+ waitAsync(typedArray: BigInt64Array | Int32Array, index: number, value: bigint, timeout?: number): { async: false, value: "ok" | "not-equal" | "timed-out" } | { async: true, value: Promise<"ok" | "not-equal" | "timed-out"> };
+}
diff --git a/cli/tsc/dts/lib.es2022.string.d.ts b/cli/tsc/dts/lib.es2022.string.d.ts
new file mode 100644
index 000000000..fbfc17f16
--- /dev/null
+++ b/cli/tsc/dts/lib.es2022.string.d.ts
@@ -0,0 +1,27 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface String {
+ /**
+ * 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;
+}
diff --git a/cli/tsc/dts/lib.es5.d.ts b/cli/tsc/dts/lib.es5.d.ts
new file mode 100644
index 000000000..28ca95abe
--- /dev/null
+++ b/cli/tsc/dts/lib.es5.d.ts
@@ -0,0 +1,4513 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/////////////////////////////
+/// ECMAScript APIs
+/////////////////////////////
+
+declare var NaN: number;
+declare var Infinity: number;
+
+/**
+ * Evaluates JavaScript code and executes it.
+ * @param x A String value that contains valid JavaScript code.
+ */
+declare function eval(x: string): any;
+
+/**
+ * Converts a string to an integer.
+ * @param 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.
+ */
+declare 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.
+ */
+declare function parseFloat(string: string): number;
+
+/**
+ * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a number).
+ * @param number A numeric value.
+ */
+declare function isNaN(number: number): boolean;
+
+/**
+ * Determines whether a supplied number is finite.
+ * @param number Any numeric value.
+ */
+declare function isFinite(number: number): boolean;
+
+/**
+ * Gets the unencoded version of an encoded Uniform Resource Identifier (URI).
+ * @param encodedURI A value representing an encoded URI.
+ */
+declare function decodeURI(encodedURI: string): string;
+
+/**
+ * Gets the unencoded version of an encoded component of a Uniform Resource Identifier (URI).
+ * @param encodedURIComponent A value representing an encoded URI component.
+ */
+declare function decodeURIComponent(encodedURIComponent: string): string;
+
+/**
+ * Encodes a text string as a valid Uniform Resource Identifier (URI)
+ * @param uri A value representing an unencoded URI.
+ */
+declare function encodeURI(uri: string): string;
+
+/**
+ * Encodes a text string as a valid component of a Uniform Resource Identifier (URI).
+ * @param uriComponent A value representing an unencoded URI component.
+ */
+declare function encodeURIComponent(uriComponent: string | number | boolean): string;
+
+/**
+ * Computes a new string in which certain characters have been replaced by a hexadecimal escape sequence.
+ * @deprecated A legacy feature for browser compatibility
+ * @param string A string value
+ */
+declare function escape(string: string): string;
+
+/**
+ * Computes a new string in which hexadecimal escape sequences are replaced with the character that it represents.
+ * @deprecated A legacy feature for browser compatibility
+ * @param string A string value
+ */
+declare function unescape(string: string): string;
+
+interface Symbol {
+ /** Returns a string representation of an object. */
+ toString(): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): symbol;
+}
+
+declare type PropertyKey = string | number | symbol;
+
+interface PropertyDescriptor {
+ configurable?: boolean;
+ enumerable?: boolean;
+ value?: any;
+ writable?: boolean;
+ get?(): any;
+ set?(v: any): void;
+}
+
+interface PropertyDescriptorMap {
+ [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;
+
+ /** Returns a date converted to a string using the current locale. */
+ toLocaleString(): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): Object;
+
+ /**
+ * Determines whether an object has a property with the specified name.
+ * @param v A property name.
+ */
+ hasOwnProperty(v: PropertyKey): boolean;
+
+ /**
+ * Determines whether an object exists in another object's prototype chain.
+ * @param v Another object whose prototype chain is to be checked.
+ */
+ isPrototypeOf(v: Object): boolean;
+
+ /**
+ * Determines whether a specified property is enumerable.
+ * @param v A property name.
+ */
+ propertyIsEnumerable(v: PropertyKey): boolean;
+}
+
+interface ObjectConstructor {
+ new(value?: any): Object;
+ (): any;
+ (value: any): any;
+
+ /** A reference to the prototype for a class of objects. */
+ readonly prototype: Object;
+
+ /**
+ * Returns the prototype of an object.
+ * @param o The object that references the prototype.
+ */
+ getPrototypeOf(o: any): any;
+
+ /**
+ * Gets the own property descriptor of the specified object.
+ * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype.
+ * @param o Object that contains the property.
+ * @param p Name of the property.
+ */
+ getOwnPropertyDescriptor(o: any, p: PropertyKey): PropertyDescriptor | undefined;
+
+ /**
+ * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly
+ * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions.
+ * @param o Object that contains the own properties.
+ */
+ getOwnPropertyNames(o: any): string[];
+
+ /**
+ * Creates an object that has the specified prototype or that has null prototype.
+ * @param o Object to use as a prototype. May be null.
+ */
+ create(o: object | null): any;
+
+ /**
+ * Creates an object that has the specified prototype, and that optionally contains specified properties.
+ * @param o Object to use as a prototype. May be null
+ * @param properties JavaScript object that contains one or more property descriptors.
+ */
+ create(o: object | null, properties: PropertyDescriptorMap & ThisType<any>): any;
+
+ /**
+ * Adds a property to an object, or modifies attributes of an existing property.
+ * @param o Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object.
+ * @param p The property name.
+ * @param attributes Descriptor for the property. It can be for a data property or an accessor property.
+ */
+ defineProperty<T>(o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType<any>): 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<T>(o: T, properties: PropertyDescriptorMap & ThisType<any>): 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<T>(o: T): T;
+
+ /**
+ * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
+ * @param a Object on which to lock the attributes.
+ */
+ freeze<T>(a: T[]): readonly T[];
+
+ /**
+ * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
+ * @param f Object on which to lock the attributes.
+ */
+ freeze<T extends Function>(f: T): T;
+
+ /**
+ * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
+ * @param o Object on which to lock the attributes.
+ */
+ freeze<T extends {[idx: string]: U | null | undefined | object}, U extends string | bigint | number | boolean | symbol>(o: T): Readonly<T>;
+
+ /**
+ * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
+ * @param o Object on which to lock the attributes.
+ */
+ freeze<T>(o: T): Readonly<T>;
+
+ /**
+ * Prevents the addition of new properties to an object.
+ * @param o Object to make non-extensible.
+ */
+ preventExtensions<T>(o: T): T;
+
+ /**
+ * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object.
+ * @param o Object to test.
+ */
+ isSealed(o: any): boolean;
+
+ /**
+ * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object.
+ * @param o Object to test.
+ */
+ isFrozen(o: any): boolean;
+
+ /**
+ * Returns a value that indicates whether new properties can be added to an object.
+ * @param o Object to test.
+ */
+ isExtensible(o: any): boolean;
+
+ /**
+ * Returns the names of the enumerable string properties and methods of an object.
+ * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
+ */
+ keys(o: object): string[];
+}
+
+/**
+ * Provides functionality common to all JavaScript objects.
+ */
+declare var Object: ObjectConstructor;
+
+/**
+ * Creates a new function.
+ */
+interface Function {
+ /**
+ * Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function.
+ * @param thisArg The object to be used as the this object.
+ * @param argArray A set of arguments to be passed to the function.
+ */
+ apply(this: Function, thisArg: any, argArray?: any): any;
+
+ /**
+ * Calls a method of an object, substituting another object for the current object.
+ * @param thisArg The object to be used as the current object.
+ * @param argArray A list of arguments to be passed to the method.
+ */
+ call(this: Function, thisArg: any, ...argArray: any[]): any;
+
+ /**
+ * For a given function, creates a bound function that has the same body as the original function.
+ * The this object of the bound function is associated with the specified object, and has the specified initial parameters.
+ * @param thisArg An object to which the this keyword can refer inside the new function.
+ * @param argArray A list of arguments to be passed to the new function.
+ */
+ bind(this: Function, thisArg: any, ...argArray: any[]): any;
+
+ /** Returns a string representation of a function. */
+ toString(): string;
+
+ prototype: any;
+ readonly length: number;
+
+ // Non-standard extensions
+ arguments: any;
+ caller: Function;
+}
+
+interface FunctionConstructor {
+ /**
+ * Creates a new function.
+ * @param args A list of arguments the function accepts.
+ */
+ new(...args: string[]): Function;
+ (...args: string[]): Function;
+ readonly prototype: Function;
+}
+
+declare var Function: FunctionConstructor;
+
+/**
+ * Extracts the type of the 'this' parameter of a function type, or 'unknown' if the function type has no 'this' parameter.
+ */
+type ThisParameterType<T> = T extends (this: infer U, ...args: never) => any ? U : unknown;
+
+/**
+ * Removes the 'this' parameter from a function type.
+ */
+type OmitThisParameter<T> = unknown extends ThisParameterType<T> ? T : T extends (...args: infer A) => infer R ? (...args: A) => R : T;
+
+interface CallableFunction extends Function {
+ /**
+ * Calls the function with the specified object as the this value and the elements of specified array as the arguments.
+ * @param thisArg The object to be used as the this object.
+ * @param args An array of argument values to be passed to the function.
+ */
+ apply<T, R>(this: (this: T) => R, thisArg: T): R;
+ apply<T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, args: A): R;
+
+ /**
+ * Calls the function with the specified object as the this value and the specified rest arguments as the arguments.
+ * @param thisArg The object to be used as the this object.
+ * @param args Argument values to be passed to the function.
+ */
+ call<T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, ...args: A): R;
+
+ /**
+ * For a given function, creates a bound function that has the same body as the original function.
+ * The this object of the bound function is associated with the specified object, and has the specified initial parameters.
+ * @param thisArg The object to be used as the this object.
+ * @param args Arguments to bind to the parameters of the function.
+ */
+ bind<T>(this: T, thisArg: ThisParameterType<T>): OmitThisParameter<T>;
+ bind<T, A0, A extends any[], R>(this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R;
+ bind<T, A0, A1, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R;
+ bind<T, A0, A1, A2, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R;
+ bind<T, A0, A1, A2, A3, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R;
+ bind<T, AX, R>(this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R;
+}
+
+interface NewableFunction extends Function {
+ /**
+ * Calls the function with the specified object as the this value and the elements of specified array as the arguments.
+ * @param thisArg The object to be used as the this object.
+ * @param args An array of argument values to be passed to the function.
+ */
+ apply<T>(this: new () => T, thisArg: T): void;
+ apply<T, A extends any[]>(this: new (...args: A) => T, thisArg: T, args: A): void;
+
+ /**
+ * Calls the function with the specified object as the this value and the specified rest arguments as the arguments.
+ * @param thisArg The object to be used as the this object.
+ * @param args Argument values to be passed to the function.
+ */
+ call<T, A extends any[]>(this: new (...args: A) => T, thisArg: T, ...args: A): void;
+
+ /**
+ * For a given function, creates a bound function that has the same body as the original function.
+ * The this object of the bound function is associated with the specified object, and has the specified initial parameters.
+ * @param thisArg The object to be used as the this object.
+ * @param args Arguments to bind to the parameters of the function.
+ */
+ bind<T>(this: T, thisArg: any): T;
+ bind<A0, A extends any[], R>(this: new (arg0: A0, ...args: A) => R, thisArg: any, arg0: A0): new (...args: A) => R;
+ bind<A0, A1, A extends any[], R>(this: new (arg0: A0, arg1: A1, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1): new (...args: A) => R;
+ bind<A0, A1, A2, A extends any[], R>(this: new (arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2): new (...args: A) => R;
+ bind<A0, A1, A2, A3, A extends any[], R>(this: new (arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2, arg3: A3): new (...args: A) => R;
+ bind<AX, R>(this: new (...args: AX[]) => R, thisArg: any, ...args: AX[]): new (...args: AX[]) => R;
+}
+
+interface IArguments {
+ [index: number]: any;
+ length: number;
+ callee: Function;
+}
+
+interface String {
+ /** Returns a string representation of a string. */
+ toString(): string;
+
+ /**
+ * Returns the character at the specified index.
+ * @param pos The zero-based index of the desired character.
+ */
+ charAt(pos: number): string;
+
+ /**
+ * Returns the Unicode value of the character at the specified location.
+ * @param index The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.
+ */
+ charCodeAt(index: number): number;
+
+ /**
+ * Returns a string that contains the concatenation of two or more strings.
+ * @param strings The strings to append to the end of the string.
+ */
+ concat(...strings: string[]): string;
+
+ /**
+ * Returns the position of the first occurrence of a substring.
+ * @param searchString The substring to search for in the string
+ * @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string.
+ */
+ indexOf(searchString: string, position?: number): number;
+
+ /**
+ * Returns the last occurrence of a substring in the string.
+ * @param searchString The substring to search for.
+ * @param position The index at which to begin searching. If omitted, the search begins at the end of the string.
+ */
+ lastIndexOf(searchString: string, position?: number): number;
+
+ /**
+ * Determines whether two strings are equivalent in the current locale.
+ * @param that String to compare to target string
+ */
+ localeCompare(that: string): number;
+
+ /**
+ * Matches a string with a regular expression, and returns an array containing the results of that search.
+ * @param regexp A variable name or string literal containing the regular expression pattern and flags.
+ */
+ match(regexp: string | RegExp): RegExpMatchArray | null;
+
+ /**
+ * Replaces text in a string, using a regular expression or search string.
+ * @param searchValue A string to search for.
+ * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
+ */
+ replace(searchValue: string | RegExp, replaceValue: string): string;
+
+ /**
+ * Replaces text in a string, using a regular expression or search string.
+ * @param searchValue A string to search for.
+ * @param replacer A function that returns the replacement text.
+ */
+ replace(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
+
+ /**
+ * Finds the first substring match in a regular expression search.
+ * @param regexp The regular expression pattern and applicable flags.
+ */
+ search(regexp: string | RegExp): number;
+
+ /**
+ * Returns a section of a string.
+ * @param start The index to the beginning of the specified portion of stringObj.
+ * @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end.
+ * If this value is not specified, the substring continues to the end of stringObj.
+ */
+ slice(start?: number, end?: number): string;
+
+ /**
+ * Split a string into substrings using the specified separator and return them as an array.
+ * @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned.
+ * @param limit A value used to limit the number of elements returned in the array.
+ */
+ split(separator: string | RegExp, limit?: number): string[];
+
+ /**
+ * Returns the substring at the specified location within a String object.
+ * @param start The zero-based index number indicating the beginning of the substring.
+ * @param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end.
+ * If end is omitted, the characters from start through the end of the original string are returned.
+ */
+ substring(start: number, end?: number): string;
+
+ /** Converts all the alphabetic characters in a string to lowercase. */
+ toLowerCase(): string;
+
+ /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */
+ toLocaleLowerCase(locales?: string | string[]): string;
+
+ /** Converts all the alphabetic characters in a string to uppercase. */
+ toUpperCase(): string;
+
+ /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */
+ toLocaleUpperCase(locales?: string | string[]): string;
+
+ /** Removes the leading and trailing white space and line terminator characters from a string. */
+ trim(): string;
+
+ /** Returns the length of a String object. */
+ readonly length: number;
+
+ // IE extensions
+ /**
+ * Gets a substring beginning at the specified location and having the specified length.
+ * @deprecated A legacy feature for browser compatibility
+ * @param from The starting position of the desired substring. The index of the first character in the string is zero.
+ * @param length The number of characters to include in the returned substring.
+ */
+ substr(from: number, length?: number): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): string;
+
+ readonly [index: number]: string;
+}
+
+interface StringConstructor {
+ new(value?: any): String;
+ (value?: any): string;
+ readonly prototype: String;
+ fromCharCode(...codes: number[]): string;
+}
+
+/**
+ * Allows manipulation and formatting of text strings and determination and location of substrings within strings.
+ */
+declare var String: StringConstructor;
+
+interface Boolean {
+ /** Returns the primitive value of the specified object. */
+ valueOf(): boolean;
+}
+
+interface BooleanConstructor {
+ new(value?: any): Boolean;
+ <T>(value?: T): boolean;
+ readonly prototype: Boolean;
+}
+
+declare var Boolean: BooleanConstructor;
+
+interface Number {
+ /**
+ * Returns a string representation of an object.
+ * @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers.
+ */
+ toString(radix?: number): string;
+
+ /**
+ * Returns a string representing a number in fixed-point notation.
+ * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
+ */
+ toFixed(fractionDigits?: number): string;
+
+ /**
+ * Returns a string containing a number represented in exponential notation.
+ * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
+ */
+ toExponential(fractionDigits?: number): string;
+
+ /**
+ * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.
+ * @param precision Number of significant digits. Must be in the range 1 - 21, inclusive.
+ */
+ toPrecision(precision?: number): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): number;
+}
+
+interface NumberConstructor {
+ new(value?: any): Number;
+ (value?: any): number;
+ readonly prototype: Number;
+
+ /** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */
+ readonly MAX_VALUE: number;
+
+ /** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */
+ readonly MIN_VALUE: number;
+
+ /**
+ * A value that is not a number.
+ * In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function.
+ */
+ readonly NaN: number;
+
+ /**
+ * A value that is less than the largest negative number that can be represented in JavaScript.
+ * JavaScript displays NEGATIVE_INFINITY values as -infinity.
+ */
+ readonly NEGATIVE_INFINITY: number;
+
+ /**
+ * A value greater than the largest number that can be represented in JavaScript.
+ * JavaScript displays POSITIVE_INFINITY values as infinity.
+ */
+ readonly POSITIVE_INFINITY: number;
+}
+
+/** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */
+declare var Number: NumberConstructor;
+
+interface TemplateStringsArray extends ReadonlyArray<string> {
+ readonly raw: readonly string[];
+}
+
+/**
+ * The type of `import.meta`.
+ *
+ * If you need to declare that a given property exists on `import.meta`,
+ * this type may be augmented via interface merging.
+ */
+interface ImportMeta {
+}
+
+/**
+ * The type for the optional second argument to `import()`.
+ *
+ * If your host environment supports additional options, this type may be
+ * augmented via interface merging.
+ */
+interface ImportCallOptions {
+ assert?: ImportAssertions;
+}
+
+/**
+ * The type for the `assert` property of the optional second argument to `import()`.
+ */
+interface ImportAssertions {
+ [key: string]: string;
+}
+
+interface Math {
+ /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */
+ readonly E: number;
+ /** The natural logarithm of 10. */
+ readonly LN10: number;
+ /** The natural logarithm of 2. */
+ readonly LN2: number;
+ /** The base-2 logarithm of e. */
+ readonly LOG2E: number;
+ /** The base-10 logarithm of e. */
+ readonly LOG10E: number;
+ /** Pi. This is the ratio of the circumference of a circle to its diameter. */
+ readonly PI: number;
+ /** The square root of 0.5, or, equivalently, one divided by the square root of 2. */
+ readonly SQRT1_2: number;
+ /** The square root of 2. */
+ readonly SQRT2: number;
+ /**
+ * Returns the absolute value of a number (the value without regard to whether it is positive or negative).
+ * For example, the absolute value of -5 is the same as the absolute value of 5.
+ * @param x A numeric expression for which the absolute value is needed.
+ */
+ abs(x: number): number;
+ /**
+ * Returns the arc cosine (or inverse cosine) of a number.
+ * @param x A numeric expression.
+ */
+ acos(x: number): number;
+ /**
+ * Returns the arcsine of a number.
+ * @param x A numeric expression.
+ */
+ asin(x: number): number;
+ /**
+ * Returns the arctangent of a number.
+ * @param x A numeric expression for which the arctangent is needed.
+ */
+ atan(x: number): number;
+ /**
+ * Returns the angle (in radians) from the X axis to a point.
+ * @param y A numeric expression representing the cartesian y-coordinate.
+ * @param x A numeric expression representing the cartesian x-coordinate.
+ */
+ atan2(y: number, x: number): number;
+ /**
+ * Returns the smallest integer greater than or equal to its numeric argument.
+ * @param x A numeric expression.
+ */
+ ceil(x: number): number;
+ /**
+ * Returns the cosine of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ cos(x: number): number;
+ /**
+ * Returns e (the base of natural logarithms) raised to a power.
+ * @param x A numeric expression representing the power of e.
+ */
+ exp(x: number): number;
+ /**
+ * Returns the greatest integer less than or equal to its numeric argument.
+ * @param x A numeric expression.
+ */
+ floor(x: number): number;
+ /**
+ * Returns the natural logarithm (base e) of a number.
+ * @param x A numeric expression.
+ */
+ log(x: number): number;
+ /**
+ * Returns the larger of a set of supplied numeric expressions.
+ * @param values Numeric expressions to be evaluated.
+ */
+ max(...values: number[]): number;
+ /**
+ * Returns the smaller of a set of supplied numeric expressions.
+ * @param values Numeric expressions to be evaluated.
+ */
+ min(...values: number[]): number;
+ /**
+ * Returns the value of a base expression taken to a specified power.
+ * @param x The base value of the expression.
+ * @param y The exponent value of the expression.
+ */
+ pow(x: number, y: number): number;
+ /** Returns a pseudorandom number between 0 and 1. */
+ random(): number;
+ /**
+ * Returns a supplied numeric expression rounded to the nearest integer.
+ * @param x The value to be rounded to the nearest integer.
+ */
+ round(x: number): number;
+ /**
+ * Returns the sine of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ sin(x: number): number;
+ /**
+ * Returns the square root of a number.
+ * @param x A numeric expression.
+ */
+ sqrt(x: number): number;
+ /**
+ * Returns the tangent of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ tan(x: number): number;
+}
+/** An intrinsic object that provides basic mathematics functionality and constants. */
+declare var Math: Math;
+
+/** Enables basic storage and retrieval of dates and times. */
+interface Date {
+ /** Returns a string representation of a date. The format of the string depends on the locale. */
+ toString(): string;
+ /** Returns a date as a string value. */
+ toDateString(): string;
+ /** Returns a time as a string value. */
+ toTimeString(): string;
+ /** Returns a value as a string value appropriate to the host environment's current locale. */
+ toLocaleString(): string;
+ /** Returns a date as a string value appropriate to the host environment's current locale. */
+ toLocaleDateString(): string;
+ /** Returns a time as a string value appropriate to the host environment's current locale. */
+ toLocaleTimeString(): string;
+ /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */
+ valueOf(): number;
+ /** Gets the time value in milliseconds. */
+ getTime(): number;
+ /** Gets the year, using local time. */
+ getFullYear(): number;
+ /** Gets the year using Universal Coordinated Time (UTC). */
+ getUTCFullYear(): number;
+ /** Gets the month, using local time. */
+ getMonth(): number;
+ /** Gets the month of a Date object using Universal Coordinated Time (UTC). */
+ getUTCMonth(): number;
+ /** Gets the day-of-the-month, using local time. */
+ getDate(): number;
+ /** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */
+ getUTCDate(): number;
+ /** Gets the day of the week, using local time. */
+ getDay(): number;
+ /** Gets the day of the week using Universal Coordinated Time (UTC). */
+ getUTCDay(): number;
+ /** Gets the hours in a date, using local time. */
+ getHours(): number;
+ /** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */
+ getUTCHours(): number;
+ /** Gets the minutes of a Date object, using local time. */
+ getMinutes(): number;
+ /** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */
+ getUTCMinutes(): number;
+ /** Gets the seconds of a Date object, using local time. */
+ getSeconds(): number;
+ /** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */
+ getUTCSeconds(): number;
+ /** Gets the milliseconds of a Date, using local time. */
+ getMilliseconds(): number;
+ /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */
+ getUTCMilliseconds(): number;
+ /** Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC). */
+ getTimezoneOffset(): number;
+ /**
+ * Sets the date and time value in the Date object.
+ * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT.
+ */
+ setTime(time: number): number;
+ /**
+ * Sets the milliseconds value in the Date object using local time.
+ * @param ms A numeric value equal to the millisecond value.
+ */
+ setMilliseconds(ms: number): number;
+ /**
+ * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).
+ * @param ms A numeric value equal to the millisecond value.
+ */
+ setUTCMilliseconds(ms: number): number;
+
+ /**
+ * Sets the seconds value in the Date object using local time.
+ * @param sec A numeric value equal to the seconds value.
+ * @param ms A numeric value equal to the milliseconds value.
+ */
+ setSeconds(sec: number, ms?: number): number;
+ /**
+ * Sets the seconds value in the Date object using Universal Coordinated Time (UTC).
+ * @param sec A numeric value equal to the seconds value.
+ * @param ms A numeric value equal to the milliseconds value.
+ */
+ setUTCSeconds(sec: number, ms?: number): number;
+ /**
+ * Sets the minutes value in the Date object using local time.
+ * @param min A numeric value equal to the minutes value.
+ * @param sec A numeric value equal to the seconds value.
+ * @param ms A numeric value equal to the milliseconds value.
+ */
+ setMinutes(min: number, sec?: number, ms?: number): number;
+ /**
+ * Sets the minutes value in the Date object using Universal Coordinated Time (UTC).
+ * @param min A numeric value equal to the minutes value.
+ * @param sec A numeric value equal to the seconds value.
+ * @param ms A numeric value equal to the milliseconds value.
+ */
+ setUTCMinutes(min: number, sec?: number, ms?: number): number;
+ /**
+ * Sets the hour value in the Date object using local time.
+ * @param hours A numeric value equal to the hours value.
+ * @param min A numeric value equal to the minutes value.
+ * @param sec A numeric value equal to the seconds value.
+ * @param ms A numeric value equal to the milliseconds value.
+ */
+ setHours(hours: number, min?: number, sec?: number, ms?: number): number;
+ /**
+ * Sets the hours value in the Date object using Universal Coordinated Time (UTC).
+ * @param hours A numeric value equal to the hours value.
+ * @param min A numeric value equal to the minutes value.
+ * @param sec A numeric value equal to the seconds value.
+ * @param ms A numeric value equal to the milliseconds value.
+ */
+ setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number;
+ /**
+ * Sets the numeric day-of-the-month value of the Date object using local time.
+ * @param date A numeric value equal to the day of the month.
+ */
+ setDate(date: number): number;
+ /**
+ * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC).
+ * @param date A numeric value equal to the day of the month.
+ */
+ setUTCDate(date: number): number;
+ /**
+ * Sets the month value in the Date object using local time.
+ * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
+ * @param date A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used.
+ */
+ setMonth(month: number, date?: number): number;
+ /**
+ * Sets the month value in the Date object using Universal Coordinated Time (UTC).
+ * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
+ * @param date A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used.
+ */
+ setUTCMonth(month: number, date?: number): number;
+ /**
+ * Sets the year of the Date object using local time.
+ * @param year A numeric value for the year.
+ * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified.
+ * @param date A numeric value equal for the day of the month.
+ */
+ setFullYear(year: number, month?: number, date?: number): number;
+ /**
+ * Sets the year value in the Date object using Universal Coordinated Time (UTC).
+ * @param year A numeric value equal to the year.
+ * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied.
+ * @param date A numeric value equal to the day of the month.
+ */
+ setUTCFullYear(year: number, month?: number, date?: number): number;
+ /** Returns a date converted to a string using Universal Coordinated Time (UTC). */
+ toUTCString(): string;
+ /** Returns a date as a string value in ISO format. */
+ toISOString(): string;
+ /** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */
+ toJSON(key?: any): string;
+}
+
+interface DateConstructor {
+ new(): Date;
+ new(value: number | string): Date;
+ new(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date;
+ (): string;
+ readonly prototype: Date;
+ /**
+ * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970.
+ * @param s A date string
+ */
+ parse(s: string): number;
+ /**
+ * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date.
+ * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.
+ * @param month The month as a number between 0 and 11 (January to December).
+ * @param date The date as a number between 1 and 31.
+ * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour.
+ * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes.
+ * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds.
+ * @param ms A number from 0 to 999 that specifies the milliseconds.
+ */
+ UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number;
+ now(): number;
+}
+
+declare var Date: DateConstructor;
+
+interface RegExpMatchArray extends Array<string> {
+ /**
+ * The index of the search at which the result was found.
+ */
+ index?: number;
+ /**
+ * A copy of the search string.
+ */
+ input?: string;
+}
+
+interface RegExpExecArray extends Array<string> {
+ /**
+ * The index of the search at which the result was found.
+ */
+ index: number;
+ /**
+ * A copy of the search string.
+ */
+ input: string;
+}
+
+interface RegExp {
+ /**
+ * Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search.
+ * @param string The String object or string literal on which to perform the search.
+ */
+ exec(string: string): RegExpExecArray | null;
+
+ /**
+ * Returns a Boolean value that indicates whether or not a pattern exists in a searched string.
+ * @param string String on which to perform the search.
+ */
+ test(string: string): boolean;
+
+ /** Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. */
+ readonly source: string;
+
+ /** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */
+ readonly global: boolean;
+
+ /** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */
+ readonly ignoreCase: boolean;
+
+ /** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */
+ readonly multiline: boolean;
+
+ lastIndex: number;
+
+ // Non-standard extensions
+ /** @deprecated A legacy feature for browser compatibility */
+ compile(pattern: string, flags?: string): this;
+}
+
+interface RegExpConstructor {
+ new(pattern: RegExp | string): RegExp;
+ new(pattern: string, flags?: string): RegExp;
+ (pattern: RegExp | string): RegExp;
+ (pattern: string, flags?: string): RegExp;
+ readonly prototype: RegExp;
+
+ // Non-standard extensions
+ /** @deprecated A legacy feature for browser compatibility */
+ $1: string;
+ /** @deprecated A legacy feature for browser compatibility */
+ $2: string;
+ /** @deprecated A legacy feature for browser compatibility */
+ $3: string;
+ /** @deprecated A legacy feature for browser compatibility */
+ $4: string;
+ /** @deprecated A legacy feature for browser compatibility */
+ $5: string;
+ /** @deprecated A legacy feature for browser compatibility */
+ $6: string;
+ /** @deprecated A legacy feature for browser compatibility */
+ $7: string;
+ /** @deprecated A legacy feature for browser compatibility */
+ $8: string;
+ /** @deprecated A legacy feature for browser compatibility */
+ $9: string;
+ /** @deprecated A legacy feature for browser compatibility */
+ input: string;
+ /** @deprecated A legacy feature for browser compatibility */
+ $_: string;
+ /** @deprecated A legacy feature for browser compatibility */
+ lastMatch: string;
+ /** @deprecated A legacy feature for browser compatibility */
+ "$&": string;
+ /** @deprecated A legacy feature for browser compatibility */
+ lastParen: string;
+ /** @deprecated A legacy feature for browser compatibility */
+ "$+": string;
+ /** @deprecated A legacy feature for browser compatibility */
+ leftContext: string;
+ /** @deprecated A legacy feature for browser compatibility */
+ "$`": string;
+ /** @deprecated A legacy feature for browser compatibility */
+ rightContext: string;
+ /** @deprecated A legacy feature for browser compatibility */
+ "$'": string;
+}
+
+declare var RegExp: RegExpConstructor;
+
+interface Error {
+ name: string;
+ message: string;
+ stack?: string;
+}
+
+interface ErrorConstructor {
+ new(message?: string): Error;
+ (message?: string): Error;
+ readonly prototype: Error;
+}
+
+declare var Error: ErrorConstructor;
+
+interface EvalError extends Error {
+}
+
+interface EvalErrorConstructor extends ErrorConstructor {
+ new(message?: string): EvalError;
+ (message?: string): EvalError;
+ readonly prototype: EvalError;
+}
+
+declare var EvalError: EvalErrorConstructor;
+
+interface RangeError extends Error {
+}
+
+interface RangeErrorConstructor extends ErrorConstructor {
+ new(message?: string): RangeError;
+ (message?: string): RangeError;
+ readonly prototype: RangeError;
+}
+
+declare var RangeError: RangeErrorConstructor;
+
+interface ReferenceError extends Error {
+}
+
+interface ReferenceErrorConstructor extends ErrorConstructor {
+ new(message?: string): ReferenceError;
+ (message?: string): ReferenceError;
+ readonly prototype: ReferenceError;
+}
+
+declare var ReferenceError: ReferenceErrorConstructor;
+
+interface SyntaxError extends Error {
+}
+
+interface SyntaxErrorConstructor extends ErrorConstructor {
+ new(message?: string): SyntaxError;
+ (message?: string): SyntaxError;
+ readonly prototype: SyntaxError;
+}
+
+declare var SyntaxError: SyntaxErrorConstructor;
+
+interface TypeError extends Error {
+}
+
+interface TypeErrorConstructor extends ErrorConstructor {
+ new(message?: string): TypeError;
+ (message?: string): TypeError;
+ readonly prototype: TypeError;
+}
+
+declare var TypeError: TypeErrorConstructor;
+
+interface URIError extends Error {
+}
+
+interface URIErrorConstructor extends ErrorConstructor {
+ new(message?: string): URIError;
+ (message?: string): URIError;
+ readonly prototype: URIError;
+}
+
+declare var URIError: URIErrorConstructor;
+
+interface JSON {
+ /**
+ * Converts a JavaScript Object Notation (JSON) string into an object.
+ * @param text A valid JSON string.
+ * @param reviver A function that transforms the results. This function is called for each member of the object.
+ * If a member contains nested objects, the nested objects are transformed before the parent object is.
+ */
+ parse(text: string, reviver?: (this: any, key: string, value: any) => any): any;
+ /**
+ * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
+ * @param value A JavaScript value, usually an object or array, to be converted.
+ * @param replacer A function that transforms the results.
+ * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
+ */
+ stringify(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
+ /**
+ * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
+ * @param value A JavaScript value, usually an object or array, to be converted.
+ * @param replacer An array of strings and numbers that acts as 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.
+ */
+ stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
+}
+
+/**
+ * An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format.
+ */
+declare var JSON: JSON;
+
+
+/////////////////////////////
+/// ECMAScript Array API (specially handled by compiler)
+/////////////////////////////
+
+interface ReadonlyArray<T> {
+ /**
+ * Gets the length of the array. This is a number one higher than the highest element defined in an array.
+ */
+ readonly length: number;
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+ /**
+ * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods.
+ */
+ toLocaleString(): string;
+ /**
+ * Combines two or more arrays.
+ * @param items Additional items to add to the end of array1.
+ */
+ concat(...items: ConcatArray<T>[]): T[];
+ /**
+ * Combines two or more arrays.
+ * @param items Additional items to add to the end of array1.
+ */
+ concat(...items: (T | ConcatArray<T>)[]): T[];
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
+ */
+ slice(start?: number, end?: number): T[];
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
+ */
+ indexOf(searchElement: T, fromIndex?: number): number;
+ /**
+ * Returns the index of the last occurrence of a specified value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.
+ */
+ lastIndexOf(searchElement: T, fromIndex?: number): number;
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param 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<S extends T>(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<U>(callbackfn: (value: T, index: number, array: readonly T[]) => U, thisArg?: any): U[];
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param 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<S extends T>(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<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U;
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T;
+ reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T;
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U;
+
+ readonly [n: number]: T;
+}
+
+interface ConcatArray<T> {
+ readonly length: number;
+ readonly [n: number]: T;
+ join(separator?: string): string;
+ slice(start?: number, end?: number): T[];
+}
+
+interface Array<T> {
+ /**
+ * Gets or sets the length of the array. This is a number one higher than the highest 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>[]): 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>)[]): 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, ASCII character order.
+ * ```ts
+ * [11,2,22,1].sort((a, b) => a - b)
+ * ```
+ */
+ sort(compareFn?: (a: T, b: T) => number): this;
+ /**
+ * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
+ * @param start The zero-based location in the array from which to start removing elements.
+ * @param deleteCount The number of elements to remove.
+ * @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.
+ * @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<S extends T>(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<U>(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[];
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param 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<S extends T>(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<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T;
+ reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T;
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
+
+ [n: number]: T;
+}
+
+interface ArrayConstructor {
+ new(arrayLength?: number): any[];
+ new <T>(arrayLength: number): T[];
+ new <T>(...items: T[]): T[];
+ (arrayLength?: number): any[];
+ <T>(arrayLength: number): T[];
+ <T>(...items: T[]): T[];
+ isArray(arg: any): arg is any[];
+ readonly prototype: any[];
+}
+
+declare var Array: ArrayConstructor;
+
+interface TypedPropertyDescriptor<T> {
+ enumerable?: boolean;
+ configurable?: boolean;
+ writable?: boolean;
+ value?: T;
+ get?: () => T;
+ set?: (value: T) => void;
+}
+
+declare type ClassDecorator = <TFunction extends Function>(target: TFunction) => TFunction | void;
+declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void;
+declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
+declare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;
+
+declare type PromiseConstructorLike = new <T>(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void) => PromiseLike<T>;
+
+interface PromiseLike<T> {
+ /**
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
+ * @param onfulfilled The callback to execute when the Promise is resolved.
+ * @param onrejected The callback to execute when the Promise is rejected.
+ * @returns A Promise for the completion of which ever callback is executed.
+ */
+ then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): PromiseLike<TResult1 | TResult2>;
+}
+
+/**
+ * Represents the completion of an asynchronous operation
+ */
+interface Promise<T> {
+ /**
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
+ * @param onfulfilled The callback to execute when the Promise is resolved.
+ * @param onrejected The callback to execute when the Promise is rejected.
+ * @returns A Promise for the completion of which ever callback is executed.
+ */
+ then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): Promise<TResult1 | TResult2>;
+
+ /**
+ * Attaches a callback for only the rejection of the Promise.
+ * @param onrejected The callback to execute when the Promise is rejected.
+ * @returns A Promise for the completion of the callback.
+ */
+ catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<T | TResult>;
+}
+
+/**
+ * Recursively unwraps the "awaited type" of a type. Non-promise "thenables" should resolve to `never`. This emulates the behavior of `await`.
+ */
+type Awaited<T> =
+ T extends null | undefined ? T : // special case for `null | undefined` when not in `--strictNullChecks` mode
+ T extends object & { then(onfulfilled: infer F): any } ? // `await` only unwraps object types with a callable `then`. Non-object types are not unwrapped
+ F extends ((value: infer V, ...args: any) => any) ? // if the argument to `then` is callable, extracts the first argument
+ Awaited<V> : // recursively unwrap the value
+ never : // the argument to `then` was not callable
+ T; // non-object or non-thenable
+
+interface ArrayLike<T> {
+ readonly length: number;
+ readonly [n: number]: T;
+}
+
+/**
+ * Make all properties in T optional
+ */
+type Partial<T> = {
+ [P in keyof T]?: T[P];
+};
+
+/**
+ * Make all properties in T required
+ */
+type Required<T> = {
+ [P in keyof T]-?: T[P];
+};
+
+/**
+ * Make all properties in T readonly
+ */
+type Readonly<T> = {
+ readonly [P in keyof T]: T[P];
+};
+
+/**
+ * From T, pick a set of properties whose keys are in the union K
+ */
+type Pick<T, K extends keyof T> = {
+ [P in K]: T[P];
+};
+
+/**
+ * Construct a type with a set of properties K of type T
+ */
+type Record<K extends keyof any, T> = {
+ [P in K]: T;
+};
+
+/**
+ * Exclude from T those types that are assignable to U
+ */
+type Exclude<T, U> = T extends U ? never : T;
+
+/**
+ * Extract from T those types that are assignable to U
+ */
+type Extract<T, U> = T extends U ? T : never;
+
+/**
+ * Construct a type with the properties of T except for those in type K.
+ */
+type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;
+
+/**
+ * Exclude null and undefined from T
+ */
+type NonNullable<T> = T & {};
+
+/**
+ * Obtain the parameters of a function type in a tuple
+ */
+type Parameters<T extends (...args: any) => any> = T extends (...args: infer P) => any ? P : never;
+
+/**
+ * Obtain the parameters of a constructor function type in a tuple
+ */
+type ConstructorParameters<T extends abstract new (...args: any) => any> = T extends abstract new (...args: infer P) => any ? P : never;
+
+/**
+ * Obtain the return type of a function type
+ */
+type ReturnType<T extends (...args: any) => any> = T extends (...args: any) => infer R ? R : any;
+
+/**
+ * Obtain the return type of a constructor function type
+ */
+type InstanceType<T extends abstract new (...args: any) => any> = T extends abstract new (...args: any) => infer R ? R : any;
+
+/**
+ * Convert string literal type to uppercase
+ */
+type Uppercase<S extends string> = intrinsic;
+
+/**
+ * Convert string literal type to lowercase
+ */
+type Lowercase<S extends string> = intrinsic;
+
+/**
+ * Convert first character of string literal type to uppercase
+ */
+type Capitalize<S extends string> = intrinsic;
+
+/**
+ * Convert first character of string literal type to lowercase
+ */
+type Uncapitalize<S extends string> = intrinsic;
+
+/**
+ * Marker for contextual 'this' type
+ */
+interface ThisType<T> { }
+
+/**
+ * Represents a raw buffer of binary data, which is used to store data for the
+ * different typed arrays. ArrayBuffers cannot be read from or written to directly,
+ * but can be passed to a typed array or DataView Object to interpret the raw
+ * buffer as needed.
+ */
+interface ArrayBuffer {
+ /**
+ * Read-only. The length of the ArrayBuffer (in bytes).
+ */
+ readonly byteLength: number;
+
+ /**
+ * Returns a section of an ArrayBuffer.
+ */
+ slice(begin: number, end?: number): ArrayBuffer;
+}
+
+/**
+ * Allowed ArrayBuffer types for the buffer of an ArrayBufferView and related Typed Arrays.
+ */
+interface ArrayBufferTypes {
+ ArrayBuffer: ArrayBuffer;
+}
+type ArrayBufferLike = ArrayBufferTypes[keyof ArrayBufferTypes];
+
+interface ArrayBufferConstructor {
+ readonly prototype: ArrayBuffer;
+ new(byteLength: number): ArrayBuffer;
+ isView(arg: any): arg is ArrayBufferView;
+}
+declare var ArrayBuffer: ArrayBufferConstructor;
+
+interface ArrayBufferView {
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ buffer: ArrayBufferLike;
+
+ /**
+ * The length in bytes of the array.
+ */
+ byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ byteOffset: number;
+}
+
+interface DataView {
+ readonly buffer: ArrayBuffer;
+ readonly byteLength: number;
+ readonly byteOffset: number;
+ /**
+ * Gets the Float32 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ * @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: ArrayBufferLike, byteOffset?: number, byteLength?: number): DataView;
+}
+declare var DataView: DataViewConstructor;
+
+/**
+ * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested
+ * number of bytes could not be allocated an exception is raised.
+ */
+interface Int8Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBufferLike;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param 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: Int8Array) => 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: Int8Array) => any, thisArg?: any): Int8Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (value: number, index: number, obj: Int8Array) => boolean, thisArg?: any): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (value: number, index: number, obj: Int8Array) => boolean, thisArg?: any): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: number, index: number, array: Int8Array) => void, thisArg?: any): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (value: number, index: number, array: Int8Array) => number, thisArg?: any): Int8Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number): number;
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number): number;
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Int8Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
+ */
+ slice(start?: number, end?: number): Int8Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param 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: Int8Array) => unknown, thisArg?: any): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn Function used to determine the order of the elements. It is expected to return
+ * a negative value if first argument is less than second argument, zero if they're equal and a positive
+ * value otherwise. If omitted, the elements are sorted in ascending order.
+ * ```ts
+ * [11,2,22,1].sort((a, b) => a - b)
+ * ```
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin?: number, end?: number): Int8Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): Int8Array;
+
+ [index: number]: number;
+}
+interface Int8ArrayConstructor {
+ readonly prototype: Int8Array;
+ new(length: number): Int8Array;
+ new(array: ArrayLike<number> | ArrayBufferLike): Int8Array;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int8Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Int8Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ */
+ from(arrayLike: ArrayLike<number>): Int8Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array;
+
+
+}
+declare var Int8Array: Int8ArrayConstructor;
+
+/**
+ * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint8Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBufferLike;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param 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: Uint8Array) => 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: Uint8Array) => any, thisArg?: any): Uint8Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (value: number, index: number, obj: Uint8Array) => boolean, thisArg?: any): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (value: number, index: number, obj: Uint8Array) => boolean, thisArg?: any): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: number, index: number, array: Uint8Array) => void, thisArg?: any): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (value: number, index: number, array: Uint8Array) => number, thisArg?: any): Uint8Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number): number;
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number): number;
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Uint8Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
+ */
+ slice(start?: number, end?: number): Uint8Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param 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: Uint8Array) => unknown, thisArg?: any): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn Function used to determine the order of the elements. It is expected to return
+ * a negative value if first argument is less than second argument, zero if they're equal and a positive
+ * value otherwise. If omitted, the elements are sorted in ascending order.
+ * ```ts
+ * [11,2,22,1].sort((a, b) => a - b)
+ * ```
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin?: number, end?: number): Uint8Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): Uint8Array;
+
+ [index: number]: number;
+}
+
+interface Uint8ArrayConstructor {
+ readonly prototype: Uint8Array;
+ new(length: number): Uint8Array;
+ new(array: ArrayLike<number> | ArrayBufferLike): Uint8Array;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Uint8Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ */
+ from(arrayLike: ArrayLike<number>): Uint8Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array;
+
+}
+declare var Uint8Array: Uint8ArrayConstructor;
+
+/**
+ * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0.
+ * If the requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint8ClampedArray {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBufferLike;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param 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: Uint8ClampedArray) => 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: Uint8ClampedArray) => any, thisArg?: any): Uint8ClampedArray;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (value: number, index: number, obj: Uint8ClampedArray) => boolean, thisArg?: any): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (value: number, index: number, obj: Uint8ClampedArray) => boolean, thisArg?: any): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => void, thisArg?: any): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => number, thisArg?: any): Uint8ClampedArray;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number): number;
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number): number;
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Uint8ClampedArray;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
+ */
+ slice(start?: number, end?: number): Uint8ClampedArray;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param 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: Uint8ClampedArray) => unknown, thisArg?: any): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn Function used to determine the order of the elements. It is expected to return
+ * a negative value if first argument is less than second argument, zero if they're equal and a positive
+ * value otherwise. If omitted, the elements are sorted in ascending order.
+ * ```ts
+ * [11,2,22,1].sort((a, b) => a - b)
+ * ```
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin?: number, end?: number): Uint8ClampedArray;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): Uint8ClampedArray;
+
+ [index: number]: number;
+}
+
+interface Uint8ClampedArrayConstructor {
+ readonly prototype: Uint8ClampedArray;
+ new(length: number): Uint8ClampedArray;
+ new(array: ArrayLike<number> | ArrayBufferLike): Uint8ClampedArray;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8ClampedArray;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Uint8ClampedArray;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ */
+ from(arrayLike: ArrayLike<number>): Uint8ClampedArray;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray;
+}
+declare var Uint8ClampedArray: Uint8ClampedArrayConstructor;
+
+/**
+ * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Int16Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBufferLike;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param 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: Int16Array) => 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: Int16Array) => any, thisArg?: any): Int16Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (value: number, index: number, obj: Int16Array) => boolean, thisArg?: any): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (value: number, index: number, obj: Int16Array) => boolean, thisArg?: any): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: number, index: number, array: Int16Array) => void, thisArg?: any): void;
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (value: number, index: number, array: Int16Array) => number, thisArg?: any): Int16Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number): number;
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number): number;
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Int16Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
+ */
+ slice(start?: number, end?: number): Int16Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param 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: Int16Array) => unknown, thisArg?: any): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn Function used to determine the order of the elements. It is expected to return
+ * a negative value if first argument is less than second argument, zero if they're equal and a positive
+ * value otherwise. If omitted, the elements are sorted in ascending order.
+ * ```ts
+ * [11,2,22,1].sort((a, b) => a - b)
+ * ```
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin?: number, end?: number): Int16Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): Int16Array;
+
+ [index: number]: number;
+}
+
+interface Int16ArrayConstructor {
+ readonly prototype: Int16Array;
+ new(length: number): Int16Array;
+ new(array: ArrayLike<number> | ArrayBufferLike): Int16Array;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int16Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Int16Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ */
+ from(arrayLike: ArrayLike<number>): Int16Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array;
+
+
+}
+declare var Int16Array: Int16ArrayConstructor;
+
+/**
+ * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint16Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBufferLike;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param 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: Uint16Array) => 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: Uint16Array) => any, thisArg?: any): Uint16Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (value: number, index: number, obj: Uint16Array) => boolean, thisArg?: any): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (value: number, index: number, obj: Uint16Array) => boolean, thisArg?: any): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: number, index: number, array: Uint16Array) => void, thisArg?: any): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (value: number, index: number, array: Uint16Array) => number, thisArg?: any): Uint16Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number): number;
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number): number;
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Uint16Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
+ */
+ slice(start?: number, end?: number): Uint16Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param 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: Uint16Array) => unknown, thisArg?: any): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn Function used to determine the order of the elements. It is expected to return
+ * a negative value if first argument is less than second argument, zero if they're equal and a positive
+ * value otherwise. If omitted, the elements are sorted in ascending order.
+ * ```ts
+ * [11,2,22,1].sort((a, b) => a - b)
+ * ```
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin?: number, end?: number): Uint16Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): Uint16Array;
+
+ [index: number]: number;
+}
+
+interface Uint16ArrayConstructor {
+ readonly prototype: Uint16Array;
+ new(length: number): Uint16Array;
+ new(array: ArrayLike<number> | ArrayBufferLike): Uint16Array;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint16Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Uint16Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ */
+ from(arrayLike: ArrayLike<number>): Uint16Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array;
+
+
+}
+declare var Uint16Array: Uint16ArrayConstructor;
+/**
+ * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Int32Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBufferLike;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param 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: Int32Array) => 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: Int32Array) => any, thisArg?: any): Int32Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (value: number, index: number, obj: Int32Array) => boolean, thisArg?: any): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (value: number, index: number, obj: Int32Array) => boolean, thisArg?: any): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: number, index: number, array: Int32Array) => void, thisArg?: any): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (value: number, index: number, array: Int32Array) => number, thisArg?: any): Int32Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number): number;
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number): number;
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Int32Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
+ */
+ slice(start?: number, end?: number): Int32Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param 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: Int32Array) => unknown, thisArg?: any): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn Function used to determine the order of the elements. It is expected to return
+ * a negative value if first argument is less than second argument, zero if they're equal and a positive
+ * value otherwise. If omitted, the elements are sorted in ascending order.
+ * ```ts
+ * [11,2,22,1].sort((a, b) => a - b)
+ * ```
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin?: number, end?: number): Int32Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): Int32Array;
+
+ [index: number]: number;
+}
+
+interface Int32ArrayConstructor {
+ readonly prototype: Int32Array;
+ new(length: number): Int32Array;
+ new(array: ArrayLike<number> | ArrayBufferLike): Int32Array;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int32Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Int32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ */
+ from(arrayLike: ArrayLike<number>): Int32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array;
+
+}
+declare var Int32Array: Int32ArrayConstructor;
+
+/**
+ * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint32Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBufferLike;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param 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: Uint32Array) => 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: Uint32Array) => any, thisArg?: any): Uint32Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (value: number, index: number, obj: Uint32Array) => boolean, thisArg?: any): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (value: number, index: number, obj: Uint32Array) => boolean, thisArg?: any): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: number, index: number, array: Uint32Array) => void, thisArg?: any): void;
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (value: number, index: number, array: Uint32Array) => number, thisArg?: any): Uint32Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number): number;
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number): number;
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Uint32Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
+ */
+ slice(start?: number, end?: number): Uint32Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param 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: Uint32Array) => unknown, thisArg?: any): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn Function used to determine the order of the elements. It is expected to return
+ * a negative value if first argument is less than second argument, zero if they're equal and a positive
+ * value otherwise. If omitted, the elements are sorted in ascending order.
+ * ```ts
+ * [11,2,22,1].sort((a, b) => a - b)
+ * ```
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Uint32Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin?: number, end?: number): Uint32Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): Uint32Array;
+
+ [index: number]: number;
+}
+
+interface Uint32ArrayConstructor {
+ readonly prototype: Uint32Array;
+ new(length: number): Uint32Array;
+ new(array: ArrayLike<number> | ArrayBufferLike): Uint32Array;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint32Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Uint32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ */
+ from(arrayLike: ArrayLike<number>): Uint32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array;
+
+}
+declare var Uint32Array: Uint32ArrayConstructor;
+
+/**
+ * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number
+ * of bytes could not be allocated an exception is raised.
+ */
+interface Float32Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBufferLike;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param 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: Float32Array) => 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: Float32Array) => any, thisArg?: any): Float32Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (value: number, index: number, obj: Float32Array) => boolean, thisArg?: any): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (value: number, index: number, obj: Float32Array) => boolean, thisArg?: any): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: number, index: number, array: Float32Array) => void, thisArg?: any): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (value: number, index: number, array: Float32Array) => number, thisArg?: any): Float32Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number): number;
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number): number;
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Float32Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
+ */
+ slice(start?: number, end?: number): Float32Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param 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: Float32Array) => unknown, thisArg?: any): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn Function used to determine the order of the elements. It is expected to return
+ * a negative value if first argument is less than second argument, zero if they're equal and a positive
+ * value otherwise. If omitted, the elements are sorted in ascending order.
+ * ```ts
+ * [11,2,22,1].sort((a, b) => a - b)
+ * ```
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin?: number, end?: number): Float32Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): Float32Array;
+
+ [index: number]: number;
+}
+
+interface Float32ArrayConstructor {
+ readonly prototype: Float32Array;
+ new(length: number): Float32Array;
+ new(array: ArrayLike<number> | ArrayBufferLike): Float32Array;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Float32Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Float32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ */
+ from(arrayLike: ArrayLike<number>): Float32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array;
+
+
+}
+declare var Float32Array: Float32ArrayConstructor;
+
+/**
+ * A typed array of 64-bit float values. The contents are initialized to 0. If the requested
+ * number of bytes could not be allocated an exception is raised.
+ */
+interface Float64Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBufferLike;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param 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: Float64Array) => 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: Float64Array) => any, thisArg?: any): Float64Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (value: number, index: number, obj: Float64Array) => boolean, thisArg?: any): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (value: number, index: number, obj: Float64Array) => boolean, thisArg?: any): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: number, index: number, array: Float64Array) => void, thisArg?: any): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (value: number, index: number, array: Float64Array) => number, thisArg?: any): Float64Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number): number;
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number): number;
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Float64Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
+ */
+ slice(start?: number, end?: number): Float64Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param 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: Float64Array) => unknown, thisArg?: any): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn Function used to determine the order of the elements. It is expected to return
+ * a negative value if first argument is less than second argument, zero if they're equal and a positive
+ * value otherwise. If omitted, the elements are sorted in ascending order.
+ * ```ts
+ * [11,2,22,1].sort((a, b) => a - b)
+ * ```
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin?: number, end?: number): Float64Array;
+
+ toString(): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): Float64Array;
+
+ [index: number]: number;
+}
+
+interface Float64ArrayConstructor {
+ readonly prototype: Float64Array;
+ new(length: number): Float64Array;
+ new(array: ArrayLike<number> | ArrayBufferLike): Float64Array;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Float64Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Float64Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ */
+ from(arrayLike: ArrayLike<number>): Float64Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array;
+
+}
+declare var Float64Array: Float64ArrayConstructor;
+
+/////////////////////////////
+/// ECMAScript Internationalization API
+/////////////////////////////
+
+declare namespace Intl {
+ interface CollatorOptions {
+ usage?: string | undefined;
+ localeMatcher?: string | undefined;
+ numeric?: boolean | undefined;
+ caseFirst?: string | undefined;
+ sensitivity?: string | undefined;
+ ignorePunctuation?: boolean | undefined;
+ }
+
+ interface ResolvedCollatorOptions {
+ locale: string;
+ usage: string;
+ sensitivity: string;
+ ignorePunctuation: boolean;
+ collation: string;
+ caseFirst: string;
+ numeric: boolean;
+ }
+
+ interface Collator {
+ compare(x: string, y: string): number;
+ resolvedOptions(): ResolvedCollatorOptions;
+ }
+ var Collator: {
+ new(locales?: string | string[], options?: CollatorOptions): Collator;
+ (locales?: string | string[], options?: CollatorOptions): Collator;
+ supportedLocalesOf(locales: string | string[], options?: CollatorOptions): string[];
+ };
+
+ interface NumberFormatOptions {
+ localeMatcher?: string | undefined;
+ style?: string | undefined;
+ currency?: string | undefined;
+ currencySign?: string | undefined;
+ useGrouping?: boolean | undefined;
+ minimumIntegerDigits?: number | undefined;
+ minimumFractionDigits?: number | undefined;
+ maximumFractionDigits?: number | undefined;
+ minimumSignificantDigits?: number | undefined;
+ maximumSignificantDigits?: number | undefined;
+ }
+
+ interface ResolvedNumberFormatOptions {
+ locale: string;
+ numberingSystem: string;
+ style: string;
+ currency?: string;
+ minimumIntegerDigits: number;
+ minimumFractionDigits: number;
+ maximumFractionDigits: number;
+ minimumSignificantDigits?: number;
+ maximumSignificantDigits?: number;
+ useGrouping: boolean;
+ }
+
+ interface NumberFormat {
+ format(value: number): string;
+ resolvedOptions(): ResolvedNumberFormatOptions;
+ }
+ var NumberFormat: {
+ new(locales?: string | string[], options?: NumberFormatOptions): NumberFormat;
+ (locales?: string | string[], options?: NumberFormatOptions): NumberFormat;
+ supportedLocalesOf(locales: string | string[], options?: NumberFormatOptions): string[];
+ readonly prototype: NumberFormat;
+ };
+
+ interface DateTimeFormatOptions {
+ localeMatcher?: "best fit" | "lookup" | undefined;
+ weekday?: "long" | "short" | "narrow" | undefined;
+ era?: "long" | "short" | "narrow" | undefined;
+ year?: "numeric" | "2-digit" | undefined;
+ month?: "numeric" | "2-digit" | "long" | "short" | "narrow" | undefined;
+ day?: "numeric" | "2-digit" | undefined;
+ hour?: "numeric" | "2-digit" | undefined;
+ minute?: "numeric" | "2-digit" | undefined;
+ second?: "numeric" | "2-digit" | undefined;
+ timeZoneName?: "short" | "long" | "shortOffset" | "longOffset" | "shortGeneric" | "longGeneric" | undefined;
+ formatMatcher?: "best fit" | "basic" | undefined;
+ hour12?: boolean | undefined;
+ timeZone?: string | undefined;
+ }
+
+ interface ResolvedDateTimeFormatOptions {
+ locale: string;
+ calendar: string;
+ numberingSystem: string;
+ timeZone: string;
+ hour12?: boolean;
+ weekday?: string;
+ era?: string;
+ year?: string;
+ month?: string;
+ day?: string;
+ hour?: string;
+ minute?: string;
+ second?: string;
+ timeZoneName?: string;
+ }
+
+ interface DateTimeFormat {
+ format(date?: Date | number): string;
+ resolvedOptions(): ResolvedDateTimeFormatOptions;
+ }
+ var DateTimeFormat: {
+ new(locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat;
+ (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat;
+ supportedLocalesOf(locales: string | string[], options?: DateTimeFormatOptions): string[];
+ readonly prototype: DateTimeFormat;
+ };
+}
+
+interface String {
+ /**
+ * Determines whether two strings are equivalent in the current or specified locale.
+ * @param that String to compare to target string
+ * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details.
+ * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details.
+ */
+ localeCompare(that: string, locales?: string | string[], options?: Intl.CollatorOptions): number;
+}
+
+interface Number {
+ /**
+ * Converts a number to a string by using the current or specified locale.
+ * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
+ * @param options An object that contains one or more properties that specify comparison options.
+ */
+ toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string;
+}
+
+interface Date {
+ /**
+ * Converts a date and time to a string by using the current or specified locale.
+ * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
+ * @param options An object that contains one or more properties that specify comparison options.
+ */
+ toLocaleString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
+ /**
+ * Converts a date to a string by using the current or specified locale.
+ * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
+ * @param options An object that contains one or more properties that specify comparison options.
+ */
+ toLocaleDateString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
+
+ /**
+ * Converts a time to a string by using the current or specified locale.
+ * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
+ * @param options An object that contains one or more properties that specify comparison options.
+ */
+ toLocaleTimeString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
+}
diff --git a/cli/tsc/dts/lib.es6.d.ts b/cli/tsc/dts/lib.es6.d.ts
new file mode 100644
index 000000000..fabf43861
--- /dev/null
+++ b/cli/tsc/dts/lib.es6.d.ts
@@ -0,0 +1,25 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2015" />
+/// <reference lib="dom" />
+/// <reference lib="dom.iterable" />
+/// <reference lib="webworker.importscripts" />
+/// <reference lib="scripthost" />
diff --git a/cli/tsc/dts/lib.esnext.array.d.ts b/cli/tsc/dts/lib.esnext.array.d.ts
new file mode 100644
index 000000000..527982ef7
--- /dev/null
+++ b/cli/tsc/dts/lib.esnext.array.d.ts
@@ -0,0 +1,583 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+/// <reference no-default-lib="true"/>
+
+interface Array<T> {
+ /**
+ * Returns the value of the last 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.
+ */
+ findLast<S extends T>(predicate: (this: void, value: T, index: number, obj: T[]) => value is S, thisArg?: any): S | undefined;
+ findLast(predicate: (value: T, index: number, obj: 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 find calls predicate 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.
+ */
+ findLastIndex(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): number;
+
+ /** Copies and reverses the elements in an array.*/
+ toReversed(): T[];
+
+ /**
+ * Copies and sorts an 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, ASCII character order.
+ * ```ts
+ * [11,2,22,1].sort((a, b) => a - b)
+ * ```
+ */
+ toSorted(compareFn?: (a: T, b: T) => number): T[];
+
+ /**
+ * Copies and 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.
+ * @returns An array containing the elements that were deleted.
+ */
+ toSpliced(start: number, deleteCount?: number): T[];
+ /**
+ * Copies and removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
+ * @param start The zero-based location in the array from which to start removing elements.
+ * @param deleteCount The number of elements to remove.
+ * @param items Elements to insert into the array in place of the deleted elements.
+ * @returns An array containing the elements that were deleted.
+ */
+ toSpliced<F>(start: number, deleteCount: number, ...items: F[]): (F | T)[];
+
+ /**
+ * Copies and replaces the element at the given index with the provided value.
+ * @param index The zero-based location in the array for which to replace an element.
+ * @param value Element to insert into the array in place of the replaced element.
+ */
+ with<F>(index: number, value: F): (F | T)[];
+ }
+
+interface ReadonlyArray<T> {
+ /**
+ * Returns the value of the last 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.
+ */
+ findLast<S extends T>(predicate: (this: void, value: T, index: number, obj: T[]) => value is S, thisArg?: any): S | undefined;
+ findLast(predicate: (value: T, index: number, obj: 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 find calls predicate 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.
+ */
+ findLastIndex(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): number;
+
+ /** Copies and reverses the elements in an array.*/
+ toReversed(): T[];
+
+ /**
+ * Copies and sorts an 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, ASCII character order.
+ * ```ts
+ * [11,2,22,1].sort((a, b) => a - b)
+ * ```
+ */
+ toSorted(compareFn?: (a: T, b: T) => number): T[];
+
+ /**
+ * Copies and 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.
+ * @returns An array containing the elements that were deleted.
+ */
+ toSpliced(start: number, deleteCount?: number): T[];
+ /**
+ * Copies and removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
+ * @param start The zero-based location in the array from which to start removing elements.
+ * @param deleteCount The number of elements to remove.
+ * @param items Elements to insert into the array in place of the deleted elements.
+ * @returns An array containing the elements that were deleted.
+ */
+ toSpliced<F>(start: number, deleteCount: number, ...items: F[]): (F | T)[];
+
+ /**
+ * Copies and replaces the element at the given index with the provided value.
+ * @param index The zero-based location in the array for which to replace an element.
+ * @param value Element to insert into the array in place of the replaced element.
+ */
+ with<F>(index: number, value: F): (F | T)[];
+}
+
+interface Int8Array {
+ /**
+ * Returns the value of the last 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.
+ */
+ findLast(predicate: (value: number, index: number, obj: Int8Array) => boolean, thisArg?: any): number | undefined;
+
+ /**
+ * Returns the index of the last 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.
+ */
+ findLastIndex(predicate: (value: number, index: number, obj: Int8Array) => boolean, thisArg?: any): number;
+
+ /** Copies and reverses the elements in an array.*/
+ toReversed(): Int8Array;
+
+ /**
+ * Copies and 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)
+ * ```
+ */
+ toSorted(compareFn?: (a: number, b: number) => number): Int8Array;
+
+ 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 find calls predicate 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.
+ */
+ findLast(predicate: (value: number, index: number, obj: Uint8Array) => boolean, thisArg?: any): number | undefined;
+
+ /**
+ * Returns the index of the last 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.
+ */
+ findLastIndex(predicate: (value: number, index: number, obj: Uint8Array) => boolean, thisArg?: any): number;
+
+ /** Copies and reverses the elements in an array.*/
+ toReversed(): Uint8Array;
+
+ /**
+ * Copies and 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)
+ * ```
+ */
+ toSorted(compareFn?: (a: number, b: number) => number): Uint8Array;
+
+ 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 find calls predicate 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.
+ */
+ findLast(predicate: (value: number, index: number, obj: Uint8ClampedArray) => boolean, thisArg?: any): number | undefined;
+
+ /**
+ * Returns the index of the last 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.
+ */
+ findIndexLast(predicate: (value: number, index: number, obj: Uint8ClampedArray) => boolean, thisArg?: any): number;
+
+ /** Copies and reverses the elements in an array.*/
+ toReversed(): Uint8ClampedArray;
+
+ /**
+ * Copies and 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)
+ * ```
+ */
+ toSorted(compareFn?: (a: number, b: number) => number): Uint8ClampedArray;
+
+ 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 find calls predicate 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.
+ */
+ findLast(predicate: (value: number, index: number, obj: Int16Array) => boolean, thisArg?: any): number | undefined;
+
+ /**
+ * Returns the index of the last 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.
+ */
+ findIndexLast(predicate: (value: number, index: number, obj: Int16Array) => boolean, thisArg?: any): number;
+
+
+ /** Copies and reverses the elements in an array.*/
+ toReversed(): Int16Array;
+
+ /**
+ * Copies and 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)
+ * ```
+ */
+ toSorted(compareFn?: (a: number, b: number) => number): Int16Array;
+
+ 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 find calls predicate 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.
+ */
+ findLast(predicate: (value: number, index: number, obj: Uint16Array) => boolean, thisArg?: any): number | undefined;
+
+ /**
+ * Returns the index of the last 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.
+ */
+ findIndexLast(predicate: (value: number, index: number, obj: Uint16Array) => boolean, thisArg?: any): number;
+
+
+ /** Copies and reverses the elements in an array.*/
+ toReversed(): Uint16Array;
+
+ /**
+ * Copies and 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)
+ * ```
+ */
+ toSorted(compareFn?: (a: number, b: number) => number): Uint16Array;
+
+ 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 find calls predicate 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.
+ */
+ findLast(predicate: (value: number, index: number, obj: Int32Array) => boolean, thisArg?: any): number | undefined;
+
+ /**
+ * Returns the index of the last 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.
+ */
+ findIndexLast(predicate: (value: number, index: number, obj: Int32Array) => boolean, thisArg?: any): number;
+
+ /** Copies and reverses the elements in an array.*/
+ toReversed(): Int32Array;
+
+ /**
+ * Copies and 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)
+ * ```
+ */
+ toSorted(compareFn?: (a: number, b: number) => number): Int32Array;
+
+ 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 find calls predicate 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.
+ */
+ findLast(predicate: (value: number, index: number, obj: Uint32Array) => boolean, thisArg?: any): number | undefined;
+
+ /**
+ * Returns the index of the last 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.
+ */
+ findIndexLast(predicate: (value: number, index: number, obj: Uint32Array) => boolean, thisArg?: any): number;
+
+ /** Copies and reverses the elements in an array.*/
+ toReversed(): Uint32Array;
+
+ /**
+ * Copies and 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)
+ * ```
+ */
+ toSorted(compareFn?: (a: number, b: number) => number): Uint32Array;
+
+ 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 find calls predicate 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.
+ */
+ findLast(predicate: (value: number, index: number, obj: Float32Array) => boolean, thisArg?: any): number | undefined;
+
+ /**
+ * Returns the index of the last 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.
+ */
+ findIndexLast(predicate: (value: number, index: number, obj: Float32Array) => boolean, thisArg?: any): number;
+
+ /** Copies and reverses the elements in an array.*/
+ toReversed(): Float32Array;
+
+ /**
+ * Copies and 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)
+ * ```
+ */
+ toSorted(compareFn?: (a: number, b: number) => number): Float32Array;
+
+ 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 find calls predicate 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.
+ */
+ findLast(predicate: (value: number, index: number, obj: Float64Array) => boolean, thisArg?: any): number | undefined;
+
+ /**
+ * Returns the index of the last 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.
+ */
+ findIndexLast(predicate: (value: number, index: number, obj: Float64Array) => boolean, thisArg?: any): number;
+
+ /** Copies and reverses the elements in an array.*/
+ toReversed(): Float64Array;
+
+ /**
+ * Copies and 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)
+ * ```
+ */
+ toSorted(compareFn?: (a: number, b: number) => number): Float64Array;
+
+ 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 find calls predicate 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.
+ */
+ findLast(predicate: (value: bigint, index: number, obj: BigInt64Array) => boolean, thisArg?: any): bigint | undefined;
+
+ /**
+ * Returns the index of the last 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.
+ */
+ findIndexLast(predicate: (value: bigint, index: number, obj: BigInt64Array) => boolean, thisArg?: any): bigint;
+
+ /** Copies and reverses the elements in an array.*/
+ toReversed(): BigInt64Array;
+
+ /**
+ * Copies and 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)
+ * ```
+ */
+ toSorted(compareFn?: (a: bigint, b: bigint) => number | bigint): BigInt64Array;
+
+ with(index: number, value: number): BigInt64Array;
+}
+
+interface BigUint64Array {
+ /**
+ * Returns the value of the last 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.
+ */
+ findLast(predicate: (value: bigint, index: number, obj: BigUint64Array) => boolean, thisArg?: any): bigint | undefined;
+
+ /**
+ * Returns the index of the last 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.
+ */
+ findIndexLast(predicate: (value: bigint, index: number, obj: BigUint64Array) => boolean, thisArg?: any): bigint;
+
+ /** Copies and reverses the elements in an array.*/
+ toReversed(): BigUint64Array;
+
+ /**
+ * Copies and 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)
+ * ```
+ */
+ toSorted(compareFn?: (a: bigint, b: bigint) => number | bigint): BigUint64Array;
+
+ with(index: number, value: number): BigUint64Array;
+}
diff --git a/cli/tsc/dts/lib.esnext.d.ts b/cli/tsc/dts/lib.esnext.d.ts
new file mode 100644
index 000000000..9605d2f9e
--- /dev/null
+++ b/cli/tsc/dts/lib.esnext.d.ts
@@ -0,0 +1,23 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2022" />
+/// <reference lib="esnext.array" />
+/// <reference lib="esnext.intl" />
diff --git a/cli/tsc/dts/lib.esnext.full.d.ts b/cli/tsc/dts/lib.esnext.full.d.ts
new file mode 100644
index 000000000..be12ba8e4
--- /dev/null
+++ b/cli/tsc/dts/lib.esnext.full.d.ts
@@ -0,0 +1,25 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="esnext" />
+/// <reference lib="dom" />
+/// <reference lib="webworker.importscripts" />
+/// <reference lib="scripthost" />
+/// <reference lib="dom.iterable" /> \ No newline at end of file
diff --git a/cli/tsc/dts/lib.esnext.intl.d.ts b/cli/tsc/dts/lib.esnext.intl.d.ts
new file mode 100644
index 000000000..0eaac02b9
--- /dev/null
+++ b/cli/tsc/dts/lib.esnext.intl.d.ts
@@ -0,0 +1,30 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+declare namespace Intl {
+ interface NumberRangeFormatPart extends NumberFormatPart {
+ source: "startRange" | "endRange" | "shared"
+ }
+
+ interface NumberFormat {
+ formatRange(start: number | bigint, end: number | bigint): string;
+ formatRangeToParts(start: number | bigint, end: number | bigint): NumberRangeFormatPart[];
+ }
+}
diff --git a/cli/tsc/dts/lib.scripthost.d.ts b/cli/tsc/dts/lib.scripthost.d.ts
new file mode 100644
index 000000000..8ac760bab
--- /dev/null
+++ b/cli/tsc/dts/lib.scripthost.d.ts
@@ -0,0 +1,327 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+
+
+/////////////////////////////
+/// Windows Script Host APIS
+/////////////////////////////
+
+
+interface ActiveXObject {
+ new (s: string): any;
+}
+declare var ActiveXObject: ActiveXObject;
+
+interface ITextWriter {
+ Write(s: string): void;
+ WriteLine(s: string): void;
+ Close(): void;
+}
+
+interface TextStreamBase {
+ /**
+ * The column number of the current character position in an input stream.
+ */
+ Column: number;
+
+ /**
+ * The current line number in an input stream.
+ */
+ Line: number;
+
+ /**
+ * Closes a text stream.
+ * It is not necessary to close standard streams; they close automatically when the process ends. If
+ * you close a standard stream, be aware that any other pointers to that standard stream become invalid.
+ */
+ Close(): void;
+}
+
+interface TextStreamWriter extends TextStreamBase {
+ /**
+ * Sends a string to an output stream.
+ */
+ Write(s: string): void;
+
+ /**
+ * Sends a specified number of blank lines (newline characters) to an output stream.
+ */
+ WriteBlankLines(intLines: number): void;
+
+ /**
+ * Sends a string followed by a newline character to an output stream.
+ */
+ WriteLine(s: string): void;
+}
+
+interface TextStreamReader extends TextStreamBase {
+ /**
+ * Returns a specified number of characters from an input stream, starting at the current pointer position.
+ * Does not return until the ENTER key is pressed.
+ * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
+ */
+ Read(characters: number): string;
+
+ /**
+ * Returns all characters from an input stream.
+ * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
+ */
+ ReadAll(): string;
+
+ /**
+ * Returns an entire line from an input stream.
+ * Although this method extracts the newline character, it does not add it to the returned string.
+ * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
+ */
+ ReadLine(): string;
+
+ /**
+ * Skips a specified number of characters when reading from an input text stream.
+ * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
+ * @param characters Positive number of characters to skip forward. (Backward skipping is not supported.)
+ */
+ Skip(characters: number): void;
+
+ /**
+ * Skips the next line when reading from an input text stream.
+ * Can only be used on a stream in reading mode, not writing or appending mode.
+ */
+ SkipLine(): void;
+
+ /**
+ * Indicates whether the stream pointer position is at the end of a line.
+ */
+ AtEndOfLine: boolean;
+
+ /**
+ * Indicates whether the stream pointer position is at the end of a stream.
+ */
+ AtEndOfStream: boolean;
+}
+
+declare var WScript: {
+ /**
+ * Outputs text to either a message box (under WScript.exe) or the command console window followed by
+ * a newline (under CScript.exe).
+ */
+ Echo(s: any): void;
+
+ /**
+ * Exposes the write-only error output stream for the current script.
+ * Can be accessed only while using CScript.exe.
+ */
+ StdErr: TextStreamWriter;
+
+ /**
+ * Exposes the write-only output stream for the current script.
+ * Can be accessed only while using CScript.exe.
+ */
+ StdOut: TextStreamWriter;
+ Arguments: { length: number; Item(n: number): string; };
+
+ /**
+ * The full path of the currently running script.
+ */
+ ScriptFullName: string;
+
+ /**
+ * Forces the script to stop immediately, with an optional exit code.
+ */
+ Quit(exitCode?: number): number;
+
+ /**
+ * The Windows Script Host build version number.
+ */
+ BuildVersion: number;
+
+ /**
+ * Fully qualified path of the host executable.
+ */
+ FullName: string;
+
+ /**
+ * Gets/sets the script mode - interactive(true) or batch(false).
+ */
+ Interactive: boolean;
+
+ /**
+ * The name of the host executable (WScript.exe or CScript.exe).
+ */
+ Name: string;
+
+ /**
+ * Path of the directory containing the host executable.
+ */
+ Path: string;
+
+ /**
+ * The filename of the currently running script.
+ */
+ ScriptName: string;
+
+ /**
+ * Exposes the read-only input stream for the current script.
+ * Can be accessed only while using CScript.exe.
+ */
+ StdIn: TextStreamReader;
+
+ /**
+ * Windows Script Host version
+ */
+ Version: string;
+
+ /**
+ * Connects a COM object's event sources to functions named with a given prefix, in the form prefix_event.
+ */
+ ConnectObject(objEventSource: any, strPrefix: string): void;
+
+ /**
+ * Creates a COM object.
+ * @param strProgiID
+ * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events.
+ */
+ CreateObject(strProgID: string, strPrefix?: string): any;
+
+ /**
+ * Disconnects a COM object from its event sources.
+ */
+ DisconnectObject(obj: any): void;
+
+ /**
+ * Retrieves an existing object with the specified ProgID from memory, or creates a new one from a file.
+ * @param strPathname Fully qualified path to the file containing the object persisted to disk.
+ * For objects in memory, pass a zero-length string.
+ * @param strProgID
+ * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events.
+ */
+ GetObject(strPathname: string, strProgID?: string, strPrefix?: string): any;
+
+ /**
+ * Suspends script execution for a specified length of time, then continues execution.
+ * @param intTime Interval (in milliseconds) to suspend script execution.
+ */
+ Sleep(intTime: number): void;
+};
+
+/**
+ * WSH is an alias for WScript under Windows Script Host
+ */
+declare var WSH: typeof WScript;
+
+/**
+ * Represents an Automation SAFEARRAY
+ */
+declare class SafeArray<T = any> {
+ private constructor();
+ private SafeArray_typekey: SafeArray<T>;
+}
+
+/**
+ * Allows enumerating over a COM collection, which may not have indexed item access.
+ */
+interface Enumerator<T = any> {
+ /**
+ * Returns true if the current item is the last one in the collection, or the collection is empty,
+ * or the current item is undefined.
+ */
+ atEnd(): boolean;
+
+ /**
+ * Returns the current item in the collection
+ */
+ item(): T;
+
+ /**
+ * Resets the current item in the collection to the first item. If there are no items in the collection,
+ * the current item is set to undefined.
+ */
+ moveFirst(): void;
+
+ /**
+ * Moves the current item to the next item in the collection. If the enumerator is at the end of
+ * the collection or the collection is empty, the current item is set to undefined.
+ */
+ moveNext(): void;
+}
+
+interface EnumeratorConstructor {
+ new <T = any>(safearray: SafeArray<T>): Enumerator<T>;
+ new <T = any>(collection: { Item(index: any): T }): Enumerator<T>;
+ new <T = any>(collection: any): Enumerator<T>;
+}
+
+declare var Enumerator: EnumeratorConstructor;
+
+/**
+ * Enables reading from a COM safe array, which might have an alternate lower bound, or multiple dimensions.
+ */
+interface VBArray<T = any> {
+ /**
+ * Returns the number of dimensions (1-based).
+ */
+ dimensions(): number;
+
+ /**
+ * Takes an index for each dimension in the array, and returns the item at the corresponding location.
+ */
+ getItem(dimension1Index: number, ...dimensionNIndexes: number[]): T;
+
+ /**
+ * Returns the smallest available index for a given dimension.
+ * @param dimension 1-based dimension (defaults to 1)
+ */
+ lbound(dimension?: number): number;
+
+ /**
+ * Returns the largest available index for a given dimension.
+ * @param dimension 1-based dimension (defaults to 1)
+ */
+ ubound(dimension?: number): number;
+
+ /**
+ * Returns a Javascript array with all the elements in the VBArray. If there are multiple dimensions,
+ * each successive dimension is appended to the end of the array.
+ * Example: [[1,2,3],[4,5,6]] becomes [1,2,3,4,5,6]
+ */
+ toArray(): T[];
+}
+
+interface VBArrayConstructor {
+ new <T = any>(safeArray: SafeArray<T>): VBArray<T>;
+}
+
+declare var VBArray: VBArrayConstructor;
+
+/**
+ * Automation date (VT_DATE)
+ */
+declare class VarDate {
+ private constructor();
+ private VarDate_typekey: VarDate;
+}
+
+interface DateConstructor {
+ new (vd: VarDate): Date;
+}
+
+interface Date {
+ getVarDate: () => VarDate;
+}
diff --git a/cli/tsc/dts/lib.webworker.d.ts b/cli/tsc/dts/lib.webworker.d.ts
new file mode 100644
index 000000000..30f83bc84
--- /dev/null
+++ b/cli/tsc/dts/lib.webworker.d.ts
@@ -0,0 +1,5956 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/////////////////////////////
+/// Worker APIs
+/////////////////////////////
+
+interface AddEventListenerOptions extends EventListenerOptions {
+ once?: boolean;
+ passive?: boolean;
+ signal?: AbortSignal;
+}
+
+interface AesCbcParams extends Algorithm {
+ iv: BufferSource;
+}
+
+interface AesCtrParams extends Algorithm {
+ counter: BufferSource;
+ length: number;
+}
+
+interface AesDerivedKeyParams extends Algorithm {
+ length: number;
+}
+
+interface AesGcmParams extends Algorithm {
+ additionalData?: BufferSource;
+ iv: BufferSource;
+ tagLength?: number;
+}
+
+interface AesKeyAlgorithm extends KeyAlgorithm {
+ length: number;
+}
+
+interface AesKeyGenParams extends Algorithm {
+ length: number;
+}
+
+interface Algorithm {
+ name: string;
+}
+
+interface AudioConfiguration {
+ bitrate?: number;
+ channels?: string;
+ contentType: string;
+ samplerate?: number;
+ spatialRendering?: boolean;
+}
+
+interface BlobPropertyBag {
+ endings?: EndingType;
+ type?: string;
+}
+
+interface CacheQueryOptions {
+ ignoreMethod?: boolean;
+ ignoreSearch?: boolean;
+ ignoreVary?: boolean;
+}
+
+interface ClientQueryOptions {
+ includeUncontrolled?: boolean;
+ type?: ClientTypes;
+}
+
+interface CloseEventInit extends EventInit {
+ code?: number;
+ reason?: string;
+ wasClean?: boolean;
+}
+
+interface CryptoKeyPair {
+ privateKey: CryptoKey;
+ publicKey: CryptoKey;
+}
+
+interface CustomEventInit<T = any> extends EventInit {
+ detail?: T;
+}
+
+interface DOMMatrix2DInit {
+ a?: number;
+ b?: number;
+ c?: number;
+ d?: number;
+ e?: number;
+ f?: number;
+ m11?: number;
+ m12?: number;
+ m21?: number;
+ m22?: number;
+ m41?: number;
+ m42?: number;
+}
+
+interface DOMMatrixInit extends DOMMatrix2DInit {
+ is2D?: boolean;
+ m13?: number;
+ m14?: number;
+ m23?: number;
+ m24?: number;
+ m31?: number;
+ m32?: number;
+ m33?: number;
+ m34?: number;
+ m43?: number;
+ m44?: number;
+}
+
+interface DOMPointInit {
+ w?: number;
+ x?: number;
+ y?: number;
+ z?: number;
+}
+
+interface DOMQuadInit {
+ p1?: DOMPointInit;
+ p2?: DOMPointInit;
+ p3?: DOMPointInit;
+ p4?: DOMPointInit;
+}
+
+interface DOMRectInit {
+ height?: number;
+ width?: number;
+ x?: number;
+ y?: number;
+}
+
+interface EcKeyGenParams extends Algorithm {
+ namedCurve: NamedCurve;
+}
+
+interface EcKeyImportParams extends Algorithm {
+ namedCurve: NamedCurve;
+}
+
+interface EcdhKeyDeriveParams extends Algorithm {
+ public: CryptoKey;
+}
+
+interface EcdsaParams extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+}
+
+interface ErrorEventInit extends EventInit {
+ colno?: number;
+ error?: any;
+ filename?: string;
+ lineno?: number;
+ message?: string;
+}
+
+interface EventInit {
+ bubbles?: boolean;
+ cancelable?: boolean;
+ composed?: boolean;
+}
+
+interface EventListenerOptions {
+ capture?: boolean;
+}
+
+interface EventSourceInit {
+ withCredentials?: boolean;
+}
+
+interface ExtendableEventInit extends EventInit {
+}
+
+interface ExtendableMessageEventInit extends ExtendableEventInit {
+ data?: any;
+ lastEventId?: string;
+ origin?: string;
+ ports?: MessagePort[];
+ source?: Client | ServiceWorker | MessagePort | null;
+}
+
+interface FetchEventInit extends ExtendableEventInit {
+ clientId?: string;
+ handled?: Promise<undefined>;
+ preloadResponse?: Promise<any>;
+ replacesClientId?: string;
+ request: Request;
+ resultingClientId?: string;
+}
+
+interface FilePropertyBag extends BlobPropertyBag {
+ lastModified?: number;
+}
+
+interface FileSystemGetDirectoryOptions {
+ create?: boolean;
+}
+
+interface FileSystemGetFileOptions {
+ create?: boolean;
+}
+
+interface FileSystemRemoveOptions {
+ recursive?: boolean;
+}
+
+interface FontFaceDescriptors {
+ display?: string;
+ featureSettings?: string;
+ stretch?: string;
+ style?: string;
+ unicodeRange?: string;
+ variant?: string;
+ weight?: string;
+}
+
+interface FontFaceSetLoadEventInit extends EventInit {
+ fontfaces?: FontFace[];
+}
+
+interface GetNotificationOptions {
+ tag?: string;
+}
+
+interface HkdfParams extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ info: BufferSource;
+ salt: BufferSource;
+}
+
+interface HmacImportParams extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ length?: number;
+}
+
+interface HmacKeyGenParams extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ length?: number;
+}
+
+interface IDBDatabaseInfo {
+ name?: string;
+ version?: number;
+}
+
+interface IDBIndexParameters {
+ multiEntry?: boolean;
+ unique?: boolean;
+}
+
+interface IDBObjectStoreParameters {
+ autoIncrement?: boolean;
+ keyPath?: string | string[] | null;
+}
+
+interface IDBTransactionOptions {
+ durability?: IDBTransactionDurability;
+}
+
+interface IDBVersionChangeEventInit extends EventInit {
+ newVersion?: number | null;
+ oldVersion?: number;
+}
+
+interface ImageBitmapOptions {
+ colorSpaceConversion?: ColorSpaceConversion;
+ imageOrientation?: ImageOrientation;
+ premultiplyAlpha?: PremultiplyAlpha;
+ resizeHeight?: number;
+ resizeQuality?: ResizeQuality;
+ resizeWidth?: number;
+}
+
+interface ImageBitmapRenderingContextSettings {
+ alpha?: boolean;
+}
+
+interface ImageDataSettings {
+ colorSpace?: PredefinedColorSpace;
+}
+
+interface ImportMeta {
+ url: string;
+}
+
+interface JsonWebKey {
+ alg?: string;
+ crv?: string;
+ d?: string;
+ dp?: string;
+ dq?: string;
+ e?: string;
+ ext?: boolean;
+ k?: string;
+ key_ops?: string[];
+ kty?: string;
+ n?: string;
+ oth?: RsaOtherPrimesInfo[];
+ p?: string;
+ q?: string;
+ qi?: string;
+ use?: string;
+ x?: string;
+ y?: string;
+}
+
+interface KeyAlgorithm {
+ name: string;
+}
+
+interface LockInfo {
+ clientId?: string;
+ mode?: LockMode;
+ name?: string;
+}
+
+interface LockManagerSnapshot {
+ held?: LockInfo[];
+ pending?: LockInfo[];
+}
+
+interface LockOptions {
+ ifAvailable?: boolean;
+ mode?: LockMode;
+ signal?: AbortSignal;
+ steal?: boolean;
+}
+
+interface MediaCapabilitiesDecodingInfo extends MediaCapabilitiesInfo {
+ configuration?: MediaDecodingConfiguration;
+}
+
+interface MediaCapabilitiesEncodingInfo extends MediaCapabilitiesInfo {
+ configuration?: MediaEncodingConfiguration;
+}
+
+interface MediaCapabilitiesInfo {
+ powerEfficient: boolean;
+ smooth: boolean;
+ supported: boolean;
+}
+
+interface MediaConfiguration {
+ audio?: AudioConfiguration;
+ video?: VideoConfiguration;
+}
+
+interface MediaDecodingConfiguration extends MediaConfiguration {
+ type: MediaDecodingType;
+}
+
+interface MediaEncodingConfiguration extends MediaConfiguration {
+ type: MediaEncodingType;
+}
+
+interface MessageEventInit<T = any> extends EventInit {
+ data?: T;
+ lastEventId?: string;
+ origin?: string;
+ ports?: MessagePort[];
+ source?: MessageEventSource | null;
+}
+
+interface MultiCacheQueryOptions extends CacheQueryOptions {
+ cacheName?: string;
+}
+
+interface NavigationPreloadState {
+ enabled?: boolean;
+ headerValue?: string;
+}
+
+interface NotificationAction {
+ action: string;
+ icon?: string;
+ title: string;
+}
+
+interface NotificationEventInit extends ExtendableEventInit {
+ action?: string;
+ notification: Notification;
+}
+
+interface NotificationOptions {
+ actions?: NotificationAction[];
+ badge?: string;
+ body?: string;
+ data?: any;
+ dir?: NotificationDirection;
+ icon?: string;
+ image?: string;
+ lang?: string;
+ renotify?: boolean;
+ requireInteraction?: boolean;
+ silent?: boolean;
+ tag?: string;
+ timestamp?: EpochTimeStamp;
+ vibrate?: VibratePattern;
+}
+
+interface Pbkdf2Params extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ iterations: number;
+ salt: BufferSource;
+}
+
+interface PerformanceMarkOptions {
+ detail?: any;
+ startTime?: DOMHighResTimeStamp;
+}
+
+interface PerformanceMeasureOptions {
+ detail?: any;
+ duration?: DOMHighResTimeStamp;
+ end?: string | DOMHighResTimeStamp;
+ start?: string | DOMHighResTimeStamp;
+}
+
+interface PerformanceObserverInit {
+ buffered?: boolean;
+ entryTypes?: string[];
+ type?: string;
+}
+
+interface PermissionDescriptor {
+ name: PermissionName;
+}
+
+interface ProgressEventInit extends EventInit {
+ lengthComputable?: boolean;
+ loaded?: number;
+ total?: number;
+}
+
+interface PromiseRejectionEventInit extends EventInit {
+ promise: Promise<any>;
+ reason?: any;
+}
+
+interface PushEventInit extends ExtendableEventInit {
+ data?: PushMessageDataInit;
+}
+
+interface PushSubscriptionJSON {
+ endpoint?: string;
+ expirationTime?: EpochTimeStamp | null;
+ keys?: Record<string, string>;
+}
+
+interface PushSubscriptionOptionsInit {
+ applicationServerKey?: BufferSource | string | null;
+ userVisibleOnly?: boolean;
+}
+
+interface QueuingStrategy<T = any> {
+ highWaterMark?: number;
+ size?: QueuingStrategySize<T>;
+}
+
+interface QueuingStrategyInit {
+ /**
+ * Creates a new ByteLengthQueuingStrategy with the provided high water mark.
+ *
+ * Note that the provided high water mark will not be validated ahead of time. Instead, if it is negative, NaN, or not a number, the resulting ByteLengthQueuingStrategy will cause the corresponding stream constructor to throw.
+ */
+ highWaterMark: number;
+}
+
+interface RTCEncodedAudioFrameMetadata {
+ contributingSources?: number[];
+ synchronizationSource?: number;
+}
+
+interface RTCEncodedVideoFrameMetadata {
+ contributingSources?: number[];
+ dependencies?: number[];
+ frameId?: number;
+ height?: number;
+ spatialIndex?: number;
+ synchronizationSource?: number;
+ temporalIndex?: number;
+ width?: number;
+}
+
+interface ReadableStreamReadDoneResult {
+ done: true;
+ value?: undefined;
+}
+
+interface ReadableStreamReadValueResult<T> {
+ done: false;
+ value: T;
+}
+
+interface ReadableWritablePair<R = any, W = any> {
+ readable: ReadableStream<R>;
+ /**
+ * Provides a convenient, chainable way of piping this readable stream through a transform stream (or any other { writable, readable } pair). It simply pipes the stream into the writable side of the supplied pair, and returns the readable side for further use.
+ *
+ * Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader.
+ */
+ writable: WritableStream<W>;
+}
+
+interface RegistrationOptions {
+ scope?: string;
+ type?: WorkerType;
+ updateViaCache?: ServiceWorkerUpdateViaCache;
+}
+
+interface RequestInit {
+ /** A BodyInit object or null to set request's body. */
+ body?: BodyInit | null;
+ /** A string indicating how the request will interact with the browser's cache to set request's cache. */
+ cache?: RequestCache;
+ /** A string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL. Sets request's credentials. */
+ credentials?: RequestCredentials;
+ /** A Headers object, an object literal, or an array of two-item arrays to set request's headers. */
+ headers?: HeadersInit;
+ /** A cryptographic hash of the resource to be fetched by request. Sets request's integrity. */
+ integrity?: string;
+ /** A boolean to set request's keepalive. */
+ keepalive?: boolean;
+ /** A string to set request's method. */
+ method?: string;
+ /** A string to indicate whether the request will use CORS, or will be restricted to same-origin URLs. Sets request's mode. */
+ mode?: RequestMode;
+ /** A string indicating whether request follows redirects, results in an error upon encountering a redirect, or returns the redirect (in an opaque fashion). Sets request's redirect. */
+ redirect?: RequestRedirect;
+ /** A string whose value is a same-origin URL, "about:client", or the empty string, to set request's referrer. */
+ referrer?: string;
+ /** A referrer policy to set request's referrerPolicy. */
+ referrerPolicy?: ReferrerPolicy;
+ /** An AbortSignal to set request's signal. */
+ signal?: AbortSignal | null;
+ /** Can only be null. Used to disassociate request from any Window. */
+ window?: null;
+}
+
+interface ResponseInit {
+ headers?: HeadersInit;
+ status?: number;
+ statusText?: string;
+}
+
+interface RsaHashedImportParams extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+}
+
+interface RsaHashedKeyGenParams extends RsaKeyGenParams {
+ hash: HashAlgorithmIdentifier;
+}
+
+interface RsaKeyGenParams extends Algorithm {
+ modulusLength: number;
+ publicExponent: BigInteger;
+}
+
+interface RsaOaepParams extends Algorithm {
+ label?: BufferSource;
+}
+
+interface RsaOtherPrimesInfo {
+ d?: string;
+ r?: string;
+ t?: string;
+}
+
+interface RsaPssParams extends Algorithm {
+ saltLength: number;
+}
+
+interface SecurityPolicyViolationEventInit extends EventInit {
+ blockedURI?: string;
+ columnNumber?: number;
+ disposition: SecurityPolicyViolationEventDisposition;
+ documentURI: string;
+ effectiveDirective: string;
+ lineNumber?: number;
+ originalPolicy: string;
+ referrer?: string;
+ sample?: string;
+ sourceFile?: string;
+ statusCode: number;
+ violatedDirective: string;
+}
+
+interface StorageEstimate {
+ quota?: number;
+ usage?: number;
+}
+
+interface StreamPipeOptions {
+ preventAbort?: boolean;
+ preventCancel?: boolean;
+ /**
+ * Pipes this readable stream to a given writable stream destination. The way in which the piping process behaves under various error conditions can be customized with a number of passed options. It returns a promise that fulfills when the piping process completes successfully, or rejects if any errors were encountered.
+ *
+ * Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader.
+ *
+ * Errors and closures of the source and destination streams propagate as follows:
+ *
+ * An error in this source readable stream will abort destination, unless preventAbort is truthy. The returned promise will be rejected with the source's error, or with any error that occurs during aborting the destination.
+ *
+ * An error in destination will cancel this source readable stream, unless preventCancel is truthy. The returned promise will be rejected with the destination's error, or with any error that occurs during canceling the source.
+ *
+ * When this source readable stream closes, destination will be closed, unless preventClose is truthy. The returned promise will be fulfilled once this process completes, unless an error is encountered while closing the destination, in which case it will be rejected with that error.
+ *
+ * If destination starts out closed or closing, this source readable stream will be canceled, unless preventCancel is true. The returned promise will be rejected with an error indicating piping to a closed stream failed, or with any error that occurs during canceling the source.
+ *
+ * The signal option can be set to an AbortSignal to allow aborting an ongoing pipe operation via the corresponding AbortController. In this case, this source readable stream will be canceled, and destination aborted, unless the respective options preventCancel or preventAbort are set.
+ */
+ preventClose?: boolean;
+ signal?: AbortSignal;
+}
+
+interface StructuredSerializeOptions {
+ transfer?: Transferable[];
+}
+
+interface TextDecodeOptions {
+ stream?: boolean;
+}
+
+interface TextDecoderOptions {
+ fatal?: boolean;
+ ignoreBOM?: boolean;
+}
+
+interface TextEncoderEncodeIntoResult {
+ read?: number;
+ written?: number;
+}
+
+interface Transformer<I = any, O = any> {
+ flush?: TransformerFlushCallback<O>;
+ readableType?: undefined;
+ start?: TransformerStartCallback<O>;
+ transform?: TransformerTransformCallback<I, O>;
+ writableType?: undefined;
+}
+
+interface UnderlyingSink<W = any> {
+ abort?: UnderlyingSinkAbortCallback;
+ close?: UnderlyingSinkCloseCallback;
+ start?: UnderlyingSinkStartCallback;
+ type?: undefined;
+ write?: UnderlyingSinkWriteCallback<W>;
+}
+
+interface UnderlyingSource<R = any> {
+ cancel?: UnderlyingSourceCancelCallback;
+ pull?: UnderlyingSourcePullCallback<R>;
+ start?: UnderlyingSourceStartCallback<R>;
+ type?: undefined;
+}
+
+interface VideoColorSpaceInit {
+ fullRange?: boolean;
+ matrix?: VideoMatrixCoefficients;
+ primaries?: VideoColorPrimaries;
+ transfer?: VideoTransferCharacteristics;
+}
+
+interface VideoConfiguration {
+ bitrate: number;
+ colorGamut?: ColorGamut;
+ contentType: string;
+ framerate: number;
+ hdrMetadataType?: HdrMetadataType;
+ height: number;
+ scalabilityMode?: string;
+ transferFunction?: TransferFunction;
+ width: number;
+}
+
+interface WebGLContextAttributes {
+ alpha?: boolean;
+ antialias?: boolean;
+ depth?: boolean;
+ desynchronized?: boolean;
+ failIfMajorPerformanceCaveat?: boolean;
+ powerPreference?: WebGLPowerPreference;
+ premultipliedAlpha?: boolean;
+ preserveDrawingBuffer?: boolean;
+ stencil?: boolean;
+}
+
+interface WebGLContextEventInit extends EventInit {
+ statusMessage?: string;
+}
+
+interface WorkerOptions {
+ credentials?: RequestCredentials;
+ name?: string;
+ type?: WorkerType;
+}
+
+/** The ANGLE_instanced_arrays extension is part of the WebGL API and allows to draw the same object, or groups of similar objects multiple times, if they share the same vertex data, primitive count and type. */
+interface ANGLE_instanced_arrays {
+ drawArraysInstancedANGLE(mode: GLenum, first: GLint, count: GLsizei, primcount: GLsizei): void;
+ drawElementsInstancedANGLE(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr, primcount: GLsizei): void;
+ vertexAttribDivisorANGLE(index: GLuint, divisor: GLuint): void;
+ readonly VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: GLenum;
+}
+
+/** A controller object that allows you to abort one or more DOM requests as and when desired. */
+interface AbortController {
+ /** Returns the AbortSignal object associated with this object. */
+ readonly signal: AbortSignal;
+ /** Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted. */
+ // abort(): AbortSignal; - To be re-added in the future
+}
+
+declare var AbortController: {
+ prototype: AbortController;
+ new(): AbortController;
+};
+
+interface AbortSignalEventMap {
+ "abort": Event;
+}
+
+/** A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object. */
+interface AbortSignal extends EventTarget {
+ /** Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise. */
+ readonly aborted: boolean;
+ onabort: ((this: AbortSignal, ev: Event) => any) | null;
+ readonly reason: any;
+ throwIfAborted(): void;
+ addEventListener<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var AbortSignal: {
+ prototype: AbortSignal;
+ new(): AbortSignal;
+ abort(reason?: any): AbortSignal;
+};
+
+interface AbstractWorkerEventMap {
+ "error": ErrorEvent;
+}
+
+interface AbstractWorker {
+ onerror: ((this: AbstractWorker, ev: ErrorEvent) => any) | null;
+ addEventListener<K extends keyof AbstractWorkerEventMap>(type: K, listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof AbstractWorkerEventMap>(type: K, listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+interface AnimationFrameProvider {
+ cancelAnimationFrame(handle: number): void;
+ requestAnimationFrame(callback: FrameRequestCallback): number;
+}
+
+/** A file-like object of immutable, raw data. Blobs represent data that isn't necessarily in a JavaScript-native format. The File interface is based on Blob, inheriting blob functionality and expanding it to support files on the user's system. */
+interface Blob {
+ readonly size: number;
+ readonly type: string;
+ arrayBuffer(): Promise<ArrayBuffer>;
+ slice(start?: number, end?: number, contentType?: string): Blob;
+ stream(): ReadableStream<Uint8Array>;
+ text(): Promise<string>;
+}
+
+declare var Blob: {
+ prototype: Blob;
+ new(blobParts?: BlobPart[], options?: BlobPropertyBag): Blob;
+};
+
+interface Body {
+ readonly body: ReadableStream<Uint8Array> | null;
+ readonly bodyUsed: boolean;
+ arrayBuffer(): Promise<ArrayBuffer>;
+ blob(): Promise<Blob>;
+ formData(): Promise<FormData>;
+ json(): Promise<any>;
+ text(): Promise<string>;
+}
+
+interface BroadcastChannelEventMap {
+ "message": MessageEvent;
+ "messageerror": MessageEvent;
+}
+
+interface BroadcastChannel extends EventTarget {
+ /** Returns the channel name (as passed to the constructor). */
+ readonly name: string;
+ onmessage: ((this: BroadcastChannel, ev: MessageEvent) => any) | null;
+ onmessageerror: ((this: BroadcastChannel, ev: MessageEvent) => any) | null;
+ /** Closes the BroadcastChannel object, opening it up to garbage collection. */
+ close(): void;
+ /** Sends the given message to other BroadcastChannel objects set up for this channel. Messages can be structured objects, e.g. nested objects and arrays. */
+ postMessage(message: any): void;
+ addEventListener<K extends keyof BroadcastChannelEventMap>(type: K, listener: (this: BroadcastChannel, ev: BroadcastChannelEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof BroadcastChannelEventMap>(type: K, listener: (this: BroadcastChannel, ev: BroadcastChannelEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var BroadcastChannel: {
+ prototype: BroadcastChannel;
+ new(name: string): BroadcastChannel;
+};
+
+/** This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. */
+interface ByteLengthQueuingStrategy extends QueuingStrategy<ArrayBufferView> {
+ readonly highWaterMark: number;
+ readonly size: QueuingStrategySize<ArrayBufferView>;
+}
+
+declare var ByteLengthQueuingStrategy: {
+ prototype: ByteLengthQueuingStrategy;
+ new(init: QueuingStrategyInit): ByteLengthQueuingStrategy;
+};
+
+/**
+ * Provides a storage mechanism for Request / Response object pairs that are cached, for example as part of the ServiceWorker life cycle. Note that the Cache interface is exposed to windowed scopes as well as workers. You don't have to use it in conjunction with service workers, even though it is defined in the service worker spec.
+ * Available only in secure contexts.
+ */
+interface Cache {
+ add(request: RequestInfo | URL): Promise<void>;
+ addAll(requests: RequestInfo[]): Promise<void>;
+ delete(request: RequestInfo | URL, options?: CacheQueryOptions): Promise<boolean>;
+ keys(request?: RequestInfo | URL, options?: CacheQueryOptions): Promise<ReadonlyArray<Request>>;
+ match(request: RequestInfo | URL, options?: CacheQueryOptions): Promise<Response | undefined>;
+ matchAll(request?: RequestInfo | URL, options?: CacheQueryOptions): Promise<ReadonlyArray<Response>>;
+ put(request: RequestInfo | URL, response: Response): Promise<void>;
+}
+
+declare var Cache: {
+ prototype: Cache;
+ new(): Cache;
+};
+
+/**
+ * The storage for Cache objects.
+ * Available only in secure contexts.
+ */
+interface CacheStorage {
+ delete(cacheName: string): Promise<boolean>;
+ has(cacheName: string): Promise<boolean>;
+ keys(): Promise<string[]>;
+ match(request: RequestInfo | URL, options?: MultiCacheQueryOptions): Promise<Response | undefined>;
+ open(cacheName: string): Promise<Cache>;
+}
+
+declare var CacheStorage: {
+ prototype: CacheStorage;
+ new(): CacheStorage;
+};
+
+/** An opaque object describing a gradient. It is returned by the methods CanvasRenderingContext2D.createLinearGradient() or CanvasRenderingContext2D.createRadialGradient(). */
+interface CanvasGradient {
+ /**
+ * Adds a color stop with the given color to the gradient at the given offset. 0.0 is the offset at one end of the gradient, 1.0 is the offset at the other end.
+ *
+ * Throws an "IndexSizeError" DOMException if the offset is out of range. Throws a "SyntaxError" DOMException if the color cannot be parsed.
+ */
+ addColorStop(offset: number, color: string): void;
+}
+
+declare var CanvasGradient: {
+ prototype: CanvasGradient;
+ new(): CanvasGradient;
+};
+
+interface CanvasPath {
+ arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, counterclockwise?: boolean): void;
+ arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void;
+ bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void;
+ closePath(): void;
+ ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, counterclockwise?: boolean): void;
+ lineTo(x: number, y: number): void;
+ moveTo(x: number, y: number): void;
+ quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;
+ rect(x: number, y: number, w: number, h: number): void;
+}
+
+/** An opaque object describing a pattern, based on an image, a canvas, or a video, created by the CanvasRenderingContext2D.createPattern() method. */
+interface CanvasPattern {
+ /** Sets the transformation matrix that will be used when rendering the pattern during a fill or stroke painting operation. */
+ setTransform(transform?: DOMMatrix2DInit): void;
+}
+
+declare var CanvasPattern: {
+ prototype: CanvasPattern;
+ new(): CanvasPattern;
+};
+
+/** The Client interface represents an executable context such as a Worker, or a SharedWorker. Window clients are represented by the more-specific WindowClient. You can get Client/WindowClient objects from methods such as Clients.matchAll() and Clients.get(). */
+interface Client {
+ readonly frameType: FrameType;
+ readonly id: string;
+ readonly type: ClientTypes;
+ readonly url: string;
+ postMessage(message: any, transfer: Transferable[]): void;
+ postMessage(message: any, options?: StructuredSerializeOptions): void;
+}
+
+declare var Client: {
+ prototype: Client;
+ new(): Client;
+};
+
+/** Provides access to Client objects. Access it via self.clients within a service worker. */
+interface Clients {
+ claim(): Promise<void>;
+ get(id: string): Promise<Client | undefined>;
+ matchAll<T extends ClientQueryOptions>(options?: T): Promise<ReadonlyArray<T["type"] extends "window" ? WindowClient : Client>>;
+ openWindow(url: string | URL): Promise<WindowClient | null>;
+}
+
+declare var Clients: {
+ prototype: Clients;
+ new(): Clients;
+};
+
+/** A CloseEvent is sent to clients using WebSockets when the connection is closed. This is delivered to the listener indicated by the WebSocket object's onclose attribute. */
+interface CloseEvent extends Event {
+ /** Returns the WebSocket connection close code provided by the server. */
+ readonly code: number;
+ /** Returns the WebSocket connection close reason provided by the server. */
+ readonly reason: string;
+ /** Returns true if the connection closed cleanly; false otherwise. */
+ readonly wasClean: boolean;
+}
+
+declare var CloseEvent: {
+ prototype: CloseEvent;
+ new(type: string, eventInitDict?: CloseEventInit): CloseEvent;
+};
+
+/** This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. */
+interface CountQueuingStrategy extends QueuingStrategy {
+ readonly highWaterMark: number;
+ readonly size: QueuingStrategySize;
+}
+
+declare var CountQueuingStrategy: {
+ prototype: CountQueuingStrategy;
+ new(init: QueuingStrategyInit): CountQueuingStrategy;
+};
+
+/** Basic cryptography features available in the current context. It allows access to a cryptographically strong random number generator and to cryptographic primitives. */
+interface Crypto {
+ /** Available only in secure contexts. */
+ readonly subtle: SubtleCrypto;
+ getRandomValues<T extends ArrayBufferView | null>(array: T): T;
+ /** Available only in secure contexts. */
+ randomUUID(): string;
+}
+
+declare var Crypto: {
+ prototype: Crypto;
+ new(): Crypto;
+};
+
+/**
+ * The CryptoKey dictionary of the Web Crypto API represents a cryptographic key.
+ * Available only in secure contexts.
+ */
+interface CryptoKey {
+ readonly algorithm: KeyAlgorithm;
+ readonly extractable: boolean;
+ readonly type: KeyType;
+ readonly usages: KeyUsage[];
+}
+
+declare var CryptoKey: {
+ prototype: CryptoKey;
+ new(): CryptoKey;
+};
+
+interface CustomEvent<T = any> extends Event {
+ /** Returns any custom data event was created with. Typically used for synthetic events. */
+ readonly detail: T;
+ /** @deprecated */
+ initCustomEvent(type: string, bubbles?: boolean, cancelable?: boolean, detail?: T): void;
+}
+
+declare var CustomEvent: {
+ prototype: CustomEvent;
+ new<T>(type: string, eventInitDict?: CustomEventInit<T>): CustomEvent<T>;
+};
+
+/** An abnormal event (called an exception) which occurs as a result of calling a method or accessing a property of a web API. */
+interface DOMException extends Error {
+ /** @deprecated */
+ readonly code: number;
+ readonly message: string;
+ readonly name: string;
+ readonly ABORT_ERR: number;
+ readonly DATA_CLONE_ERR: number;
+ readonly DOMSTRING_SIZE_ERR: number;
+ readonly HIERARCHY_REQUEST_ERR: number;
+ readonly INDEX_SIZE_ERR: number;
+ readonly INUSE_ATTRIBUTE_ERR: number;
+ readonly INVALID_ACCESS_ERR: number;
+ readonly INVALID_CHARACTER_ERR: number;
+ readonly INVALID_MODIFICATION_ERR: number;
+ readonly INVALID_NODE_TYPE_ERR: number;
+ readonly INVALID_STATE_ERR: number;
+ readonly NAMESPACE_ERR: number;
+ readonly NETWORK_ERR: number;
+ readonly NOT_FOUND_ERR: number;
+ readonly NOT_SUPPORTED_ERR: number;
+ readonly NO_DATA_ALLOWED_ERR: number;
+ readonly NO_MODIFICATION_ALLOWED_ERR: number;
+ readonly QUOTA_EXCEEDED_ERR: number;
+ readonly SECURITY_ERR: number;
+ readonly SYNTAX_ERR: number;
+ readonly TIMEOUT_ERR: number;
+ readonly TYPE_MISMATCH_ERR: number;
+ readonly URL_MISMATCH_ERR: number;
+ readonly VALIDATION_ERR: number;
+ readonly WRONG_DOCUMENT_ERR: number;
+}
+
+declare var DOMException: {
+ prototype: DOMException;
+ new(message?: string, name?: string): DOMException;
+ readonly ABORT_ERR: number;
+ readonly DATA_CLONE_ERR: number;
+ readonly DOMSTRING_SIZE_ERR: number;
+ readonly HIERARCHY_REQUEST_ERR: number;
+ readonly INDEX_SIZE_ERR: number;
+ readonly INUSE_ATTRIBUTE_ERR: number;
+ readonly INVALID_ACCESS_ERR: number;
+ readonly INVALID_CHARACTER_ERR: number;
+ readonly INVALID_MODIFICATION_ERR: number;
+ readonly INVALID_NODE_TYPE_ERR: number;
+ readonly INVALID_STATE_ERR: number;
+ readonly NAMESPACE_ERR: number;
+ readonly NETWORK_ERR: number;
+ readonly NOT_FOUND_ERR: number;
+ readonly NOT_SUPPORTED_ERR: number;
+ readonly NO_DATA_ALLOWED_ERR: number;
+ readonly NO_MODIFICATION_ALLOWED_ERR: number;
+ readonly QUOTA_EXCEEDED_ERR: number;
+ readonly SECURITY_ERR: number;
+ readonly SYNTAX_ERR: number;
+ readonly TIMEOUT_ERR: number;
+ readonly TYPE_MISMATCH_ERR: number;
+ readonly URL_MISMATCH_ERR: number;
+ readonly VALIDATION_ERR: number;
+ readonly WRONG_DOCUMENT_ERR: number;
+};
+
+interface DOMMatrix extends DOMMatrixReadOnly {
+ a: number;
+ b: number;
+ c: number;
+ d: number;
+ e: number;
+ f: number;
+ m11: number;
+ m12: number;
+ m13: number;
+ m14: number;
+ m21: number;
+ m22: number;
+ m23: number;
+ m24: number;
+ m31: number;
+ m32: number;
+ m33: number;
+ m34: number;
+ m41: number;
+ m42: number;
+ m43: number;
+ m44: number;
+ invertSelf(): DOMMatrix;
+ multiplySelf(other?: DOMMatrixInit): DOMMatrix;
+ preMultiplySelf(other?: DOMMatrixInit): DOMMatrix;
+ rotateAxisAngleSelf(x?: number, y?: number, z?: number, angle?: number): DOMMatrix;
+ rotateFromVectorSelf(x?: number, y?: number): DOMMatrix;
+ rotateSelf(rotX?: number, rotY?: number, rotZ?: number): DOMMatrix;
+ scale3dSelf(scale?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix;
+ scaleSelf(scaleX?: number, scaleY?: number, scaleZ?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix;
+ skewXSelf(sx?: number): DOMMatrix;
+ skewYSelf(sy?: number): DOMMatrix;
+ translateSelf(tx?: number, ty?: number, tz?: number): DOMMatrix;
+}
+
+declare var DOMMatrix: {
+ prototype: DOMMatrix;
+ new(init?: string | number[]): DOMMatrix;
+ fromFloat32Array(array32: Float32Array): DOMMatrix;
+ fromFloat64Array(array64: Float64Array): DOMMatrix;
+ fromMatrix(other?: DOMMatrixInit): DOMMatrix;
+};
+
+interface DOMMatrixReadOnly {
+ readonly a: number;
+ readonly b: number;
+ readonly c: number;
+ readonly d: number;
+ readonly e: number;
+ readonly f: number;
+ readonly is2D: boolean;
+ readonly isIdentity: boolean;
+ readonly m11: number;
+ readonly m12: number;
+ readonly m13: number;
+ readonly m14: number;
+ readonly m21: number;
+ readonly m22: number;
+ readonly m23: number;
+ readonly m24: number;
+ readonly m31: number;
+ readonly m32: number;
+ readonly m33: number;
+ readonly m34: number;
+ readonly m41: number;
+ readonly m42: number;
+ readonly m43: number;
+ readonly m44: number;
+ flipX(): DOMMatrix;
+ flipY(): DOMMatrix;
+ inverse(): DOMMatrix;
+ multiply(other?: DOMMatrixInit): DOMMatrix;
+ rotate(rotX?: number, rotY?: number, rotZ?: number): DOMMatrix;
+ rotateAxisAngle(x?: number, y?: number, z?: number, angle?: number): DOMMatrix;
+ rotateFromVector(x?: number, y?: number): DOMMatrix;
+ scale(scaleX?: number, scaleY?: number, scaleZ?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix;
+ scale3d(scale?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix;
+ /** @deprecated */
+ scaleNonUniform(scaleX?: number, scaleY?: number): DOMMatrix;
+ skewX(sx?: number): DOMMatrix;
+ skewY(sy?: number): DOMMatrix;
+ toFloat32Array(): Float32Array;
+ toFloat64Array(): Float64Array;
+ toJSON(): any;
+ transformPoint(point?: DOMPointInit): DOMPoint;
+ translate(tx?: number, ty?: number, tz?: number): DOMMatrix;
+}
+
+declare var DOMMatrixReadOnly: {
+ prototype: DOMMatrixReadOnly;
+ new(init?: string | number[]): DOMMatrixReadOnly;
+ fromFloat32Array(array32: Float32Array): DOMMatrixReadOnly;
+ fromFloat64Array(array64: Float64Array): DOMMatrixReadOnly;
+ fromMatrix(other?: DOMMatrixInit): DOMMatrixReadOnly;
+};
+
+interface DOMPoint extends DOMPointReadOnly {
+ w: number;
+ x: number;
+ y: number;
+ z: number;
+}
+
+declare var DOMPoint: {
+ prototype: DOMPoint;
+ new(x?: number, y?: number, z?: number, w?: number): DOMPoint;
+ fromPoint(other?: DOMPointInit): DOMPoint;
+};
+
+interface DOMPointReadOnly {
+ readonly w: number;
+ readonly x: number;
+ readonly y: number;
+ readonly z: number;
+ matrixTransform(matrix?: DOMMatrixInit): DOMPoint;
+ toJSON(): any;
+}
+
+declare var DOMPointReadOnly: {
+ prototype: DOMPointReadOnly;
+ new(x?: number, y?: number, z?: number, w?: number): DOMPointReadOnly;
+ fromPoint(other?: DOMPointInit): DOMPointReadOnly;
+};
+
+interface DOMQuad {
+ readonly p1: DOMPoint;
+ readonly p2: DOMPoint;
+ readonly p3: DOMPoint;
+ readonly p4: DOMPoint;
+ getBounds(): DOMRect;
+ toJSON(): any;
+}
+
+declare var DOMQuad: {
+ prototype: DOMQuad;
+ new(p1?: DOMPointInit, p2?: DOMPointInit, p3?: DOMPointInit, p4?: DOMPointInit): DOMQuad;
+ fromQuad(other?: DOMQuadInit): DOMQuad;
+ fromRect(other?: DOMRectInit): DOMQuad;
+};
+
+interface DOMRect extends DOMRectReadOnly {
+ height: number;
+ width: number;
+ x: number;
+ y: number;
+}
+
+declare var DOMRect: {
+ prototype: DOMRect;
+ new(x?: number, y?: number, width?: number, height?: number): DOMRect;
+ fromRect(other?: DOMRectInit): DOMRect;
+};
+
+interface DOMRectReadOnly {
+ readonly bottom: number;
+ readonly height: number;
+ readonly left: number;
+ readonly right: number;
+ readonly top: number;
+ readonly width: number;
+ readonly x: number;
+ readonly y: number;
+ toJSON(): any;
+}
+
+declare var DOMRectReadOnly: {
+ prototype: DOMRectReadOnly;
+ new(x?: number, y?: number, width?: number, height?: number): DOMRectReadOnly;
+ fromRect(other?: DOMRectInit): DOMRectReadOnly;
+};
+
+/** A type returned by some APIs which contains a list of DOMString (strings). */
+interface DOMStringList {
+ /** Returns the number of strings in strings. */
+ readonly length: number;
+ /** Returns true if strings contains string, and false otherwise. */
+ contains(string: string): boolean;
+ /** Returns the string with index index from strings. */
+ item(index: number): string | null;
+ [index: number]: string;
+}
+
+declare var DOMStringList: {
+ prototype: DOMStringList;
+ new(): DOMStringList;
+};
+
+interface DedicatedWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap {
+ "message": MessageEvent;
+ "messageerror": MessageEvent;
+}
+
+/** (the Worker global scope) is accessible through the self keyword. Some additional global functions, namespaces objects, and constructors, not typically associated with the worker global scope, but available on it, are listed in the JavaScript Reference. See also: Functions available to workers. */
+interface DedicatedWorkerGlobalScope extends WorkerGlobalScope, AnimationFrameProvider {
+ /** Returns dedicatedWorkerGlobal's name, i.e. the value given to the Worker constructor. Primarily useful for debugging. */
+ readonly name: string;
+ onmessage: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null;
+ onmessageerror: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null;
+ /** Aborts dedicatedWorkerGlobal. */
+ close(): void;
+ /** Clones message and transmits it to the Worker object associated with dedicatedWorkerGlobal. transfer can be passed as a list of objects that are to be transferred rather than cloned. */
+ postMessage(message: any, transfer: Transferable[]): void;
+ postMessage(message: any, options?: StructuredSerializeOptions): void;
+ addEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var DedicatedWorkerGlobalScope: {
+ prototype: DedicatedWorkerGlobalScope;
+ new(): DedicatedWorkerGlobalScope;
+};
+
+interface EXT_blend_minmax {
+ readonly MAX_EXT: GLenum;
+ readonly MIN_EXT: GLenum;
+}
+
+interface EXT_color_buffer_float {
+}
+
+interface EXT_color_buffer_half_float {
+ readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT: GLenum;
+ readonly RGB16F_EXT: GLenum;
+ readonly RGBA16F_EXT: GLenum;
+ readonly UNSIGNED_NORMALIZED_EXT: GLenum;
+}
+
+interface EXT_float_blend {
+}
+
+/** The EXT_frag_depth extension is part of the WebGL API and enables to set a depth value of a fragment from within the fragment shader. */
+interface EXT_frag_depth {
+}
+
+interface EXT_sRGB {
+ readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT: GLenum;
+ readonly SRGB8_ALPHA8_EXT: GLenum;
+ readonly SRGB_ALPHA_EXT: GLenum;
+ readonly SRGB_EXT: GLenum;
+}
+
+interface EXT_shader_texture_lod {
+}
+
+interface EXT_texture_compression_rgtc {
+ readonly COMPRESSED_RED_GREEN_RGTC2_EXT: GLenum;
+ readonly COMPRESSED_RED_RGTC1_EXT: GLenum;
+ readonly COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT: GLenum;
+ readonly COMPRESSED_SIGNED_RED_RGTC1_EXT: GLenum;
+}
+
+/** The EXT_texture_filter_anisotropic extension is part of the WebGL API and exposes two constants for anisotropic filtering (AF). */
+interface EXT_texture_filter_anisotropic {
+ readonly MAX_TEXTURE_MAX_ANISOTROPY_EXT: GLenum;
+ readonly TEXTURE_MAX_ANISOTROPY_EXT: GLenum;
+}
+
+/** Events providing information related to errors in scripts or in files. */
+interface ErrorEvent extends Event {
+ readonly colno: number;
+ readonly error: any;
+ readonly filename: string;
+ readonly lineno: number;
+ readonly message: string;
+}
+
+declare var ErrorEvent: {
+ prototype: ErrorEvent;
+ new(type: string, eventInitDict?: ErrorEventInit): ErrorEvent;
+};
+
+/** An event which takes place in the DOM. */
+interface Event {
+ /** Returns true or false depending on how event was initialized. True if event goes through its target's ancestors in reverse tree order, and false otherwise. */
+ readonly bubbles: boolean;
+ cancelBubble: boolean;
+ /** Returns true or false depending on how event was initialized. Its return value does not always carry meaning, but true can indicate that part of the operation during which event was dispatched, can be canceled by invoking the preventDefault() method. */
+ readonly cancelable: boolean;
+ /** Returns true or false depending on how event was initialized. True if event invokes listeners past a ShadowRoot node that is the root of its target, and false otherwise. */
+ readonly composed: boolean;
+ /** Returns the object whose event listener's callback is currently being invoked. */
+ readonly currentTarget: EventTarget | null;
+ /** Returns true if preventDefault() was invoked successfully to indicate cancelation, and false otherwise. */
+ readonly defaultPrevented: boolean;
+ /** Returns the event's phase, which is one of NONE, CAPTURING_PHASE, AT_TARGET, and BUBBLING_PHASE. */
+ readonly eventPhase: number;
+ /** Returns true if event was dispatched by the user agent, and false otherwise. */
+ readonly isTrusted: boolean;
+ /** @deprecated */
+ returnValue: boolean;
+ /** @deprecated */
+ readonly srcElement: EventTarget | null;
+ /** Returns the object to which event is dispatched (its target). */
+ readonly target: EventTarget | null;
+ /** Returns the event's timestamp as the number of milliseconds measured relative to the time origin. */
+ readonly timeStamp: DOMHighResTimeStamp;
+ /** Returns the type of event, e.g. "click", "hashchange", or "submit". */
+ readonly type: string;
+ /** Returns the invocation target objects of event's path (objects on which listeners will be invoked), except for any nodes in shadow trees of which the shadow root's mode is "closed" that are not reachable from event's currentTarget. */
+ composedPath(): EventTarget[];
+ /** @deprecated */
+ initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void;
+ /** If invoked when the cancelable attribute value is true, and while executing a listener for the event with passive set to false, signals to the operation that caused event to be dispatched that it needs to be canceled. */
+ preventDefault(): void;
+ /** Invoking this method prevents event from reaching any registered event listeners after the current one finishes running and, when dispatched in a tree, also prevents event from reaching any other objects. */
+ stopImmediatePropagation(): void;
+ /** When dispatched in a tree, invoking this method prevents event from reaching any objects other than the current object. */
+ stopPropagation(): void;
+ readonly AT_TARGET: number;
+ readonly BUBBLING_PHASE: number;
+ readonly CAPTURING_PHASE: number;
+ readonly NONE: number;
+}
+
+declare var Event: {
+ prototype: Event;
+ new(type: string, eventInitDict?: EventInit): Event;
+ readonly AT_TARGET: number;
+ readonly BUBBLING_PHASE: number;
+ readonly CAPTURING_PHASE: number;
+ readonly NONE: number;
+};
+
+interface EventListener {
+ (evt: Event): void;
+}
+
+interface EventListenerObject {
+ handleEvent(object: Event): void;
+}
+
+interface EventSourceEventMap {
+ "error": Event;
+ "message": MessageEvent;
+ "open": Event;
+}
+
+interface EventSource extends EventTarget {
+ onerror: ((this: EventSource, ev: Event) => any) | null;
+ onmessage: ((this: EventSource, ev: MessageEvent) => any) | null;
+ onopen: ((this: EventSource, ev: Event) => any) | null;
+ /** Returns the state of this EventSource object's connection. It can have the values described below. */
+ readonly readyState: number;
+ /** Returns the URL providing the event stream. */
+ readonly url: string;
+ /** Returns true if the credentials mode for connection requests to the URL providing the event stream is set to "include", and false otherwise. */
+ readonly withCredentials: boolean;
+ /** Aborts any instances of the fetch algorithm started for this EventSource object, and sets the readyState attribute to CLOSED. */
+ close(): void;
+ readonly CLOSED: number;
+ readonly CONNECTING: number;
+ readonly OPEN: number;
+ addEventListener<K extends keyof EventSourceEventMap>(type: K, listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: (this: EventSource, event: MessageEvent) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof EventSourceEventMap>(type: K, listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: (this: EventSource, event: MessageEvent) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var EventSource: {
+ prototype: EventSource;
+ new(url: string | URL, eventSourceInitDict?: EventSourceInit): EventSource;
+ readonly CLOSED: number;
+ readonly CONNECTING: number;
+ readonly OPEN: number;
+};
+
+/** EventTarget is a DOM interface implemented by objects that can receive events and may have listeners for them. */
+interface EventTarget {
+ /**
+ * Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
+ *
+ * The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
+ *
+ * When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
+ *
+ * When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
+ *
+ * When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
+ *
+ * If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
+ *
+ * The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
+ */
+ addEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean): void;
+ /** Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise. */
+ dispatchEvent(event: Event): boolean;
+ /** Removes the event listener in target's event listener list with the same type, callback, and options. */
+ removeEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void;
+}
+
+declare var EventTarget: {
+ prototype: EventTarget;
+ new(): EventTarget;
+};
+
+/** Extends the lifetime of the install and activate events dispatched on the global scope as part of the service worker lifecycle. This ensures that any functional events (like FetchEvent) are not dispatched until it upgrades database schemas and deletes the outdated cache entries. */
+interface ExtendableEvent extends Event {
+ waitUntil(f: Promise<any>): void;
+}
+
+declare var ExtendableEvent: {
+ prototype: ExtendableEvent;
+ new(type: string, eventInitDict?: ExtendableEventInit): ExtendableEvent;
+};
+
+/** This ServiceWorker API interface represents the event object of a message event fired on a service worker (when a channel message is received on the ServiceWorkerGlobalScope from another context) — extends the lifetime of such events. */
+interface ExtendableMessageEvent extends ExtendableEvent {
+ readonly data: any;
+ readonly lastEventId: string;
+ readonly origin: string;
+ readonly ports: ReadonlyArray<MessagePort>;
+ readonly source: Client | ServiceWorker | MessagePort | null;
+}
+
+declare var ExtendableMessageEvent: {
+ prototype: ExtendableMessageEvent;
+ new(type: string, eventInitDict?: ExtendableMessageEventInit): ExtendableMessageEvent;
+};
+
+/** This is the event type for fetch events dispatched on the service worker global scope. It contains information about the fetch, including the request and how the receiver will treat the response. It provides the event.respondWith() method, which allows us to provide a response to this fetch. */
+interface FetchEvent extends ExtendableEvent {
+ readonly clientId: string;
+ readonly handled: Promise<undefined>;
+ readonly preloadResponse: Promise<any>;
+ readonly request: Request;
+ readonly resultingClientId: string;
+ respondWith(r: Response | PromiseLike<Response>): void;
+}
+
+declare var FetchEvent: {
+ prototype: FetchEvent;
+ new(type: string, eventInitDict: FetchEventInit): FetchEvent;
+};
+
+/** Provides information about files and allows JavaScript in a web page to access their content. */
+interface File extends Blob {
+ readonly lastModified: number;
+ readonly name: string;
+ readonly webkitRelativePath: string;
+}
+
+declare var File: {
+ prototype: File;
+ new(fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File;
+};
+
+/** An object of this type is returned by the files property of the HTML <input> element; this lets you access the list of files selected with the <input type="file"> element. It's also used for a list of files dropped into web content when using the drag and drop API; see the DataTransfer object for details on this usage. */
+interface FileList {
+ readonly length: number;
+ item(index: number): File | null;
+ [index: number]: File;
+}
+
+declare var FileList: {
+ prototype: FileList;
+ new(): FileList;
+};
+
+interface FileReaderEventMap {
+ "abort": ProgressEvent<FileReader>;
+ "error": ProgressEvent<FileReader>;
+ "load": ProgressEvent<FileReader>;
+ "loadend": ProgressEvent<FileReader>;
+ "loadstart": ProgressEvent<FileReader>;
+ "progress": ProgressEvent<FileReader>;
+}
+
+/** Lets web applications asynchronously read the contents of files (or raw data buffers) stored on the user's computer, using File or Blob objects to specify the file or data to read. */
+interface FileReader extends EventTarget {
+ readonly error: DOMException | null;
+ onabort: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
+ onerror: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
+ onload: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
+ onloadend: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
+ onloadstart: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
+ onprogress: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
+ readonly readyState: number;
+ readonly result: string | ArrayBuffer | null;
+ abort(): void;
+ readAsArrayBuffer(blob: Blob): void;
+ readAsBinaryString(blob: Blob): void;
+ readAsDataURL(blob: Blob): void;
+ readAsText(blob: Blob, encoding?: string): void;
+ readonly DONE: number;
+ readonly EMPTY: number;
+ readonly LOADING: number;
+ addEventListener<K extends keyof FileReaderEventMap>(type: K, listener: (this: FileReader, ev: FileReaderEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof FileReaderEventMap>(type: K, listener: (this: FileReader, ev: FileReaderEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var FileReader: {
+ prototype: FileReader;
+ new(): FileReader;
+ readonly DONE: number;
+ readonly EMPTY: number;
+ readonly LOADING: number;
+};
+
+/** Allows to read File or Blob objects in a synchronous way. */
+interface FileReaderSync {
+ readAsArrayBuffer(blob: Blob): ArrayBuffer;
+ /** @deprecated */
+ readAsBinaryString(blob: Blob): string;
+ readAsDataURL(blob: Blob): string;
+ readAsText(blob: Blob, encoding?: string): string;
+}
+
+declare var FileReaderSync: {
+ prototype: FileReaderSync;
+ new(): FileReaderSync;
+};
+
+/** Available only in secure contexts. */
+interface FileSystemDirectoryHandle extends FileSystemHandle {
+ readonly kind: "directory";
+ getDirectoryHandle(name: string, options?: FileSystemGetDirectoryOptions): Promise<FileSystemDirectoryHandle>;
+ getFileHandle(name: string, options?: FileSystemGetFileOptions): Promise<FileSystemFileHandle>;
+ removeEntry(name: string, options?: FileSystemRemoveOptions): Promise<void>;
+ resolve(possibleDescendant: FileSystemHandle): Promise<string[] | null>;
+}
+
+declare var FileSystemDirectoryHandle: {
+ prototype: FileSystemDirectoryHandle;
+ new(): FileSystemDirectoryHandle;
+};
+
+/** Available only in secure contexts. */
+interface FileSystemFileHandle extends FileSystemHandle {
+ readonly kind: "file";
+ getFile(): Promise<File>;
+}
+
+declare var FileSystemFileHandle: {
+ prototype: FileSystemFileHandle;
+ new(): FileSystemFileHandle;
+};
+
+/** Available only in secure contexts. */
+interface FileSystemHandle {
+ readonly kind: FileSystemHandleKind;
+ readonly name: string;
+ isSameEntry(other: FileSystemHandle): Promise<boolean>;
+}
+
+declare var FileSystemHandle: {
+ prototype: FileSystemHandle;
+ new(): FileSystemHandle;
+};
+
+interface FontFace {
+ ascentOverride: string;
+ descentOverride: string;
+ display: string;
+ family: string;
+ featureSettings: string;
+ lineGapOverride: string;
+ readonly loaded: Promise<FontFace>;
+ readonly status: FontFaceLoadStatus;
+ stretch: string;
+ style: string;
+ unicodeRange: string;
+ variant: string;
+ variationSettings: string;
+ weight: string;
+ load(): Promise<FontFace>;
+}
+
+declare var FontFace: {
+ prototype: FontFace;
+ new(family: string, source: string | BinaryData, descriptors?: FontFaceDescriptors): FontFace;
+};
+
+interface FontFaceSetEventMap {
+ "loading": Event;
+ "loadingdone": Event;
+ "loadingerror": Event;
+}
+
+interface FontFaceSet extends EventTarget {
+ onloading: ((this: FontFaceSet, ev: Event) => any) | null;
+ onloadingdone: ((this: FontFaceSet, ev: Event) => any) | null;
+ onloadingerror: ((this: FontFaceSet, ev: Event) => any) | null;
+ readonly ready: Promise<FontFaceSet>;
+ readonly status: FontFaceSetLoadStatus;
+ check(font: string, text?: string): boolean;
+ load(font: string, text?: string): Promise<FontFace[]>;
+ forEach(callbackfn: (value: FontFace, key: FontFace, parent: FontFaceSet) => void, thisArg?: any): void;
+ addEventListener<K extends keyof FontFaceSetEventMap>(type: K, listener: (this: FontFaceSet, ev: FontFaceSetEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof FontFaceSetEventMap>(type: K, listener: (this: FontFaceSet, ev: FontFaceSetEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var FontFaceSet: {
+ prototype: FontFaceSet;
+ new(initialFaces: FontFace[]): FontFaceSet;
+};
+
+interface FontFaceSetLoadEvent extends Event {
+ readonly fontfaces: ReadonlyArray<FontFace>;
+}
+
+declare var FontFaceSetLoadEvent: {
+ prototype: FontFaceSetLoadEvent;
+ new(type: string, eventInitDict?: FontFaceSetLoadEventInit): FontFaceSetLoadEvent;
+};
+
+interface FontFaceSource {
+ readonly fonts: FontFaceSet;
+}
+
+/** Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the XMLHttpRequest.send() method. It uses the same format a form would use if the encoding type were set to "multipart/form-data". */
+interface FormData {
+ append(name: string, value: string | Blob, fileName?: string): void;
+ delete(name: string): void;
+ get(name: string): FormDataEntryValue | null;
+ getAll(name: string): FormDataEntryValue[];
+ has(name: string): boolean;
+ set(name: string, value: string | Blob, fileName?: string): void;
+ forEach(callbackfn: (value: FormDataEntryValue, key: string, parent: FormData) => void, thisArg?: any): void;
+}
+
+declare var FormData: {
+ prototype: FormData;
+ new(): FormData;
+};
+
+interface GenericTransformStream {
+ readonly readable: ReadableStream;
+ readonly writable: WritableStream;
+}
+
+/** This Fetch API interface allows you to perform various actions on HTTP request and response headers. These actions include retrieving, setting, adding to, and removing. A Headers object has an associated header list, which is initially empty and consists of zero or more name and value pairs.  You can add to this using methods like append() (see Examples.) In all methods of this interface, header names are matched by case-insensitive byte sequence. */
+interface Headers {
+ append(name: string, value: string): void;
+ delete(name: string): void;
+ get(name: string): string | null;
+ has(name: string): boolean;
+ set(name: string, value: string): void;
+ forEach(callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any): void;
+}
+
+declare var Headers: {
+ prototype: Headers;
+ new(init?: HeadersInit): Headers;
+};
+
+/** This IndexedDB API interface represents a cursor for traversing or iterating over multiple records in a database. */
+interface IDBCursor {
+ /** Returns the direction ("next", "nextunique", "prev" or "prevunique") of the cursor. */
+ readonly direction: IDBCursorDirection;
+ /** Returns the key of the cursor. Throws a "InvalidStateError" DOMException if the cursor is advancing or is finished. */
+ readonly key: IDBValidKey;
+ /** Returns the effective key of the cursor. Throws a "InvalidStateError" DOMException if the cursor is advancing or is finished. */
+ readonly primaryKey: IDBValidKey;
+ readonly request: IDBRequest;
+ /** Returns the IDBObjectStore or IDBIndex the cursor was opened from. */
+ readonly source: IDBObjectStore | IDBIndex;
+ /** Advances the cursor through the next count records in range. */
+ advance(count: number): void;
+ /** Advances the cursor to the next record in range. */
+ continue(key?: IDBValidKey): void;
+ /** Advances the cursor to the next record in range matching or after key and primaryKey. Throws an "InvalidAccessError" DOMException if the source is not an index. */
+ continuePrimaryKey(key: IDBValidKey, primaryKey: IDBValidKey): void;
+ /**
+ * Delete the record pointed at by the cursor with a new value.
+ *
+ * If successful, request's result will be undefined.
+ */
+ delete(): IDBRequest<undefined>;
+ /**
+ * Updated the record pointed at by the cursor with a new value.
+ *
+ * Throws a "DataError" DOMException if the effective object store uses in-line keys and the key would have changed.
+ *
+ * If successful, request's result will be the record's key.
+ */
+ update(value: any): IDBRequest<IDBValidKey>;
+}
+
+declare var IDBCursor: {
+ prototype: IDBCursor;
+ new(): IDBCursor;
+};
+
+/** This IndexedDB API interface represents a cursor for traversing or iterating over multiple records in a database. It is the same as the IDBCursor, except that it includes the value property. */
+interface IDBCursorWithValue extends IDBCursor {
+ /** Returns the cursor's current value. */
+ readonly value: any;
+}
+
+declare var IDBCursorWithValue: {
+ prototype: IDBCursorWithValue;
+ new(): IDBCursorWithValue;
+};
+
+interface IDBDatabaseEventMap {
+ "abort": Event;
+ "close": Event;
+ "error": Event;
+ "versionchange": IDBVersionChangeEvent;
+}
+
+/** This IndexedDB API interface provides a connection to a database; you can use an IDBDatabase object to open a transaction on your database then create, manipulate, and delete objects (data) in that database. The interface provides the only way to get and manage versions of the database. */
+interface IDBDatabase extends EventTarget {
+ /** Returns the name of the database. */
+ readonly name: string;
+ /** Returns a list of the names of object stores in the database. */
+ readonly objectStoreNames: DOMStringList;
+ onabort: ((this: IDBDatabase, ev: Event) => any) | null;
+ onclose: ((this: IDBDatabase, ev: Event) => any) | null;
+ onerror: ((this: IDBDatabase, ev: Event) => any) | null;
+ onversionchange: ((this: IDBDatabase, ev: IDBVersionChangeEvent) => any) | null;
+ /** Returns the version of the database. */
+ readonly version: number;
+ /** Closes the connection once all running transactions have finished. */
+ close(): void;
+ /**
+ * Creates a new object store with the given name and options and returns a new IDBObjectStore.
+ *
+ * Throws a "InvalidStateError" DOMException if not called within an upgrade transaction.
+ */
+ createObjectStore(name: string, options?: IDBObjectStoreParameters): IDBObjectStore;
+ /**
+ * Deletes the object store with the given name.
+ *
+ * Throws a "InvalidStateError" DOMException if not called within an upgrade transaction.
+ */
+ deleteObjectStore(name: string): void;
+ /** Returns a new transaction with the given mode ("readonly" or "readwrite") and scope which can be a single object store name or an array of names. */
+ transaction(storeNames: string | string[], mode?: IDBTransactionMode, options?: IDBTransactionOptions): IDBTransaction;
+ addEventListener<K extends keyof IDBDatabaseEventMap>(type: K, listener: (this: IDBDatabase, ev: IDBDatabaseEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof IDBDatabaseEventMap>(type: K, listener: (this: IDBDatabase, ev: IDBDatabaseEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var IDBDatabase: {
+ prototype: IDBDatabase;
+ new(): IDBDatabase;
+};
+
+/** In the following code snippet, we make a request to open a database, and include handlers for the success and error cases. For a full working example, see our To-do Notifications app (view example live.) */
+interface IDBFactory {
+ /**
+ * Compares two values as keys. Returns -1 if key1 precedes key2, 1 if key2 precedes key1, and 0 if the keys are equal.
+ *
+ * Throws a "DataError" DOMException if either input is not a valid key.
+ */
+ cmp(first: any, second: any): number;
+ databases(): Promise<IDBDatabaseInfo[]>;
+ /** Attempts to delete the named database. If the database already exists and there are open connections that don't close in response to a versionchange event, the request will be blocked until all they close. If the request is successful request's result will be null. */
+ deleteDatabase(name: string): IDBOpenDBRequest;
+ /** Attempts to open a connection to the named database with the current version, or 1 if it does not already exist. If the request is successful request's result will be the connection. */
+ open(name: string, version?: number): IDBOpenDBRequest;
+}
+
+declare var IDBFactory: {
+ prototype: IDBFactory;
+ new(): IDBFactory;
+};
+
+/** IDBIndex interface of the IndexedDB API provides asynchronous access to an index in a database. An index is a kind of object store for looking up records in another object store, called the referenced object store. You use this interface to retrieve data. */
+interface IDBIndex {
+ readonly keyPath: string | string[];
+ readonly multiEntry: boolean;
+ /** Returns the name of the index. */
+ name: string;
+ /** Returns the IDBObjectStore the index belongs to. */
+ readonly objectStore: IDBObjectStore;
+ readonly unique: boolean;
+ /**
+ * Retrieves the number of records matching the given key or key range in query.
+ *
+ * If successful, request's result will be the count.
+ */
+ count(query?: IDBValidKey | IDBKeyRange): IDBRequest<number>;
+ /**
+ * Retrieves the value of the first record matching the given key or key range in query.
+ *
+ * If successful, request's result will be the value, or undefined if there was no matching record.
+ */
+ get(query: IDBValidKey | IDBKeyRange): IDBRequest<any>;
+ /**
+ * Retrieves the values of the records matching the given key or key range in query (up to count if given).
+ *
+ * If successful, request's result will be an Array of the values.
+ */
+ getAll(query?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest<any[]>;
+ /**
+ * Retrieves the keys of records matching the given key or key range in query (up to count if given).
+ *
+ * If successful, request's result will be an Array of the keys.
+ */
+ getAllKeys(query?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest<IDBValidKey[]>;
+ /**
+ * Retrieves the key of the first record matching the given key or key range in query.
+ *
+ * If successful, request's result will be the key, or undefined if there was no matching record.
+ */
+ getKey(query: IDBValidKey | IDBKeyRange): IDBRequest<IDBValidKey | undefined>;
+ /**
+ * Opens a cursor over the records matching query, ordered by direction. If query is null, all records in index are matched.
+ *
+ * If successful, request's result will be an IDBCursorWithValue, or null if there were no matching records.
+ */
+ openCursor(query?: IDBValidKey | IDBKeyRange | null, direction?: IDBCursorDirection): IDBRequest<IDBCursorWithValue | null>;
+ /**
+ * Opens a cursor with key only flag set over the records matching query, ordered by direction. If query is null, all records in index are matched.
+ *
+ * If successful, request's result will be an IDBCursor, or null if there were no matching records.
+ */
+ openKeyCursor(query?: IDBValidKey | IDBKeyRange | null, direction?: IDBCursorDirection): IDBRequest<IDBCursor | null>;
+}
+
+declare var IDBIndex: {
+ prototype: IDBIndex;
+ new(): IDBIndex;
+};
+
+/** A key range can be a single value or a range with upper and lower bounds or endpoints. If the key range has both upper and lower bounds, then it is bounded; if it has no bounds, it is unbounded. A bounded key range can either be open (the endpoints are excluded) or closed (the endpoints are included). To retrieve all keys within a certain range, you can use the following code constructs: */
+interface IDBKeyRange {
+ /** Returns lower bound, or undefined if none. */
+ readonly lower: any;
+ /** Returns true if the lower open flag is set, and false otherwise. */
+ readonly lowerOpen: boolean;
+ /** Returns upper bound, or undefined if none. */
+ readonly upper: any;
+ /** Returns true if the upper open flag is set, and false otherwise. */
+ readonly upperOpen: boolean;
+ /** Returns true if key is included in the range, and false otherwise. */
+ includes(key: any): boolean;
+}
+
+declare var IDBKeyRange: {
+ prototype: IDBKeyRange;
+ new(): IDBKeyRange;
+ /** Returns a new IDBKeyRange spanning from lower to upper. If lowerOpen is true, lower is not included in the range. If upperOpen is true, upper is not included in the range. */
+ bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange;
+ /** Returns a new IDBKeyRange starting at key with no upper bound. If open is true, key is not included in the range. */
+ lowerBound(lower: any, open?: boolean): IDBKeyRange;
+ /** Returns a new IDBKeyRange spanning only key. */
+ only(value: any): IDBKeyRange;
+ /** Returns a new IDBKeyRange with no lower bound and ending at key. If open is true, key is not included in the range. */
+ upperBound(upper: any, open?: boolean): IDBKeyRange;
+};
+
+/** This example shows a variety of different uses of object stores, from updating the data structure with IDBObjectStore.createIndex inside an onupgradeneeded function, to adding a new item to our object store with IDBObjectStore.add. For a full working example, see our To-do Notifications app (view example live.) */
+interface IDBObjectStore {
+ /** Returns true if the store has a key generator, and false otherwise. */
+ readonly autoIncrement: boolean;
+ /** Returns a list of the names of indexes in the store. */
+ readonly indexNames: DOMStringList;
+ /** Returns the key path of the store, or null if none. */
+ readonly keyPath: string | string[];
+ /** Returns the name of the store. */
+ name: string;
+ /** Returns the associated transaction. */
+ readonly transaction: IDBTransaction;
+ /**
+ * Adds or updates a record in store with the given value and key.
+ *
+ * If the store uses in-line keys and key is specified a "DataError" DOMException will be thrown.
+ *
+ * If put() is used, any existing record with the key will be replaced. If add() is used, and if a record with the key already exists the request will fail, with request's error set to a "ConstraintError" DOMException.
+ *
+ * If successful, request's result will be the record's key.
+ */
+ add(value: any, key?: IDBValidKey): IDBRequest<IDBValidKey>;
+ /**
+ * Deletes all records in store.
+ *
+ * If successful, request's result will be undefined.
+ */
+ clear(): IDBRequest<undefined>;
+ /**
+ * Retrieves the number of records matching the given key or key range in query.
+ *
+ * If successful, request's result will be the count.
+ */
+ count(query?: IDBValidKey | IDBKeyRange): IDBRequest<number>;
+ /**
+ * Creates a new index in store with the given name, keyPath and options and returns a new IDBIndex. If the keyPath and options define constraints that cannot be satisfied with the data already in store the upgrade transaction will abort with a "ConstraintError" DOMException.
+ *
+ * Throws an "InvalidStateError" DOMException if not called within an upgrade transaction.
+ */
+ createIndex(name: string, keyPath: string | string[], options?: IDBIndexParameters): IDBIndex;
+ /**
+ * Deletes records in store with the given key or in the given key range in query.
+ *
+ * If successful, request's result will be undefined.
+ */
+ delete(query: IDBValidKey | IDBKeyRange): IDBRequest<undefined>;
+ /**
+ * Deletes the index in store with the given name.
+ *
+ * Throws an "InvalidStateError" DOMException if not called within an upgrade transaction.
+ */
+ deleteIndex(name: string): void;
+ /**
+ * Retrieves the value of the first record matching the given key or key range in query.
+ *
+ * If successful, request's result will be the value, or undefined if there was no matching record.
+ */
+ get(query: IDBValidKey | IDBKeyRange): IDBRequest<any>;
+ /**
+ * Retrieves the values of the records matching the given key or key range in query (up to count if given).
+ *
+ * If successful, request's result will be an Array of the values.
+ */
+ getAll(query?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest<any[]>;
+ /**
+ * Retrieves the keys of records matching the given key or key range in query (up to count if given).
+ *
+ * If successful, request's result will be an Array of the keys.
+ */
+ getAllKeys(query?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest<IDBValidKey[]>;
+ /**
+ * Retrieves the key of the first record matching the given key or key range in query.
+ *
+ * If successful, request's result will be the key, or undefined if there was no matching record.
+ */
+ getKey(query: IDBValidKey | IDBKeyRange): IDBRequest<IDBValidKey | undefined>;
+ index(name: string): IDBIndex;
+ /**
+ * Opens a cursor over the records matching query, ordered by direction. If query is null, all records in store are matched.
+ *
+ * If successful, request's result will be an IDBCursorWithValue pointing at the first matching record, or null if there were no matching records.
+ */
+ openCursor(query?: IDBValidKey | IDBKeyRange | null, direction?: IDBCursorDirection): IDBRequest<IDBCursorWithValue | null>;
+ /**
+ * Opens a cursor with key only flag set over the records matching query, ordered by direction. If query is null, all records in store are matched.
+ *
+ * If successful, request's result will be an IDBCursor pointing at the first matching record, or null if there were no matching records.
+ */
+ openKeyCursor(query?: IDBValidKey | IDBKeyRange | null, direction?: IDBCursorDirection): IDBRequest<IDBCursor | null>;
+ /**
+ * Adds or updates a record in store with the given value and key.
+ *
+ * If the store uses in-line keys and key is specified a "DataError" DOMException will be thrown.
+ *
+ * If put() is used, any existing record with the key will be replaced. If add() is used, and if a record with the key already exists the request will fail, with request's error set to a "ConstraintError" DOMException.
+ *
+ * If successful, request's result will be the record's key.
+ */
+ put(value: any, key?: IDBValidKey): IDBRequest<IDBValidKey>;
+}
+
+declare var IDBObjectStore: {
+ prototype: IDBObjectStore;
+ new(): IDBObjectStore;
+};
+
+interface IDBOpenDBRequestEventMap extends IDBRequestEventMap {
+ "blocked": Event;
+ "upgradeneeded": IDBVersionChangeEvent;
+}
+
+/** Also inherits methods from its parents IDBRequest and EventTarget. */
+interface IDBOpenDBRequest extends IDBRequest<IDBDatabase> {
+ onblocked: ((this: IDBOpenDBRequest, ev: Event) => any) | null;
+ onupgradeneeded: ((this: IDBOpenDBRequest, ev: IDBVersionChangeEvent) => any) | null;
+ addEventListener<K extends keyof IDBOpenDBRequestEventMap>(type: K, listener: (this: IDBOpenDBRequest, ev: IDBOpenDBRequestEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof IDBOpenDBRequestEventMap>(type: K, listener: (this: IDBOpenDBRequest, ev: IDBOpenDBRequestEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var IDBOpenDBRequest: {
+ prototype: IDBOpenDBRequest;
+ new(): IDBOpenDBRequest;
+};
+
+interface IDBRequestEventMap {
+ "error": Event;
+ "success": Event;
+}
+
+/** The request object does not initially contain any information about the result of the operation, but once information becomes available, an event is fired on the request, and the information becomes available through the properties of the IDBRequest instance. */
+interface IDBRequest<T = any> extends EventTarget {
+ /** When a request is completed, returns the error (a DOMException), or null if the request succeeded. Throws a "InvalidStateError" DOMException if the request is still pending. */
+ readonly error: DOMException | null;
+ onerror: ((this: IDBRequest<T>, ev: Event) => any) | null;
+ onsuccess: ((this: IDBRequest<T>, ev: Event) => any) | null;
+ /** Returns "pending" until a request is complete, then returns "done". */
+ readonly readyState: IDBRequestReadyState;
+ /** When a request is completed, returns the result, or undefined if the request failed. Throws a "InvalidStateError" DOMException if the request is still pending. */
+ readonly result: T;
+ /** Returns the IDBObjectStore, IDBIndex, or IDBCursor the request was made against, or null if is was an open request. */
+ readonly source: IDBObjectStore | IDBIndex | IDBCursor;
+ /** Returns the IDBTransaction the request was made within. If this as an open request, then it returns an upgrade transaction while it is running, or null otherwise. */
+ readonly transaction: IDBTransaction | null;
+ addEventListener<K extends keyof IDBRequestEventMap>(type: K, listener: (this: IDBRequest<T>, ev: IDBRequestEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof IDBRequestEventMap>(type: K, listener: (this: IDBRequest<T>, ev: IDBRequestEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var IDBRequest: {
+ prototype: IDBRequest;
+ new(): IDBRequest;
+};
+
+interface IDBTransactionEventMap {
+ "abort": Event;
+ "complete": Event;
+ "error": Event;
+}
+
+interface IDBTransaction extends EventTarget {
+ /** Returns the transaction's connection. */
+ readonly db: IDBDatabase;
+ readonly durability: IDBTransactionDurability;
+ /** If the transaction was aborted, returns the error (a DOMException) providing the reason. */
+ readonly error: DOMException | null;
+ /** Returns the mode the transaction was created with ("readonly" or "readwrite"), or "versionchange" for an upgrade transaction. */
+ readonly mode: IDBTransactionMode;
+ /** Returns a list of the names of object stores in the transaction's scope. For an upgrade transaction this is all object stores in the database. */
+ readonly objectStoreNames: DOMStringList;
+ onabort: ((this: IDBTransaction, ev: Event) => any) | null;
+ oncomplete: ((this: IDBTransaction, ev: Event) => any) | null;
+ onerror: ((this: IDBTransaction, ev: Event) => any) | null;
+ /** Aborts the transaction. All pending requests will fail with a "AbortError" DOMException and all changes made to the database will be reverted. */
+ abort(): void;
+ commit(): void;
+ /** Returns an IDBObjectStore in the transaction's scope. */
+ objectStore(name: string): IDBObjectStore;
+ addEventListener<K extends keyof IDBTransactionEventMap>(type: K, listener: (this: IDBTransaction, ev: IDBTransactionEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof IDBTransactionEventMap>(type: K, listener: (this: IDBTransaction, ev: IDBTransactionEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var IDBTransaction: {
+ prototype: IDBTransaction;
+ new(): IDBTransaction;
+};
+
+/** This IndexedDB API interface indicates that the version of the database has changed, as the result of an IDBOpenDBRequest.onupgradeneeded event handler function. */
+interface IDBVersionChangeEvent extends Event {
+ readonly newVersion: number | null;
+ readonly oldVersion: number;
+}
+
+declare var IDBVersionChangeEvent: {
+ prototype: IDBVersionChangeEvent;
+ new(type: string, eventInitDict?: IDBVersionChangeEventInit): IDBVersionChangeEvent;
+};
+
+interface ImageBitmap {
+ /** Returns the intrinsic height of the image, in CSS pixels. */
+ readonly height: number;
+ /** Returns the intrinsic width of the image, in CSS pixels. */
+ readonly width: number;
+ /** Releases imageBitmap's underlying bitmap data. */
+ close(): void;
+}
+
+declare var ImageBitmap: {
+ prototype: ImageBitmap;
+ new(): ImageBitmap;
+};
+
+interface ImageBitmapRenderingContext {
+ /** Transfers the underlying bitmap data from imageBitmap to context, and the bitmap becomes the contents of the canvas element to which context is bound. */
+ transferFromImageBitmap(bitmap: ImageBitmap | null): void;
+}
+
+declare var ImageBitmapRenderingContext: {
+ prototype: ImageBitmapRenderingContext;
+ new(): ImageBitmapRenderingContext;
+};
+
+/** The underlying pixel data of an area of a <canvas> element. It is created using the ImageData() constructor or creator methods on the CanvasRenderingContext2D object associated with a canvas: createImageData() and getImageData(). It can also be used to set a part of the canvas by using putImageData(). */
+interface ImageData {
+ readonly colorSpace: PredefinedColorSpace;
+ /** Returns the one-dimensional array containing the data in RGBA order, as integers in the range 0 to 255. */
+ readonly data: Uint8ClampedArray;
+ /** Returns the actual dimensions of the data in the ImageData object, in pixels. */
+ readonly height: number;
+ /** Returns the actual dimensions of the data in the ImageData object, in pixels. */
+ readonly width: number;
+}
+
+declare var ImageData: {
+ prototype: ImageData;
+ new(sw: number, sh: number, settings?: ImageDataSettings): ImageData;
+ new(data: Uint8ClampedArray, sw: number, sh?: number, settings?: ImageDataSettings): ImageData;
+};
+
+interface KHR_parallel_shader_compile {
+ readonly COMPLETION_STATUS_KHR: GLenum;
+}
+
+/** Available only in secure contexts. */
+interface Lock {
+ readonly mode: LockMode;
+ readonly name: string;
+}
+
+declare var Lock: {
+ prototype: Lock;
+ new(): Lock;
+};
+
+/** Available only in secure contexts. */
+interface LockManager {
+ query(): Promise<LockManagerSnapshot>;
+ request(name: string, callback: LockGrantedCallback): Promise<any>;
+ request(name: string, options: LockOptions, callback: LockGrantedCallback): Promise<any>;
+}
+
+declare var LockManager: {
+ prototype: LockManager;
+ new(): LockManager;
+};
+
+interface MediaCapabilities {
+ decodingInfo(configuration: MediaDecodingConfiguration): Promise<MediaCapabilitiesDecodingInfo>;
+ encodingInfo(configuration: MediaEncodingConfiguration): Promise<MediaCapabilitiesEncodingInfo>;
+}
+
+declare var MediaCapabilities: {
+ prototype: MediaCapabilities;
+ new(): MediaCapabilities;
+};
+
+/** This Channel Messaging API interface allows us to create a new message channel and send data through it via its two MessagePort properties. */
+interface MessageChannel {
+ /** Returns the first MessagePort object. */
+ readonly port1: MessagePort;
+ /** Returns the second MessagePort object. */
+ readonly port2: MessagePort;
+}
+
+declare var MessageChannel: {
+ prototype: MessageChannel;
+ new(): MessageChannel;
+};
+
+/** A message received by a target object. */
+interface MessageEvent<T = any> extends Event {
+ /** Returns the data of the message. */
+ readonly data: T;
+ /** Returns the last event ID string, for server-sent events. */
+ readonly lastEventId: string;
+ /** Returns the origin of the message, for server-sent events and cross-document messaging. */
+ readonly origin: string;
+ /** Returns the MessagePort array sent with the message, for cross-document messaging and channel messaging. */
+ readonly ports: ReadonlyArray<MessagePort>;
+ /** Returns the WindowProxy of the source window, for cross-document messaging, and the MessagePort being attached, in the connect event fired at SharedWorkerGlobalScope objects. */
+ readonly source: MessageEventSource | null;
+ /** @deprecated */
+ initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: MessagePort[]): void;
+}
+
+declare var MessageEvent: {
+ prototype: MessageEvent;
+ new<T>(type: string, eventInitDict?: MessageEventInit<T>): MessageEvent<T>;
+};
+
+interface MessagePortEventMap {
+ "message": MessageEvent;
+ "messageerror": MessageEvent;
+}
+
+/** This Channel Messaging API interface represents one of the two ports of a MessageChannel, allowing messages to be sent from one port and listening out for them arriving at the other. */
+interface MessagePort extends EventTarget {
+ onmessage: ((this: MessagePort, ev: MessageEvent) => any) | null;
+ onmessageerror: ((this: MessagePort, ev: MessageEvent) => any) | null;
+ /** Disconnects the port, so that it is no longer active. */
+ close(): void;
+ /**
+ * Posts a message through the channel. Objects listed in transfer are transferred, not just cloned, meaning that they are no longer usable on the sending side.
+ *
+ * Throws a "DataCloneError" DOMException if transfer contains duplicate objects or port, or if message could not be cloned.
+ */
+ postMessage(message: any, transfer: Transferable[]): void;
+ postMessage(message: any, options?: StructuredSerializeOptions): void;
+ /** Begins dispatching messages received on the port. */
+ start(): void;
+ addEventListener<K extends keyof MessagePortEventMap>(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof MessagePortEventMap>(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var MessagePort: {
+ prototype: MessagePort;
+ new(): MessagePort;
+};
+
+/** Available only in secure contexts. */
+interface NavigationPreloadManager {
+ disable(): Promise<void>;
+ enable(): Promise<void>;
+ getState(): Promise<NavigationPreloadState>;
+ setHeaderValue(value: string): Promise<void>;
+}
+
+declare var NavigationPreloadManager: {
+ prototype: NavigationPreloadManager;
+ new(): NavigationPreloadManager;
+};
+
+interface NavigatorConcurrentHardware {
+ readonly hardwareConcurrency: number;
+}
+
+interface NavigatorID {
+ /** @deprecated */
+ readonly appCodeName: string;
+ /** @deprecated */
+ readonly appName: string;
+ /** @deprecated */
+ readonly appVersion: string;
+ readonly platform: string;
+ /** @deprecated */
+ readonly product: string;
+ readonly userAgent: string;
+}
+
+interface NavigatorLanguage {
+ readonly language: string;
+ readonly languages: ReadonlyArray<string>;
+}
+
+/** Available only in secure contexts. */
+interface NavigatorLocks {
+ readonly locks: LockManager;
+}
+
+interface NavigatorOnLine {
+ readonly onLine: boolean;
+}
+
+/** Available only in secure contexts. */
+interface NavigatorStorage {
+ readonly storage: StorageManager;
+}
+
+interface NotificationEventMap {
+ "click": Event;
+ "close": Event;
+ "error": Event;
+ "show": Event;
+}
+
+/** This Notifications API interface is used to configure and display desktop notifications to the user. */
+interface Notification extends EventTarget {
+ readonly body: string;
+ readonly data: any;
+ readonly dir: NotificationDirection;
+ readonly icon: string;
+ readonly lang: string;
+ onclick: ((this: Notification, ev: Event) => any) | null;
+ onclose: ((this: Notification, ev: Event) => any) | null;
+ onerror: ((this: Notification, ev: Event) => any) | null;
+ onshow: ((this: Notification, ev: Event) => any) | null;
+ readonly tag: string;
+ readonly title: string;
+ close(): void;
+ addEventListener<K extends keyof NotificationEventMap>(type: K, listener: (this: Notification, ev: NotificationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof NotificationEventMap>(type: K, listener: (this: Notification, ev: NotificationEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var Notification: {
+ prototype: Notification;
+ new(title: string, options?: NotificationOptions): Notification;
+ readonly permission: NotificationPermission;
+};
+
+/** The parameter passed into the onnotificationclick handler, the NotificationEvent interface represents a notification click event that is dispatched on the ServiceWorkerGlobalScope of a ServiceWorker. */
+interface NotificationEvent extends ExtendableEvent {
+ readonly action: string;
+ readonly notification: Notification;
+}
+
+declare var NotificationEvent: {
+ prototype: NotificationEvent;
+ new(type: string, eventInitDict: NotificationEventInit): NotificationEvent;
+};
+
+/** The OES_element_index_uint extension is part of the WebGL API and adds support for gl.UNSIGNED_INT types to WebGLRenderingContext.drawElements(). */
+interface OES_element_index_uint {
+}
+
+interface OES_fbo_render_mipmap {
+}
+
+/** The OES_standard_derivatives extension is part of the WebGL API and adds the GLSL derivative functions dFdx, dFdy, and fwidth. */
+interface OES_standard_derivatives {
+ readonly FRAGMENT_SHADER_DERIVATIVE_HINT_OES: GLenum;
+}
+
+/** The OES_texture_float extension is part of the WebGL API and exposes floating-point pixel types for textures. */
+interface OES_texture_float {
+}
+
+/** The OES_texture_float_linear extension is part of the WebGL API and allows linear filtering with floating-point pixel types for textures. */
+interface OES_texture_float_linear {
+}
+
+/** The OES_texture_half_float extension is part of the WebGL API and adds texture formats with 16- (aka half float) and 32-bit floating-point components. */
+interface OES_texture_half_float {
+ readonly HALF_FLOAT_OES: GLenum;
+}
+
+/** The OES_texture_half_float_linear extension is part of the WebGL API and allows linear filtering with half floating-point pixel types for textures. */
+interface OES_texture_half_float_linear {
+}
+
+interface OES_vertex_array_object {
+ bindVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): void;
+ createVertexArrayOES(): WebGLVertexArrayObjectOES | null;
+ deleteVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): void;
+ isVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): GLboolean;
+ readonly VERTEX_ARRAY_BINDING_OES: GLenum;
+}
+
+interface OVR_multiview2 {
+ framebufferTextureMultiviewOVR(target: GLenum, attachment: GLenum, texture: WebGLTexture | null, level: GLint, baseViewIndex: GLint, numViews: GLsizei): void;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR: GLenum;
+ readonly MAX_VIEWS_OVR: GLenum;
+}
+
+/** @deprecated this is not available in most browsers */
+interface OffscreenCanvas extends EventTarget {
+}
+
+/** This Canvas 2D API interface is used to declare a path that can then be used on a CanvasRenderingContext2D object. The path methods of the CanvasRenderingContext2D interface are also present on this interface, which gives you the convenience of being able to retain and replay your path whenever desired. */
+interface Path2D extends CanvasPath {
+ /** Adds to the path the path given by the argument. */
+ addPath(path: Path2D, transform?: DOMMatrix2DInit): void;
+}
+
+declare var Path2D: {
+ prototype: Path2D;
+ new(path?: Path2D | string): Path2D;
+};
+
+interface PerformanceEventMap {
+ "resourcetimingbufferfull": Event;
+}
+
+/** Provides access to performance-related information for the current page. It's part of the High Resolution Time API, but is enhanced by the Performance Timeline API, the Navigation Timing API, the User Timing API, and the Resource Timing API. */
+interface Performance extends EventTarget {
+ onresourcetimingbufferfull: ((this: Performance, ev: Event) => any) | null;
+ readonly timeOrigin: DOMHighResTimeStamp;
+ clearMarks(markName?: string): void;
+ clearMeasures(measureName?: string): void;
+ clearResourceTimings(): void;
+ getEntries(): PerformanceEntryList;
+ getEntriesByName(name: string, type?: string): PerformanceEntryList;
+ getEntriesByType(type: string): PerformanceEntryList;
+ mark(markName: string, markOptions?: PerformanceMarkOptions): PerformanceMark;
+ measure(measureName: string, startOrMeasureOptions?: string | PerformanceMeasureOptions, endMark?: string): PerformanceMeasure;
+ now(): DOMHighResTimeStamp;
+ setResourceTimingBufferSize(maxSize: number): void;
+ toJSON(): any;
+ addEventListener<K extends keyof PerformanceEventMap>(type: K, listener: (this: Performance, ev: PerformanceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof PerformanceEventMap>(type: K, listener: (this: Performance, ev: PerformanceEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var Performance: {
+ prototype: Performance;
+ new(): Performance;
+};
+
+/** Encapsulates a single performance metric that is part of the performance timeline. A performance entry can be directly created by making a performance mark or measure (for example by calling the mark() method) at an explicit point in an application. Performance entries are also created in indirect ways such as loading a resource (such as an image). */
+interface PerformanceEntry {
+ readonly duration: DOMHighResTimeStamp;
+ readonly entryType: string;
+ readonly name: string;
+ readonly startTime: DOMHighResTimeStamp;
+ toJSON(): any;
+}
+
+declare var PerformanceEntry: {
+ prototype: PerformanceEntry;
+ new(): PerformanceEntry;
+};
+
+/** PerformanceMark is an abstract interface for PerformanceEntry objects with an entryType of "mark". Entries of this type are created by calling performance.mark() to add a named DOMHighResTimeStamp (the mark) to the browser's performance timeline. */
+interface PerformanceMark extends PerformanceEntry {
+ readonly detail: any;
+}
+
+declare var PerformanceMark: {
+ prototype: PerformanceMark;
+ new(markName: string, markOptions?: PerformanceMarkOptions): PerformanceMark;
+};
+
+/** PerformanceMeasure is an abstract interface for PerformanceEntry objects with an entryType of "measure". Entries of this type are created by calling performance.measure() to add a named DOMHighResTimeStamp (the measure) between two marks to the browser's performance timeline. */
+interface PerformanceMeasure extends PerformanceEntry {
+ readonly detail: any;
+}
+
+declare var PerformanceMeasure: {
+ prototype: PerformanceMeasure;
+ new(): PerformanceMeasure;
+};
+
+interface PerformanceObserver {
+ disconnect(): void;
+ observe(options?: PerformanceObserverInit): void;
+ takeRecords(): PerformanceEntryList;
+}
+
+declare var PerformanceObserver: {
+ prototype: PerformanceObserver;
+ new(callback: PerformanceObserverCallback): PerformanceObserver;
+ readonly supportedEntryTypes: ReadonlyArray<string>;
+};
+
+interface PerformanceObserverEntryList {
+ getEntries(): PerformanceEntryList;
+ getEntriesByName(name: string, type?: string): PerformanceEntryList;
+ getEntriesByType(type: string): PerformanceEntryList;
+}
+
+declare var PerformanceObserverEntryList: {
+ prototype: PerformanceObserverEntryList;
+ new(): PerformanceObserverEntryList;
+};
+
+/** Enables retrieval and analysis of detailed network timing data regarding the loading of an application's resources. An application can use the timing metrics to determine, for example, the length of time it takes to fetch a specific resource, such as an XMLHttpRequest, <SVG>, image, or script. */
+interface PerformanceResourceTiming extends PerformanceEntry {
+ readonly connectEnd: DOMHighResTimeStamp;
+ readonly connectStart: DOMHighResTimeStamp;
+ readonly decodedBodySize: number;
+ readonly domainLookupEnd: DOMHighResTimeStamp;
+ readonly domainLookupStart: DOMHighResTimeStamp;
+ readonly encodedBodySize: number;
+ readonly fetchStart: DOMHighResTimeStamp;
+ readonly initiatorType: string;
+ readonly nextHopProtocol: string;
+ readonly redirectEnd: DOMHighResTimeStamp;
+ readonly redirectStart: DOMHighResTimeStamp;
+ readonly requestStart: DOMHighResTimeStamp;
+ readonly responseEnd: DOMHighResTimeStamp;
+ readonly responseStart: DOMHighResTimeStamp;
+ readonly secureConnectionStart: DOMHighResTimeStamp;
+ readonly serverTiming: ReadonlyArray<PerformanceServerTiming>;
+ readonly transferSize: number;
+ readonly workerStart: DOMHighResTimeStamp;
+ toJSON(): any;
+}
+
+declare var PerformanceResourceTiming: {
+ prototype: PerformanceResourceTiming;
+ new(): PerformanceResourceTiming;
+};
+
+interface PerformanceServerTiming {
+ readonly description: string;
+ readonly duration: DOMHighResTimeStamp;
+ readonly name: string;
+ toJSON(): any;
+}
+
+declare var PerformanceServerTiming: {
+ prototype: PerformanceServerTiming;
+ new(): PerformanceServerTiming;
+};
+
+interface PermissionStatusEventMap {
+ "change": Event;
+}
+
+interface PermissionStatus extends EventTarget {
+ onchange: ((this: PermissionStatus, ev: Event) => any) | null;
+ readonly state: PermissionState;
+ addEventListener<K extends keyof PermissionStatusEventMap>(type: K, listener: (this: PermissionStatus, ev: PermissionStatusEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof PermissionStatusEventMap>(type: K, listener: (this: PermissionStatus, ev: PermissionStatusEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var PermissionStatus: {
+ prototype: PermissionStatus;
+ new(): PermissionStatus;
+};
+
+interface Permissions {
+ query(permissionDesc: PermissionDescriptor): Promise<PermissionStatus>;
+}
+
+declare var Permissions: {
+ prototype: Permissions;
+ new(): Permissions;
+};
+
+/** Events measuring progress of an underlying process, like an HTTP request (for an XMLHttpRequest, or the loading of the underlying resource of an <img>, <audio>, <video>, <style> or <link>). */
+interface ProgressEvent<T extends EventTarget = EventTarget> extends Event {
+ readonly lengthComputable: boolean;
+ readonly loaded: number;
+ readonly target: T | null;
+ readonly total: number;
+}
+
+declare var ProgressEvent: {
+ prototype: ProgressEvent;
+ new(type: string, eventInitDict?: ProgressEventInit): ProgressEvent;
+};
+
+interface PromiseRejectionEvent extends Event {
+ readonly promise: Promise<any>;
+ readonly reason: any;
+}
+
+declare var PromiseRejectionEvent: {
+ prototype: PromiseRejectionEvent;
+ new(type: string, eventInitDict: PromiseRejectionEventInit): PromiseRejectionEvent;
+};
+
+/**
+ * This Push API interface represents a push message that has been received. This event is sent to the global scope of a ServiceWorker. It contains the information sent from an application server to a PushSubscription.
+ * Available only in secure contexts.
+ */
+interface PushEvent extends ExtendableEvent {
+ readonly data: PushMessageData | null;
+}
+
+declare var PushEvent: {
+ prototype: PushEvent;
+ new(type: string, eventInitDict?: PushEventInit): PushEvent;
+};
+
+/**
+ * This Push API interface provides a way to receive notifications from third-party servers as well as request URLs for push notifications.
+ * Available only in secure contexts.
+ */
+interface PushManager {
+ getSubscription(): Promise<PushSubscription | null>;
+ permissionState(options?: PushSubscriptionOptionsInit): Promise<PermissionState>;
+ subscribe(options?: PushSubscriptionOptionsInit): Promise<PushSubscription>;
+}
+
+declare var PushManager: {
+ prototype: PushManager;
+ new(): PushManager;
+ readonly supportedContentEncodings: ReadonlyArray<string>;
+};
+
+/**
+ * This Push API interface provides methods which let you retrieve the push data sent by a server in various formats.
+ * Available only in secure contexts.
+ */
+interface PushMessageData {
+ arrayBuffer(): ArrayBuffer;
+ blob(): Blob;
+ json(): any;
+ text(): string;
+}
+
+declare var PushMessageData: {
+ prototype: PushMessageData;
+ new(): PushMessageData;
+};
+
+/**
+ * This Push API interface provides a subcription's URL endpoint and allows unsubscription from a push service.
+ * Available only in secure contexts.
+ */
+interface PushSubscription {
+ readonly endpoint: string;
+ readonly expirationTime: EpochTimeStamp | null;
+ readonly options: PushSubscriptionOptions;
+ getKey(name: PushEncryptionKeyName): ArrayBuffer | null;
+ toJSON(): PushSubscriptionJSON;
+ unsubscribe(): Promise<boolean>;
+}
+
+declare var PushSubscription: {
+ prototype: PushSubscription;
+ new(): PushSubscription;
+};
+
+/** Available only in secure contexts. */
+interface PushSubscriptionOptions {
+ readonly applicationServerKey: ArrayBuffer | null;
+}
+
+declare var PushSubscriptionOptions: {
+ prototype: PushSubscriptionOptions;
+ new(): PushSubscriptionOptions;
+};
+
+interface RTCEncodedAudioFrame {
+ data: ArrayBuffer;
+ readonly timestamp: number;
+ getMetadata(): RTCEncodedAudioFrameMetadata;
+}
+
+declare var RTCEncodedAudioFrame: {
+ prototype: RTCEncodedAudioFrame;
+ new(): RTCEncodedAudioFrame;
+};
+
+interface RTCEncodedVideoFrame {
+ data: ArrayBuffer;
+ readonly timestamp: number;
+ readonly type: RTCEncodedVideoFrameType;
+ getMetadata(): RTCEncodedVideoFrameMetadata;
+}
+
+declare var RTCEncodedVideoFrame: {
+ prototype: RTCEncodedVideoFrame;
+ new(): RTCEncodedVideoFrame;
+};
+
+interface ReadableByteStreamController {
+ readonly byobRequest: ReadableStreamBYOBRequest | null;
+ readonly desiredSize: number | null;
+ close(): void;
+ enqueue(chunk: ArrayBufferView): void;
+ error(e?: any): void;
+}
+
+declare var ReadableByteStreamController: {
+ prototype: ReadableByteStreamController;
+ new(): ReadableByteStreamController;
+};
+
+/** This Streams API interface represents a readable stream of byte data. The Fetch API offers a concrete instance of a ReadableStream through the body property of a Response object. */
+interface ReadableStream<R = any> {
+ readonly locked: boolean;
+ cancel(reason?: any): Promise<void>;
+ getReader(): ReadableStreamDefaultReader<R>;
+ pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
+ pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
+ tee(): [ReadableStream<R>, ReadableStream<R>];
+}
+
+declare var ReadableStream: {
+ prototype: ReadableStream;
+ new<R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
+};
+
+interface ReadableStreamBYOBReader extends ReadableStreamGenericReader {
+ read(view: ArrayBufferView): Promise<ReadableStreamReadResult<ArrayBufferView>>;
+ releaseLock(): void;
+}
+
+declare var ReadableStreamBYOBReader: {
+ prototype: ReadableStreamBYOBReader;
+ new(stream: ReadableStream): ReadableStreamBYOBReader;
+};
+
+interface ReadableStreamBYOBRequest {
+ readonly view: ArrayBufferView | null;
+ respond(bytesWritten: number): void;
+ respondWithNewView(view: ArrayBufferView): void;
+}
+
+declare var ReadableStreamBYOBRequest: {
+ prototype: ReadableStreamBYOBRequest;
+ new(): ReadableStreamBYOBRequest;
+};
+
+interface ReadableStreamDefaultController<R = any> {
+ readonly desiredSize: number | null;
+ close(): void;
+ enqueue(chunk?: R): void;
+ error(e?: any): void;
+}
+
+declare var ReadableStreamDefaultController: {
+ prototype: ReadableStreamDefaultController;
+ new(): ReadableStreamDefaultController;
+};
+
+interface ReadableStreamDefaultReader<R = any> extends ReadableStreamGenericReader {
+ read(): Promise<ReadableStreamReadResult<R>>;
+ releaseLock(): void;
+}
+
+declare var ReadableStreamDefaultReader: {
+ prototype: ReadableStreamDefaultReader;
+ new<R = any>(stream: ReadableStream<R>): ReadableStreamDefaultReader<R>;
+};
+
+interface ReadableStreamGenericReader {
+ readonly closed: Promise<undefined>;
+ cancel(reason?: any): Promise<void>;
+}
+
+/** This Fetch API interface represents a resource request. */
+interface Request extends Body {
+ /** Returns the cache mode associated with request, which is a string indicating how the request will interact with the browser's cache when fetching. */
+ readonly cache: RequestCache;
+ /** Returns the credentials mode associated with request, which is a string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL. */
+ readonly credentials: RequestCredentials;
+ /** Returns the kind of resource requested by request, e.g., "document" or "script". */
+ readonly destination: RequestDestination;
+ /** Returns a Headers object consisting of the headers associated with request. Note that headers added in the network layer by the user agent will not be accounted for in this object, e.g., the "Host" header. */
+ readonly headers: Headers;
+ /** Returns request's subresource integrity metadata, which is a cryptographic hash of the resource being fetched. Its value consists of multiple hashes separated by whitespace. [SRI] */
+ readonly integrity: string;
+ /** Returns a boolean indicating whether or not request can outlive the global in which it was created. */
+ readonly keepalive: boolean;
+ /** Returns request's HTTP method, which is "GET" by default. */
+ readonly method: string;
+ /** Returns the mode associated with request, which is a string indicating whether the request will use CORS, or will be restricted to same-origin URLs. */
+ readonly mode: RequestMode;
+ /** Returns the redirect mode associated with request, which is a string indicating how redirects for the request will be handled during fetching. A request will follow redirects by default. */
+ readonly redirect: RequestRedirect;
+ /** Returns the referrer of request. Its value can be a same-origin URL if explicitly set in init, the empty string to indicate no referrer, and "about:client" when defaulting to the global's default. This is used during fetching to determine the value of the `Referer` header of the request being made. */
+ readonly referrer: string;
+ /** Returns the referrer policy associated with request. This is used during fetching to compute the value of the request's referrer. */
+ readonly referrerPolicy: ReferrerPolicy;
+ /** Returns the signal associated with request, which is an AbortSignal object indicating whether or not request has been aborted, and its abort event handler. */
+ readonly signal: AbortSignal;
+ /** Returns the URL of request as a string. */
+ readonly url: string;
+ clone(): Request;
+}
+
+declare var Request: {
+ prototype: Request;
+ new(input: RequestInfo | URL, init?: RequestInit): Request;
+};
+
+/** This Fetch API interface represents the response to a request. */
+interface Response extends Body {
+ readonly headers: Headers;
+ readonly ok: boolean;
+ readonly redirected: boolean;
+ readonly status: number;
+ readonly statusText: string;
+ readonly type: ResponseType;
+ readonly url: string;
+ clone(): Response;
+}
+
+declare var Response: {
+ prototype: Response;
+ new(body?: BodyInit | null, init?: ResponseInit): Response;
+ error(): Response;
+ redirect(url: string | URL, status?: number): Response;
+};
+
+/** Inherits from Event, and represents the event object of an event sent on a document or worker when its content security policy is violated. */
+interface SecurityPolicyViolationEvent extends Event {
+ readonly blockedURI: string;
+ readonly columnNumber: number;
+ readonly disposition: SecurityPolicyViolationEventDisposition;
+ readonly documentURI: string;
+ readonly effectiveDirective: string;
+ readonly lineNumber: number;
+ readonly originalPolicy: string;
+ readonly referrer: string;
+ readonly sample: string;
+ readonly sourceFile: string;
+ readonly statusCode: number;
+ readonly violatedDirective: string;
+}
+
+declare var SecurityPolicyViolationEvent: {
+ prototype: SecurityPolicyViolationEvent;
+ new(type: string, eventInitDict?: SecurityPolicyViolationEventInit): SecurityPolicyViolationEvent;
+};
+
+interface ServiceWorkerEventMap extends AbstractWorkerEventMap {
+ "statechange": Event;
+}
+
+/**
+ * This ServiceWorker API interface provides a reference to a service worker. Multiple browsing contexts (e.g. pages, workers, etc.) can be associated with the same service worker, each through a unique ServiceWorker object.
+ * Available only in secure contexts.
+ */
+interface ServiceWorker extends EventTarget, AbstractWorker {
+ onstatechange: ((this: ServiceWorker, ev: Event) => any) | null;
+ readonly scriptURL: string;
+ readonly state: ServiceWorkerState;
+ postMessage(message: any, transfer: Transferable[]): void;
+ postMessage(message: any, options?: StructuredSerializeOptions): void;
+ addEventListener<K extends keyof ServiceWorkerEventMap>(type: K, listener: (this: ServiceWorker, ev: ServiceWorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof ServiceWorkerEventMap>(type: K, listener: (this: ServiceWorker, ev: ServiceWorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var ServiceWorker: {
+ prototype: ServiceWorker;
+ new(): ServiceWorker;
+};
+
+interface ServiceWorkerContainerEventMap {
+ "controllerchange": Event;
+ "message": MessageEvent;
+ "messageerror": MessageEvent;
+}
+
+/**
+ * The ServiceWorkerContainer interface of the ServiceWorker API provides an object representing the service worker as an overall unit in the network ecosystem, including facilities to register, unregister and update service workers, and access the state of service workers and their registrations.
+ * Available only in secure contexts.
+ */
+interface ServiceWorkerContainer extends EventTarget {
+ readonly controller: ServiceWorker | null;
+ oncontrollerchange: ((this: ServiceWorkerContainer, ev: Event) => any) | null;
+ onmessage: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null;
+ onmessageerror: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null;
+ readonly ready: Promise<ServiceWorkerRegistration>;
+ getRegistration(clientURL?: string | URL): Promise<ServiceWorkerRegistration | undefined>;
+ getRegistrations(): Promise<ReadonlyArray<ServiceWorkerRegistration>>;
+ register(scriptURL: string | URL, options?: RegistrationOptions): Promise<ServiceWorkerRegistration>;
+ startMessages(): void;
+ addEventListener<K extends keyof ServiceWorkerContainerEventMap>(type: K, listener: (this: ServiceWorkerContainer, ev: ServiceWorkerContainerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof ServiceWorkerContainerEventMap>(type: K, listener: (this: ServiceWorkerContainer, ev: ServiceWorkerContainerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var ServiceWorkerContainer: {
+ prototype: ServiceWorkerContainer;
+ new(): ServiceWorkerContainer;
+};
+
+interface ServiceWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap {
+ "activate": ExtendableEvent;
+ "fetch": FetchEvent;
+ "install": ExtendableEvent;
+ "message": ExtendableMessageEvent;
+ "messageerror": MessageEvent;
+ "notificationclick": NotificationEvent;
+ "notificationclose": NotificationEvent;
+ "push": PushEvent;
+}
+
+/** This ServiceWorker API interface represents the global execution context of a service worker. */
+interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
+ readonly clients: Clients;
+ onactivate: ((this: ServiceWorkerGlobalScope, ev: ExtendableEvent) => any) | null;
+ onfetch: ((this: ServiceWorkerGlobalScope, ev: FetchEvent) => any) | null;
+ oninstall: ((this: ServiceWorkerGlobalScope, ev: ExtendableEvent) => any) | null;
+ onmessage: ((this: ServiceWorkerGlobalScope, ev: ExtendableMessageEvent) => any) | null;
+ onmessageerror: ((this: ServiceWorkerGlobalScope, ev: MessageEvent) => any) | null;
+ onnotificationclick: ((this: ServiceWorkerGlobalScope, ev: NotificationEvent) => any) | null;
+ onnotificationclose: ((this: ServiceWorkerGlobalScope, ev: NotificationEvent) => any) | null;
+ onpush: ((this: ServiceWorkerGlobalScope, ev: PushEvent) => any) | null;
+ readonly registration: ServiceWorkerRegistration;
+ readonly serviceWorker: ServiceWorker;
+ skipWaiting(): Promise<void>;
+ addEventListener<K extends keyof ServiceWorkerGlobalScopeEventMap>(type: K, listener: (this: ServiceWorkerGlobalScope, ev: ServiceWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof ServiceWorkerGlobalScopeEventMap>(type: K, listener: (this: ServiceWorkerGlobalScope, ev: ServiceWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var ServiceWorkerGlobalScope: {
+ prototype: ServiceWorkerGlobalScope;
+ new(): ServiceWorkerGlobalScope;
+};
+
+interface ServiceWorkerRegistrationEventMap {
+ "updatefound": Event;
+}
+
+/**
+ * This ServiceWorker API interface represents the service worker registration. You register a service worker to control one or more pages that share the same origin.
+ * Available only in secure contexts.
+ */
+interface ServiceWorkerRegistration extends EventTarget {
+ readonly active: ServiceWorker | null;
+ readonly installing: ServiceWorker | null;
+ readonly navigationPreload: NavigationPreloadManager;
+ onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null;
+ readonly pushManager: PushManager;
+ readonly scope: string;
+ readonly updateViaCache: ServiceWorkerUpdateViaCache;
+ readonly waiting: ServiceWorker | null;
+ getNotifications(filter?: GetNotificationOptions): Promise<Notification[]>;
+ showNotification(title: string, options?: NotificationOptions): Promise<void>;
+ unregister(): Promise<boolean>;
+ update(): Promise<void>;
+ addEventListener<K extends keyof ServiceWorkerRegistrationEventMap>(type: K, listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof ServiceWorkerRegistrationEventMap>(type: K, listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var ServiceWorkerRegistration: {
+ prototype: ServiceWorkerRegistration;
+ new(): ServiceWorkerRegistration;
+};
+
+interface SharedWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap {
+ "connect": MessageEvent;
+}
+
+interface SharedWorkerGlobalScope extends WorkerGlobalScope {
+ /** Returns sharedWorkerGlobal's name, i.e. the value given to the SharedWorker constructor. Multiple SharedWorker objects can correspond to the same shared worker (and SharedWorkerGlobalScope), by reusing the same name. */
+ readonly name: string;
+ onconnect: ((this: SharedWorkerGlobalScope, ev: MessageEvent) => any) | null;
+ /** Aborts sharedWorkerGlobal. */
+ close(): void;
+ addEventListener<K extends keyof SharedWorkerGlobalScopeEventMap>(type: K, listener: (this: SharedWorkerGlobalScope, ev: SharedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SharedWorkerGlobalScopeEventMap>(type: K, listener: (this: SharedWorkerGlobalScope, ev: SharedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SharedWorkerGlobalScope: {
+ prototype: SharedWorkerGlobalScope;
+ new(): SharedWorkerGlobalScope;
+};
+
+/** Available only in secure contexts. */
+interface StorageManager {
+ estimate(): Promise<StorageEstimate>;
+ getDirectory(): Promise<FileSystemDirectoryHandle>;
+ persisted(): Promise<boolean>;
+}
+
+declare var StorageManager: {
+ prototype: StorageManager;
+ new(): StorageManager;
+};
+
+/**
+ * This Web Crypto API interface provides a number of low-level cryptographic functions. It is accessed via the Crypto.subtle properties available in a window context (via Window.crypto).
+ * Available only in secure contexts.
+ */
+interface SubtleCrypto {
+ decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
+ deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise<ArrayBuffer>;
+ deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
+ digest(algorithm: AlgorithmIdentifier, data: BufferSource): Promise<ArrayBuffer>;
+ encrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
+ exportKey(format: "jwk", key: CryptoKey): Promise<JsonWebKey>;
+ exportKey(format: Exclude<KeyFormat, "jwk">, key: CryptoKey): Promise<ArrayBuffer>;
+ generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKeyPair>;
+ generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
+ generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair | CryptoKey>;
+ importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
+ importKey(format: Exclude<KeyFormat, "jwk">, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
+ sign(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
+ unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
+ verify(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams, key: CryptoKey, signature: BufferSource, data: BufferSource): Promise<boolean>;
+ wrapKey(format: KeyFormat, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams): Promise<ArrayBuffer>;
+}
+
+declare var SubtleCrypto: {
+ prototype: SubtleCrypto;
+ new(): SubtleCrypto;
+};
+
+/** A decoder for a specific method, that is a specific character encoding, like utf-8, iso-8859-2, koi8, cp1261, gbk, etc. A decoder takes a stream of bytes as input and emits a stream of code points. For a more scalable, non-native library, see StringView – a C-like representation of strings based on typed arrays. */
+interface TextDecoder extends TextDecoderCommon {
+ /**
+ * Returns the result of running encoding's decoder. The method can be invoked zero or more times with options's stream set to true, and then once without options's stream (or set to false), to process a fragmented input. If the invocation without options's stream (or set to false) has no input, it's clearest to omit both arguments.
+ *
+ * ```
+ * var string = "", decoder = new TextDecoder(encoding), buffer;
+ * while(buffer = next_chunk()) {
+ * string += decoder.decode(buffer, {stream:true});
+ * }
+ * string += decoder.decode(); // end-of-queue
+ * ```
+ *
+ * If the error mode is "fatal" and encoding's decoder returns error, throws a TypeError.
+ */
+ decode(input?: BufferSource, options?: TextDecodeOptions): string;
+}
+
+declare var TextDecoder: {
+ prototype: TextDecoder;
+ new(label?: string, options?: TextDecoderOptions): TextDecoder;
+};
+
+interface TextDecoderCommon {
+ /** Returns encoding's name, lowercased. */
+ readonly encoding: string;
+ /** Returns true if error mode is "fatal", otherwise false. */
+ readonly fatal: boolean;
+ /** Returns the value of ignore BOM. */
+ readonly ignoreBOM: boolean;
+}
+
+interface TextDecoderStream extends GenericTransformStream, TextDecoderCommon {
+ readonly readable: ReadableStream<string>;
+ readonly writable: WritableStream<BufferSource>;
+}
+
+declare var TextDecoderStream: {
+ prototype: TextDecoderStream;
+ new(label?: string, options?: TextDecoderOptions): TextDecoderStream;
+};
+
+/** TextEncoder takes a stream of code points as input and emits a stream of bytes. For a more scalable, non-native library, see StringView – a C-like representation of strings based on typed arrays. */
+interface TextEncoder extends TextEncoderCommon {
+ /** Returns the result of running UTF-8's encoder. */
+ encode(input?: string): Uint8Array;
+ /** Runs the UTF-8 encoder on source, stores the result of that operation into destination, and returns the progress made as an object wherein read is the number of converted code units of source and written is the number of bytes modified in destination. */
+ encodeInto(source: string, destination: Uint8Array): TextEncoderEncodeIntoResult;
+}
+
+declare var TextEncoder: {
+ prototype: TextEncoder;
+ new(): TextEncoder;
+};
+
+interface TextEncoderCommon {
+ /** Returns "utf-8". */
+ readonly encoding: string;
+}
+
+interface TextEncoderStream extends GenericTransformStream, TextEncoderCommon {
+ readonly readable: ReadableStream<Uint8Array>;
+ readonly writable: WritableStream<string>;
+}
+
+declare var TextEncoderStream: {
+ prototype: TextEncoderStream;
+ new(): TextEncoderStream;
+};
+
+/** The dimensions of a piece of text in the canvas, as created by the CanvasRenderingContext2D.measureText() method. */
+interface TextMetrics {
+ /** Returns the measurement described below. */
+ readonly actualBoundingBoxAscent: number;
+ /** Returns the measurement described below. */
+ readonly actualBoundingBoxDescent: number;
+ /** Returns the measurement described below. */
+ readonly actualBoundingBoxLeft: number;
+ /** Returns the measurement described below. */
+ readonly actualBoundingBoxRight: number;
+ /** Returns the measurement described below. */
+ readonly fontBoundingBoxAscent: number;
+ /** Returns the measurement described below. */
+ readonly fontBoundingBoxDescent: number;
+ /** Returns the measurement described below. */
+ readonly width: number;
+}
+
+declare var TextMetrics: {
+ prototype: TextMetrics;
+ new(): TextMetrics;
+};
+
+interface TransformStream<I = any, O = any> {
+ readonly readable: ReadableStream<O>;
+ readonly writable: WritableStream<I>;
+}
+
+declare var TransformStream: {
+ prototype: TransformStream;
+ new<I = any, O = any>(transformer?: Transformer<I, O>, writableStrategy?: QueuingStrategy<I>, readableStrategy?: QueuingStrategy<O>): TransformStream<I, O>;
+};
+
+interface TransformStreamDefaultController<O = any> {
+ readonly desiredSize: number | null;
+ enqueue(chunk?: O): void;
+ error(reason?: any): void;
+ terminate(): void;
+}
+
+declare var TransformStreamDefaultController: {
+ prototype: TransformStreamDefaultController;
+ new(): TransformStreamDefaultController;
+};
+
+/** The URL interface represents an object providing static methods used for creating object URLs. */
+interface URL {
+ hash: string;
+ host: string;
+ hostname: string;
+ href: string;
+ toString(): string;
+ readonly origin: string;
+ password: string;
+ pathname: string;
+ port: string;
+ protocol: string;
+ search: string;
+ readonly searchParams: URLSearchParams;
+ username: string;
+ toJSON(): string;
+}
+
+declare var URL: {
+ prototype: URL;
+ new(url: string | URL, base?: string | URL): URL;
+ createObjectURL(obj: Blob): string;
+ revokeObjectURL(url: string): void;
+};
+
+interface URLSearchParams {
+ /** Appends a specified key/value pair as a new search parameter. */
+ append(name: string, value: string): void;
+ /** Deletes the given search parameter, and its associated value, from the list of all search parameters. */
+ delete(name: string): void;
+ /** Returns the first value associated to the given search parameter. */
+ get(name: string): string | null;
+ /** Returns all the values association with a given search parameter. */
+ getAll(name: string): string[];
+ /** Returns a Boolean indicating if such a search parameter exists. */
+ has(name: string): boolean;
+ /** Sets the value associated to a given search parameter to the given value. If there were several values, delete the others. */
+ set(name: string, value: string): void;
+ sort(): void;
+ /** Returns a string containing a query string suitable for use in a URL. Does not include the question mark. */
+ toString(): string;
+ forEach(callbackfn: (value: string, key: string, parent: URLSearchParams) => void, thisArg?: any): void;
+}
+
+declare var URLSearchParams: {
+ prototype: URLSearchParams;
+ new(init?: string[][] | Record<string, string> | string | URLSearchParams): URLSearchParams;
+ toString(): string;
+};
+
+interface VideoColorSpace {
+ readonly fullRange: boolean | null;
+ readonly matrix: VideoMatrixCoefficients | null;
+ readonly primaries: VideoColorPrimaries | null;
+ readonly transfer: VideoTransferCharacteristics | null;
+ toJSON(): VideoColorSpaceInit;
+}
+
+declare var VideoColorSpace: {
+ prototype: VideoColorSpace;
+ new(init?: VideoColorSpaceInit): VideoColorSpace;
+};
+
+interface WEBGL_color_buffer_float {
+ readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT: GLenum;
+ readonly RGBA32F_EXT: GLenum;
+ readonly UNSIGNED_NORMALIZED_EXT: GLenum;
+}
+
+interface WEBGL_compressed_texture_astc {
+ getSupportedProfiles(): string[];
+ readonly COMPRESSED_RGBA_ASTC_10x10_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_10x5_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_10x6_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_10x8_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_12x10_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_12x12_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_4x4_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_5x4_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_5x5_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_6x5_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_6x6_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_8x5_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_8x6_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_8x8_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR: GLenum;
+}
+
+interface WEBGL_compressed_texture_etc {
+ readonly COMPRESSED_R11_EAC: GLenum;
+ readonly COMPRESSED_RG11_EAC: GLenum;
+ readonly COMPRESSED_RGB8_ETC2: GLenum;
+ readonly COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2: GLenum;
+ readonly COMPRESSED_RGBA8_ETC2_EAC: GLenum;
+ readonly COMPRESSED_SIGNED_R11_EAC: GLenum;
+ readonly COMPRESSED_SIGNED_RG11_EAC: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ETC2_EAC: GLenum;
+ readonly COMPRESSED_SRGB8_ETC2: GLenum;
+ readonly COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2: GLenum;
+}
+
+interface WEBGL_compressed_texture_etc1 {
+ readonly COMPRESSED_RGB_ETC1_WEBGL: GLenum;
+}
+
+/** The WEBGL_compressed_texture_s3tc extension is part of the WebGL API and exposes four S3TC compressed texture formats. */
+interface WEBGL_compressed_texture_s3tc {
+ readonly COMPRESSED_RGBA_S3TC_DXT1_EXT: GLenum;
+ readonly COMPRESSED_RGBA_S3TC_DXT3_EXT: GLenum;
+ readonly COMPRESSED_RGBA_S3TC_DXT5_EXT: GLenum;
+ readonly COMPRESSED_RGB_S3TC_DXT1_EXT: GLenum;
+}
+
+interface WEBGL_compressed_texture_s3tc_srgb {
+ readonly COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT: GLenum;
+ readonly COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT: GLenum;
+ readonly COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT: GLenum;
+ readonly COMPRESSED_SRGB_S3TC_DXT1_EXT: GLenum;
+}
+
+/** The WEBGL_debug_renderer_info extension is part of the WebGL API and exposes two constants with information about the graphics driver for debugging purposes. */
+interface WEBGL_debug_renderer_info {
+ readonly UNMASKED_RENDERER_WEBGL: GLenum;
+ readonly UNMASKED_VENDOR_WEBGL: GLenum;
+}
+
+interface WEBGL_debug_shaders {
+ getTranslatedShaderSource(shader: WebGLShader): string;
+}
+
+/** The WEBGL_depth_texture extension is part of the WebGL API and defines 2D depth and depth-stencil textures. */
+interface WEBGL_depth_texture {
+ readonly UNSIGNED_INT_24_8_WEBGL: GLenum;
+}
+
+interface WEBGL_draw_buffers {
+ drawBuffersWEBGL(buffers: GLenum[]): void;
+ readonly COLOR_ATTACHMENT0_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT10_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT11_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT12_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT13_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT14_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT15_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT1_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT2_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT3_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT4_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT5_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT6_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT7_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT8_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT9_WEBGL: GLenum;
+ readonly DRAW_BUFFER0_WEBGL: GLenum;
+ readonly DRAW_BUFFER10_WEBGL: GLenum;
+ readonly DRAW_BUFFER11_WEBGL: GLenum;
+ readonly DRAW_BUFFER12_WEBGL: GLenum;
+ readonly DRAW_BUFFER13_WEBGL: GLenum;
+ readonly DRAW_BUFFER14_WEBGL: GLenum;
+ readonly DRAW_BUFFER15_WEBGL: GLenum;
+ readonly DRAW_BUFFER1_WEBGL: GLenum;
+ readonly DRAW_BUFFER2_WEBGL: GLenum;
+ readonly DRAW_BUFFER3_WEBGL: GLenum;
+ readonly DRAW_BUFFER4_WEBGL: GLenum;
+ readonly DRAW_BUFFER5_WEBGL: GLenum;
+ readonly DRAW_BUFFER6_WEBGL: GLenum;
+ readonly DRAW_BUFFER7_WEBGL: GLenum;
+ readonly DRAW_BUFFER8_WEBGL: GLenum;
+ readonly DRAW_BUFFER9_WEBGL: GLenum;
+ readonly MAX_COLOR_ATTACHMENTS_WEBGL: GLenum;
+ readonly MAX_DRAW_BUFFERS_WEBGL: GLenum;
+}
+
+interface WEBGL_lose_context {
+ loseContext(): void;
+ restoreContext(): void;
+}
+
+interface WEBGL_multi_draw {
+ multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | GLint[], firstsOffset: GLuint, countsList: Int32Array | GLsizei[], countsOffset: GLuint, instanceCountsList: Int32Array | GLsizei[], instanceCountsOffset: GLuint, drawcount: GLsizei): void;
+ multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | GLint[], firstsOffset: GLuint, countsList: Int32Array | GLsizei[], countsOffset: GLuint, drawcount: GLsizei): void;
+ multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | GLint[], countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: GLuint, instanceCountsList: Int32Array | GLsizei[], instanceCountsOffset: GLuint, drawcount: GLsizei): void;
+ multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | GLint[], countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: GLuint, drawcount: GLsizei): void;
+}
+
+interface WebGL2RenderingContext extends WebGL2RenderingContextBase, WebGL2RenderingContextOverloads, WebGLRenderingContextBase {
+}
+
+declare var WebGL2RenderingContext: {
+ prototype: WebGL2RenderingContext;
+ new(): WebGL2RenderingContext;
+ readonly ACTIVE_UNIFORM_BLOCKS: GLenum;
+ readonly ALREADY_SIGNALED: GLenum;
+ readonly ANY_SAMPLES_PASSED: GLenum;
+ readonly ANY_SAMPLES_PASSED_CONSERVATIVE: GLenum;
+ readonly COLOR: GLenum;
+ readonly COLOR_ATTACHMENT1: GLenum;
+ readonly COLOR_ATTACHMENT10: GLenum;
+ readonly COLOR_ATTACHMENT11: GLenum;
+ readonly COLOR_ATTACHMENT12: GLenum;
+ readonly COLOR_ATTACHMENT13: GLenum;
+ readonly COLOR_ATTACHMENT14: GLenum;
+ readonly COLOR_ATTACHMENT15: GLenum;
+ readonly COLOR_ATTACHMENT2: GLenum;
+ readonly COLOR_ATTACHMENT3: GLenum;
+ readonly COLOR_ATTACHMENT4: GLenum;
+ readonly COLOR_ATTACHMENT5: GLenum;
+ readonly COLOR_ATTACHMENT6: GLenum;
+ readonly COLOR_ATTACHMENT7: GLenum;
+ readonly COLOR_ATTACHMENT8: GLenum;
+ readonly COLOR_ATTACHMENT9: GLenum;
+ readonly COMPARE_REF_TO_TEXTURE: GLenum;
+ readonly CONDITION_SATISFIED: GLenum;
+ readonly COPY_READ_BUFFER: GLenum;
+ readonly COPY_READ_BUFFER_BINDING: GLenum;
+ readonly COPY_WRITE_BUFFER: GLenum;
+ readonly COPY_WRITE_BUFFER_BINDING: GLenum;
+ readonly CURRENT_QUERY: GLenum;
+ readonly DEPTH: GLenum;
+ readonly DEPTH24_STENCIL8: GLenum;
+ readonly DEPTH32F_STENCIL8: GLenum;
+ readonly DEPTH_COMPONENT24: GLenum;
+ readonly DEPTH_COMPONENT32F: GLenum;
+ readonly DRAW_BUFFER0: GLenum;
+ readonly DRAW_BUFFER1: GLenum;
+ readonly DRAW_BUFFER10: GLenum;
+ readonly DRAW_BUFFER11: GLenum;
+ readonly DRAW_BUFFER12: GLenum;
+ readonly DRAW_BUFFER13: GLenum;
+ readonly DRAW_BUFFER14: GLenum;
+ readonly DRAW_BUFFER15: GLenum;
+ readonly DRAW_BUFFER2: GLenum;
+ readonly DRAW_BUFFER3: GLenum;
+ readonly DRAW_BUFFER4: GLenum;
+ readonly DRAW_BUFFER5: GLenum;
+ readonly DRAW_BUFFER6: GLenum;
+ readonly DRAW_BUFFER7: GLenum;
+ readonly DRAW_BUFFER8: GLenum;
+ readonly DRAW_BUFFER9: GLenum;
+ readonly DRAW_FRAMEBUFFER: GLenum;
+ readonly DRAW_FRAMEBUFFER_BINDING: GLenum;
+ readonly DYNAMIC_COPY: GLenum;
+ readonly DYNAMIC_READ: GLenum;
+ readonly FLOAT_32_UNSIGNED_INT_24_8_REV: GLenum;
+ readonly FLOAT_MAT2x3: GLenum;
+ readonly FLOAT_MAT2x4: GLenum;
+ readonly FLOAT_MAT3x2: GLenum;
+ readonly FLOAT_MAT3x4: GLenum;
+ readonly FLOAT_MAT4x2: GLenum;
+ readonly FLOAT_MAT4x3: GLenum;
+ readonly FRAGMENT_SHADER_DERIVATIVE_HINT: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_RED_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: GLenum;
+ readonly FRAMEBUFFER_DEFAULT: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: GLenum;
+ readonly HALF_FLOAT: GLenum;
+ readonly INTERLEAVED_ATTRIBS: GLenum;
+ readonly INT_2_10_10_10_REV: GLenum;
+ readonly INT_SAMPLER_2D: GLenum;
+ readonly INT_SAMPLER_2D_ARRAY: GLenum;
+ readonly INT_SAMPLER_3D: GLenum;
+ readonly INT_SAMPLER_CUBE: GLenum;
+ readonly INVALID_INDEX: GLenum;
+ readonly MAX: GLenum;
+ readonly MAX_3D_TEXTURE_SIZE: GLenum;
+ readonly MAX_ARRAY_TEXTURE_LAYERS: GLenum;
+ readonly MAX_CLIENT_WAIT_TIMEOUT_WEBGL: GLenum;
+ readonly MAX_COLOR_ATTACHMENTS: GLenum;
+ readonly MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: GLenum;
+ readonly MAX_COMBINED_UNIFORM_BLOCKS: GLenum;
+ readonly MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: GLenum;
+ readonly MAX_DRAW_BUFFERS: GLenum;
+ readonly MAX_ELEMENTS_INDICES: GLenum;
+ readonly MAX_ELEMENTS_VERTICES: GLenum;
+ readonly MAX_ELEMENT_INDEX: GLenum;
+ readonly MAX_FRAGMENT_INPUT_COMPONENTS: GLenum;
+ readonly MAX_FRAGMENT_UNIFORM_BLOCKS: GLenum;
+ readonly MAX_FRAGMENT_UNIFORM_COMPONENTS: GLenum;
+ readonly MAX_PROGRAM_TEXEL_OFFSET: GLenum;
+ readonly MAX_SAMPLES: GLenum;
+ readonly MAX_SERVER_WAIT_TIMEOUT: GLenum;
+ readonly MAX_TEXTURE_LOD_BIAS: GLenum;
+ readonly MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: GLenum;
+ readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: GLenum;
+ readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: GLenum;
+ readonly MAX_UNIFORM_BLOCK_SIZE: GLenum;
+ readonly MAX_UNIFORM_BUFFER_BINDINGS: GLenum;
+ readonly MAX_VARYING_COMPONENTS: GLenum;
+ readonly MAX_VERTEX_OUTPUT_COMPONENTS: GLenum;
+ readonly MAX_VERTEX_UNIFORM_BLOCKS: GLenum;
+ readonly MAX_VERTEX_UNIFORM_COMPONENTS: GLenum;
+ readonly MIN: GLenum;
+ readonly MIN_PROGRAM_TEXEL_OFFSET: GLenum;
+ readonly OBJECT_TYPE: GLenum;
+ readonly PACK_ROW_LENGTH: GLenum;
+ readonly PACK_SKIP_PIXELS: GLenum;
+ readonly PACK_SKIP_ROWS: GLenum;
+ readonly PIXEL_PACK_BUFFER: GLenum;
+ readonly PIXEL_PACK_BUFFER_BINDING: GLenum;
+ readonly PIXEL_UNPACK_BUFFER: GLenum;
+ readonly PIXEL_UNPACK_BUFFER_BINDING: GLenum;
+ readonly QUERY_RESULT: GLenum;
+ readonly QUERY_RESULT_AVAILABLE: GLenum;
+ readonly R11F_G11F_B10F: GLenum;
+ readonly R16F: GLenum;
+ readonly R16I: GLenum;
+ readonly R16UI: GLenum;
+ readonly R32F: GLenum;
+ readonly R32I: GLenum;
+ readonly R32UI: GLenum;
+ readonly R8: GLenum;
+ readonly R8I: GLenum;
+ readonly R8UI: GLenum;
+ readonly R8_SNORM: GLenum;
+ readonly RASTERIZER_DISCARD: GLenum;
+ readonly READ_BUFFER: GLenum;
+ readonly READ_FRAMEBUFFER: GLenum;
+ readonly READ_FRAMEBUFFER_BINDING: GLenum;
+ readonly RED: GLenum;
+ readonly RED_INTEGER: GLenum;
+ readonly RENDERBUFFER_SAMPLES: GLenum;
+ readonly RG: GLenum;
+ readonly RG16F: GLenum;
+ readonly RG16I: GLenum;
+ readonly RG16UI: GLenum;
+ readonly RG32F: GLenum;
+ readonly RG32I: GLenum;
+ readonly RG32UI: GLenum;
+ readonly RG8: GLenum;
+ readonly RG8I: GLenum;
+ readonly RG8UI: GLenum;
+ readonly RG8_SNORM: GLenum;
+ readonly RGB10_A2: GLenum;
+ readonly RGB10_A2UI: GLenum;
+ readonly RGB16F: GLenum;
+ readonly RGB16I: GLenum;
+ readonly RGB16UI: GLenum;
+ readonly RGB32F: GLenum;
+ readonly RGB32I: GLenum;
+ readonly RGB32UI: GLenum;
+ readonly RGB8: GLenum;
+ readonly RGB8I: GLenum;
+ readonly RGB8UI: GLenum;
+ readonly RGB8_SNORM: GLenum;
+ readonly RGB9_E5: GLenum;
+ readonly RGBA16F: GLenum;
+ readonly RGBA16I: GLenum;
+ readonly RGBA16UI: GLenum;
+ readonly RGBA32F: GLenum;
+ readonly RGBA32I: GLenum;
+ readonly RGBA32UI: GLenum;
+ readonly RGBA8: GLenum;
+ readonly RGBA8I: GLenum;
+ readonly RGBA8UI: GLenum;
+ readonly RGBA8_SNORM: GLenum;
+ readonly RGBA_INTEGER: GLenum;
+ readonly RGB_INTEGER: GLenum;
+ readonly RG_INTEGER: GLenum;
+ readonly SAMPLER_2D_ARRAY: GLenum;
+ readonly SAMPLER_2D_ARRAY_SHADOW: GLenum;
+ readonly SAMPLER_2D_SHADOW: GLenum;
+ readonly SAMPLER_3D: GLenum;
+ readonly SAMPLER_BINDING: GLenum;
+ readonly SAMPLER_CUBE_SHADOW: GLenum;
+ readonly SEPARATE_ATTRIBS: GLenum;
+ readonly SIGNALED: GLenum;
+ readonly SIGNED_NORMALIZED: GLenum;
+ readonly SRGB: GLenum;
+ readonly SRGB8: GLenum;
+ readonly SRGB8_ALPHA8: GLenum;
+ readonly STATIC_COPY: GLenum;
+ readonly STATIC_READ: GLenum;
+ readonly STENCIL: GLenum;
+ readonly STREAM_COPY: GLenum;
+ readonly STREAM_READ: GLenum;
+ readonly SYNC_CONDITION: GLenum;
+ readonly SYNC_FENCE: GLenum;
+ readonly SYNC_FLAGS: GLenum;
+ readonly SYNC_FLUSH_COMMANDS_BIT: GLenum;
+ readonly SYNC_GPU_COMMANDS_COMPLETE: GLenum;
+ readonly SYNC_STATUS: GLenum;
+ readonly TEXTURE_2D_ARRAY: GLenum;
+ readonly TEXTURE_3D: GLenum;
+ readonly TEXTURE_BASE_LEVEL: GLenum;
+ readonly TEXTURE_BINDING_2D_ARRAY: GLenum;
+ readonly TEXTURE_BINDING_3D: GLenum;
+ readonly TEXTURE_COMPARE_FUNC: GLenum;
+ readonly TEXTURE_COMPARE_MODE: GLenum;
+ readonly TEXTURE_IMMUTABLE_FORMAT: GLenum;
+ readonly TEXTURE_IMMUTABLE_LEVELS: GLenum;
+ readonly TEXTURE_MAX_LEVEL: GLenum;
+ readonly TEXTURE_MAX_LOD: GLenum;
+ readonly TEXTURE_MIN_LOD: GLenum;
+ readonly TEXTURE_WRAP_R: GLenum;
+ readonly TIMEOUT_EXPIRED: GLenum;
+ readonly TIMEOUT_IGNORED: GLint64;
+ readonly TRANSFORM_FEEDBACK: GLenum;
+ readonly TRANSFORM_FEEDBACK_ACTIVE: GLenum;
+ readonly TRANSFORM_FEEDBACK_BINDING: GLenum;
+ readonly TRANSFORM_FEEDBACK_BUFFER: GLenum;
+ readonly TRANSFORM_FEEDBACK_BUFFER_BINDING: GLenum;
+ readonly TRANSFORM_FEEDBACK_BUFFER_MODE: GLenum;
+ readonly TRANSFORM_FEEDBACK_BUFFER_SIZE: GLenum;
+ readonly TRANSFORM_FEEDBACK_BUFFER_START: GLenum;
+ readonly TRANSFORM_FEEDBACK_PAUSED: GLenum;
+ readonly TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: GLenum;
+ readonly TRANSFORM_FEEDBACK_VARYINGS: GLenum;
+ readonly UNIFORM_ARRAY_STRIDE: GLenum;
+ readonly UNIFORM_BLOCK_ACTIVE_UNIFORMS: GLenum;
+ readonly UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: GLenum;
+ readonly UNIFORM_BLOCK_BINDING: GLenum;
+ readonly UNIFORM_BLOCK_DATA_SIZE: GLenum;
+ readonly UNIFORM_BLOCK_INDEX: GLenum;
+ readonly UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: GLenum;
+ readonly UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: GLenum;
+ readonly UNIFORM_BUFFER: GLenum;
+ readonly UNIFORM_BUFFER_BINDING: GLenum;
+ readonly UNIFORM_BUFFER_OFFSET_ALIGNMENT: GLenum;
+ readonly UNIFORM_BUFFER_SIZE: GLenum;
+ readonly UNIFORM_BUFFER_START: GLenum;
+ readonly UNIFORM_IS_ROW_MAJOR: GLenum;
+ readonly UNIFORM_MATRIX_STRIDE: GLenum;
+ readonly UNIFORM_OFFSET: GLenum;
+ readonly UNIFORM_SIZE: GLenum;
+ readonly UNIFORM_TYPE: GLenum;
+ readonly UNPACK_IMAGE_HEIGHT: GLenum;
+ readonly UNPACK_ROW_LENGTH: GLenum;
+ readonly UNPACK_SKIP_IMAGES: GLenum;
+ readonly UNPACK_SKIP_PIXELS: GLenum;
+ readonly UNPACK_SKIP_ROWS: GLenum;
+ readonly UNSIGNALED: GLenum;
+ readonly UNSIGNED_INT_10F_11F_11F_REV: GLenum;
+ readonly UNSIGNED_INT_24_8: GLenum;
+ readonly UNSIGNED_INT_2_10_10_10_REV: GLenum;
+ readonly UNSIGNED_INT_5_9_9_9_REV: GLenum;
+ readonly UNSIGNED_INT_SAMPLER_2D: GLenum;
+ readonly UNSIGNED_INT_SAMPLER_2D_ARRAY: GLenum;
+ readonly UNSIGNED_INT_SAMPLER_3D: GLenum;
+ readonly UNSIGNED_INT_SAMPLER_CUBE: GLenum;
+ readonly UNSIGNED_INT_VEC2: GLenum;
+ readonly UNSIGNED_INT_VEC3: GLenum;
+ readonly UNSIGNED_INT_VEC4: GLenum;
+ readonly UNSIGNED_NORMALIZED: GLenum;
+ readonly VERTEX_ARRAY_BINDING: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_DIVISOR: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_INTEGER: GLenum;
+ readonly WAIT_FAILED: GLenum;
+ readonly ACTIVE_ATTRIBUTES: GLenum;
+ readonly ACTIVE_TEXTURE: GLenum;
+ readonly ACTIVE_UNIFORMS: GLenum;
+ readonly ALIASED_LINE_WIDTH_RANGE: GLenum;
+ readonly ALIASED_POINT_SIZE_RANGE: GLenum;
+ readonly ALPHA: GLenum;
+ readonly ALPHA_BITS: GLenum;
+ readonly ALWAYS: GLenum;
+ readonly ARRAY_BUFFER: GLenum;
+ readonly ARRAY_BUFFER_BINDING: GLenum;
+ readonly ATTACHED_SHADERS: GLenum;
+ readonly BACK: GLenum;
+ readonly BLEND: GLenum;
+ readonly BLEND_COLOR: GLenum;
+ readonly BLEND_DST_ALPHA: GLenum;
+ readonly BLEND_DST_RGB: GLenum;
+ readonly BLEND_EQUATION: GLenum;
+ readonly BLEND_EQUATION_ALPHA: GLenum;
+ readonly BLEND_EQUATION_RGB: GLenum;
+ readonly BLEND_SRC_ALPHA: GLenum;
+ readonly BLEND_SRC_RGB: GLenum;
+ readonly BLUE_BITS: GLenum;
+ readonly BOOL: GLenum;
+ readonly BOOL_VEC2: GLenum;
+ readonly BOOL_VEC3: GLenum;
+ readonly BOOL_VEC4: GLenum;
+ readonly BROWSER_DEFAULT_WEBGL: GLenum;
+ readonly BUFFER_SIZE: GLenum;
+ readonly BUFFER_USAGE: GLenum;
+ readonly BYTE: GLenum;
+ readonly CCW: GLenum;
+ readonly CLAMP_TO_EDGE: GLenum;
+ readonly COLOR_ATTACHMENT0: GLenum;
+ readonly COLOR_BUFFER_BIT: GLenum;
+ readonly COLOR_CLEAR_VALUE: GLenum;
+ readonly COLOR_WRITEMASK: GLenum;
+ readonly COMPILE_STATUS: GLenum;
+ readonly COMPRESSED_TEXTURE_FORMATS: GLenum;
+ readonly CONSTANT_ALPHA: GLenum;
+ readonly CONSTANT_COLOR: GLenum;
+ readonly CONTEXT_LOST_WEBGL: GLenum;
+ readonly CULL_FACE: GLenum;
+ readonly CULL_FACE_MODE: GLenum;
+ readonly CURRENT_PROGRAM: GLenum;
+ readonly CURRENT_VERTEX_ATTRIB: GLenum;
+ readonly CW: GLenum;
+ readonly DECR: GLenum;
+ readonly DECR_WRAP: GLenum;
+ readonly DELETE_STATUS: GLenum;
+ readonly DEPTH_ATTACHMENT: GLenum;
+ readonly DEPTH_BITS: GLenum;
+ readonly DEPTH_BUFFER_BIT: GLenum;
+ readonly DEPTH_CLEAR_VALUE: GLenum;
+ readonly DEPTH_COMPONENT: GLenum;
+ readonly DEPTH_COMPONENT16: GLenum;
+ readonly DEPTH_FUNC: GLenum;
+ readonly DEPTH_RANGE: GLenum;
+ readonly DEPTH_STENCIL: GLenum;
+ readonly DEPTH_STENCIL_ATTACHMENT: GLenum;
+ readonly DEPTH_TEST: GLenum;
+ readonly DEPTH_WRITEMASK: GLenum;
+ readonly DITHER: GLenum;
+ readonly DONT_CARE: GLenum;
+ readonly DST_ALPHA: GLenum;
+ readonly DST_COLOR: GLenum;
+ readonly DYNAMIC_DRAW: GLenum;
+ readonly ELEMENT_ARRAY_BUFFER: GLenum;
+ readonly ELEMENT_ARRAY_BUFFER_BINDING: GLenum;
+ readonly EQUAL: GLenum;
+ readonly FASTEST: GLenum;
+ readonly FLOAT: GLenum;
+ readonly FLOAT_MAT2: GLenum;
+ readonly FLOAT_MAT3: GLenum;
+ readonly FLOAT_MAT4: GLenum;
+ readonly FLOAT_VEC2: GLenum;
+ readonly FLOAT_VEC3: GLenum;
+ readonly FLOAT_VEC4: GLenum;
+ readonly FRAGMENT_SHADER: GLenum;
+ readonly FRAMEBUFFER: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: GLenum;
+ readonly FRAMEBUFFER_BINDING: GLenum;
+ readonly FRAMEBUFFER_COMPLETE: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: GLenum;
+ readonly FRAMEBUFFER_UNSUPPORTED: GLenum;
+ readonly FRONT: GLenum;
+ readonly FRONT_AND_BACK: GLenum;
+ readonly FRONT_FACE: GLenum;
+ readonly FUNC_ADD: GLenum;
+ readonly FUNC_REVERSE_SUBTRACT: GLenum;
+ readonly FUNC_SUBTRACT: GLenum;
+ readonly GENERATE_MIPMAP_HINT: GLenum;
+ readonly GEQUAL: GLenum;
+ readonly GREATER: GLenum;
+ readonly GREEN_BITS: GLenum;
+ readonly HIGH_FLOAT: GLenum;
+ readonly HIGH_INT: GLenum;
+ readonly IMPLEMENTATION_COLOR_READ_FORMAT: GLenum;
+ readonly IMPLEMENTATION_COLOR_READ_TYPE: GLenum;
+ readonly INCR: GLenum;
+ readonly INCR_WRAP: GLenum;
+ readonly INT: GLenum;
+ readonly INT_VEC2: GLenum;
+ readonly INT_VEC3: GLenum;
+ readonly INT_VEC4: GLenum;
+ readonly INVALID_ENUM: GLenum;
+ readonly INVALID_FRAMEBUFFER_OPERATION: GLenum;
+ readonly INVALID_OPERATION: GLenum;
+ readonly INVALID_VALUE: GLenum;
+ readonly INVERT: GLenum;
+ readonly KEEP: GLenum;
+ readonly LEQUAL: GLenum;
+ readonly LESS: GLenum;
+ readonly LINEAR: GLenum;
+ readonly LINEAR_MIPMAP_LINEAR: GLenum;
+ readonly LINEAR_MIPMAP_NEAREST: GLenum;
+ readonly LINES: GLenum;
+ readonly LINE_LOOP: GLenum;
+ readonly LINE_STRIP: GLenum;
+ readonly LINE_WIDTH: GLenum;
+ readonly LINK_STATUS: GLenum;
+ readonly LOW_FLOAT: GLenum;
+ readonly LOW_INT: GLenum;
+ readonly LUMINANCE: GLenum;
+ readonly LUMINANCE_ALPHA: GLenum;
+ readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: GLenum;
+ readonly MAX_CUBE_MAP_TEXTURE_SIZE: GLenum;
+ readonly MAX_FRAGMENT_UNIFORM_VECTORS: GLenum;
+ readonly MAX_RENDERBUFFER_SIZE: GLenum;
+ readonly MAX_TEXTURE_IMAGE_UNITS: GLenum;
+ readonly MAX_TEXTURE_SIZE: GLenum;
+ readonly MAX_VARYING_VECTORS: GLenum;
+ readonly MAX_VERTEX_ATTRIBS: GLenum;
+ readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: GLenum;
+ readonly MAX_VERTEX_UNIFORM_VECTORS: GLenum;
+ readonly MAX_VIEWPORT_DIMS: GLenum;
+ readonly MEDIUM_FLOAT: GLenum;
+ readonly MEDIUM_INT: GLenum;
+ readonly MIRRORED_REPEAT: GLenum;
+ readonly NEAREST: GLenum;
+ readonly NEAREST_MIPMAP_LINEAR: GLenum;
+ readonly NEAREST_MIPMAP_NEAREST: GLenum;
+ readonly NEVER: GLenum;
+ readonly NICEST: GLenum;
+ readonly NONE: GLenum;
+ readonly NOTEQUAL: GLenum;
+ readonly NO_ERROR: GLenum;
+ readonly ONE: GLenum;
+ readonly ONE_MINUS_CONSTANT_ALPHA: GLenum;
+ readonly ONE_MINUS_CONSTANT_COLOR: GLenum;
+ readonly ONE_MINUS_DST_ALPHA: GLenum;
+ readonly ONE_MINUS_DST_COLOR: GLenum;
+ readonly ONE_MINUS_SRC_ALPHA: GLenum;
+ readonly ONE_MINUS_SRC_COLOR: GLenum;
+ readonly OUT_OF_MEMORY: GLenum;
+ readonly PACK_ALIGNMENT: GLenum;
+ readonly POINTS: GLenum;
+ readonly POLYGON_OFFSET_FACTOR: GLenum;
+ readonly POLYGON_OFFSET_FILL: GLenum;
+ readonly POLYGON_OFFSET_UNITS: GLenum;
+ readonly RED_BITS: GLenum;
+ readonly RENDERBUFFER: GLenum;
+ readonly RENDERBUFFER_ALPHA_SIZE: GLenum;
+ readonly RENDERBUFFER_BINDING: GLenum;
+ readonly RENDERBUFFER_BLUE_SIZE: GLenum;
+ readonly RENDERBUFFER_DEPTH_SIZE: GLenum;
+ readonly RENDERBUFFER_GREEN_SIZE: GLenum;
+ readonly RENDERBUFFER_HEIGHT: GLenum;
+ readonly RENDERBUFFER_INTERNAL_FORMAT: GLenum;
+ readonly RENDERBUFFER_RED_SIZE: GLenum;
+ readonly RENDERBUFFER_STENCIL_SIZE: GLenum;
+ readonly RENDERBUFFER_WIDTH: GLenum;
+ readonly RENDERER: GLenum;
+ readonly REPEAT: GLenum;
+ readonly REPLACE: GLenum;
+ readonly RGB: GLenum;
+ readonly RGB565: GLenum;
+ readonly RGB5_A1: GLenum;
+ readonly RGBA: GLenum;
+ readonly RGBA4: GLenum;
+ readonly SAMPLER_2D: GLenum;
+ readonly SAMPLER_CUBE: GLenum;
+ readonly SAMPLES: GLenum;
+ readonly SAMPLE_ALPHA_TO_COVERAGE: GLenum;
+ readonly SAMPLE_BUFFERS: GLenum;
+ readonly SAMPLE_COVERAGE: GLenum;
+ readonly SAMPLE_COVERAGE_INVERT: GLenum;
+ readonly SAMPLE_COVERAGE_VALUE: GLenum;
+ readonly SCISSOR_BOX: GLenum;
+ readonly SCISSOR_TEST: GLenum;
+ readonly SHADER_TYPE: GLenum;
+ readonly SHADING_LANGUAGE_VERSION: GLenum;
+ readonly SHORT: GLenum;
+ readonly SRC_ALPHA: GLenum;
+ readonly SRC_ALPHA_SATURATE: GLenum;
+ readonly SRC_COLOR: GLenum;
+ readonly STATIC_DRAW: GLenum;
+ readonly STENCIL_ATTACHMENT: GLenum;
+ readonly STENCIL_BACK_FAIL: GLenum;
+ readonly STENCIL_BACK_FUNC: GLenum;
+ readonly STENCIL_BACK_PASS_DEPTH_FAIL: GLenum;
+ readonly STENCIL_BACK_PASS_DEPTH_PASS: GLenum;
+ readonly STENCIL_BACK_REF: GLenum;
+ readonly STENCIL_BACK_VALUE_MASK: GLenum;
+ readonly STENCIL_BACK_WRITEMASK: GLenum;
+ readonly STENCIL_BITS: GLenum;
+ readonly STENCIL_BUFFER_BIT: GLenum;
+ readonly STENCIL_CLEAR_VALUE: GLenum;
+ readonly STENCIL_FAIL: GLenum;
+ readonly STENCIL_FUNC: GLenum;
+ readonly STENCIL_INDEX8: GLenum;
+ readonly STENCIL_PASS_DEPTH_FAIL: GLenum;
+ readonly STENCIL_PASS_DEPTH_PASS: GLenum;
+ readonly STENCIL_REF: GLenum;
+ readonly STENCIL_TEST: GLenum;
+ readonly STENCIL_VALUE_MASK: GLenum;
+ readonly STENCIL_WRITEMASK: GLenum;
+ readonly STREAM_DRAW: GLenum;
+ readonly SUBPIXEL_BITS: GLenum;
+ readonly TEXTURE: GLenum;
+ readonly TEXTURE0: GLenum;
+ readonly TEXTURE1: GLenum;
+ readonly TEXTURE10: GLenum;
+ readonly TEXTURE11: GLenum;
+ readonly TEXTURE12: GLenum;
+ readonly TEXTURE13: GLenum;
+ readonly TEXTURE14: GLenum;
+ readonly TEXTURE15: GLenum;
+ readonly TEXTURE16: GLenum;
+ readonly TEXTURE17: GLenum;
+ readonly TEXTURE18: GLenum;
+ readonly TEXTURE19: GLenum;
+ readonly TEXTURE2: GLenum;
+ readonly TEXTURE20: GLenum;
+ readonly TEXTURE21: GLenum;
+ readonly TEXTURE22: GLenum;
+ readonly TEXTURE23: GLenum;
+ readonly TEXTURE24: GLenum;
+ readonly TEXTURE25: GLenum;
+ readonly TEXTURE26: GLenum;
+ readonly TEXTURE27: GLenum;
+ readonly TEXTURE28: GLenum;
+ readonly TEXTURE29: GLenum;
+ readonly TEXTURE3: GLenum;
+ readonly TEXTURE30: GLenum;
+ readonly TEXTURE31: GLenum;
+ readonly TEXTURE4: GLenum;
+ readonly TEXTURE5: GLenum;
+ readonly TEXTURE6: GLenum;
+ readonly TEXTURE7: GLenum;
+ readonly TEXTURE8: GLenum;
+ readonly TEXTURE9: GLenum;
+ readonly TEXTURE_2D: GLenum;
+ readonly TEXTURE_BINDING_2D: GLenum;
+ readonly TEXTURE_BINDING_CUBE_MAP: GLenum;
+ readonly TEXTURE_CUBE_MAP: GLenum;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_X: GLenum;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: GLenum;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: GLenum;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_X: GLenum;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Y: GLenum;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Z: GLenum;
+ readonly TEXTURE_MAG_FILTER: GLenum;
+ readonly TEXTURE_MIN_FILTER: GLenum;
+ readonly TEXTURE_WRAP_S: GLenum;
+ readonly TEXTURE_WRAP_T: GLenum;
+ readonly TRIANGLES: GLenum;
+ readonly TRIANGLE_FAN: GLenum;
+ readonly TRIANGLE_STRIP: GLenum;
+ readonly UNPACK_ALIGNMENT: GLenum;
+ readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: GLenum;
+ readonly UNPACK_FLIP_Y_WEBGL: GLenum;
+ readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: GLenum;
+ readonly UNSIGNED_BYTE: GLenum;
+ readonly UNSIGNED_INT: GLenum;
+ readonly UNSIGNED_SHORT: GLenum;
+ readonly UNSIGNED_SHORT_4_4_4_4: GLenum;
+ readonly UNSIGNED_SHORT_5_5_5_1: GLenum;
+ readonly UNSIGNED_SHORT_5_6_5: GLenum;
+ readonly VALIDATE_STATUS: GLenum;
+ readonly VENDOR: GLenum;
+ readonly VERSION: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_ENABLED: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_POINTER: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_SIZE: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_STRIDE: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_TYPE: GLenum;
+ readonly VERTEX_SHADER: GLenum;
+ readonly VIEWPORT: GLenum;
+ readonly ZERO: GLenum;
+};
+
+interface WebGL2RenderingContextBase {
+ beginQuery(target: GLenum, query: WebGLQuery): void;
+ beginTransformFeedback(primitiveMode: GLenum): void;
+ bindBufferBase(target: GLenum, index: GLuint, buffer: WebGLBuffer | null): void;
+ bindBufferRange(target: GLenum, index: GLuint, buffer: WebGLBuffer | null, offset: GLintptr, size: GLsizeiptr): void;
+ bindSampler(unit: GLuint, sampler: WebGLSampler | null): void;
+ bindTransformFeedback(target: GLenum, tf: WebGLTransformFeedback | null): void;
+ bindVertexArray(array: WebGLVertexArrayObject | null): void;
+ blitFramebuffer(srcX0: GLint, srcY0: GLint, srcX1: GLint, srcY1: GLint, dstX0: GLint, dstY0: GLint, dstX1: GLint, dstY1: GLint, mask: GLbitfield, filter: GLenum): void;
+ clearBufferfi(buffer: GLenum, drawbuffer: GLint, depth: GLfloat, stencil: GLint): void;
+ clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Float32List, srcOffset?: GLuint): void;
+ clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Int32List, srcOffset?: GLuint): void;
+ clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Uint32List, srcOffset?: GLuint): void;
+ clientWaitSync(sync: WebGLSync, flags: GLbitfield, timeout: GLuint64): GLenum;
+ compressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, imageSize: GLsizei, offset: GLintptr): void;
+ compressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void;
+ compressedTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, imageSize: GLsizei, offset: GLintptr): void;
+ compressedTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void;
+ copyBufferSubData(readTarget: GLenum, writeTarget: GLenum, readOffset: GLintptr, writeOffset: GLintptr, size: GLsizeiptr): void;
+ copyTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
+ createQuery(): WebGLQuery | null;
+ createSampler(): WebGLSampler | null;
+ createTransformFeedback(): WebGLTransformFeedback | null;
+ createVertexArray(): WebGLVertexArrayObject | null;
+ deleteQuery(query: WebGLQuery | null): void;
+ deleteSampler(sampler: WebGLSampler | null): void;
+ deleteSync(sync: WebGLSync | null): void;
+ deleteTransformFeedback(tf: WebGLTransformFeedback | null): void;
+ deleteVertexArray(vertexArray: WebGLVertexArrayObject | null): void;
+ drawArraysInstanced(mode: GLenum, first: GLint, count: GLsizei, instanceCount: GLsizei): void;
+ drawBuffers(buffers: GLenum[]): void;
+ drawElementsInstanced(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr, instanceCount: GLsizei): void;
+ drawRangeElements(mode: GLenum, start: GLuint, end: GLuint, count: GLsizei, type: GLenum, offset: GLintptr): void;
+ endQuery(target: GLenum): void;
+ endTransformFeedback(): void;
+ fenceSync(condition: GLenum, flags: GLbitfield): WebGLSync | null;
+ framebufferTextureLayer(target: GLenum, attachment: GLenum, texture: WebGLTexture | null, level: GLint, layer: GLint): void;
+ getActiveUniformBlockName(program: WebGLProgram, uniformBlockIndex: GLuint): string | null;
+ getActiveUniformBlockParameter(program: WebGLProgram, uniformBlockIndex: GLuint, pname: GLenum): any;
+ getActiveUniforms(program: WebGLProgram, uniformIndices: GLuint[], pname: GLenum): any;
+ getBufferSubData(target: GLenum, srcByteOffset: GLintptr, dstBuffer: ArrayBufferView, dstOffset?: GLuint, length?: GLuint): void;
+ getFragDataLocation(program: WebGLProgram, name: string): GLint;
+ getIndexedParameter(target: GLenum, index: GLuint): any;
+ getInternalformatParameter(target: GLenum, internalformat: GLenum, pname: GLenum): any;
+ getQuery(target: GLenum, pname: GLenum): WebGLQuery | null;
+ getQueryParameter(query: WebGLQuery, pname: GLenum): any;
+ getSamplerParameter(sampler: WebGLSampler, pname: GLenum): any;
+ getSyncParameter(sync: WebGLSync, pname: GLenum): any;
+ getTransformFeedbackVarying(program: WebGLProgram, index: GLuint): WebGLActiveInfo | null;
+ getUniformBlockIndex(program: WebGLProgram, uniformBlockName: string): GLuint;
+ getUniformIndices(program: WebGLProgram, uniformNames: string[]): GLuint[] | null;
+ invalidateFramebuffer(target: GLenum, attachments: GLenum[]): void;
+ invalidateSubFramebuffer(target: GLenum, attachments: GLenum[], x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
+ isQuery(query: WebGLQuery | null): GLboolean;
+ isSampler(sampler: WebGLSampler | null): GLboolean;
+ isSync(sync: WebGLSync | null): GLboolean;
+ isTransformFeedback(tf: WebGLTransformFeedback | null): GLboolean;
+ isVertexArray(vertexArray: WebGLVertexArrayObject | null): GLboolean;
+ pauseTransformFeedback(): void;
+ readBuffer(src: GLenum): void;
+ renderbufferStorageMultisample(target: GLenum, samples: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei): void;
+ resumeTransformFeedback(): void;
+ samplerParameterf(sampler: WebGLSampler, pname: GLenum, param: GLfloat): void;
+ samplerParameteri(sampler: WebGLSampler, pname: GLenum, param: GLint): void;
+ texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, pboOffset: GLintptr): void;
+ texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
+ texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView | null): void;
+ texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint): void;
+ texStorage2D(target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei): void;
+ texStorage3D(target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei): void;
+ texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, pboOffset: GLintptr): void;
+ texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, source: TexImageSource): void;
+ texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView | null, srcOffset?: GLuint): void;
+ transformFeedbackVaryings(program: WebGLProgram, varyings: string[], bufferMode: GLenum): void;
+ uniform1ui(location: WebGLUniformLocation | null, v0: GLuint): void;
+ uniform1uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform2ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint): void;
+ uniform2uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform3ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint, v2: GLuint): void;
+ uniform3uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform4ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint, v2: GLuint, v3: GLuint): void;
+ uniform4uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformBlockBinding(program: WebGLProgram, uniformBlockIndex: GLuint, uniformBlockBinding: GLuint): void;
+ uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ vertexAttribDivisor(index: GLuint, divisor: GLuint): void;
+ vertexAttribI4i(index: GLuint, x: GLint, y: GLint, z: GLint, w: GLint): void;
+ vertexAttribI4iv(index: GLuint, values: Int32List): void;
+ vertexAttribI4ui(index: GLuint, x: GLuint, y: GLuint, z: GLuint, w: GLuint): void;
+ vertexAttribI4uiv(index: GLuint, values: Uint32List): void;
+ vertexAttribIPointer(index: GLuint, size: GLint, type: GLenum, stride: GLsizei, offset: GLintptr): void;
+ waitSync(sync: WebGLSync, flags: GLbitfield, timeout: GLint64): void;
+ readonly ACTIVE_UNIFORM_BLOCKS: GLenum;
+ readonly ALREADY_SIGNALED: GLenum;
+ readonly ANY_SAMPLES_PASSED: GLenum;
+ readonly ANY_SAMPLES_PASSED_CONSERVATIVE: GLenum;
+ readonly COLOR: GLenum;
+ readonly COLOR_ATTACHMENT1: GLenum;
+ readonly COLOR_ATTACHMENT10: GLenum;
+ readonly COLOR_ATTACHMENT11: GLenum;
+ readonly COLOR_ATTACHMENT12: GLenum;
+ readonly COLOR_ATTACHMENT13: GLenum;
+ readonly COLOR_ATTACHMENT14: GLenum;
+ readonly COLOR_ATTACHMENT15: GLenum;
+ readonly COLOR_ATTACHMENT2: GLenum;
+ readonly COLOR_ATTACHMENT3: GLenum;
+ readonly COLOR_ATTACHMENT4: GLenum;
+ readonly COLOR_ATTACHMENT5: GLenum;
+ readonly COLOR_ATTACHMENT6: GLenum;
+ readonly COLOR_ATTACHMENT7: GLenum;
+ readonly COLOR_ATTACHMENT8: GLenum;
+ readonly COLOR_ATTACHMENT9: GLenum;
+ readonly COMPARE_REF_TO_TEXTURE: GLenum;
+ readonly CONDITION_SATISFIED: GLenum;
+ readonly COPY_READ_BUFFER: GLenum;
+ readonly COPY_READ_BUFFER_BINDING: GLenum;
+ readonly COPY_WRITE_BUFFER: GLenum;
+ readonly COPY_WRITE_BUFFER_BINDING: GLenum;
+ readonly CURRENT_QUERY: GLenum;
+ readonly DEPTH: GLenum;
+ readonly DEPTH24_STENCIL8: GLenum;
+ readonly DEPTH32F_STENCIL8: GLenum;
+ readonly DEPTH_COMPONENT24: GLenum;
+ readonly DEPTH_COMPONENT32F: GLenum;
+ readonly DRAW_BUFFER0: GLenum;
+ readonly DRAW_BUFFER1: GLenum;
+ readonly DRAW_BUFFER10: GLenum;
+ readonly DRAW_BUFFER11: GLenum;
+ readonly DRAW_BUFFER12: GLenum;
+ readonly DRAW_BUFFER13: GLenum;
+ readonly DRAW_BUFFER14: GLenum;
+ readonly DRAW_BUFFER15: GLenum;
+ readonly DRAW_BUFFER2: GLenum;
+ readonly DRAW_BUFFER3: GLenum;
+ readonly DRAW_BUFFER4: GLenum;
+ readonly DRAW_BUFFER5: GLenum;
+ readonly DRAW_BUFFER6: GLenum;
+ readonly DRAW_BUFFER7: GLenum;
+ readonly DRAW_BUFFER8: GLenum;
+ readonly DRAW_BUFFER9: GLenum;
+ readonly DRAW_FRAMEBUFFER: GLenum;
+ readonly DRAW_FRAMEBUFFER_BINDING: GLenum;
+ readonly DYNAMIC_COPY: GLenum;
+ readonly DYNAMIC_READ: GLenum;
+ readonly FLOAT_32_UNSIGNED_INT_24_8_REV: GLenum;
+ readonly FLOAT_MAT2x3: GLenum;
+ readonly FLOAT_MAT2x4: GLenum;
+ readonly FLOAT_MAT3x2: GLenum;
+ readonly FLOAT_MAT3x4: GLenum;
+ readonly FLOAT_MAT4x2: GLenum;
+ readonly FLOAT_MAT4x3: GLenum;
+ readonly FRAGMENT_SHADER_DERIVATIVE_HINT: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_RED_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: GLenum;
+ readonly FRAMEBUFFER_DEFAULT: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: GLenum;
+ readonly HALF_FLOAT: GLenum;
+ readonly INTERLEAVED_ATTRIBS: GLenum;
+ readonly INT_2_10_10_10_REV: GLenum;
+ readonly INT_SAMPLER_2D: GLenum;
+ readonly INT_SAMPLER_2D_ARRAY: GLenum;
+ readonly INT_SAMPLER_3D: GLenum;
+ readonly INT_SAMPLER_CUBE: GLenum;
+ readonly INVALID_INDEX: GLenum;
+ readonly MAX: GLenum;
+ readonly MAX_3D_TEXTURE_SIZE: GLenum;
+ readonly MAX_ARRAY_TEXTURE_LAYERS: GLenum;
+ readonly MAX_CLIENT_WAIT_TIMEOUT_WEBGL: GLenum;
+ readonly MAX_COLOR_ATTACHMENTS: GLenum;
+ readonly MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: GLenum;
+ readonly MAX_COMBINED_UNIFORM_BLOCKS: GLenum;
+ readonly MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: GLenum;
+ readonly MAX_DRAW_BUFFERS: GLenum;
+ readonly MAX_ELEMENTS_INDICES: GLenum;
+ readonly MAX_ELEMENTS_VERTICES: GLenum;
+ readonly MAX_ELEMENT_INDEX: GLenum;
+ readonly MAX_FRAGMENT_INPUT_COMPONENTS: GLenum;
+ readonly MAX_FRAGMENT_UNIFORM_BLOCKS: GLenum;
+ readonly MAX_FRAGMENT_UNIFORM_COMPONENTS: GLenum;
+ readonly MAX_PROGRAM_TEXEL_OFFSET: GLenum;
+ readonly MAX_SAMPLES: GLenum;
+ readonly MAX_SERVER_WAIT_TIMEOUT: GLenum;
+ readonly MAX_TEXTURE_LOD_BIAS: GLenum;
+ readonly MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: GLenum;
+ readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: GLenum;
+ readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: GLenum;
+ readonly MAX_UNIFORM_BLOCK_SIZE: GLenum;
+ readonly MAX_UNIFORM_BUFFER_BINDINGS: GLenum;
+ readonly MAX_VARYING_COMPONENTS: GLenum;
+ readonly MAX_VERTEX_OUTPUT_COMPONENTS: GLenum;
+ readonly MAX_VERTEX_UNIFORM_BLOCKS: GLenum;
+ readonly MAX_VERTEX_UNIFORM_COMPONENTS: GLenum;
+ readonly MIN: GLenum;
+ readonly MIN_PROGRAM_TEXEL_OFFSET: GLenum;
+ readonly OBJECT_TYPE: GLenum;
+ readonly PACK_ROW_LENGTH: GLenum;
+ readonly PACK_SKIP_PIXELS: GLenum;
+ readonly PACK_SKIP_ROWS: GLenum;
+ readonly PIXEL_PACK_BUFFER: GLenum;
+ readonly PIXEL_PACK_BUFFER_BINDING: GLenum;
+ readonly PIXEL_UNPACK_BUFFER: GLenum;
+ readonly PIXEL_UNPACK_BUFFER_BINDING: GLenum;
+ readonly QUERY_RESULT: GLenum;
+ readonly QUERY_RESULT_AVAILABLE: GLenum;
+ readonly R11F_G11F_B10F: GLenum;
+ readonly R16F: GLenum;
+ readonly R16I: GLenum;
+ readonly R16UI: GLenum;
+ readonly R32F: GLenum;
+ readonly R32I: GLenum;
+ readonly R32UI: GLenum;
+ readonly R8: GLenum;
+ readonly R8I: GLenum;
+ readonly R8UI: GLenum;
+ readonly R8_SNORM: GLenum;
+ readonly RASTERIZER_DISCARD: GLenum;
+ readonly READ_BUFFER: GLenum;
+ readonly READ_FRAMEBUFFER: GLenum;
+ readonly READ_FRAMEBUFFER_BINDING: GLenum;
+ readonly RED: GLenum;
+ readonly RED_INTEGER: GLenum;
+ readonly RENDERBUFFER_SAMPLES: GLenum;
+ readonly RG: GLenum;
+ readonly RG16F: GLenum;
+ readonly RG16I: GLenum;
+ readonly RG16UI: GLenum;
+ readonly RG32F: GLenum;
+ readonly RG32I: GLenum;
+ readonly RG32UI: GLenum;
+ readonly RG8: GLenum;
+ readonly RG8I: GLenum;
+ readonly RG8UI: GLenum;
+ readonly RG8_SNORM: GLenum;
+ readonly RGB10_A2: GLenum;
+ readonly RGB10_A2UI: GLenum;
+ readonly RGB16F: GLenum;
+ readonly RGB16I: GLenum;
+ readonly RGB16UI: GLenum;
+ readonly RGB32F: GLenum;
+ readonly RGB32I: GLenum;
+ readonly RGB32UI: GLenum;
+ readonly RGB8: GLenum;
+ readonly RGB8I: GLenum;
+ readonly RGB8UI: GLenum;
+ readonly RGB8_SNORM: GLenum;
+ readonly RGB9_E5: GLenum;
+ readonly RGBA16F: GLenum;
+ readonly RGBA16I: GLenum;
+ readonly RGBA16UI: GLenum;
+ readonly RGBA32F: GLenum;
+ readonly RGBA32I: GLenum;
+ readonly RGBA32UI: GLenum;
+ readonly RGBA8: GLenum;
+ readonly RGBA8I: GLenum;
+ readonly RGBA8UI: GLenum;
+ readonly RGBA8_SNORM: GLenum;
+ readonly RGBA_INTEGER: GLenum;
+ readonly RGB_INTEGER: GLenum;
+ readonly RG_INTEGER: GLenum;
+ readonly SAMPLER_2D_ARRAY: GLenum;
+ readonly SAMPLER_2D_ARRAY_SHADOW: GLenum;
+ readonly SAMPLER_2D_SHADOW: GLenum;
+ readonly SAMPLER_3D: GLenum;
+ readonly SAMPLER_BINDING: GLenum;
+ readonly SAMPLER_CUBE_SHADOW: GLenum;
+ readonly SEPARATE_ATTRIBS: GLenum;
+ readonly SIGNALED: GLenum;
+ readonly SIGNED_NORMALIZED: GLenum;
+ readonly SRGB: GLenum;
+ readonly SRGB8: GLenum;
+ readonly SRGB8_ALPHA8: GLenum;
+ readonly STATIC_COPY: GLenum;
+ readonly STATIC_READ: GLenum;
+ readonly STENCIL: GLenum;
+ readonly STREAM_COPY: GLenum;
+ readonly STREAM_READ: GLenum;
+ readonly SYNC_CONDITION: GLenum;
+ readonly SYNC_FENCE: GLenum;
+ readonly SYNC_FLAGS: GLenum;
+ readonly SYNC_FLUSH_COMMANDS_BIT: GLenum;
+ readonly SYNC_GPU_COMMANDS_COMPLETE: GLenum;
+ readonly SYNC_STATUS: GLenum;
+ readonly TEXTURE_2D_ARRAY: GLenum;
+ readonly TEXTURE_3D: GLenum;
+ readonly TEXTURE_BASE_LEVEL: GLenum;
+ readonly TEXTURE_BINDING_2D_ARRAY: GLenum;
+ readonly TEXTURE_BINDING_3D: GLenum;
+ readonly TEXTURE_COMPARE_FUNC: GLenum;
+ readonly TEXTURE_COMPARE_MODE: GLenum;
+ readonly TEXTURE_IMMUTABLE_FORMAT: GLenum;
+ readonly TEXTURE_IMMUTABLE_LEVELS: GLenum;
+ readonly TEXTURE_MAX_LEVEL: GLenum;
+ readonly TEXTURE_MAX_LOD: GLenum;
+ readonly TEXTURE_MIN_LOD: GLenum;
+ readonly TEXTURE_WRAP_R: GLenum;
+ readonly TIMEOUT_EXPIRED: GLenum;
+ readonly TIMEOUT_IGNORED: GLint64;
+ readonly TRANSFORM_FEEDBACK: GLenum;
+ readonly TRANSFORM_FEEDBACK_ACTIVE: GLenum;
+ readonly TRANSFORM_FEEDBACK_BINDING: GLenum;
+ readonly TRANSFORM_FEEDBACK_BUFFER: GLenum;
+ readonly TRANSFORM_FEEDBACK_BUFFER_BINDING: GLenum;
+ readonly TRANSFORM_FEEDBACK_BUFFER_MODE: GLenum;
+ readonly TRANSFORM_FEEDBACK_BUFFER_SIZE: GLenum;
+ readonly TRANSFORM_FEEDBACK_BUFFER_START: GLenum;
+ readonly TRANSFORM_FEEDBACK_PAUSED: GLenum;
+ readonly TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: GLenum;
+ readonly TRANSFORM_FEEDBACK_VARYINGS: GLenum;
+ readonly UNIFORM_ARRAY_STRIDE: GLenum;
+ readonly UNIFORM_BLOCK_ACTIVE_UNIFORMS: GLenum;
+ readonly UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: GLenum;
+ readonly UNIFORM_BLOCK_BINDING: GLenum;
+ readonly UNIFORM_BLOCK_DATA_SIZE: GLenum;
+ readonly UNIFORM_BLOCK_INDEX: GLenum;
+ readonly UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: GLenum;
+ readonly UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: GLenum;
+ readonly UNIFORM_BUFFER: GLenum;
+ readonly UNIFORM_BUFFER_BINDING: GLenum;
+ readonly UNIFORM_BUFFER_OFFSET_ALIGNMENT: GLenum;
+ readonly UNIFORM_BUFFER_SIZE: GLenum;
+ readonly UNIFORM_BUFFER_START: GLenum;
+ readonly UNIFORM_IS_ROW_MAJOR: GLenum;
+ readonly UNIFORM_MATRIX_STRIDE: GLenum;
+ readonly UNIFORM_OFFSET: GLenum;
+ readonly UNIFORM_SIZE: GLenum;
+ readonly UNIFORM_TYPE: GLenum;
+ readonly UNPACK_IMAGE_HEIGHT: GLenum;
+ readonly UNPACK_ROW_LENGTH: GLenum;
+ readonly UNPACK_SKIP_IMAGES: GLenum;
+ readonly UNPACK_SKIP_PIXELS: GLenum;
+ readonly UNPACK_SKIP_ROWS: GLenum;
+ readonly UNSIGNALED: GLenum;
+ readonly UNSIGNED_INT_10F_11F_11F_REV: GLenum;
+ readonly UNSIGNED_INT_24_8: GLenum;
+ readonly UNSIGNED_INT_2_10_10_10_REV: GLenum;
+ readonly UNSIGNED_INT_5_9_9_9_REV: GLenum;
+ readonly UNSIGNED_INT_SAMPLER_2D: GLenum;
+ readonly UNSIGNED_INT_SAMPLER_2D_ARRAY: GLenum;
+ readonly UNSIGNED_INT_SAMPLER_3D: GLenum;
+ readonly UNSIGNED_INT_SAMPLER_CUBE: GLenum;
+ readonly UNSIGNED_INT_VEC2: GLenum;
+ readonly UNSIGNED_INT_VEC3: GLenum;
+ readonly UNSIGNED_INT_VEC4: GLenum;
+ readonly UNSIGNED_NORMALIZED: GLenum;
+ readonly VERTEX_ARRAY_BINDING: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_DIVISOR: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_INTEGER: GLenum;
+ readonly WAIT_FAILED: GLenum;
+}
+
+interface WebGL2RenderingContextOverloads {
+ bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum): void;
+ bufferData(target: GLenum, srcData: BufferSource | null, usage: GLenum): void;
+ bufferData(target: GLenum, srcData: ArrayBufferView, usage: GLenum, srcOffset: GLuint, length?: GLuint): void;
+ bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: BufferSource): void;
+ bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: ArrayBufferView, srcOffset: GLuint, length?: GLuint): void;
+ compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, imageSize: GLsizei, offset: GLintptr): void;
+ compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void;
+ compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, imageSize: GLsizei, offset: GLintptr): void;
+ compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void;
+ readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, dstData: ArrayBufferView | null): void;
+ readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, offset: GLintptr): void;
+ readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, dstData: ArrayBufferView, dstOffset: GLuint): void;
+ texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
+ texImage2D(target: GLenum, level: GLint, internalformat: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
+ texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pboOffset: GLintptr): void;
+ texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
+ texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint): void;
+ texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
+ texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
+ texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pboOffset: GLintptr): void;
+ texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, source: TexImageSource): void;
+ texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint): void;
+ uniform1fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform1iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform2fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform2iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform3fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform3iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform4fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform4iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+}
+
+/** Part of the WebGL API and represents the information returned by calling the WebGLRenderingContext.getActiveAttrib() and WebGLRenderingContext.getActiveUniform() methods. */
+interface WebGLActiveInfo {
+ readonly name: string;
+ readonly size: GLint;
+ readonly type: GLenum;
+}
+
+declare var WebGLActiveInfo: {
+ prototype: WebGLActiveInfo;
+ new(): WebGLActiveInfo;
+};
+
+/** Part of the WebGL API and represents an opaque buffer object storing data such as vertices or colors. */
+interface WebGLBuffer {
+}
+
+declare var WebGLBuffer: {
+ prototype: WebGLBuffer;
+ new(): WebGLBuffer;
+};
+
+/** The WebContextEvent interface is part of the WebGL API and is an interface for an event that is generated in response to a status change to the WebGL rendering context. */
+interface WebGLContextEvent extends Event {
+ readonly statusMessage: string;
+}
+
+declare var WebGLContextEvent: {
+ prototype: WebGLContextEvent;
+ new(type: string, eventInit?: WebGLContextEventInit): WebGLContextEvent;
+};
+
+/** Part of the WebGL API and represents a collection of buffers that serve as a rendering destination. */
+interface WebGLFramebuffer {
+}
+
+declare var WebGLFramebuffer: {
+ prototype: WebGLFramebuffer;
+ new(): WebGLFramebuffer;
+};
+
+/** The WebGLProgram is part of the WebGL API and is a combination of two compiled WebGLShaders consisting of a vertex shader and a fragment shader (both written in GLSL). */
+interface WebGLProgram {
+}
+
+declare var WebGLProgram: {
+ prototype: WebGLProgram;
+ new(): WebGLProgram;
+};
+
+interface WebGLQuery {
+}
+
+declare var WebGLQuery: {
+ prototype: WebGLQuery;
+ new(): WebGLQuery;
+};
+
+/** Part of the WebGL API and represents a buffer that can contain an image, or can be source or target of an rendering operation. */
+interface WebGLRenderbuffer {
+}
+
+declare var WebGLRenderbuffer: {
+ prototype: WebGLRenderbuffer;
+ new(): WebGLRenderbuffer;
+};
+
+/** Provides an interface to the OpenGL ES 2.0 graphics rendering context for the drawing surface of an HTML <canvas> element. */
+interface WebGLRenderingContext extends WebGLRenderingContextBase, WebGLRenderingContextOverloads {
+}
+
+declare var WebGLRenderingContext: {
+ prototype: WebGLRenderingContext;
+ new(): WebGLRenderingContext;
+ readonly ACTIVE_ATTRIBUTES: GLenum;
+ readonly ACTIVE_TEXTURE: GLenum;
+ readonly ACTIVE_UNIFORMS: GLenum;
+ readonly ALIASED_LINE_WIDTH_RANGE: GLenum;
+ readonly ALIASED_POINT_SIZE_RANGE: GLenum;
+ readonly ALPHA: GLenum;
+ readonly ALPHA_BITS: GLenum;
+ readonly ALWAYS: GLenum;
+ readonly ARRAY_BUFFER: GLenum;
+ readonly ARRAY_BUFFER_BINDING: GLenum;
+ readonly ATTACHED_SHADERS: GLenum;
+ readonly BACK: GLenum;
+ readonly BLEND: GLenum;
+ readonly BLEND_COLOR: GLenum;
+ readonly BLEND_DST_ALPHA: GLenum;
+ readonly BLEND_DST_RGB: GLenum;
+ readonly BLEND_EQUATION: GLenum;
+ readonly BLEND_EQUATION_ALPHA: GLenum;
+ readonly BLEND_EQUATION_RGB: GLenum;
+ readonly BLEND_SRC_ALPHA: GLenum;
+ readonly BLEND_SRC_RGB: GLenum;
+ readonly BLUE_BITS: GLenum;
+ readonly BOOL: GLenum;
+ readonly BOOL_VEC2: GLenum;
+ readonly BOOL_VEC3: GLenum;
+ readonly BOOL_VEC4: GLenum;
+ readonly BROWSER_DEFAULT_WEBGL: GLenum;
+ readonly BUFFER_SIZE: GLenum;
+ readonly BUFFER_USAGE: GLenum;
+ readonly BYTE: GLenum;
+ readonly CCW: GLenum;
+ readonly CLAMP_TO_EDGE: GLenum;
+ readonly COLOR_ATTACHMENT0: GLenum;
+ readonly COLOR_BUFFER_BIT: GLenum;
+ readonly COLOR_CLEAR_VALUE: GLenum;
+ readonly COLOR_WRITEMASK: GLenum;
+ readonly COMPILE_STATUS: GLenum;
+ readonly COMPRESSED_TEXTURE_FORMATS: GLenum;
+ readonly CONSTANT_ALPHA: GLenum;
+ readonly CONSTANT_COLOR: GLenum;
+ readonly CONTEXT_LOST_WEBGL: GLenum;
+ readonly CULL_FACE: GLenum;
+ readonly CULL_FACE_MODE: GLenum;
+ readonly CURRENT_PROGRAM: GLenum;
+ readonly CURRENT_VERTEX_ATTRIB: GLenum;
+ readonly CW: GLenum;
+ readonly DECR: GLenum;
+ readonly DECR_WRAP: GLenum;
+ readonly DELETE_STATUS: GLenum;
+ readonly DEPTH_ATTACHMENT: GLenum;
+ readonly DEPTH_BITS: GLenum;
+ readonly DEPTH_BUFFER_BIT: GLenum;
+ readonly DEPTH_CLEAR_VALUE: GLenum;
+ readonly DEPTH_COMPONENT: GLenum;
+ readonly DEPTH_COMPONENT16: GLenum;
+ readonly DEPTH_FUNC: GLenum;
+ readonly DEPTH_RANGE: GLenum;
+ readonly DEPTH_STENCIL: GLenum;
+ readonly DEPTH_STENCIL_ATTACHMENT: GLenum;
+ readonly DEPTH_TEST: GLenum;
+ readonly DEPTH_WRITEMASK: GLenum;
+ readonly DITHER: GLenum;
+ readonly DONT_CARE: GLenum;
+ readonly DST_ALPHA: GLenum;
+ readonly DST_COLOR: GLenum;
+ readonly DYNAMIC_DRAW: GLenum;
+ readonly ELEMENT_ARRAY_BUFFER: GLenum;
+ readonly ELEMENT_ARRAY_BUFFER_BINDING: GLenum;
+ readonly EQUAL: GLenum;
+ readonly FASTEST: GLenum;
+ readonly FLOAT: GLenum;
+ readonly FLOAT_MAT2: GLenum;
+ readonly FLOAT_MAT3: GLenum;
+ readonly FLOAT_MAT4: GLenum;
+ readonly FLOAT_VEC2: GLenum;
+ readonly FLOAT_VEC3: GLenum;
+ readonly FLOAT_VEC4: GLenum;
+ readonly FRAGMENT_SHADER: GLenum;
+ readonly FRAMEBUFFER: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: GLenum;
+ readonly FRAMEBUFFER_BINDING: GLenum;
+ readonly FRAMEBUFFER_COMPLETE: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: GLenum;
+ readonly FRAMEBUFFER_UNSUPPORTED: GLenum;
+ readonly FRONT: GLenum;
+ readonly FRONT_AND_BACK: GLenum;
+ readonly FRONT_FACE: GLenum;
+ readonly FUNC_ADD: GLenum;
+ readonly FUNC_REVERSE_SUBTRACT: GLenum;
+ readonly FUNC_SUBTRACT: GLenum;
+ readonly GENERATE_MIPMAP_HINT: GLenum;
+ readonly GEQUAL: GLenum;
+ readonly GREATER: GLenum;
+ readonly GREEN_BITS: GLenum;
+ readonly HIGH_FLOAT: GLenum;
+ readonly HIGH_INT: GLenum;
+ readonly IMPLEMENTATION_COLOR_READ_FORMAT: GLenum;
+ readonly IMPLEMENTATION_COLOR_READ_TYPE: GLenum;
+ readonly INCR: GLenum;
+ readonly INCR_WRAP: GLenum;
+ readonly INT: GLenum;
+ readonly INT_VEC2: GLenum;
+ readonly INT_VEC3: GLenum;
+ readonly INT_VEC4: GLenum;
+ readonly INVALID_ENUM: GLenum;
+ readonly INVALID_FRAMEBUFFER_OPERATION: GLenum;
+ readonly INVALID_OPERATION: GLenum;
+ readonly INVALID_VALUE: GLenum;
+ readonly INVERT: GLenum;
+ readonly KEEP: GLenum;
+ readonly LEQUAL: GLenum;
+ readonly LESS: GLenum;
+ readonly LINEAR: GLenum;
+ readonly LINEAR_MIPMAP_LINEAR: GLenum;
+ readonly LINEAR_MIPMAP_NEAREST: GLenum;
+ readonly LINES: GLenum;
+ readonly LINE_LOOP: GLenum;
+ readonly LINE_STRIP: GLenum;
+ readonly LINE_WIDTH: GLenum;
+ readonly LINK_STATUS: GLenum;
+ readonly LOW_FLOAT: GLenum;
+ readonly LOW_INT: GLenum;
+ readonly LUMINANCE: GLenum;
+ readonly LUMINANCE_ALPHA: GLenum;
+ readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: GLenum;
+ readonly MAX_CUBE_MAP_TEXTURE_SIZE: GLenum;
+ readonly MAX_FRAGMENT_UNIFORM_VECTORS: GLenum;
+ readonly MAX_RENDERBUFFER_SIZE: GLenum;
+ readonly MAX_TEXTURE_IMAGE_UNITS: GLenum;
+ readonly MAX_TEXTURE_SIZE: GLenum;
+ readonly MAX_VARYING_VECTORS: GLenum;
+ readonly MAX_VERTEX_ATTRIBS: GLenum;
+ readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: GLenum;
+ readonly MAX_VERTEX_UNIFORM_VECTORS: GLenum;
+ readonly MAX_VIEWPORT_DIMS: GLenum;
+ readonly MEDIUM_FLOAT: GLenum;
+ readonly MEDIUM_INT: GLenum;
+ readonly MIRRORED_REPEAT: GLenum;
+ readonly NEAREST: GLenum;
+ readonly NEAREST_MIPMAP_LINEAR: GLenum;
+ readonly NEAREST_MIPMAP_NEAREST: GLenum;
+ readonly NEVER: GLenum;
+ readonly NICEST: GLenum;
+ readonly NONE: GLenum;
+ readonly NOTEQUAL: GLenum;
+ readonly NO_ERROR: GLenum;
+ readonly ONE: GLenum;
+ readonly ONE_MINUS_CONSTANT_ALPHA: GLenum;
+ readonly ONE_MINUS_CONSTANT_COLOR: GLenum;
+ readonly ONE_MINUS_DST_ALPHA: GLenum;
+ readonly ONE_MINUS_DST_COLOR: GLenum;
+ readonly ONE_MINUS_SRC_ALPHA: GLenum;
+ readonly ONE_MINUS_SRC_COLOR: GLenum;
+ readonly OUT_OF_MEMORY: GLenum;
+ readonly PACK_ALIGNMENT: GLenum;
+ readonly POINTS: GLenum;
+ readonly POLYGON_OFFSET_FACTOR: GLenum;
+ readonly POLYGON_OFFSET_FILL: GLenum;
+ readonly POLYGON_OFFSET_UNITS: GLenum;
+ readonly RED_BITS: GLenum;
+ readonly RENDERBUFFER: GLenum;
+ readonly RENDERBUFFER_ALPHA_SIZE: GLenum;
+ readonly RENDERBUFFER_BINDING: GLenum;
+ readonly RENDERBUFFER_BLUE_SIZE: GLenum;
+ readonly RENDERBUFFER_DEPTH_SIZE: GLenum;
+ readonly RENDERBUFFER_GREEN_SIZE: GLenum;
+ readonly RENDERBUFFER_HEIGHT: GLenum;
+ readonly RENDERBUFFER_INTERNAL_FORMAT: GLenum;
+ readonly RENDERBUFFER_RED_SIZE: GLenum;
+ readonly RENDERBUFFER_STENCIL_SIZE: GLenum;
+ readonly RENDERBUFFER_WIDTH: GLenum;
+ readonly RENDERER: GLenum;
+ readonly REPEAT: GLenum;
+ readonly REPLACE: GLenum;
+ readonly RGB: GLenum;
+ readonly RGB565: GLenum;
+ readonly RGB5_A1: GLenum;
+ readonly RGBA: GLenum;
+ readonly RGBA4: GLenum;
+ readonly SAMPLER_2D: GLenum;
+ readonly SAMPLER_CUBE: GLenum;
+ readonly SAMPLES: GLenum;
+ readonly SAMPLE_ALPHA_TO_COVERAGE: GLenum;
+ readonly SAMPLE_BUFFERS: GLenum;
+ readonly SAMPLE_COVERAGE: GLenum;
+ readonly SAMPLE_COVERAGE_INVERT: GLenum;
+ readonly SAMPLE_COVERAGE_VALUE: GLenum;
+ readonly SCISSOR_BOX: GLenum;
+ readonly SCISSOR_TEST: GLenum;
+ readonly SHADER_TYPE: GLenum;
+ readonly SHADING_LANGUAGE_VERSION: GLenum;
+ readonly SHORT: GLenum;
+ readonly SRC_ALPHA: GLenum;
+ readonly SRC_ALPHA_SATURATE: GLenum;
+ readonly SRC_COLOR: GLenum;
+ readonly STATIC_DRAW: GLenum;
+ readonly STENCIL_ATTACHMENT: GLenum;
+ readonly STENCIL_BACK_FAIL: GLenum;
+ readonly STENCIL_BACK_FUNC: GLenum;
+ readonly STENCIL_BACK_PASS_DEPTH_FAIL: GLenum;
+ readonly STENCIL_BACK_PASS_DEPTH_PASS: GLenum;
+ readonly STENCIL_BACK_REF: GLenum;
+ readonly STENCIL_BACK_VALUE_MASK: GLenum;
+ readonly STENCIL_BACK_WRITEMASK: GLenum;
+ readonly STENCIL_BITS: GLenum;
+ readonly STENCIL_BUFFER_BIT: GLenum;
+ readonly STENCIL_CLEAR_VALUE: GLenum;
+ readonly STENCIL_FAIL: GLenum;
+ readonly STENCIL_FUNC: GLenum;
+ readonly STENCIL_INDEX8: GLenum;
+ readonly STENCIL_PASS_DEPTH_FAIL: GLenum;
+ readonly STENCIL_PASS_DEPTH_PASS: GLenum;
+ readonly STENCIL_REF: GLenum;
+ readonly STENCIL_TEST: GLenum;
+ readonly STENCIL_VALUE_MASK: GLenum;
+ readonly STENCIL_WRITEMASK: GLenum;
+ readonly STREAM_DRAW: GLenum;
+ readonly SUBPIXEL_BITS: GLenum;
+ readonly TEXTURE: GLenum;
+ readonly TEXTURE0: GLenum;
+ readonly TEXTURE1: GLenum;
+ readonly TEXTURE10: GLenum;
+ readonly TEXTURE11: GLenum;
+ readonly TEXTURE12: GLenum;
+ readonly TEXTURE13: GLenum;
+ readonly TEXTURE14: GLenum;
+ readonly TEXTURE15: GLenum;
+ readonly TEXTURE16: GLenum;
+ readonly TEXTURE17: GLenum;
+ readonly TEXTURE18: GLenum;
+ readonly TEXTURE19: GLenum;
+ readonly TEXTURE2: GLenum;
+ readonly TEXTURE20: GLenum;
+ readonly TEXTURE21: GLenum;
+ readonly TEXTURE22: GLenum;
+ readonly TEXTURE23: GLenum;
+ readonly TEXTURE24: GLenum;
+ readonly TEXTURE25: GLenum;
+ readonly TEXTURE26: GLenum;
+ readonly TEXTURE27: GLenum;
+ readonly TEXTURE28: GLenum;
+ readonly TEXTURE29: GLenum;
+ readonly TEXTURE3: GLenum;
+ readonly TEXTURE30: GLenum;
+ readonly TEXTURE31: GLenum;
+ readonly TEXTURE4: GLenum;
+ readonly TEXTURE5: GLenum;
+ readonly TEXTURE6: GLenum;
+ readonly TEXTURE7: GLenum;
+ readonly TEXTURE8: GLenum;
+ readonly TEXTURE9: GLenum;
+ readonly TEXTURE_2D: GLenum;
+ readonly TEXTURE_BINDING_2D: GLenum;
+ readonly TEXTURE_BINDING_CUBE_MAP: GLenum;
+ readonly TEXTURE_CUBE_MAP: GLenum;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_X: GLenum;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: GLenum;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: GLenum;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_X: GLenum;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Y: GLenum;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Z: GLenum;
+ readonly TEXTURE_MAG_FILTER: GLenum;
+ readonly TEXTURE_MIN_FILTER: GLenum;
+ readonly TEXTURE_WRAP_S: GLenum;
+ readonly TEXTURE_WRAP_T: GLenum;
+ readonly TRIANGLES: GLenum;
+ readonly TRIANGLE_FAN: GLenum;
+ readonly TRIANGLE_STRIP: GLenum;
+ readonly UNPACK_ALIGNMENT: GLenum;
+ readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: GLenum;
+ readonly UNPACK_FLIP_Y_WEBGL: GLenum;
+ readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: GLenum;
+ readonly UNSIGNED_BYTE: GLenum;
+ readonly UNSIGNED_INT: GLenum;
+ readonly UNSIGNED_SHORT: GLenum;
+ readonly UNSIGNED_SHORT_4_4_4_4: GLenum;
+ readonly UNSIGNED_SHORT_5_5_5_1: GLenum;
+ readonly UNSIGNED_SHORT_5_6_5: GLenum;
+ readonly VALIDATE_STATUS: GLenum;
+ readonly VENDOR: GLenum;
+ readonly VERSION: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_ENABLED: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_POINTER: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_SIZE: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_STRIDE: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_TYPE: GLenum;
+ readonly VERTEX_SHADER: GLenum;
+ readonly VIEWPORT: GLenum;
+ readonly ZERO: GLenum;
+};
+
+interface WebGLRenderingContextBase {
+ readonly drawingBufferHeight: GLsizei;
+ readonly drawingBufferWidth: GLsizei;
+ activeTexture(texture: GLenum): void;
+ attachShader(program: WebGLProgram, shader: WebGLShader): void;
+ bindAttribLocation(program: WebGLProgram, index: GLuint, name: string): void;
+ bindBuffer(target: GLenum, buffer: WebGLBuffer | null): void;
+ bindFramebuffer(target: GLenum, framebuffer: WebGLFramebuffer | null): void;
+ bindRenderbuffer(target: GLenum, renderbuffer: WebGLRenderbuffer | null): void;
+ bindTexture(target: GLenum, texture: WebGLTexture | null): void;
+ blendColor(red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf): void;
+ blendEquation(mode: GLenum): void;
+ blendEquationSeparate(modeRGB: GLenum, modeAlpha: GLenum): void;
+ blendFunc(sfactor: GLenum, dfactor: GLenum): void;
+ blendFuncSeparate(srcRGB: GLenum, dstRGB: GLenum, srcAlpha: GLenum, dstAlpha: GLenum): void;
+ checkFramebufferStatus(target: GLenum): GLenum;
+ clear(mask: GLbitfield): void;
+ clearColor(red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf): void;
+ clearDepth(depth: GLclampf): void;
+ clearStencil(s: GLint): void;
+ colorMask(red: GLboolean, green: GLboolean, blue: GLboolean, alpha: GLboolean): void;
+ compileShader(shader: WebGLShader): void;
+ copyTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, x: GLint, y: GLint, width: GLsizei, height: GLsizei, border: GLint): void;
+ copyTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
+ createBuffer(): WebGLBuffer | null;
+ createFramebuffer(): WebGLFramebuffer | null;
+ createProgram(): WebGLProgram | null;
+ createRenderbuffer(): WebGLRenderbuffer | null;
+ createShader(type: GLenum): WebGLShader | null;
+ createTexture(): WebGLTexture | null;
+ cullFace(mode: GLenum): void;
+ deleteBuffer(buffer: WebGLBuffer | null): void;
+ deleteFramebuffer(framebuffer: WebGLFramebuffer | null): void;
+ deleteProgram(program: WebGLProgram | null): void;
+ deleteRenderbuffer(renderbuffer: WebGLRenderbuffer | null): void;
+ deleteShader(shader: WebGLShader | null): void;
+ deleteTexture(texture: WebGLTexture | null): void;
+ depthFunc(func: GLenum): void;
+ depthMask(flag: GLboolean): void;
+ depthRange(zNear: GLclampf, zFar: GLclampf): void;
+ detachShader(program: WebGLProgram, shader: WebGLShader): void;
+ disable(cap: GLenum): void;
+ disableVertexAttribArray(index: GLuint): void;
+ drawArrays(mode: GLenum, first: GLint, count: GLsizei): void;
+ drawElements(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr): void;
+ enable(cap: GLenum): void;
+ enableVertexAttribArray(index: GLuint): void;
+ finish(): void;
+ flush(): void;
+ framebufferRenderbuffer(target: GLenum, attachment: GLenum, renderbuffertarget: GLenum, renderbuffer: WebGLRenderbuffer | null): void;
+ framebufferTexture2D(target: GLenum, attachment: GLenum, textarget: GLenum, texture: WebGLTexture | null, level: GLint): void;
+ frontFace(mode: GLenum): void;
+ generateMipmap(target: GLenum): void;
+ getActiveAttrib(program: WebGLProgram, index: GLuint): WebGLActiveInfo | null;
+ getActiveUniform(program: WebGLProgram, index: GLuint): WebGLActiveInfo | null;
+ getAttachedShaders(program: WebGLProgram): WebGLShader[] | null;
+ getAttribLocation(program: WebGLProgram, name: string): GLint;
+ getBufferParameter(target: GLenum, pname: GLenum): any;
+ getContextAttributes(): WebGLContextAttributes | null;
+ getError(): GLenum;
+ getExtension(extensionName: "EXT_blend_minmax"): EXT_blend_minmax | null;
+ getExtension(extensionName: "EXT_color_buffer_float"): EXT_color_buffer_float | null;
+ getExtension(extensionName: "EXT_color_buffer_half_float"): EXT_color_buffer_half_float | null;
+ getExtension(extensionName: "EXT_float_blend"): EXT_float_blend | null;
+ getExtension(extensionName: "EXT_texture_filter_anisotropic"): EXT_texture_filter_anisotropic | null;
+ getExtension(extensionName: "EXT_frag_depth"): EXT_frag_depth | null;
+ getExtension(extensionName: "EXT_shader_texture_lod"): EXT_shader_texture_lod | null;
+ getExtension(extensionName: "EXT_sRGB"): EXT_sRGB | null;
+ getExtension(extensionName: "KHR_parallel_shader_compile"): KHR_parallel_shader_compile | null;
+ getExtension(extensionName: "OES_vertex_array_object"): OES_vertex_array_object | null;
+ getExtension(extensionName: "OVR_multiview2"): OVR_multiview2 | null;
+ getExtension(extensionName: "WEBGL_color_buffer_float"): WEBGL_color_buffer_float | null;
+ getExtension(extensionName: "WEBGL_compressed_texture_astc"): WEBGL_compressed_texture_astc | null;
+ getExtension(extensionName: "WEBGL_compressed_texture_etc"): WEBGL_compressed_texture_etc | null;
+ getExtension(extensionName: "WEBGL_compressed_texture_etc1"): WEBGL_compressed_texture_etc1 | null;
+ getExtension(extensionName: "WEBGL_compressed_texture_s3tc_srgb"): WEBGL_compressed_texture_s3tc_srgb | null;
+ getExtension(extensionName: "WEBGL_debug_shaders"): WEBGL_debug_shaders | null;
+ getExtension(extensionName: "WEBGL_draw_buffers"): WEBGL_draw_buffers | null;
+ getExtension(extensionName: "WEBGL_lose_context"): WEBGL_lose_context | null;
+ getExtension(extensionName: "WEBGL_depth_texture"): WEBGL_depth_texture | null;
+ getExtension(extensionName: "WEBGL_debug_renderer_info"): WEBGL_debug_renderer_info | null;
+ getExtension(extensionName: "WEBGL_compressed_texture_s3tc"): WEBGL_compressed_texture_s3tc | null;
+ getExtension(extensionName: "OES_texture_half_float_linear"): OES_texture_half_float_linear | null;
+ getExtension(extensionName: "OES_texture_half_float"): OES_texture_half_float | null;
+ getExtension(extensionName: "OES_texture_float_linear"): OES_texture_float_linear | null;
+ getExtension(extensionName: "OES_texture_float"): OES_texture_float | null;
+ getExtension(extensionName: "OES_standard_derivatives"): OES_standard_derivatives | null;
+ getExtension(extensionName: "OES_element_index_uint"): OES_element_index_uint | null;
+ getExtension(extensionName: "ANGLE_instanced_arrays"): ANGLE_instanced_arrays | null;
+ getExtension(name: string): any;
+ getFramebufferAttachmentParameter(target: GLenum, attachment: GLenum, pname: GLenum): any;
+ getParameter(pname: GLenum): any;
+ getProgramInfoLog(program: WebGLProgram): string | null;
+ getProgramParameter(program: WebGLProgram, pname: GLenum): any;
+ getRenderbufferParameter(target: GLenum, pname: GLenum): any;
+ getShaderInfoLog(shader: WebGLShader): string | null;
+ getShaderParameter(shader: WebGLShader, pname: GLenum): any;
+ getShaderPrecisionFormat(shadertype: GLenum, precisiontype: GLenum): WebGLShaderPrecisionFormat | null;
+ getShaderSource(shader: WebGLShader): string | null;
+ getSupportedExtensions(): string[] | null;
+ getTexParameter(target: GLenum, pname: GLenum): any;
+ getUniform(program: WebGLProgram, location: WebGLUniformLocation): any;
+ getUniformLocation(program: WebGLProgram, name: string): WebGLUniformLocation | null;
+ getVertexAttrib(index: GLuint, pname: GLenum): any;
+ getVertexAttribOffset(index: GLuint, pname: GLenum): GLintptr;
+ hint(target: GLenum, mode: GLenum): void;
+ isBuffer(buffer: WebGLBuffer | null): GLboolean;
+ isContextLost(): boolean;
+ isEnabled(cap: GLenum): GLboolean;
+ isFramebuffer(framebuffer: WebGLFramebuffer | null): GLboolean;
+ isProgram(program: WebGLProgram | null): GLboolean;
+ isRenderbuffer(renderbuffer: WebGLRenderbuffer | null): GLboolean;
+ isShader(shader: WebGLShader | null): GLboolean;
+ isTexture(texture: WebGLTexture | null): GLboolean;
+ lineWidth(width: GLfloat): void;
+ linkProgram(program: WebGLProgram): void;
+ pixelStorei(pname: GLenum, param: GLint | GLboolean): void;
+ polygonOffset(factor: GLfloat, units: GLfloat): void;
+ renderbufferStorage(target: GLenum, internalformat: GLenum, width: GLsizei, height: GLsizei): void;
+ sampleCoverage(value: GLclampf, invert: GLboolean): void;
+ scissor(x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
+ shaderSource(shader: WebGLShader, source: string): void;
+ stencilFunc(func: GLenum, ref: GLint, mask: GLuint): void;
+ stencilFuncSeparate(face: GLenum, func: GLenum, ref: GLint, mask: GLuint): void;
+ stencilMask(mask: GLuint): void;
+ stencilMaskSeparate(face: GLenum, mask: GLuint): void;
+ stencilOp(fail: GLenum, zfail: GLenum, zpass: GLenum): void;
+ stencilOpSeparate(face: GLenum, fail: GLenum, zfail: GLenum, zpass: GLenum): void;
+ texParameterf(target: GLenum, pname: GLenum, param: GLfloat): void;
+ texParameteri(target: GLenum, pname: GLenum, param: GLint): void;
+ uniform1f(location: WebGLUniformLocation | null, x: GLfloat): void;
+ uniform1i(location: WebGLUniformLocation | null, x: GLint): void;
+ uniform2f(location: WebGLUniformLocation | null, x: GLfloat, y: GLfloat): void;
+ uniform2i(location: WebGLUniformLocation | null, x: GLint, y: GLint): void;
+ uniform3f(location: WebGLUniformLocation | null, x: GLfloat, y: GLfloat, z: GLfloat): void;
+ uniform3i(location: WebGLUniformLocation | null, x: GLint, y: GLint, z: GLint): void;
+ uniform4f(location: WebGLUniformLocation | null, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat): void;
+ uniform4i(location: WebGLUniformLocation | null, x: GLint, y: GLint, z: GLint, w: GLint): void;
+ useProgram(program: WebGLProgram | null): void;
+ validateProgram(program: WebGLProgram): void;
+ vertexAttrib1f(index: GLuint, x: GLfloat): void;
+ vertexAttrib1fv(index: GLuint, values: Float32List): void;
+ vertexAttrib2f(index: GLuint, x: GLfloat, y: GLfloat): void;
+ vertexAttrib2fv(index: GLuint, values: Float32List): void;
+ vertexAttrib3f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat): void;
+ vertexAttrib3fv(index: GLuint, values: Float32List): void;
+ vertexAttrib4f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat): void;
+ vertexAttrib4fv(index: GLuint, values: Float32List): void;
+ vertexAttribPointer(index: GLuint, size: GLint, type: GLenum, normalized: GLboolean, stride: GLsizei, offset: GLintptr): void;
+ viewport(x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
+ readonly ACTIVE_ATTRIBUTES: GLenum;
+ readonly ACTIVE_TEXTURE: GLenum;
+ readonly ACTIVE_UNIFORMS: GLenum;
+ readonly ALIASED_LINE_WIDTH_RANGE: GLenum;
+ readonly ALIASED_POINT_SIZE_RANGE: GLenum;
+ readonly ALPHA: GLenum;
+ readonly ALPHA_BITS: GLenum;
+ readonly ALWAYS: GLenum;
+ readonly ARRAY_BUFFER: GLenum;
+ readonly ARRAY_BUFFER_BINDING: GLenum;
+ readonly ATTACHED_SHADERS: GLenum;
+ readonly BACK: GLenum;
+ readonly BLEND: GLenum;
+ readonly BLEND_COLOR: GLenum;
+ readonly BLEND_DST_ALPHA: GLenum;
+ readonly BLEND_DST_RGB: GLenum;
+ readonly BLEND_EQUATION: GLenum;
+ readonly BLEND_EQUATION_ALPHA: GLenum;
+ readonly BLEND_EQUATION_RGB: GLenum;
+ readonly BLEND_SRC_ALPHA: GLenum;
+ readonly BLEND_SRC_RGB: GLenum;
+ readonly BLUE_BITS: GLenum;
+ readonly BOOL: GLenum;
+ readonly BOOL_VEC2: GLenum;
+ readonly BOOL_VEC3: GLenum;
+ readonly BOOL_VEC4: GLenum;
+ readonly BROWSER_DEFAULT_WEBGL: GLenum;
+ readonly BUFFER_SIZE: GLenum;
+ readonly BUFFER_USAGE: GLenum;
+ readonly BYTE: GLenum;
+ readonly CCW: GLenum;
+ readonly CLAMP_TO_EDGE: GLenum;
+ readonly COLOR_ATTACHMENT0: GLenum;
+ readonly COLOR_BUFFER_BIT: GLenum;
+ readonly COLOR_CLEAR_VALUE: GLenum;
+ readonly COLOR_WRITEMASK: GLenum;
+ readonly COMPILE_STATUS: GLenum;
+ readonly COMPRESSED_TEXTURE_FORMATS: GLenum;
+ readonly CONSTANT_ALPHA: GLenum;
+ readonly CONSTANT_COLOR: GLenum;
+ readonly CONTEXT_LOST_WEBGL: GLenum;
+ readonly CULL_FACE: GLenum;
+ readonly CULL_FACE_MODE: GLenum;
+ readonly CURRENT_PROGRAM: GLenum;
+ readonly CURRENT_VERTEX_ATTRIB: GLenum;
+ readonly CW: GLenum;
+ readonly DECR: GLenum;
+ readonly DECR_WRAP: GLenum;
+ readonly DELETE_STATUS: GLenum;
+ readonly DEPTH_ATTACHMENT: GLenum;
+ readonly DEPTH_BITS: GLenum;
+ readonly DEPTH_BUFFER_BIT: GLenum;
+ readonly DEPTH_CLEAR_VALUE: GLenum;
+ readonly DEPTH_COMPONENT: GLenum;
+ readonly DEPTH_COMPONENT16: GLenum;
+ readonly DEPTH_FUNC: GLenum;
+ readonly DEPTH_RANGE: GLenum;
+ readonly DEPTH_STENCIL: GLenum;
+ readonly DEPTH_STENCIL_ATTACHMENT: GLenum;
+ readonly DEPTH_TEST: GLenum;
+ readonly DEPTH_WRITEMASK: GLenum;
+ readonly DITHER: GLenum;
+ readonly DONT_CARE: GLenum;
+ readonly DST_ALPHA: GLenum;
+ readonly DST_COLOR: GLenum;
+ readonly DYNAMIC_DRAW: GLenum;
+ readonly ELEMENT_ARRAY_BUFFER: GLenum;
+ readonly ELEMENT_ARRAY_BUFFER_BINDING: GLenum;
+ readonly EQUAL: GLenum;
+ readonly FASTEST: GLenum;
+ readonly FLOAT: GLenum;
+ readonly FLOAT_MAT2: GLenum;
+ readonly FLOAT_MAT3: GLenum;
+ readonly FLOAT_MAT4: GLenum;
+ readonly FLOAT_VEC2: GLenum;
+ readonly FLOAT_VEC3: GLenum;
+ readonly FLOAT_VEC4: GLenum;
+ readonly FRAGMENT_SHADER: GLenum;
+ readonly FRAMEBUFFER: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: GLenum;
+ readonly FRAMEBUFFER_BINDING: GLenum;
+ readonly FRAMEBUFFER_COMPLETE: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: GLenum;
+ readonly FRAMEBUFFER_UNSUPPORTED: GLenum;
+ readonly FRONT: GLenum;
+ readonly FRONT_AND_BACK: GLenum;
+ readonly FRONT_FACE: GLenum;
+ readonly FUNC_ADD: GLenum;
+ readonly FUNC_REVERSE_SUBTRACT: GLenum;
+ readonly FUNC_SUBTRACT: GLenum;
+ readonly GENERATE_MIPMAP_HINT: GLenum;
+ readonly GEQUAL: GLenum;
+ readonly GREATER: GLenum;
+ readonly GREEN_BITS: GLenum;
+ readonly HIGH_FLOAT: GLenum;
+ readonly HIGH_INT: GLenum;
+ readonly IMPLEMENTATION_COLOR_READ_FORMAT: GLenum;
+ readonly IMPLEMENTATION_COLOR_READ_TYPE: GLenum;
+ readonly INCR: GLenum;
+ readonly INCR_WRAP: GLenum;
+ readonly INT: GLenum;
+ readonly INT_VEC2: GLenum;
+ readonly INT_VEC3: GLenum;
+ readonly INT_VEC4: GLenum;
+ readonly INVALID_ENUM: GLenum;
+ readonly INVALID_FRAMEBUFFER_OPERATION: GLenum;
+ readonly INVALID_OPERATION: GLenum;
+ readonly INVALID_VALUE: GLenum;
+ readonly INVERT: GLenum;
+ readonly KEEP: GLenum;
+ readonly LEQUAL: GLenum;
+ readonly LESS: GLenum;
+ readonly LINEAR: GLenum;
+ readonly LINEAR_MIPMAP_LINEAR: GLenum;
+ readonly LINEAR_MIPMAP_NEAREST: GLenum;
+ readonly LINES: GLenum;
+ readonly LINE_LOOP: GLenum;
+ readonly LINE_STRIP: GLenum;
+ readonly LINE_WIDTH: GLenum;
+ readonly LINK_STATUS: GLenum;
+ readonly LOW_FLOAT: GLenum;
+ readonly LOW_INT: GLenum;
+ readonly LUMINANCE: GLenum;
+ readonly LUMINANCE_ALPHA: GLenum;
+ readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: GLenum;
+ readonly MAX_CUBE_MAP_TEXTURE_SIZE: GLenum;
+ readonly MAX_FRAGMENT_UNIFORM_VECTORS: GLenum;
+ readonly MAX_RENDERBUFFER_SIZE: GLenum;
+ readonly MAX_TEXTURE_IMAGE_UNITS: GLenum;
+ readonly MAX_TEXTURE_SIZE: GLenum;
+ readonly MAX_VARYING_VECTORS: GLenum;
+ readonly MAX_VERTEX_ATTRIBS: GLenum;
+ readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: GLenum;
+ readonly MAX_VERTEX_UNIFORM_VECTORS: GLenum;
+ readonly MAX_VIEWPORT_DIMS: GLenum;
+ readonly MEDIUM_FLOAT: GLenum;
+ readonly MEDIUM_INT: GLenum;
+ readonly MIRRORED_REPEAT: GLenum;
+ readonly NEAREST: GLenum;
+ readonly NEAREST_MIPMAP_LINEAR: GLenum;
+ readonly NEAREST_MIPMAP_NEAREST: GLenum;
+ readonly NEVER: GLenum;
+ readonly NICEST: GLenum;
+ readonly NONE: GLenum;
+ readonly NOTEQUAL: GLenum;
+ readonly NO_ERROR: GLenum;
+ readonly ONE: GLenum;
+ readonly ONE_MINUS_CONSTANT_ALPHA: GLenum;
+ readonly ONE_MINUS_CONSTANT_COLOR: GLenum;
+ readonly ONE_MINUS_DST_ALPHA: GLenum;
+ readonly ONE_MINUS_DST_COLOR: GLenum;
+ readonly ONE_MINUS_SRC_ALPHA: GLenum;
+ readonly ONE_MINUS_SRC_COLOR: GLenum;
+ readonly OUT_OF_MEMORY: GLenum;
+ readonly PACK_ALIGNMENT: GLenum;
+ readonly POINTS: GLenum;
+ readonly POLYGON_OFFSET_FACTOR: GLenum;
+ readonly POLYGON_OFFSET_FILL: GLenum;
+ readonly POLYGON_OFFSET_UNITS: GLenum;
+ readonly RED_BITS: GLenum;
+ readonly RENDERBUFFER: GLenum;
+ readonly RENDERBUFFER_ALPHA_SIZE: GLenum;
+ readonly RENDERBUFFER_BINDING: GLenum;
+ readonly RENDERBUFFER_BLUE_SIZE: GLenum;
+ readonly RENDERBUFFER_DEPTH_SIZE: GLenum;
+ readonly RENDERBUFFER_GREEN_SIZE: GLenum;
+ readonly RENDERBUFFER_HEIGHT: GLenum;
+ readonly RENDERBUFFER_INTERNAL_FORMAT: GLenum;
+ readonly RENDERBUFFER_RED_SIZE: GLenum;
+ readonly RENDERBUFFER_STENCIL_SIZE: GLenum;
+ readonly RENDERBUFFER_WIDTH: GLenum;
+ readonly RENDERER: GLenum;
+ readonly REPEAT: GLenum;
+ readonly REPLACE: GLenum;
+ readonly RGB: GLenum;
+ readonly RGB565: GLenum;
+ readonly RGB5_A1: GLenum;
+ readonly RGBA: GLenum;
+ readonly RGBA4: GLenum;
+ readonly SAMPLER_2D: GLenum;
+ readonly SAMPLER_CUBE: GLenum;
+ readonly SAMPLES: GLenum;
+ readonly SAMPLE_ALPHA_TO_COVERAGE: GLenum;
+ readonly SAMPLE_BUFFERS: GLenum;
+ readonly SAMPLE_COVERAGE: GLenum;
+ readonly SAMPLE_COVERAGE_INVERT: GLenum;
+ readonly SAMPLE_COVERAGE_VALUE: GLenum;
+ readonly SCISSOR_BOX: GLenum;
+ readonly SCISSOR_TEST: GLenum;
+ readonly SHADER_TYPE: GLenum;
+ readonly SHADING_LANGUAGE_VERSION: GLenum;
+ readonly SHORT: GLenum;
+ readonly SRC_ALPHA: GLenum;
+ readonly SRC_ALPHA_SATURATE: GLenum;
+ readonly SRC_COLOR: GLenum;
+ readonly STATIC_DRAW: GLenum;
+ readonly STENCIL_ATTACHMENT: GLenum;
+ readonly STENCIL_BACK_FAIL: GLenum;
+ readonly STENCIL_BACK_FUNC: GLenum;
+ readonly STENCIL_BACK_PASS_DEPTH_FAIL: GLenum;
+ readonly STENCIL_BACK_PASS_DEPTH_PASS: GLenum;
+ readonly STENCIL_BACK_REF: GLenum;
+ readonly STENCIL_BACK_VALUE_MASK: GLenum;
+ readonly STENCIL_BACK_WRITEMASK: GLenum;
+ readonly STENCIL_BITS: GLenum;
+ readonly STENCIL_BUFFER_BIT: GLenum;
+ readonly STENCIL_CLEAR_VALUE: GLenum;
+ readonly STENCIL_FAIL: GLenum;
+ readonly STENCIL_FUNC: GLenum;
+ readonly STENCIL_INDEX8: GLenum;
+ readonly STENCIL_PASS_DEPTH_FAIL: GLenum;
+ readonly STENCIL_PASS_DEPTH_PASS: GLenum;
+ readonly STENCIL_REF: GLenum;
+ readonly STENCIL_TEST: GLenum;
+ readonly STENCIL_VALUE_MASK: GLenum;
+ readonly STENCIL_WRITEMASK: GLenum;
+ readonly STREAM_DRAW: GLenum;
+ readonly SUBPIXEL_BITS: GLenum;
+ readonly TEXTURE: GLenum;
+ readonly TEXTURE0: GLenum;
+ readonly TEXTURE1: GLenum;
+ readonly TEXTURE10: GLenum;
+ readonly TEXTURE11: GLenum;
+ readonly TEXTURE12: GLenum;
+ readonly TEXTURE13: GLenum;
+ readonly TEXTURE14: GLenum;
+ readonly TEXTURE15: GLenum;
+ readonly TEXTURE16: GLenum;
+ readonly TEXTURE17: GLenum;
+ readonly TEXTURE18: GLenum;
+ readonly TEXTURE19: GLenum;
+ readonly TEXTURE2: GLenum;
+ readonly TEXTURE20: GLenum;
+ readonly TEXTURE21: GLenum;
+ readonly TEXTURE22: GLenum;
+ readonly TEXTURE23: GLenum;
+ readonly TEXTURE24: GLenum;
+ readonly TEXTURE25: GLenum;
+ readonly TEXTURE26: GLenum;
+ readonly TEXTURE27: GLenum;
+ readonly TEXTURE28: GLenum;
+ readonly TEXTURE29: GLenum;
+ readonly TEXTURE3: GLenum;
+ readonly TEXTURE30: GLenum;
+ readonly TEXTURE31: GLenum;
+ readonly TEXTURE4: GLenum;
+ readonly TEXTURE5: GLenum;
+ readonly TEXTURE6: GLenum;
+ readonly TEXTURE7: GLenum;
+ readonly TEXTURE8: GLenum;
+ readonly TEXTURE9: GLenum;
+ readonly TEXTURE_2D: GLenum;
+ readonly TEXTURE_BINDING_2D: GLenum;
+ readonly TEXTURE_BINDING_CUBE_MAP: GLenum;
+ readonly TEXTURE_CUBE_MAP: GLenum;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_X: GLenum;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: GLenum;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: GLenum;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_X: GLenum;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Y: GLenum;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Z: GLenum;
+ readonly TEXTURE_MAG_FILTER: GLenum;
+ readonly TEXTURE_MIN_FILTER: GLenum;
+ readonly TEXTURE_WRAP_S: GLenum;
+ readonly TEXTURE_WRAP_T: GLenum;
+ readonly TRIANGLES: GLenum;
+ readonly TRIANGLE_FAN: GLenum;
+ readonly TRIANGLE_STRIP: GLenum;
+ readonly UNPACK_ALIGNMENT: GLenum;
+ readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: GLenum;
+ readonly UNPACK_FLIP_Y_WEBGL: GLenum;
+ readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: GLenum;
+ readonly UNSIGNED_BYTE: GLenum;
+ readonly UNSIGNED_INT: GLenum;
+ readonly UNSIGNED_SHORT: GLenum;
+ readonly UNSIGNED_SHORT_4_4_4_4: GLenum;
+ readonly UNSIGNED_SHORT_5_5_5_1: GLenum;
+ readonly UNSIGNED_SHORT_5_6_5: GLenum;
+ readonly VALIDATE_STATUS: GLenum;
+ readonly VENDOR: GLenum;
+ readonly VERSION: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_ENABLED: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_POINTER: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_SIZE: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_STRIDE: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_TYPE: GLenum;
+ readonly VERTEX_SHADER: GLenum;
+ readonly VIEWPORT: GLenum;
+ readonly ZERO: GLenum;
+}
+
+interface WebGLRenderingContextOverloads {
+ bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum): void;
+ bufferData(target: GLenum, data: BufferSource | null, usage: GLenum): void;
+ bufferSubData(target: GLenum, offset: GLintptr, data: BufferSource): void;
+ compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, data: ArrayBufferView): void;
+ compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, data: ArrayBufferView): void;
+ readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
+ texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
+ texImage2D(target: GLenum, level: GLint, internalformat: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
+ texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
+ texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
+ uniform1fv(location: WebGLUniformLocation | null, v: Float32List): void;
+ uniform1iv(location: WebGLUniformLocation | null, v: Int32List): void;
+ uniform2fv(location: WebGLUniformLocation | null, v: Float32List): void;
+ uniform2iv(location: WebGLUniformLocation | null, v: Int32List): void;
+ uniform3fv(location: WebGLUniformLocation | null, v: Float32List): void;
+ uniform3iv(location: WebGLUniformLocation | null, v: Int32List): void;
+ uniform4fv(location: WebGLUniformLocation | null, v: Float32List): void;
+ uniform4iv(location: WebGLUniformLocation | null, v: Int32List): void;
+ uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void;
+ uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void;
+ uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void;
+}
+
+interface WebGLSampler {
+}
+
+declare var WebGLSampler: {
+ prototype: WebGLSampler;
+ new(): WebGLSampler;
+};
+
+/** The WebGLShader is part of the WebGL API and can either be a vertex or a fragment shader. A WebGLProgram requires both types of shaders. */
+interface WebGLShader {
+}
+
+declare var WebGLShader: {
+ prototype: WebGLShader;
+ new(): WebGLShader;
+};
+
+/** Part of the WebGL API and represents the information returned by calling the WebGLRenderingContext.getShaderPrecisionFormat() method. */
+interface WebGLShaderPrecisionFormat {
+ readonly precision: GLint;
+ readonly rangeMax: GLint;
+ readonly rangeMin: GLint;
+}
+
+declare var WebGLShaderPrecisionFormat: {
+ prototype: WebGLShaderPrecisionFormat;
+ new(): WebGLShaderPrecisionFormat;
+};
+
+interface WebGLSync {
+}
+
+declare var WebGLSync: {
+ prototype: WebGLSync;
+ new(): WebGLSync;
+};
+
+/** Part of the WebGL API and represents an opaque texture object providing storage and state for texturing operations. */
+interface WebGLTexture {
+}
+
+declare var WebGLTexture: {
+ prototype: WebGLTexture;
+ new(): WebGLTexture;
+};
+
+interface WebGLTransformFeedback {
+}
+
+declare var WebGLTransformFeedback: {
+ prototype: WebGLTransformFeedback;
+ new(): WebGLTransformFeedback;
+};
+
+/** Part of the WebGL API and represents the location of a uniform variable in a shader program. */
+interface WebGLUniformLocation {
+}
+
+declare var WebGLUniformLocation: {
+ prototype: WebGLUniformLocation;
+ new(): WebGLUniformLocation;
+};
+
+interface WebGLVertexArrayObject {
+}
+
+declare var WebGLVertexArrayObject: {
+ prototype: WebGLVertexArrayObject;
+ new(): WebGLVertexArrayObject;
+};
+
+interface WebGLVertexArrayObjectOES {
+}
+
+interface WebSocketEventMap {
+ "close": CloseEvent;
+ "error": Event;
+ "message": MessageEvent;
+ "open": Event;
+}
+
+/** Provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection. */
+interface WebSocket extends EventTarget {
+ /**
+ * Returns a string that indicates how binary data from the WebSocket object is exposed to scripts:
+ *
+ * Can be set, to change how binary data is returned. The default is "blob".
+ */
+ binaryType: BinaryType;
+ /**
+ * Returns the number of bytes of application data (UTF-8 text and binary data) that have been queued using send() but not yet been transmitted to the network.
+ *
+ * If the WebSocket connection is closed, this attribute's value will only increase with each call to the send() method. (The number does not reset to zero once the connection closes.)
+ */
+ readonly bufferedAmount: number;
+ /** Returns the extensions selected by the server, if any. */
+ readonly extensions: string;
+ onclose: ((this: WebSocket, ev: CloseEvent) => any) | null;
+ onerror: ((this: WebSocket, ev: Event) => any) | null;
+ onmessage: ((this: WebSocket, ev: MessageEvent) => any) | null;
+ onopen: ((this: WebSocket, ev: Event) => any) | null;
+ /** Returns the subprotocol selected by the server, if any. It can be used in conjunction with the array form of the constructor's second argument to perform subprotocol negotiation. */
+ readonly protocol: string;
+ /** Returns the state of the WebSocket object's connection. It can have the values described below. */
+ readonly readyState: number;
+ /** Returns the URL that was used to establish the WebSocket connection. */
+ readonly url: string;
+ /** Closes the WebSocket connection, optionally using code as the the WebSocket connection close code and reason as the the WebSocket connection close reason. */
+ close(code?: number, reason?: string): void;
+ /** Transmits data using the WebSocket connection. data can be a string, a Blob, an ArrayBuffer, or an ArrayBufferView. */
+ send(data: string | ArrayBufferLike | Blob | ArrayBufferView): void;
+ readonly CLOSED: number;
+ readonly CLOSING: number;
+ readonly CONNECTING: number;
+ readonly OPEN: number;
+ addEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var WebSocket: {
+ prototype: WebSocket;
+ new(url: string | URL, protocols?: string | string[]): WebSocket;
+ readonly CLOSED: number;
+ readonly CLOSING: number;
+ readonly CONNECTING: number;
+ readonly OPEN: number;
+};
+
+/** This ServiceWorker API interface represents the scope of a service worker client that is a document in a browser context, controlled by an active worker. The service worker client independently selects and uses a service worker for its own loading and sub-resources. */
+interface WindowClient extends Client {
+ readonly focused: boolean;
+ readonly visibilityState: DocumentVisibilityState;
+ focus(): Promise<WindowClient>;
+ navigate(url: string | URL): Promise<WindowClient | null>;
+}
+
+declare var WindowClient: {
+ prototype: WindowClient;
+ new(): WindowClient;
+};
+
+interface WindowOrWorkerGlobalScope {
+ /** Available only in secure contexts. */
+ readonly caches: CacheStorage;
+ readonly crossOriginIsolated: boolean;
+ readonly crypto: Crypto;
+ readonly indexedDB: IDBFactory;
+ readonly isSecureContext: boolean;
+ readonly origin: string;
+ readonly performance: Performance;
+ atob(data: string): string;
+ btoa(data: string): string;
+ clearInterval(id: number | undefined): void;
+ clearTimeout(id: number | undefined): void;
+ createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
+ createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
+ fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
+ queueMicrotask(callback: VoidFunction): void;
+ reportError(e: any): void;
+ setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
+ setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
+ structuredClone(value: any, options?: StructuredSerializeOptions): any;
+}
+
+interface WorkerEventMap extends AbstractWorkerEventMap {
+ "message": MessageEvent;
+ "messageerror": MessageEvent;
+}
+
+/** This Web Workers API interface represents a background task that can be easily created and can send messages back to its creator. Creating a worker is as simple as calling the Worker() constructor and specifying a script to be run in the worker thread. */
+interface Worker extends EventTarget, AbstractWorker {
+ onmessage: ((this: Worker, ev: MessageEvent) => any) | null;
+ onmessageerror: ((this: Worker, ev: MessageEvent) => any) | null;
+ /** Clones message and transmits it to worker's global environment. transfer can be passed as a list of objects that are to be transferred rather than cloned. */
+ postMessage(message: any, transfer: Transferable[]): void;
+ postMessage(message: any, options?: StructuredSerializeOptions): void;
+ /** Aborts worker's associated global environment. */
+ terminate(): void;
+ addEventListener<K extends keyof WorkerEventMap>(type: K, listener: (this: Worker, ev: WorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof WorkerEventMap>(type: K, listener: (this: Worker, ev: WorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var Worker: {
+ prototype: Worker;
+ new(scriptURL: string | URL, options?: WorkerOptions): Worker;
+};
+
+interface WorkerGlobalScopeEventMap {
+ "error": ErrorEvent;
+ "languagechange": Event;
+ "offline": Event;
+ "online": Event;
+ "rejectionhandled": PromiseRejectionEvent;
+ "unhandledrejection": PromiseRejectionEvent;
+}
+
+/** This Web Workers API interface is an interface representing the scope of any worker. Workers have no browsing context; this scope contains the information usually conveyed by Window objects — in this case event handlers, the console or the associated WorkerNavigator object. Each WorkerGlobalScope has its own event loop. */
+interface WorkerGlobalScope extends EventTarget, FontFaceSource, WindowOrWorkerGlobalScope {
+ /** Returns workerGlobal's WorkerLocation object. */
+ readonly location: WorkerLocation;
+ /** Returns workerGlobal's WorkerNavigator object. */
+ readonly navigator: WorkerNavigator;
+ onerror: ((this: WorkerGlobalScope, ev: ErrorEvent) => any) | null;
+ onlanguagechange: ((this: WorkerGlobalScope, ev: Event) => any) | null;
+ onoffline: ((this: WorkerGlobalScope, ev: Event) => any) | null;
+ ononline: ((this: WorkerGlobalScope, ev: Event) => any) | null;
+ onrejectionhandled: ((this: WorkerGlobalScope, ev: PromiseRejectionEvent) => any) | null;
+ onunhandledrejection: ((this: WorkerGlobalScope, ev: PromiseRejectionEvent) => any) | null;
+ /** Returns workerGlobal. */
+ readonly self: WorkerGlobalScope & typeof globalThis;
+ /** Fetches each URL in urls, executes them one-by-one in the order they are passed, and then returns (or throws if something went amiss). */
+ importScripts(...urls: (string | URL)[]): void;
+ addEventListener<K extends keyof WorkerGlobalScopeEventMap>(type: K, listener: (this: WorkerGlobalScope, ev: WorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof WorkerGlobalScopeEventMap>(type: K, listener: (this: WorkerGlobalScope, ev: WorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var WorkerGlobalScope: {
+ prototype: WorkerGlobalScope;
+ new(): WorkerGlobalScope;
+};
+
+/** The absolute location of the script executed by the Worker. Such an object is initialized for each worker and is available via the WorkerGlobalScope.location property obtained by calling self.location. */
+interface WorkerLocation {
+ readonly hash: string;
+ readonly host: string;
+ readonly hostname: string;
+ readonly href: string;
+ toString(): string;
+ readonly origin: string;
+ readonly pathname: string;
+ readonly port: string;
+ readonly protocol: string;
+ readonly search: string;
+}
+
+declare var WorkerLocation: {
+ prototype: WorkerLocation;
+ new(): WorkerLocation;
+};
+
+/** A subset of the Navigator interface allowed to be accessed from a Worker. Such an object is initialized for each worker and is available via the WorkerGlobalScope.navigator property obtained by calling window.self.navigator. */
+interface WorkerNavigator extends NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorLocks, NavigatorOnLine, NavigatorStorage {
+ readonly mediaCapabilities: MediaCapabilities;
+}
+
+declare var WorkerNavigator: {
+ prototype: WorkerNavigator;
+ new(): WorkerNavigator;
+};
+
+/** This Streams API interface provides a standard abstraction for writing streaming data to a destination, known as a sink. This object comes with built-in backpressure and queuing. */
+interface WritableStream<W = any> {
+ readonly locked: boolean;
+ abort(reason?: any): Promise<void>;
+ close(): Promise<void>;
+ getWriter(): WritableStreamDefaultWriter<W>;
+}
+
+declare var WritableStream: {
+ prototype: WritableStream;
+ new<W = any>(underlyingSink?: UnderlyingSink<W>, strategy?: QueuingStrategy<W>): WritableStream<W>;
+};
+
+/** This Streams API interface represents a controller allowing control of a WritableStream's state. When constructing a WritableStream, the underlying sink is given a corresponding WritableStreamDefaultController instance to manipulate. */
+interface WritableStreamDefaultController {
+ readonly signal: AbortSignal;
+ error(e?: any): void;
+}
+
+declare var WritableStreamDefaultController: {
+ prototype: WritableStreamDefaultController;
+ new(): WritableStreamDefaultController;
+};
+
+/** This Streams API interface is the object returned by WritableStream.getWriter() and once created locks the < writer to the WritableStream ensuring that no other streams can write to the underlying sink. */
+interface WritableStreamDefaultWriter<W = any> {
+ readonly closed: Promise<undefined>;
+ readonly desiredSize: number | null;
+ readonly ready: Promise<undefined>;
+ abort(reason?: any): Promise<void>;
+ close(): Promise<void>;
+ releaseLock(): void;
+ write(chunk?: W): Promise<void>;
+}
+
+declare var WritableStreamDefaultWriter: {
+ prototype: WritableStreamDefaultWriter;
+ new<W = any>(stream: WritableStream<W>): WritableStreamDefaultWriter<W>;
+};
+
+interface XMLHttpRequestEventMap extends XMLHttpRequestEventTargetEventMap {
+ "readystatechange": Event;
+}
+
+/** Use XMLHttpRequest (XHR) objects to interact with servers. You can retrieve data from a URL without having to do a full page refresh. This enables a Web page to update just part of a page without disrupting what the user is doing. */
+interface XMLHttpRequest extends XMLHttpRequestEventTarget {
+ onreadystatechange: ((this: XMLHttpRequest, ev: Event) => any) | null;
+ /** Returns client's state. */
+ readonly readyState: number;
+ /** Returns the response body. */
+ readonly response: any;
+ /**
+ * Returns response as text.
+ *
+ * Throws an "InvalidStateError" DOMException if responseType is not the empty string or "text".
+ */
+ readonly responseText: string;
+ /**
+ * Returns the response type.
+ *
+ * Can be set to change the response type. Values are: the empty string (default), "arraybuffer", "blob", "document", "json", and "text".
+ *
+ * When set: setting to "document" is ignored if current global object is not a Window object.
+ *
+ * When set: throws an "InvalidStateError" DOMException if state is loading or done.
+ *
+ * When set: throws an "InvalidAccessError" DOMException if the synchronous flag is set and current global object is a Window object.
+ */
+ responseType: XMLHttpRequestResponseType;
+ readonly responseURL: string;
+ readonly status: number;
+ readonly statusText: string;
+ /**
+ * Can be set to a time in milliseconds. When set to a non-zero value will cause fetching to terminate after the given time has passed. When the time has passed, the request has not yet completed, and this's synchronous flag is unset, a timeout event will then be dispatched, or a "TimeoutError" DOMException will be thrown otherwise (for the send() method).
+ *
+ * When set: throws an "InvalidAccessError" DOMException if the synchronous flag is set and current global object is a Window object.
+ */
+ timeout: number;
+ /** Returns the associated XMLHttpRequestUpload object. It can be used to gather transmission information when data is transferred to a server. */
+ readonly upload: XMLHttpRequestUpload;
+ /**
+ * True when credentials are to be included in a cross-origin request. False when they are to be excluded in a cross-origin request and when cookies are to be ignored in its response. Initially false.
+ *
+ * When set: throws an "InvalidStateError" DOMException if state is not unsent or opened, or if the send() flag is set.
+ */
+ withCredentials: boolean;
+ /** Cancels any network activity. */
+ abort(): void;
+ getAllResponseHeaders(): string;
+ getResponseHeader(name: string): string | null;
+ /**
+ * Sets the request method, request URL, and synchronous flag.
+ *
+ * Throws a "SyntaxError" DOMException if either method is not a valid method or url cannot be parsed.
+ *
+ * Throws a "SecurityError" DOMException if method is a case-insensitive match for `CONNECT`, `TRACE`, or `TRACK`.
+ *
+ * Throws an "InvalidAccessError" DOMException if async is false, current global object is a Window object, and the timeout attribute is not zero or the responseType attribute is not the empty string.
+ */
+ open(method: string, url: string | URL): void;
+ open(method: string, url: string | URL, async: boolean, username?: string | null, password?: string | null): void;
+ /**
+ * Acts as if the `Content-Type` header value for a response is mime. (It does not change the header.)
+ *
+ * Throws an "InvalidStateError" DOMException if state is loading or done.
+ */
+ overrideMimeType(mime: string): void;
+ /**
+ * Initiates the request. The body argument provides the request body, if any, and is ignored if the request method is GET or HEAD.
+ *
+ * Throws an "InvalidStateError" DOMException if either state is not opened or the send() flag is set.
+ */
+ send(body?: XMLHttpRequestBodyInit | null): void;
+ /**
+ * Combines a header in author request headers.
+ *
+ * Throws an "InvalidStateError" DOMException if either state is not opened or the send() flag is set.
+ *
+ * Throws a "SyntaxError" DOMException if name is not a header name or if value is not a header value.
+ */
+ setRequestHeader(name: string, value: string): void;
+ readonly DONE: number;
+ readonly HEADERS_RECEIVED: number;
+ readonly LOADING: number;
+ readonly OPENED: number;
+ readonly UNSENT: number;
+ addEventListener<K extends keyof XMLHttpRequestEventMap>(type: K, listener: (this: XMLHttpRequest, ev: XMLHttpRequestEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof XMLHttpRequestEventMap>(type: K, listener: (this: XMLHttpRequest, ev: XMLHttpRequestEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var XMLHttpRequest: {
+ prototype: XMLHttpRequest;
+ new(): XMLHttpRequest;
+ readonly DONE: number;
+ readonly HEADERS_RECEIVED: number;
+ readonly LOADING: number;
+ readonly OPENED: number;
+ readonly UNSENT: number;
+};
+
+interface XMLHttpRequestEventTargetEventMap {
+ "abort": ProgressEvent<XMLHttpRequestEventTarget>;
+ "error": ProgressEvent<XMLHttpRequestEventTarget>;
+ "load": ProgressEvent<XMLHttpRequestEventTarget>;
+ "loadend": ProgressEvent<XMLHttpRequestEventTarget>;
+ "loadstart": ProgressEvent<XMLHttpRequestEventTarget>;
+ "progress": ProgressEvent<XMLHttpRequestEventTarget>;
+ "timeout": ProgressEvent<XMLHttpRequestEventTarget>;
+}
+
+interface XMLHttpRequestEventTarget extends EventTarget {
+ onabort: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
+ onerror: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
+ onload: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
+ onloadend: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
+ onloadstart: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
+ onprogress: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
+ ontimeout: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
+ addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestEventTarget, ev: XMLHttpRequestEventTargetEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestEventTarget, ev: XMLHttpRequestEventTargetEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var XMLHttpRequestEventTarget: {
+ prototype: XMLHttpRequestEventTarget;
+ new(): XMLHttpRequestEventTarget;
+};
+
+interface XMLHttpRequestUpload extends XMLHttpRequestEventTarget {
+ addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestUpload, ev: XMLHttpRequestEventTargetEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestUpload, ev: XMLHttpRequestEventTargetEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var XMLHttpRequestUpload: {
+ prototype: XMLHttpRequestUpload;
+ new(): XMLHttpRequestUpload;
+};
+
+interface Console {
+ assert(condition?: boolean, ...data: any[]): void;
+ clear(): void;
+ count(label?: string): void;
+ countReset(label?: string): void;
+ debug(...data: any[]): void;
+ dir(item?: any, options?: any): void;
+ dirxml(...data: any[]): void;
+ error(...data: any[]): void;
+ group(...data: any[]): void;
+ groupCollapsed(...data: any[]): void;
+ groupEnd(): void;
+ info(...data: any[]): void;
+ log(...data: any[]): void;
+ table(tabularData?: any, properties?: string[]): void;
+ time(label?: string): void;
+ timeEnd(label?: string): void;
+ timeLog(label?: string, ...data: any[]): void;
+ timeStamp(label?: string): void;
+ trace(...data: any[]): void;
+ warn(...data: any[]): void;
+}
+
+declare var console: Console;
+
+declare namespace WebAssembly {
+ interface CompileError extends Error {
+ }
+
+ var CompileError: {
+ prototype: CompileError;
+ new(message?: string): CompileError;
+ (message?: string): CompileError;
+ };
+
+ interface Global {
+ value: any;
+ valueOf(): any;
+ }
+
+ var Global: {
+ prototype: Global;
+ new(descriptor: GlobalDescriptor, v?: any): Global;
+ };
+
+ interface Instance {
+ readonly exports: Exports;
+ }
+
+ var Instance: {
+ prototype: Instance;
+ new(module: Module, importObject?: Imports): Instance;
+ };
+
+ interface LinkError extends Error {
+ }
+
+ var LinkError: {
+ prototype: LinkError;
+ new(message?: string): LinkError;
+ (message?: string): LinkError;
+ };
+
+ interface Memory {
+ readonly buffer: ArrayBuffer;
+ grow(delta: number): number;
+ }
+
+ var Memory: {
+ prototype: Memory;
+ new(descriptor: MemoryDescriptor): Memory;
+ };
+
+ interface Module {
+ }
+
+ var Module: {
+ prototype: Module;
+ new(bytes: BufferSource): Module;
+ customSections(moduleObject: Module, sectionName: string): ArrayBuffer[];
+ exports(moduleObject: Module): ModuleExportDescriptor[];
+ imports(moduleObject: Module): ModuleImportDescriptor[];
+ };
+
+ interface RuntimeError extends Error {
+ }
+
+ var RuntimeError: {
+ prototype: RuntimeError;
+ new(message?: string): RuntimeError;
+ (message?: string): RuntimeError;
+ };
+
+ interface Table {
+ readonly length: number;
+ get(index: number): any;
+ grow(delta: number, value?: any): number;
+ set(index: number, value?: any): void;
+ }
+
+ var Table: {
+ prototype: Table;
+ new(descriptor: TableDescriptor, value?: any): Table;
+ };
+
+ interface GlobalDescriptor {
+ mutable?: boolean;
+ value: ValueType;
+ }
+
+ interface MemoryDescriptor {
+ initial: number;
+ maximum?: number;
+ shared?: boolean;
+ }
+
+ interface ModuleExportDescriptor {
+ kind: ImportExportKind;
+ name: string;
+ }
+
+ interface ModuleImportDescriptor {
+ kind: ImportExportKind;
+ module: string;
+ name: string;
+ }
+
+ interface TableDescriptor {
+ element: TableKind;
+ initial: number;
+ maximum?: number;
+ }
+
+ interface WebAssemblyInstantiatedSource {
+ instance: Instance;
+ module: Module;
+ }
+
+ type ImportExportKind = "function" | "global" | "memory" | "table";
+ type TableKind = "anyfunc" | "externref";
+ type ValueType = "anyfunc" | "externref" | "f32" | "f64" | "i32" | "i64" | "v128";
+ type ExportValue = Function | Global | Memory | Table;
+ type Exports = Record<string, ExportValue>;
+ type ImportValue = ExportValue | number;
+ type Imports = Record<string, ModuleImports>;
+ type ModuleImports = Record<string, ImportValue>;
+ function compile(bytes: BufferSource): Promise<Module>;
+ function compileStreaming(source: Response | PromiseLike<Response>): Promise<Module>;
+ function instantiate(bytes: BufferSource, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
+ function instantiate(moduleObject: Module, importObject?: Imports): Promise<Instance>;
+ function instantiateStreaming(source: Response | PromiseLike<Response>, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
+ function validate(bytes: BufferSource): boolean;
+}
+
+interface FrameRequestCallback {
+ (time: DOMHighResTimeStamp): void;
+}
+
+interface LockGrantedCallback {
+ (lock: Lock | null): any;
+}
+
+interface OnErrorEventHandlerNonNull {
+ (event: Event | string, source?: string, lineno?: number, colno?: number, error?: Error): any;
+}
+
+interface PerformanceObserverCallback {
+ (entries: PerformanceObserverEntryList, observer: PerformanceObserver): void;
+}
+
+interface QueuingStrategySize<T = any> {
+ (chunk: T): number;
+}
+
+interface TransformerFlushCallback<O> {
+ (controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
+}
+
+interface TransformerStartCallback<O> {
+ (controller: TransformStreamDefaultController<O>): any;
+}
+
+interface TransformerTransformCallback<I, O> {
+ (chunk: I, controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
+}
+
+interface UnderlyingSinkAbortCallback {
+ (reason?: any): void | PromiseLike<void>;
+}
+
+interface UnderlyingSinkCloseCallback {
+ (): void | PromiseLike<void>;
+}
+
+interface UnderlyingSinkStartCallback {
+ (controller: WritableStreamDefaultController): any;
+}
+
+interface UnderlyingSinkWriteCallback<W> {
+ (chunk: W, controller: WritableStreamDefaultController): void | PromiseLike<void>;
+}
+
+interface UnderlyingSourceCancelCallback {
+ (reason?: any): void | PromiseLike<void>;
+}
+
+interface UnderlyingSourcePullCallback<R> {
+ (controller: ReadableStreamController<R>): void | PromiseLike<void>;
+}
+
+interface UnderlyingSourceStartCallback<R> {
+ (controller: ReadableStreamController<R>): any;
+}
+
+interface VoidFunction {
+ (): void;
+}
+
+/** Returns dedicatedWorkerGlobal's name, i.e. the value given to the Worker constructor. Primarily useful for debugging. */
+declare var name: string;
+declare var onmessage: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null;
+declare var onmessageerror: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null;
+/** Aborts dedicatedWorkerGlobal. */
+declare function close(): void;
+/** Clones message and transmits it to the Worker object associated with dedicatedWorkerGlobal. transfer can be passed as a list of objects that are to be transferred rather than cloned. */
+declare function postMessage(message: any, transfer: Transferable[]): void;
+declare function postMessage(message: any, options?: StructuredSerializeOptions): void;
+/** Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise. */
+declare function dispatchEvent(event: Event): boolean;
+/** Returns workerGlobal's WorkerLocation object. */
+declare var location: WorkerLocation;
+/** Returns workerGlobal's WorkerNavigator object. */
+declare var navigator: WorkerNavigator;
+declare var onerror: ((this: DedicatedWorkerGlobalScope, ev: ErrorEvent) => any) | null;
+declare var onlanguagechange: ((this: DedicatedWorkerGlobalScope, ev: Event) => any) | null;
+declare var onoffline: ((this: DedicatedWorkerGlobalScope, ev: Event) => any) | null;
+declare var ononline: ((this: DedicatedWorkerGlobalScope, ev: Event) => any) | null;
+declare var onrejectionhandled: ((this: DedicatedWorkerGlobalScope, ev: PromiseRejectionEvent) => any) | null;
+declare var onunhandledrejection: ((this: DedicatedWorkerGlobalScope, ev: PromiseRejectionEvent) => any) | null;
+/** Returns workerGlobal. */
+declare var self: WorkerGlobalScope & typeof globalThis;
+/** Fetches each URL in urls, executes them one-by-one in the order they are passed, and then returns (or throws if something went amiss). */
+declare function importScripts(...urls: (string | URL)[]): void;
+/** Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise. */
+declare function dispatchEvent(event: Event): boolean;
+declare var fonts: FontFaceSet;
+/** Available only in secure contexts. */
+declare var caches: CacheStorage;
+declare var crossOriginIsolated: boolean;
+declare var crypto: Crypto;
+declare var indexedDB: IDBFactory;
+declare var isSecureContext: boolean;
+declare var origin: string;
+declare var performance: Performance;
+declare function atob(data: string): string;
+declare function btoa(data: string): string;
+declare function clearInterval(id: number | undefined): void;
+declare function clearTimeout(id: number | undefined): void;
+declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
+declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
+declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
+declare function queueMicrotask(callback: VoidFunction): void;
+declare function reportError(e: any): void;
+declare function setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
+declare function setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
+declare function structuredClone(value: any, options?: StructuredSerializeOptions): any;
+declare function cancelAnimationFrame(handle: number): void;
+declare function requestAnimationFrame(callback: FrameRequestCallback): number;
+declare function addEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+declare function removeEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+declare function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+type AlgorithmIdentifier = Algorithm | string;
+type BigInteger = Uint8Array;
+type BinaryData = ArrayBuffer | ArrayBufferView;
+type BlobPart = BufferSource | Blob | string;
+type BodyInit = ReadableStream | XMLHttpRequestBodyInit;
+type BufferSource = ArrayBufferView | ArrayBuffer;
+type CanvasImageSource = ImageBitmap | OffscreenCanvas;
+type DOMHighResTimeStamp = number;
+type EpochTimeStamp = number;
+type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
+type Float32List = Float32Array | GLfloat[];
+type FormDataEntryValue = File | string;
+type GLbitfield = number;
+type GLboolean = boolean;
+type GLclampf = number;
+type GLenum = number;
+type GLfloat = number;
+type GLint = number;
+type GLint64 = number;
+type GLintptr = number;
+type GLsizei = number;
+type GLsizeiptr = number;
+type GLuint = number;
+type GLuint64 = number;
+type HashAlgorithmIdentifier = AlgorithmIdentifier;
+type HeadersInit = [string, string][] | Record<string, string> | Headers;
+type IDBValidKey = number | string | Date | BufferSource | IDBValidKey[];
+type ImageBitmapSource = CanvasImageSource | Blob | ImageData;
+type Int32List = Int32Array | GLint[];
+type MessageEventSource = MessagePort | ServiceWorker;
+type NamedCurve = string;
+type OnErrorEventHandler = OnErrorEventHandlerNonNull | null;
+type PerformanceEntryList = PerformanceEntry[];
+type PushMessageDataInit = BufferSource | string;
+type ReadableStreamController<T> = ReadableStreamDefaultController<T>;
+type ReadableStreamReadResult<T> = ReadableStreamReadValueResult<T> | ReadableStreamReadDoneResult;
+type ReadableStreamReader<T> = ReadableStreamDefaultReader<T>;
+type RequestInfo = Request | string;
+type TexImageSource = ImageBitmap | ImageData | OffscreenCanvas;
+type TimerHandler = string | Function;
+type Transferable = ArrayBuffer | MessagePort | ImageBitmap;
+type Uint32List = Uint32Array | GLuint[];
+type VibratePattern = number | number[];
+type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string;
+type BinaryType = "arraybuffer" | "blob";
+type ClientTypes = "all" | "sharedworker" | "window" | "worker";
+type ColorGamut = "p3" | "rec2020" | "srgb";
+type ColorSpaceConversion = "default" | "none";
+type DocumentVisibilityState = "hidden" | "visible";
+type EndingType = "native" | "transparent";
+type FileSystemHandleKind = "directory" | "file";
+type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
+type FontFaceSetLoadStatus = "loaded" | "loading";
+type FrameType = "auxiliary" | "nested" | "none" | "top-level";
+type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40";
+type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique";
+type IDBRequestReadyState = "done" | "pending";
+type IDBTransactionDurability = "default" | "relaxed" | "strict";
+type IDBTransactionMode = "readonly" | "readwrite" | "versionchange";
+type ImageOrientation = "flipY" | "none";
+type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki";
+type KeyType = "private" | "public" | "secret";
+type KeyUsage = "decrypt" | "deriveBits" | "deriveKey" | "encrypt" | "sign" | "unwrapKey" | "verify" | "wrapKey";
+type LockMode = "exclusive" | "shared";
+type MediaDecodingType = "file" | "media-source" | "webrtc";
+type MediaEncodingType = "record" | "webrtc";
+type NotificationDirection = "auto" | "ltr" | "rtl";
+type NotificationPermission = "default" | "denied" | "granted";
+type PermissionName = "geolocation" | "notifications" | "persistent-storage" | "push" | "screen-wake-lock" | "xr-spatial-tracking";
+type PermissionState = "denied" | "granted" | "prompt";
+type PredefinedColorSpace = "display-p3" | "srgb";
+type PremultiplyAlpha = "default" | "none" | "premultiply";
+type PushEncryptionKeyName = "auth" | "p256dh";
+type RTCEncodedVideoFrameType = "delta" | "empty" | "key";
+type ReferrerPolicy = "" | "no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url";
+type RequestCache = "default" | "force-cache" | "no-cache" | "no-store" | "only-if-cached" | "reload";
+type RequestCredentials = "include" | "omit" | "same-origin";
+type RequestDestination = "" | "audio" | "audioworklet" | "document" | "embed" | "font" | "frame" | "iframe" | "image" | "manifest" | "object" | "paintworklet" | "report" | "script" | "sharedworker" | "style" | "track" | "video" | "worker" | "xslt";
+type RequestMode = "cors" | "navigate" | "no-cors" | "same-origin";
+type RequestRedirect = "error" | "follow" | "manual";
+type ResizeQuality = "high" | "low" | "medium" | "pixelated";
+type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect";
+type SecurityPolicyViolationEventDisposition = "enforce" | "report";
+type ServiceWorkerState = "activated" | "activating" | "installed" | "installing" | "parsed" | "redundant";
+type ServiceWorkerUpdateViaCache = "all" | "imports" | "none";
+type TransferFunction = "hlg" | "pq" | "srgb";
+type VideoColorPrimaries = "bt470bg" | "bt709" | "smpte170m";
+type VideoMatrixCoefficients = "bt470bg" | "bt709" | "rgb" | "smpte170m";
+type VideoTransferCharacteristics = "bt709" | "iec61966-2-1" | "smpte170m";
+type WebGLPowerPreference = "default" | "high-performance" | "low-power";
+type WorkerType = "classic" | "module";
+type XMLHttpRequestResponseType = "" | "arraybuffer" | "blob" | "document" | "json" | "text";
diff --git a/cli/tsc/dts/lib.webworker.importscripts.d.ts b/cli/tsc/dts/lib.webworker.importscripts.d.ts
new file mode 100644
index 000000000..73bd28166
--- /dev/null
+++ b/cli/tsc/dts/lib.webworker.importscripts.d.ts
@@ -0,0 +1,26 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+
+/////////////////////////////
+/// WorkerGlobalScope APIs
+/////////////////////////////
+// These are only available in a Web Worker
+declare function importScripts(...urls: string[]): void;
diff --git a/cli/tsc/dts/lib.webworker.iterable.d.ts b/cli/tsc/dts/lib.webworker.iterable.d.ts
new file mode 100644
index 000000000..3d9e75d00
--- /dev/null
+++ b/cli/tsc/dts/lib.webworker.iterable.d.ts
@@ -0,0 +1,167 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/////////////////////////////
+/// Worker Iterable APIs
+/////////////////////////////
+
+interface Cache {
+ addAll(requests: Iterable<RequestInfo>): Promise<void>;
+}
+
+interface DOMStringList {
+ [Symbol.iterator](): IterableIterator<string>;
+}
+
+interface FileList {
+ [Symbol.iterator](): IterableIterator<File>;
+}
+
+interface FontFaceSet extends Set<FontFace> {
+}
+
+interface FormData {
+ [Symbol.iterator](): IterableIterator<[string, FormDataEntryValue]>;
+ /** Returns an array of key, value pairs for every entry in the list. */
+ entries(): IterableIterator<[string, FormDataEntryValue]>;
+ /** Returns a list of keys in the list. */
+ keys(): IterableIterator<string>;
+ /** Returns a list of values in the list. */
+ values(): IterableIterator<FormDataEntryValue>;
+}
+
+interface Headers {
+ [Symbol.iterator](): IterableIterator<[string, string]>;
+ /** Returns an iterator allowing to go through all key/value pairs contained in this object. */
+ entries(): IterableIterator<[string, string]>;
+ /** Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. */
+ keys(): IterableIterator<string>;
+ /** Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */
+ values(): IterableIterator<string>;
+}
+
+interface IDBDatabase {
+ /** Returns a new transaction with the given mode ("readonly" or "readwrite") and scope which can be a single object store name or an array of names. */
+ transaction(storeNames: string | Iterable<string>, mode?: IDBTransactionMode, options?: IDBTransactionOptions): IDBTransaction;
+}
+
+interface IDBObjectStore {
+ /**
+ * Creates a new index in store with the given name, keyPath and options and returns a new IDBIndex. If the keyPath and options define constraints that cannot be satisfied with the data already in store the upgrade transaction will abort with a "ConstraintError" DOMException.
+ *
+ * Throws an "InvalidStateError" DOMException if not called within an upgrade transaction.
+ */
+ createIndex(name: string, keyPath: string | Iterable<string>, options?: IDBIndexParameters): IDBIndex;
+}
+
+interface MessageEvent<T = any> {
+ /** @deprecated */
+ initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable<MessagePort>): void;
+}
+
+interface SubtleCrypto {
+ deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
+ generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKeyPair>;
+ generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
+ generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKeyPair | CryptoKey>;
+ importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
+ importKey(format: Exclude<KeyFormat, "jwk">, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
+ unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
+}
+
+interface URLSearchParams {
+ [Symbol.iterator](): IterableIterator<[string, string]>;
+ /** Returns an array of key, value pairs for every entry in the search params. */
+ entries(): IterableIterator<[string, string]>;
+ /** Returns a list of keys in the search params. */
+ keys(): IterableIterator<string>;
+ /** Returns a list of values in the search params. */
+ values(): IterableIterator<string>;
+}
+
+interface WEBGL_draw_buffers {
+ drawBuffersWEBGL(buffers: Iterable<GLenum>): void;
+}
+
+interface WEBGL_multi_draw {
+ multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | Iterable<GLint>, firstsOffset: GLuint, countsList: Int32Array | Iterable<GLsizei>, countsOffset: GLuint, instanceCountsList: Int32Array | Iterable<GLsizei>, instanceCountsOffset: GLuint, drawcount: GLsizei): void;
+ multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | Iterable<GLint>, firstsOffset: GLuint, countsList: Int32Array | Iterable<GLsizei>, countsOffset: GLuint, drawcount: GLsizei): void;
+ multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | Iterable<GLint>, countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | Iterable<GLsizei>, offsetsOffset: GLuint, instanceCountsList: Int32Array | Iterable<GLsizei>, instanceCountsOffset: GLuint, drawcount: GLsizei): void;
+ multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | Iterable<GLint>, countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | Iterable<GLsizei>, offsetsOffset: GLuint, drawcount: GLsizei): void;
+}
+
+interface WebGL2RenderingContextBase {
+ clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLfloat>, srcOffset?: GLuint): void;
+ clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLint>, srcOffset?: GLuint): void;
+ clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLuint>, srcOffset?: GLuint): void;
+ drawBuffers(buffers: Iterable<GLenum>): void;
+ getActiveUniforms(program: WebGLProgram, uniformIndices: Iterable<GLuint>, pname: GLenum): any;
+ getUniformIndices(program: WebGLProgram, uniformNames: Iterable<string>): Iterable<GLuint> | null;
+ invalidateFramebuffer(target: GLenum, attachments: Iterable<GLenum>): void;
+ invalidateSubFramebuffer(target: GLenum, attachments: Iterable<GLenum>, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
+ transformFeedbackVaryings(program: WebGLProgram, varyings: Iterable<string>, bufferMode: GLenum): void;
+ uniform1uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform2uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform3uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform4uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ vertexAttribI4iv(index: GLuint, values: Iterable<GLint>): void;
+ vertexAttribI4uiv(index: GLuint, values: Iterable<GLuint>): void;
+}
+
+interface WebGL2RenderingContextOverloads {
+ uniform1fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform1iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform2fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform2iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform3fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform3iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform4fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform4iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
+}
+
+interface WebGLRenderingContextBase {
+ vertexAttrib1fv(index: GLuint, values: Iterable<GLfloat>): void;
+ vertexAttrib2fv(index: GLuint, values: Iterable<GLfloat>): void;
+ vertexAttrib3fv(index: GLuint, values: Iterable<GLfloat>): void;
+ vertexAttrib4fv(index: GLuint, values: Iterable<GLfloat>): void;
+}
+
+interface WebGLRenderingContextOverloads {
+ uniform1fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void;
+ uniform1iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void;
+ uniform2fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void;
+ uniform2iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void;
+ uniform3fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void;
+ uniform3iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void;
+ uniform4fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void;
+ uniform4iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void;
+ uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable<GLfloat>): void;
+ uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable<GLfloat>): void;
+ uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable<GLfloat>): void;
+}
diff --git a/cli/tsc/dts/typescript.d.ts b/cli/tsc/dts/typescript.d.ts
new file mode 100644
index 000000000..0fd60ae88
--- /dev/null
+++ b/cli/tsc/dts/typescript.d.ts
@@ -0,0 +1,8118 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+declare namespace ts {
+ const versionMajorMinor = "4.8";
+ /** The version of the TypeScript compiler release */
+ const version: string;
+ /**
+ * Type of objects whose values are all of the same type.
+ * The `in` and `for-in` operators can *not* be safely used,
+ * since `Object.prototype` may be modified by outside code.
+ */
+ interface MapLike<T> {
+ [index: string]: T;
+ }
+ interface SortedReadonlyArray<T> extends ReadonlyArray<T> {
+ " __sortedArrayBrand": any;
+ }
+ interface SortedArray<T> extends Array<T> {
+ " __sortedArrayBrand": any;
+ }
+ /** Common read methods for ES6 Map/Set. */
+ interface ReadonlyCollection<K> {
+ readonly size: number;
+ has(key: K): boolean;
+ keys(): Iterator<K>;
+ }
+ /** Common write methods for ES6 Map/Set. */
+ interface Collection<K> extends ReadonlyCollection<K> {
+ delete(key: K): boolean;
+ clear(): void;
+ }
+ /** ES6 Map interface, only read methods included. */
+ interface ReadonlyESMap<K, V> extends ReadonlyCollection<K> {
+ get(key: K): V | undefined;
+ values(): Iterator<V>;
+ entries(): Iterator<[K, V]>;
+ forEach(action: (value: V, key: K) => void): void;
+ }
+ /**
+ * ES6 Map interface, only read methods included.
+ */
+ interface ReadonlyMap<T> extends ReadonlyESMap<string, T> {
+ }
+ /** ES6 Map interface. */
+ interface ESMap<K, V> extends ReadonlyESMap<K, V>, Collection<K> {
+ set(key: K, value: V): this;
+ }
+ /**
+ * ES6 Map interface.
+ */
+ interface Map<T> extends ESMap<string, T> {
+ }
+ /** ES6 Set interface, only read methods included. */
+ interface ReadonlySet<T> extends ReadonlyCollection<T> {
+ has(value: T): boolean;
+ values(): Iterator<T>;
+ entries(): Iterator<[T, T]>;
+ forEach(action: (value: T, key: T) => void): void;
+ }
+ /** ES6 Set interface. */
+ interface Set<T> extends ReadonlySet<T>, Collection<T> {
+ add(value: T): this;
+ delete(value: T): boolean;
+ }
+ /** ES6 Iterator type. */
+ interface Iterator<T> {
+ next(): {
+ value: T;
+ done?: false;
+ } | {
+ value: void;
+ done: true;
+ };
+ }
+ /** Array that is only intended to be pushed to, never read. */
+ interface Push<T> {
+ push(...values: T[]): void;
+ }
+}
+declare namespace ts {
+ export type Path = string & {
+ __pathBrand: any;
+ };
+ export interface TextRange {
+ pos: number;
+ end: number;
+ }
+ export interface ReadonlyTextRange {
+ readonly pos: number;
+ readonly end: number;
+ }
+ export enum SyntaxKind {
+ Unknown = 0,
+ EndOfFileToken = 1,
+ SingleLineCommentTrivia = 2,
+ MultiLineCommentTrivia = 3,
+ NewLineTrivia = 4,
+ WhitespaceTrivia = 5,
+ ShebangTrivia = 6,
+ ConflictMarkerTrivia = 7,
+ NumericLiteral = 8,
+ BigIntLiteral = 9,
+ StringLiteral = 10,
+ JsxText = 11,
+ JsxTextAllWhiteSpaces = 12,
+ RegularExpressionLiteral = 13,
+ NoSubstitutionTemplateLiteral = 14,
+ TemplateHead = 15,
+ TemplateMiddle = 16,
+ TemplateTail = 17,
+ OpenBraceToken = 18,
+ CloseBraceToken = 19,
+ OpenParenToken = 20,
+ CloseParenToken = 21,
+ OpenBracketToken = 22,
+ CloseBracketToken = 23,
+ DotToken = 24,
+ DotDotDotToken = 25,
+ SemicolonToken = 26,
+ CommaToken = 27,
+ QuestionDotToken = 28,
+ LessThanToken = 29,
+ LessThanSlashToken = 30,
+ GreaterThanToken = 31,
+ LessThanEqualsToken = 32,
+ GreaterThanEqualsToken = 33,
+ EqualsEqualsToken = 34,
+ ExclamationEqualsToken = 35,
+ EqualsEqualsEqualsToken = 36,
+ ExclamationEqualsEqualsToken = 37,
+ EqualsGreaterThanToken = 38,
+ PlusToken = 39,
+ MinusToken = 40,
+ AsteriskToken = 41,
+ AsteriskAsteriskToken = 42,
+ SlashToken = 43,
+ PercentToken = 44,
+ PlusPlusToken = 45,
+ MinusMinusToken = 46,
+ LessThanLessThanToken = 47,
+ GreaterThanGreaterThanToken = 48,
+ GreaterThanGreaterThanGreaterThanToken = 49,
+ AmpersandToken = 50,
+ BarToken = 51,
+ CaretToken = 52,
+ ExclamationToken = 53,
+ TildeToken = 54,
+ AmpersandAmpersandToken = 55,
+ BarBarToken = 56,
+ QuestionToken = 57,
+ ColonToken = 58,
+ AtToken = 59,
+ QuestionQuestionToken = 60,
+ /** Only the JSDoc scanner produces BacktickToken. The normal scanner produces NoSubstitutionTemplateLiteral and related kinds. */
+ BacktickToken = 61,
+ /** Only the JSDoc scanner produces HashToken. The normal scanner produces PrivateIdentifier. */
+ HashToken = 62,
+ EqualsToken = 63,
+ PlusEqualsToken = 64,
+ MinusEqualsToken = 65,
+ AsteriskEqualsToken = 66,
+ AsteriskAsteriskEqualsToken = 67,
+ SlashEqualsToken = 68,
+ PercentEqualsToken = 69,
+ LessThanLessThanEqualsToken = 70,
+ GreaterThanGreaterThanEqualsToken = 71,
+ GreaterThanGreaterThanGreaterThanEqualsToken = 72,
+ AmpersandEqualsToken = 73,
+ BarEqualsToken = 74,
+ BarBarEqualsToken = 75,
+ AmpersandAmpersandEqualsToken = 76,
+ QuestionQuestionEqualsToken = 77,
+ CaretEqualsToken = 78,
+ Identifier = 79,
+ PrivateIdentifier = 80,
+ BreakKeyword = 81,
+ CaseKeyword = 82,
+ CatchKeyword = 83,
+ ClassKeyword = 84,
+ ConstKeyword = 85,
+ ContinueKeyword = 86,
+ DebuggerKeyword = 87,
+ DefaultKeyword = 88,
+ DeleteKeyword = 89,
+ DoKeyword = 90,
+ ElseKeyword = 91,
+ EnumKeyword = 92,
+ ExportKeyword = 93,
+ ExtendsKeyword = 94,
+ FalseKeyword = 95,
+ FinallyKeyword = 96,
+ ForKeyword = 97,
+ FunctionKeyword = 98,
+ IfKeyword = 99,
+ ImportKeyword = 100,
+ InKeyword = 101,
+ InstanceOfKeyword = 102,
+ NewKeyword = 103,
+ NullKeyword = 104,
+ ReturnKeyword = 105,
+ SuperKeyword = 106,
+ SwitchKeyword = 107,
+ ThisKeyword = 108,
+ ThrowKeyword = 109,
+ TrueKeyword = 110,
+ TryKeyword = 111,
+ TypeOfKeyword = 112,
+ VarKeyword = 113,
+ VoidKeyword = 114,
+ WhileKeyword = 115,
+ WithKeyword = 116,
+ ImplementsKeyword = 117,
+ InterfaceKeyword = 118,
+ LetKeyword = 119,
+ PackageKeyword = 120,
+ PrivateKeyword = 121,
+ ProtectedKeyword = 122,
+ PublicKeyword = 123,
+ StaticKeyword = 124,
+ YieldKeyword = 125,
+ AbstractKeyword = 126,
+ AsKeyword = 127,
+ AssertsKeyword = 128,
+ AssertKeyword = 129,
+ AnyKeyword = 130,
+ AsyncKeyword = 131,
+ AwaitKeyword = 132,
+ BooleanKeyword = 133,
+ ConstructorKeyword = 134,
+ DeclareKeyword = 135,
+ GetKeyword = 136,
+ InferKeyword = 137,
+ IntrinsicKeyword = 138,
+ IsKeyword = 139,
+ KeyOfKeyword = 140,
+ ModuleKeyword = 141,
+ NamespaceKeyword = 142,
+ NeverKeyword = 143,
+ OutKeyword = 144,
+ ReadonlyKeyword = 145,
+ RequireKeyword = 146,
+ NumberKeyword = 147,
+ ObjectKeyword = 148,
+ SetKeyword = 149,
+ StringKeyword = 150,
+ SymbolKeyword = 151,
+ TypeKeyword = 152,
+ UndefinedKeyword = 153,
+ UniqueKeyword = 154,
+ UnknownKeyword = 155,
+ FromKeyword = 156,
+ GlobalKeyword = 157,
+ BigIntKeyword = 158,
+ OverrideKeyword = 159,
+ OfKeyword = 160,
+ QualifiedName = 161,
+ ComputedPropertyName = 162,
+ TypeParameter = 163,
+ Parameter = 164,
+ Decorator = 165,
+ PropertySignature = 166,
+ PropertyDeclaration = 167,
+ MethodSignature = 168,
+ MethodDeclaration = 169,
+ ClassStaticBlockDeclaration = 170,
+ Constructor = 171,
+ GetAccessor = 172,
+ SetAccessor = 173,
+ CallSignature = 174,
+ ConstructSignature = 175,
+ IndexSignature = 176,
+ TypePredicate = 177,
+ TypeReference = 178,
+ FunctionType = 179,
+ ConstructorType = 180,
+ TypeQuery = 181,
+ TypeLiteral = 182,
+ ArrayType = 183,
+ TupleType = 184,
+ OptionalType = 185,
+ RestType = 186,
+ UnionType = 187,
+ IntersectionType = 188,
+ ConditionalType = 189,
+ InferType = 190,
+ ParenthesizedType = 191,
+ ThisType = 192,
+ TypeOperator = 193,
+ IndexedAccessType = 194,
+ MappedType = 195,
+ LiteralType = 196,
+ NamedTupleMember = 197,
+ TemplateLiteralType = 198,
+ TemplateLiteralTypeSpan = 199,
+ ImportType = 200,
+ ObjectBindingPattern = 201,
+ ArrayBindingPattern = 202,
+ BindingElement = 203,
+ ArrayLiteralExpression = 204,
+ ObjectLiteralExpression = 205,
+ PropertyAccessExpression = 206,
+ ElementAccessExpression = 207,
+ CallExpression = 208,
+ NewExpression = 209,
+ TaggedTemplateExpression = 210,
+ TypeAssertionExpression = 211,
+ ParenthesizedExpression = 212,
+ FunctionExpression = 213,
+ ArrowFunction = 214,
+ DeleteExpression = 215,
+ TypeOfExpression = 216,
+ VoidExpression = 217,
+ AwaitExpression = 218,
+ PrefixUnaryExpression = 219,
+ PostfixUnaryExpression = 220,
+ BinaryExpression = 221,
+ ConditionalExpression = 222,
+ TemplateExpression = 223,
+ YieldExpression = 224,
+ SpreadElement = 225,
+ ClassExpression = 226,
+ OmittedExpression = 227,
+ ExpressionWithTypeArguments = 228,
+ AsExpression = 229,
+ NonNullExpression = 230,
+ MetaProperty = 231,
+ SyntheticExpression = 232,
+ TemplateSpan = 233,
+ SemicolonClassElement = 234,
+ Block = 235,
+ EmptyStatement = 236,
+ VariableStatement = 237,
+ ExpressionStatement = 238,
+ IfStatement = 239,
+ DoStatement = 240,
+ WhileStatement = 241,
+ ForStatement = 242,
+ ForInStatement = 243,
+ ForOfStatement = 244,
+ ContinueStatement = 245,
+ BreakStatement = 246,
+ ReturnStatement = 247,
+ WithStatement = 248,
+ SwitchStatement = 249,
+ LabeledStatement = 250,
+ ThrowStatement = 251,
+ TryStatement = 252,
+ DebuggerStatement = 253,
+ VariableDeclaration = 254,
+ VariableDeclarationList = 255,
+ FunctionDeclaration = 256,
+ ClassDeclaration = 257,
+ InterfaceDeclaration = 258,
+ TypeAliasDeclaration = 259,
+ EnumDeclaration = 260,
+ ModuleDeclaration = 261,
+ ModuleBlock = 262,
+ CaseBlock = 263,
+ NamespaceExportDeclaration = 264,
+ ImportEqualsDeclaration = 265,
+ ImportDeclaration = 266,
+ ImportClause = 267,
+ NamespaceImport = 268,
+ NamedImports = 269,
+ ImportSpecifier = 270,
+ ExportAssignment = 271,
+ ExportDeclaration = 272,
+ NamedExports = 273,
+ NamespaceExport = 274,
+ ExportSpecifier = 275,
+ MissingDeclaration = 276,
+ ExternalModuleReference = 277,
+ JsxElement = 278,
+ JsxSelfClosingElement = 279,
+ JsxOpeningElement = 280,
+ JsxClosingElement = 281,
+ JsxFragment = 282,
+ JsxOpeningFragment = 283,
+ JsxClosingFragment = 284,
+ JsxAttribute = 285,
+ JsxAttributes = 286,
+ JsxSpreadAttribute = 287,
+ JsxExpression = 288,
+ CaseClause = 289,
+ DefaultClause = 290,
+ HeritageClause = 291,
+ CatchClause = 292,
+ AssertClause = 293,
+ AssertEntry = 294,
+ ImportTypeAssertionContainer = 295,
+ PropertyAssignment = 296,
+ ShorthandPropertyAssignment = 297,
+ SpreadAssignment = 298,
+ EnumMember = 299,
+ UnparsedPrologue = 300,
+ UnparsedPrepend = 301,
+ UnparsedText = 302,
+ UnparsedInternalText = 303,
+ UnparsedSyntheticReference = 304,
+ SourceFile = 305,
+ Bundle = 306,
+ UnparsedSource = 307,
+ InputFiles = 308,
+ JSDocTypeExpression = 309,
+ JSDocNameReference = 310,
+ JSDocMemberName = 311,
+ JSDocAllType = 312,
+ JSDocUnknownType = 313,
+ JSDocNullableType = 314,
+ JSDocNonNullableType = 315,
+ JSDocOptionalType = 316,
+ JSDocFunctionType = 317,
+ JSDocVariadicType = 318,
+ JSDocNamepathType = 319,
+ JSDoc = 320,
+ /** @deprecated Use SyntaxKind.JSDoc */
+ JSDocComment = 320,
+ JSDocText = 321,
+ JSDocTypeLiteral = 322,
+ JSDocSignature = 323,
+ JSDocLink = 324,
+ JSDocLinkCode = 325,
+ JSDocLinkPlain = 326,
+ JSDocTag = 327,
+ JSDocAugmentsTag = 328,
+ JSDocImplementsTag = 329,
+ JSDocAuthorTag = 330,
+ JSDocDeprecatedTag = 331,
+ JSDocClassTag = 332,
+ JSDocPublicTag = 333,
+ JSDocPrivateTag = 334,
+ JSDocProtectedTag = 335,
+ JSDocReadonlyTag = 336,
+ JSDocOverrideTag = 337,
+ JSDocCallbackTag = 338,
+ JSDocEnumTag = 339,
+ JSDocParameterTag = 340,
+ JSDocReturnTag = 341,
+ JSDocThisTag = 342,
+ JSDocTypeTag = 343,
+ JSDocTemplateTag = 344,
+ JSDocTypedefTag = 345,
+ JSDocSeeTag = 346,
+ JSDocPropertyTag = 347,
+ SyntaxList = 348,
+ NotEmittedStatement = 349,
+ PartiallyEmittedExpression = 350,
+ CommaListExpression = 351,
+ MergeDeclarationMarker = 352,
+ EndOfDeclarationMarker = 353,
+ SyntheticReferenceExpression = 354,
+ Count = 355,
+ FirstAssignment = 63,
+ LastAssignment = 78,
+ FirstCompoundAssignment = 64,
+ LastCompoundAssignment = 78,
+ FirstReservedWord = 81,
+ LastReservedWord = 116,
+ FirstKeyword = 81,
+ LastKeyword = 160,
+ FirstFutureReservedWord = 117,
+ LastFutureReservedWord = 125,
+ FirstTypeNode = 177,
+ LastTypeNode = 200,
+ FirstPunctuation = 18,
+ LastPunctuation = 78,
+ FirstToken = 0,
+ LastToken = 160,
+ FirstTriviaToken = 2,
+ LastTriviaToken = 7,
+ FirstLiteralToken = 8,
+ LastLiteralToken = 14,
+ FirstTemplateToken = 14,
+ LastTemplateToken = 17,
+ FirstBinaryOperator = 29,
+ LastBinaryOperator = 78,
+ FirstStatement = 237,
+ LastStatement = 253,
+ FirstNode = 161,
+ FirstJSDocNode = 309,
+ LastJSDocNode = 347,
+ FirstJSDocTagNode = 327,
+ LastJSDocTagNode = 347,
+ }
+ export type TriviaSyntaxKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia;
+ export type LiteralSyntaxKind = SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral;
+ export type PseudoLiteralSyntaxKind = SyntaxKind.TemplateHead | SyntaxKind.TemplateMiddle | SyntaxKind.TemplateTail;
+ export type PunctuationSyntaxKind = SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.OpenParenToken | SyntaxKind.CloseParenToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.DotToken | SyntaxKind.DotDotDotToken | SyntaxKind.SemicolonToken | SyntaxKind.CommaToken | SyntaxKind.QuestionDotToken | SyntaxKind.LessThanToken | SyntaxKind.LessThanSlashToken | SyntaxKind.GreaterThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.EqualsEqualsToken | SyntaxKind.ExclamationEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.EqualsGreaterThanToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.AsteriskToken | SyntaxKind.AsteriskAsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken | SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken | SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken | SyntaxKind.ExclamationToken | SyntaxKind.TildeToken | SyntaxKind.AmpersandAmpersandToken | SyntaxKind.BarBarToken | SyntaxKind.QuestionQuestionToken | SyntaxKind.QuestionToken | SyntaxKind.ColonToken | SyntaxKind.AtToken | SyntaxKind.BacktickToken | SyntaxKind.HashToken | SyntaxKind.EqualsToken | SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.CaretEqualsToken;
+ export type KeywordSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsKeyword | SyntaxKind.AssertsKeyword | SyntaxKind.AssertKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FromKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.GetKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InferKeyword | SyntaxKind.InKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.LetKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.OfKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.OutKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.RequireKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SetKeyword | SyntaxKind.StaticKeyword | SyntaxKind.StringKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.YieldKeyword;
+ export type ModifierSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.ConstKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.ExportKeyword | SyntaxKind.InKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.OutKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.StaticKeyword;
+ export type KeywordTypeSyntaxKind = SyntaxKind.AnyKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VoidKeyword;
+ export type TokenSyntaxKind = SyntaxKind.Unknown | SyntaxKind.EndOfFileToken | TriviaSyntaxKind | LiteralSyntaxKind | PseudoLiteralSyntaxKind | PunctuationSyntaxKind | SyntaxKind.Identifier | KeywordSyntaxKind;
+ export type JsxTokenSyntaxKind = SyntaxKind.LessThanSlashToken | SyntaxKind.EndOfFileToken | SyntaxKind.ConflictMarkerTrivia | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.OpenBraceToken | SyntaxKind.LessThanToken;
+ export type JSDocSyntaxKind = SyntaxKind.EndOfFileToken | SyntaxKind.WhitespaceTrivia | SyntaxKind.AtToken | SyntaxKind.NewLineTrivia | SyntaxKind.AsteriskToken | SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.LessThanToken | SyntaxKind.GreaterThanToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.EqualsToken | SyntaxKind.CommaToken | SyntaxKind.DotToken | SyntaxKind.Identifier | SyntaxKind.BacktickToken | SyntaxKind.HashToken | SyntaxKind.Unknown | KeywordSyntaxKind;
+ export enum NodeFlags {
+ None = 0,
+ Let = 1,
+ Const = 2,
+ NestedNamespace = 4,
+ Synthesized = 8,
+ Namespace = 16,
+ OptionalChain = 32,
+ ExportContext = 64,
+ ContainsThis = 128,
+ HasImplicitReturn = 256,
+ HasExplicitReturn = 512,
+ GlobalAugmentation = 1024,
+ HasAsyncFunctions = 2048,
+ DisallowInContext = 4096,
+ YieldContext = 8192,
+ DecoratorContext = 16384,
+ AwaitContext = 32768,
+ DisallowConditionalTypesContext = 65536,
+ ThisNodeHasError = 131072,
+ JavaScriptFile = 262144,
+ ThisNodeOrAnySubNodesHasError = 524288,
+ HasAggregatedChildData = 1048576,
+ JSDoc = 8388608,
+ JsonFile = 67108864,
+ BlockScoped = 3,
+ ReachabilityCheckFlags = 768,
+ ReachabilityAndEmitFlags = 2816,
+ ContextFlags = 50720768,
+ TypeExcludesFlags = 40960,
+ }
+ export enum ModifierFlags {
+ None = 0,
+ Export = 1,
+ Ambient = 2,
+ Public = 4,
+ Private = 8,
+ Protected = 16,
+ Static = 32,
+ Readonly = 64,
+ Abstract = 128,
+ Async = 256,
+ Default = 512,
+ Const = 2048,
+ HasComputedJSDocModifiers = 4096,
+ Deprecated = 8192,
+ Override = 16384,
+ In = 32768,
+ Out = 65536,
+ Decorator = 131072,
+ HasComputedFlags = 536870912,
+ AccessibilityModifier = 28,
+ ParameterPropertyModifier = 16476,
+ NonPublicAccessibilityModifier = 24,
+ TypeScriptModifier = 116958,
+ ExportDefault = 513,
+ All = 257023,
+ Modifier = 125951
+ }
+ export enum JsxFlags {
+ None = 0,
+ /** An element from a named property of the JSX.IntrinsicElements interface */
+ IntrinsicNamedElement = 1,
+ /** An element inferred from the string index signature of the JSX.IntrinsicElements interface */
+ IntrinsicIndexedElement = 2,
+ IntrinsicElement = 3
+ }
+ export interface Node extends ReadonlyTextRange {
+ readonly kind: SyntaxKind;
+ readonly flags: NodeFlags;
+ readonly parent: Node;
+ }
+ export interface JSDocContainer {
+ }
+ export type HasJSDoc = ParameterDeclaration | CallSignatureDeclaration | ClassStaticBlockDeclaration | ConstructSignatureDeclaration | MethodSignature | PropertySignature | ArrowFunction | ParenthesizedExpression | SpreadAssignment | ShorthandPropertyAssignment | PropertyAssignment | FunctionExpression | EmptyStatement | DebuggerStatement | Block | VariableStatement | ExpressionStatement | IfStatement | DoStatement | WhileStatement | ForStatement | ForInStatement | ForOfStatement | BreakStatement | ContinueStatement | ReturnStatement | WithStatement | SwitchStatement | LabeledStatement | ThrowStatement | TryStatement | FunctionDeclaration | ConstructorDeclaration | MethodDeclaration | VariableDeclaration | PropertyDeclaration | AccessorDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumMember | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | NamespaceExportDeclaration | ExportAssignment | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | ExportDeclaration | NamedTupleMember | ExportSpecifier | CaseClause | EndOfFileToken;
+ export type HasType = SignatureDeclaration | VariableDeclaration | ParameterDeclaration | PropertySignature | PropertyDeclaration | TypePredicateNode | ParenthesizedTypeNode | TypeOperatorNode | MappedTypeNode | AssertionExpression | TypeAliasDeclaration | JSDocTypeExpression | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocVariadicType;
+ export type HasTypeArguments = CallExpression | NewExpression | TaggedTemplateExpression | JsxOpeningElement | JsxSelfClosingElement;
+ export type HasInitializer = HasExpressionInitializer | ForStatement | ForInStatement | ForOfStatement | JsxAttribute;
+ export type HasExpressionInitializer = VariableDeclaration | ParameterDeclaration | BindingElement | PropertyDeclaration | PropertyAssignment | EnumMember;
+ export type HasDecorators = ParameterDeclaration | PropertyDeclaration | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | ClassExpression | ClassDeclaration;
+ export type HasModifiers = TypeParameterDeclaration | ParameterDeclaration | ConstructorTypeNode | PropertySignature | PropertyDeclaration | MethodSignature | MethodDeclaration | ConstructorDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | IndexSignatureDeclaration | FunctionExpression | ArrowFunction | ClassExpression | VariableStatement | FunctionDeclaration | ClassDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | ExportAssignment | ExportDeclaration;
+ export interface NodeArray<T extends Node> extends ReadonlyArray<T>, ReadonlyTextRange {
+ readonly hasTrailingComma: boolean;
+ }
+ export interface Token<TKind extends SyntaxKind> extends Node {
+ readonly kind: TKind;
+ }
+ export type EndOfFileToken = Token<SyntaxKind.EndOfFileToken> & JSDocContainer;
+ export interface PunctuationToken<TKind extends PunctuationSyntaxKind> extends Token<TKind> {
+ }
+ export type DotToken = PunctuationToken<SyntaxKind.DotToken>;
+ export type DotDotDotToken = PunctuationToken<SyntaxKind.DotDotDotToken>;
+ export type QuestionToken = PunctuationToken<SyntaxKind.QuestionToken>;
+ export type ExclamationToken = PunctuationToken<SyntaxKind.ExclamationToken>;
+ export type ColonToken = PunctuationToken<SyntaxKind.ColonToken>;
+ export type EqualsToken = PunctuationToken<SyntaxKind.EqualsToken>;
+ export type AsteriskToken = PunctuationToken<SyntaxKind.AsteriskToken>;
+ export type EqualsGreaterThanToken = PunctuationToken<SyntaxKind.EqualsGreaterThanToken>;
+ export type PlusToken = PunctuationToken<SyntaxKind.PlusToken>;
+ export type MinusToken = PunctuationToken<SyntaxKind.MinusToken>;
+ export type QuestionDotToken = PunctuationToken<SyntaxKind.QuestionDotToken>;
+ export interface KeywordToken<TKind extends KeywordSyntaxKind> extends Token<TKind> {
+ }
+ export type AssertsKeyword = KeywordToken<SyntaxKind.AssertsKeyword>;
+ export type AssertKeyword = KeywordToken<SyntaxKind.AssertKeyword>;
+ export type AwaitKeyword = KeywordToken<SyntaxKind.AwaitKeyword>;
+ /** @deprecated Use `AwaitKeyword` instead. */
+ export type AwaitKeywordToken = AwaitKeyword;
+ /** @deprecated Use `AssertsKeyword` instead. */
+ export type AssertsToken = AssertsKeyword;
+ export interface ModifierToken<TKind extends ModifierSyntaxKind> extends KeywordToken<TKind> {
+ }
+ export type AbstractKeyword = ModifierToken<SyntaxKind.AbstractKeyword>;
+ export type AsyncKeyword = ModifierToken<SyntaxKind.AsyncKeyword>;
+ export type ConstKeyword = ModifierToken<SyntaxKind.ConstKeyword>;
+ export type DeclareKeyword = ModifierToken<SyntaxKind.DeclareKeyword>;
+ export type DefaultKeyword = ModifierToken<SyntaxKind.DefaultKeyword>;
+ export type ExportKeyword = ModifierToken<SyntaxKind.ExportKeyword>;
+ export type InKeyword = ModifierToken<SyntaxKind.InKeyword>;
+ export type PrivateKeyword = ModifierToken<SyntaxKind.PrivateKeyword>;
+ export type ProtectedKeyword = ModifierToken<SyntaxKind.ProtectedKeyword>;
+ export type PublicKeyword = ModifierToken<SyntaxKind.PublicKeyword>;
+ export type ReadonlyKeyword = ModifierToken<SyntaxKind.ReadonlyKeyword>;
+ export type OutKeyword = ModifierToken<SyntaxKind.OutKeyword>;
+ export type OverrideKeyword = ModifierToken<SyntaxKind.OverrideKeyword>;
+ export type StaticKeyword = ModifierToken<SyntaxKind.StaticKeyword>;
+ /** @deprecated Use `ReadonlyKeyword` instead. */
+ export type ReadonlyToken = ReadonlyKeyword;
+ export type Modifier = AbstractKeyword | AsyncKeyword | ConstKeyword | DeclareKeyword | DefaultKeyword | ExportKeyword | InKeyword | PrivateKeyword | ProtectedKeyword | PublicKeyword | OutKeyword | OverrideKeyword | ReadonlyKeyword | StaticKeyword;
+ export type ModifierLike = Modifier | Decorator;
+ export type AccessibilityModifier = PublicKeyword | PrivateKeyword | ProtectedKeyword;
+ export type ParameterPropertyModifier = AccessibilityModifier | ReadonlyKeyword;
+ export type ClassMemberModifier = AccessibilityModifier | ReadonlyKeyword | StaticKeyword;
+ export type ModifiersArray = NodeArray<Modifier>;
+ export enum GeneratedIdentifierFlags {
+ None = 0,
+ ReservedInNestedScopes = 8,
+ Optimistic = 16,
+ FileLevel = 32,
+ AllowNameSubstitution = 64
+ }
+ export interface Identifier extends PrimaryExpression, Declaration {
+ readonly kind: SyntaxKind.Identifier;
+ /**
+ * Prefer to use `id.unescapedText`. (Note: This is available only in services, not internally to the TypeScript compiler.)
+ * Text of identifier, but if the identifier begins with two underscores, this will begin with three.
+ */
+ readonly escapedText: __String;
+ readonly originalKeywordKind?: SyntaxKind;
+ isInJSDocNamespace?: boolean;
+ }
+ export interface TransientIdentifier extends Identifier {
+ resolvedSymbol: Symbol;
+ }
+ export interface QualifiedName extends Node {
+ readonly kind: SyntaxKind.QualifiedName;
+ readonly left: EntityName;
+ readonly right: Identifier;
+ }
+ export type EntityName = Identifier | QualifiedName;
+ export type PropertyName = Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier;
+ export type MemberName = Identifier | PrivateIdentifier;
+ export type DeclarationName = Identifier | PrivateIdentifier | StringLiteralLike | NumericLiteral | ComputedPropertyName | ElementAccessExpression | BindingPattern | EntityNameExpression;
+ export interface Declaration extends Node {
+ _declarationBrand: any;
+ }
+ export interface NamedDeclaration extends Declaration {
+ readonly name?: DeclarationName;
+ }
+ export interface DeclarationStatement extends NamedDeclaration, Statement {
+ readonly name?: Identifier | StringLiteral | NumericLiteral;
+ }
+ export interface ComputedPropertyName extends Node {
+ readonly kind: SyntaxKind.ComputedPropertyName;
+ readonly parent: Declaration;
+ readonly expression: Expression;
+ }
+ export interface PrivateIdentifier extends PrimaryExpression {
+ readonly kind: SyntaxKind.PrivateIdentifier;
+ readonly escapedText: __String;
+ }
+ export interface Decorator extends Node {
+ readonly kind: SyntaxKind.Decorator;
+ readonly parent: NamedDeclaration;
+ readonly expression: LeftHandSideExpression;
+ }
+ export interface TypeParameterDeclaration extends NamedDeclaration {
+ readonly kind: SyntaxKind.TypeParameter;
+ readonly parent: DeclarationWithTypeParameterChildren | InferTypeNode;
+ readonly modifiers?: NodeArray<Modifier>;
+ readonly name: Identifier;
+ /** Note: Consider calling `getEffectiveConstraintOfTypeParameter` */
+ readonly constraint?: TypeNode;
+ readonly default?: TypeNode;
+ expression?: Expression;
+ }
+ export interface SignatureDeclarationBase extends NamedDeclaration, JSDocContainer {
+ readonly kind: SignatureDeclaration["kind"];
+ readonly name?: PropertyName;
+ readonly typeParameters?: NodeArray<TypeParameterDeclaration> | undefined;
+ readonly parameters: NodeArray<ParameterDeclaration>;
+ readonly type?: TypeNode | undefined;
+ }
+ export type SignatureDeclaration = CallSignatureDeclaration | ConstructSignatureDeclaration | MethodSignature | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | FunctionDeclaration | MethodDeclaration | ConstructorDeclaration | AccessorDeclaration | FunctionExpression | ArrowFunction;
+ export interface CallSignatureDeclaration extends SignatureDeclarationBase, TypeElement {
+ readonly kind: SyntaxKind.CallSignature;
+ }
+ export interface ConstructSignatureDeclaration extends SignatureDeclarationBase, TypeElement {
+ readonly kind: SyntaxKind.ConstructSignature;
+ }
+ export type BindingName = Identifier | BindingPattern;
+ export interface VariableDeclaration extends NamedDeclaration, JSDocContainer {
+ readonly kind: SyntaxKind.VariableDeclaration;
+ readonly parent: VariableDeclarationList | CatchClause;
+ readonly name: BindingName;
+ readonly exclamationToken?: ExclamationToken;
+ readonly type?: TypeNode;
+ readonly initializer?: Expression;
+ }
+ export interface VariableDeclarationList extends Node {
+ readonly kind: SyntaxKind.VariableDeclarationList;
+ readonly parent: VariableStatement | ForStatement | ForOfStatement | ForInStatement;
+ readonly declarations: NodeArray<VariableDeclaration>;
+ }
+ export interface ParameterDeclaration extends NamedDeclaration, JSDocContainer {
+ readonly kind: SyntaxKind.Parameter;
+ readonly parent: SignatureDeclaration;
+ readonly modifiers?: NodeArray<ModifierLike>;
+ readonly dotDotDotToken?: DotDotDotToken;
+ readonly name: BindingName;
+ readonly questionToken?: QuestionToken;
+ readonly type?: TypeNode;
+ readonly initializer?: Expression;
+ }
+ export interface BindingElement extends NamedDeclaration {
+ readonly kind: SyntaxKind.BindingElement;
+ readonly parent: BindingPattern;
+ readonly propertyName?: PropertyName;
+ readonly dotDotDotToken?: DotDotDotToken;
+ readonly name: BindingName;
+ readonly initializer?: Expression;
+ }
+ export interface PropertySignature extends TypeElement, JSDocContainer {
+ readonly kind: SyntaxKind.PropertySignature;
+ readonly modifiers?: NodeArray<Modifier>;
+ readonly name: PropertyName;
+ readonly questionToken?: QuestionToken;
+ readonly type?: TypeNode;
+ }
+ export interface PropertyDeclaration extends ClassElement, JSDocContainer {
+ readonly kind: SyntaxKind.PropertyDeclaration;
+ readonly parent: ClassLikeDeclaration;
+ readonly modifiers?: NodeArray<ModifierLike>;
+ readonly name: PropertyName;
+ readonly questionToken?: QuestionToken;
+ readonly exclamationToken?: ExclamationToken;
+ readonly type?: TypeNode;
+ readonly initializer?: Expression;
+ }
+ export interface ObjectLiteralElement extends NamedDeclaration {
+ _objectLiteralBrand: any;
+ readonly name?: PropertyName;
+ }
+ /** Unlike ObjectLiteralElement, excludes JSXAttribute and JSXSpreadAttribute. */
+ export type ObjectLiteralElementLike = PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment | MethodDeclaration | AccessorDeclaration;
+ export interface PropertyAssignment extends ObjectLiteralElement, JSDocContainer {
+ readonly kind: SyntaxKind.PropertyAssignment;
+ readonly parent: ObjectLiteralExpression;
+ readonly name: PropertyName;
+ readonly initializer: Expression;
+ }
+ export interface ShorthandPropertyAssignment extends ObjectLiteralElement, JSDocContainer {
+ readonly kind: SyntaxKind.ShorthandPropertyAssignment;
+ readonly parent: ObjectLiteralExpression;
+ readonly name: Identifier;
+ readonly equalsToken?: EqualsToken;
+ readonly objectAssignmentInitializer?: Expression;
+ }
+ export interface SpreadAssignment extends ObjectLiteralElement, JSDocContainer {
+ readonly kind: SyntaxKind.SpreadAssignment;
+ readonly parent: ObjectLiteralExpression;
+ readonly expression: Expression;
+ }
+ export type VariableLikeDeclaration = VariableDeclaration | ParameterDeclaration | BindingElement | PropertyDeclaration | PropertyAssignment | PropertySignature | JsxAttribute | ShorthandPropertyAssignment | EnumMember | JSDocPropertyTag | JSDocParameterTag;
+ export interface PropertyLikeDeclaration extends NamedDeclaration {
+ readonly name: PropertyName;
+ }
+ export interface ObjectBindingPattern extends Node {
+ readonly kind: SyntaxKind.ObjectBindingPattern;
+ readonly parent: VariableDeclaration | ParameterDeclaration | BindingElement;
+ readonly elements: NodeArray<BindingElement>;
+ }
+ export interface ArrayBindingPattern extends Node {
+ readonly kind: SyntaxKind.ArrayBindingPattern;
+ readonly parent: VariableDeclaration | ParameterDeclaration | BindingElement;
+ readonly elements: NodeArray<ArrayBindingElement>;
+ }
+ export type BindingPattern = ObjectBindingPattern | ArrayBindingPattern;
+ export type ArrayBindingElement = BindingElement | OmittedExpression;
+ /**
+ * Several node kinds share function-like features such as a signature,
+ * a name, and a body. These nodes should extend FunctionLikeDeclarationBase.
+ * Examples:
+ * - FunctionDeclaration
+ * - MethodDeclaration
+ * - AccessorDeclaration
+ */
+ export interface FunctionLikeDeclarationBase extends SignatureDeclarationBase {
+ _functionLikeDeclarationBrand: any;
+ readonly asteriskToken?: AsteriskToken | undefined;
+ readonly questionToken?: QuestionToken | undefined;
+ readonly exclamationToken?: ExclamationToken | undefined;
+ readonly body?: Block | Expression | undefined;
+ }
+ export type FunctionLikeDeclaration = FunctionDeclaration | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | ConstructorDeclaration | FunctionExpression | ArrowFunction;
+ /** @deprecated Use SignatureDeclaration */
+ export type FunctionLike = SignatureDeclaration;
+ export interface FunctionDeclaration extends FunctionLikeDeclarationBase, DeclarationStatement {
+ readonly kind: SyntaxKind.FunctionDeclaration;
+ readonly modifiers?: NodeArray<Modifier>;
+ readonly name?: Identifier;
+ readonly body?: FunctionBody;
+ }
+ export interface MethodSignature extends SignatureDeclarationBase, TypeElement {
+ readonly kind: SyntaxKind.MethodSignature;
+ readonly parent: ObjectTypeDeclaration;
+ readonly modifiers?: NodeArray<Modifier>;
+ readonly name: PropertyName;
+ }
+ export interface MethodDeclaration extends FunctionLikeDeclarationBase, ClassElement, ObjectLiteralElement, JSDocContainer {
+ readonly kind: SyntaxKind.MethodDeclaration;
+ readonly parent: ClassLikeDeclaration | ObjectLiteralExpression;
+ readonly modifiers?: NodeArray<ModifierLike> | undefined;
+ readonly name: PropertyName;
+ readonly body?: FunctionBody | undefined;
+ }
+ export interface ConstructorDeclaration extends FunctionLikeDeclarationBase, ClassElement, JSDocContainer {
+ readonly kind: SyntaxKind.Constructor;
+ readonly parent: ClassLikeDeclaration;
+ readonly modifiers?: NodeArray<Modifier> | undefined;
+ readonly body?: FunctionBody | undefined;
+ }
+ /** For when we encounter a semicolon in a class declaration. ES6 allows these as class elements. */
+ export interface SemicolonClassElement extends ClassElement {
+ readonly kind: SyntaxKind.SemicolonClassElement;
+ readonly parent: ClassLikeDeclaration;
+ }
+ export interface GetAccessorDeclaration extends FunctionLikeDeclarationBase, ClassElement, TypeElement, ObjectLiteralElement, JSDocContainer {
+ readonly kind: SyntaxKind.GetAccessor;
+ readonly parent: ClassLikeDeclaration | ObjectLiteralExpression | TypeLiteralNode | InterfaceDeclaration;
+ readonly modifiers?: NodeArray<ModifierLike>;
+ readonly name: PropertyName;
+ readonly body?: FunctionBody;
+ }
+ export interface SetAccessorDeclaration extends FunctionLikeDeclarationBase, ClassElement, TypeElement, ObjectLiteralElement, JSDocContainer {
+ readonly kind: SyntaxKind.SetAccessor;
+ readonly parent: ClassLikeDeclaration | ObjectLiteralExpression | TypeLiteralNode | InterfaceDeclaration;
+ readonly modifiers?: NodeArray<ModifierLike>;
+ readonly name: PropertyName;
+ readonly body?: FunctionBody;
+ }
+ export type AccessorDeclaration = GetAccessorDeclaration | SetAccessorDeclaration;
+ export interface IndexSignatureDeclaration extends SignatureDeclarationBase, ClassElement, TypeElement {
+ readonly kind: SyntaxKind.IndexSignature;
+ readonly parent: ObjectTypeDeclaration;
+ readonly modifiers?: NodeArray<Modifier>;
+ readonly type: TypeNode;
+ }
+ export interface ClassStaticBlockDeclaration extends ClassElement, JSDocContainer {
+ readonly kind: SyntaxKind.ClassStaticBlockDeclaration;
+ readonly parent: ClassDeclaration | ClassExpression;
+ readonly body: Block;
+ }
+ export interface TypeNode extends Node {
+ _typeNodeBrand: any;
+ }
+ export interface KeywordTypeNode<TKind extends KeywordTypeSyntaxKind = KeywordTypeSyntaxKind> extends KeywordToken<TKind>, TypeNode {
+ readonly kind: TKind;
+ }
+ export interface ImportTypeAssertionContainer extends Node {
+ readonly kind: SyntaxKind.ImportTypeAssertionContainer;
+ readonly parent: ImportTypeNode;
+ readonly assertClause: AssertClause;
+ readonly multiLine?: boolean;
+ }
+ export interface ImportTypeNode extends NodeWithTypeArguments {
+ readonly kind: SyntaxKind.ImportType;
+ readonly isTypeOf: boolean;
+ readonly argument: TypeNode;
+ readonly assertions?: ImportTypeAssertionContainer;
+ readonly qualifier?: EntityName;
+ }
+ export interface ThisTypeNode extends TypeNode {
+ readonly kind: SyntaxKind.ThisType;
+ }
+ export type FunctionOrConstructorTypeNode = FunctionTypeNode | ConstructorTypeNode;
+ export interface FunctionOrConstructorTypeNodeBase extends TypeNode, SignatureDeclarationBase {
+ readonly kind: SyntaxKind.FunctionType | SyntaxKind.ConstructorType;
+ readonly type: TypeNode;
+ }
+ export interface FunctionTypeNode extends FunctionOrConstructorTypeNodeBase {
+ readonly kind: SyntaxKind.FunctionType;
+ }
+ export interface ConstructorTypeNode extends FunctionOrConstructorTypeNodeBase {
+ readonly kind: SyntaxKind.ConstructorType;
+ readonly modifiers?: NodeArray<Modifier>;
+ }
+ export interface NodeWithTypeArguments extends TypeNode {
+ readonly typeArguments?: NodeArray<TypeNode>;
+ }
+ export type TypeReferenceType = TypeReferenceNode | ExpressionWithTypeArguments;
+ export interface TypeReferenceNode extends NodeWithTypeArguments {
+ readonly kind: SyntaxKind.TypeReference;
+ readonly typeName: EntityName;
+ }
+ export interface TypePredicateNode extends TypeNode {
+ readonly kind: SyntaxKind.TypePredicate;
+ readonly parent: SignatureDeclaration | JSDocTypeExpression;
+ readonly assertsModifier?: AssertsKeyword;
+ readonly parameterName: Identifier | ThisTypeNode;
+ readonly type?: TypeNode;
+ }
+ export interface TypeQueryNode extends NodeWithTypeArguments {
+ readonly kind: SyntaxKind.TypeQuery;
+ readonly exprName: EntityName;
+ }
+ export interface TypeLiteralNode extends TypeNode, Declaration {
+ readonly kind: SyntaxKind.TypeLiteral;
+ readonly members: NodeArray<TypeElement>;
+ }
+ export interface ArrayTypeNode extends TypeNode {
+ readonly kind: SyntaxKind.ArrayType;
+ readonly elementType: TypeNode;
+ }
+ export interface TupleTypeNode extends TypeNode {
+ readonly kind: SyntaxKind.TupleType;
+ readonly elements: NodeArray<TypeNode | NamedTupleMember>;
+ }
+ export interface NamedTupleMember extends TypeNode, JSDocContainer, Declaration {
+ readonly kind: SyntaxKind.NamedTupleMember;
+ readonly dotDotDotToken?: Token<SyntaxKind.DotDotDotToken>;
+ readonly name: Identifier;
+ readonly questionToken?: Token<SyntaxKind.QuestionToken>;
+ readonly type: TypeNode;
+ }
+ export interface OptionalTypeNode extends TypeNode {
+ readonly kind: SyntaxKind.OptionalType;
+ readonly type: TypeNode;
+ }
+ export interface RestTypeNode extends TypeNode {
+ readonly kind: SyntaxKind.RestType;
+ readonly type: TypeNode;
+ }
+ export type UnionOrIntersectionTypeNode = UnionTypeNode | IntersectionTypeNode;
+ export interface UnionTypeNode extends TypeNode {
+ readonly kind: SyntaxKind.UnionType;
+ readonly types: NodeArray<TypeNode>;
+ }
+ export interface IntersectionTypeNode extends TypeNode {
+ readonly kind: SyntaxKind.IntersectionType;
+ readonly types: NodeArray<TypeNode>;
+ }
+ export interface ConditionalTypeNode extends TypeNode {
+ readonly kind: SyntaxKind.ConditionalType;
+ readonly checkType: TypeNode;
+ readonly extendsType: TypeNode;
+ readonly trueType: TypeNode;
+ readonly falseType: TypeNode;
+ }
+ export interface InferTypeNode extends TypeNode {
+ readonly kind: SyntaxKind.InferType;
+ readonly typeParameter: TypeParameterDeclaration;
+ }
+ export interface ParenthesizedTypeNode extends TypeNode {
+ readonly kind: SyntaxKind.ParenthesizedType;
+ readonly type: TypeNode;
+ }
+ export interface TypeOperatorNode extends TypeNode {
+ readonly kind: SyntaxKind.TypeOperator;
+ readonly operator: SyntaxKind.KeyOfKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.ReadonlyKeyword;
+ readonly type: TypeNode;
+ }
+ export interface IndexedAccessTypeNode extends TypeNode {
+ readonly kind: SyntaxKind.IndexedAccessType;
+ readonly objectType: TypeNode;
+ readonly indexType: TypeNode;
+ }
+ export interface MappedTypeNode extends TypeNode, Declaration {
+ readonly kind: SyntaxKind.MappedType;
+ readonly readonlyToken?: ReadonlyKeyword | PlusToken | MinusToken;
+ readonly typeParameter: TypeParameterDeclaration;
+ readonly nameType?: TypeNode;
+ readonly questionToken?: QuestionToken | PlusToken | MinusToken;
+ readonly type?: TypeNode;
+ /** Used only to produce grammar errors */
+ readonly members?: NodeArray<TypeElement>;
+ }
+ export interface LiteralTypeNode extends TypeNode {
+ readonly kind: SyntaxKind.LiteralType;
+ readonly literal: NullLiteral | BooleanLiteral | LiteralExpression | PrefixUnaryExpression;
+ }
+ export interface StringLiteral extends LiteralExpression, Declaration {
+ readonly kind: SyntaxKind.StringLiteral;
+ }
+ export type StringLiteralLike = StringLiteral | NoSubstitutionTemplateLiteral;
+ export type PropertyNameLiteral = Identifier | StringLiteralLike | NumericLiteral;
+ export interface TemplateLiteralTypeNode extends TypeNode {
+ kind: SyntaxKind.TemplateLiteralType;
+ readonly head: TemplateHead;
+ readonly templateSpans: NodeArray<TemplateLiteralTypeSpan>;
+ }
+ export interface TemplateLiteralTypeSpan extends TypeNode {
+ readonly kind: SyntaxKind.TemplateLiteralTypeSpan;
+ readonly parent: TemplateLiteralTypeNode;
+ readonly type: TypeNode;
+ readonly literal: TemplateMiddle | TemplateTail;
+ }
+ export interface Expression extends Node {
+ _expressionBrand: any;
+ }
+ export interface OmittedExpression extends Expression {
+ readonly kind: SyntaxKind.OmittedExpression;
+ }
+ export interface PartiallyEmittedExpression extends LeftHandSideExpression {
+ readonly kind: SyntaxKind.PartiallyEmittedExpression;
+ readonly expression: Expression;
+ }
+ export interface UnaryExpression extends Expression {
+ _unaryExpressionBrand: any;
+ }
+ /** Deprecated, please use UpdateExpression */
+ export type IncrementExpression = UpdateExpression;
+ export interface UpdateExpression extends UnaryExpression {
+ _updateExpressionBrand: any;
+ }
+ export type PrefixUnaryOperator = SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.TildeToken | SyntaxKind.ExclamationToken;
+ export interface PrefixUnaryExpression extends UpdateExpression {
+ readonly kind: SyntaxKind.PrefixUnaryExpression;
+ readonly operator: PrefixUnaryOperator;
+ readonly operand: UnaryExpression;
+ }
+ export type PostfixUnaryOperator = SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken;
+ export interface PostfixUnaryExpression extends UpdateExpression {
+ readonly kind: SyntaxKind.PostfixUnaryExpression;
+ readonly operand: LeftHandSideExpression;
+ readonly operator: PostfixUnaryOperator;
+ }
+ export interface LeftHandSideExpression extends UpdateExpression {
+ _leftHandSideExpressionBrand: any;
+ }
+ export interface MemberExpression extends LeftHandSideExpression {
+ _memberExpressionBrand: any;
+ }
+ export interface PrimaryExpression extends MemberExpression {
+ _primaryExpressionBrand: any;
+ }
+ export interface NullLiteral extends PrimaryExpression {
+ readonly kind: SyntaxKind.NullKeyword;
+ }
+ export interface TrueLiteral extends PrimaryExpression {
+ readonly kind: SyntaxKind.TrueKeyword;
+ }
+ export interface FalseLiteral extends PrimaryExpression {
+ readonly kind: SyntaxKind.FalseKeyword;
+ }
+ export type BooleanLiteral = TrueLiteral | FalseLiteral;
+ export interface ThisExpression extends PrimaryExpression {
+ readonly kind: SyntaxKind.ThisKeyword;
+ }
+ export interface SuperExpression extends PrimaryExpression {
+ readonly kind: SyntaxKind.SuperKeyword;
+ }
+ export interface ImportExpression extends PrimaryExpression {
+ readonly kind: SyntaxKind.ImportKeyword;
+ }
+ export interface DeleteExpression extends UnaryExpression {
+ readonly kind: SyntaxKind.DeleteExpression;
+ readonly expression: UnaryExpression;
+ }
+ export interface TypeOfExpression extends UnaryExpression {
+ readonly kind: SyntaxKind.TypeOfExpression;
+ readonly expression: UnaryExpression;
+ }
+ export interface VoidExpression extends UnaryExpression {
+ readonly kind: SyntaxKind.VoidExpression;
+ readonly expression: UnaryExpression;
+ }
+ export interface AwaitExpression extends UnaryExpression {
+ readonly kind: SyntaxKind.AwaitExpression;
+ readonly expression: UnaryExpression;
+ }
+ export interface YieldExpression extends Expression {
+ readonly kind: SyntaxKind.YieldExpression;
+ readonly asteriskToken?: AsteriskToken;
+ readonly expression?: Expression;
+ }
+ export interface SyntheticExpression extends Expression {
+ readonly kind: SyntaxKind.SyntheticExpression;
+ readonly isSpread: boolean;
+ readonly type: Type;
+ readonly tupleNameSource?: ParameterDeclaration | NamedTupleMember;
+ }
+ export type ExponentiationOperator = SyntaxKind.AsteriskAsteriskToken;
+ export type MultiplicativeOperator = SyntaxKind.AsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken;
+ export type MultiplicativeOperatorOrHigher = ExponentiationOperator | MultiplicativeOperator;
+ export type AdditiveOperator = SyntaxKind.PlusToken | SyntaxKind.MinusToken;
+ export type AdditiveOperatorOrHigher = MultiplicativeOperatorOrHigher | AdditiveOperator;
+ export type ShiftOperator = SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken;
+ export type ShiftOperatorOrHigher = AdditiveOperatorOrHigher | ShiftOperator;
+ export type RelationalOperator = SyntaxKind.LessThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.InstanceOfKeyword | SyntaxKind.InKeyword;
+ export type RelationalOperatorOrHigher = ShiftOperatorOrHigher | RelationalOperator;
+ export type EqualityOperator = SyntaxKind.EqualsEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.ExclamationEqualsToken;
+ export type EqualityOperatorOrHigher = RelationalOperatorOrHigher | EqualityOperator;
+ export type BitwiseOperator = SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken;
+ export type BitwiseOperatorOrHigher = EqualityOperatorOrHigher | BitwiseOperator;
+ export type LogicalOperator = SyntaxKind.AmpersandAmpersandToken | SyntaxKind.BarBarToken;
+ export type LogicalOperatorOrHigher = BitwiseOperatorOrHigher | LogicalOperator;
+ export type CompoundAssignmentOperator = SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.CaretEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken | SyntaxKind.BarBarEqualsToken | SyntaxKind.AmpersandAmpersandEqualsToken | SyntaxKind.QuestionQuestionEqualsToken;
+ export type AssignmentOperator = SyntaxKind.EqualsToken | CompoundAssignmentOperator;
+ export type AssignmentOperatorOrHigher = SyntaxKind.QuestionQuestionToken | LogicalOperatorOrHigher | AssignmentOperator;
+ export type BinaryOperator = AssignmentOperatorOrHigher | SyntaxKind.CommaToken;
+ export type LogicalOrCoalescingAssignmentOperator = SyntaxKind.AmpersandAmpersandEqualsToken | SyntaxKind.BarBarEqualsToken | SyntaxKind.QuestionQuestionEqualsToken;
+ export type BinaryOperatorToken = Token<BinaryOperator>;
+ export interface BinaryExpression extends Expression, Declaration {
+ readonly kind: SyntaxKind.BinaryExpression;
+ readonly left: Expression;
+ readonly operatorToken: BinaryOperatorToken;
+ readonly right: Expression;
+ }
+ export type AssignmentOperatorToken = Token<AssignmentOperator>;
+ export interface AssignmentExpression<TOperator extends AssignmentOperatorToken> extends BinaryExpression {
+ readonly left: LeftHandSideExpression;
+ readonly operatorToken: TOperator;
+ }
+ export interface ObjectDestructuringAssignment extends AssignmentExpression<EqualsToken> {
+ readonly left: ObjectLiteralExpression;
+ }
+ export interface ArrayDestructuringAssignment extends AssignmentExpression<EqualsToken> {
+ readonly left: ArrayLiteralExpression;
+ }
+ export type DestructuringAssignment = ObjectDestructuringAssignment | ArrayDestructuringAssignment;
+ export type BindingOrAssignmentElement = VariableDeclaration | ParameterDeclaration | ObjectBindingOrAssignmentElement | ArrayBindingOrAssignmentElement;
+ export type ObjectBindingOrAssignmentElement = BindingElement | PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment;
+ export type ArrayBindingOrAssignmentElement = BindingElement | OmittedExpression | SpreadElement | ArrayLiteralExpression | ObjectLiteralExpression | AssignmentExpression<EqualsToken> | Identifier | PropertyAccessExpression | ElementAccessExpression;
+ export type BindingOrAssignmentElementRestIndicator = DotDotDotToken | SpreadElement | SpreadAssignment;
+ export type BindingOrAssignmentElementTarget = BindingOrAssignmentPattern | Identifier | PropertyAccessExpression | ElementAccessExpression | OmittedExpression;
+ export type ObjectBindingOrAssignmentPattern = ObjectBindingPattern | ObjectLiteralExpression;
+ export type ArrayBindingOrAssignmentPattern = ArrayBindingPattern | ArrayLiteralExpression;
+ export type AssignmentPattern = ObjectLiteralExpression | ArrayLiteralExpression;
+ export type BindingOrAssignmentPattern = ObjectBindingOrAssignmentPattern | ArrayBindingOrAssignmentPattern;
+ export interface ConditionalExpression extends Expression {
+ readonly kind: SyntaxKind.ConditionalExpression;
+ readonly condition: Expression;
+ readonly questionToken: QuestionToken;
+ readonly whenTrue: Expression;
+ readonly colonToken: ColonToken;
+ readonly whenFalse: Expression;
+ }
+ export type FunctionBody = Block;
+ export type ConciseBody = FunctionBody | Expression;
+ export interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclarationBase, JSDocContainer {
+ readonly kind: SyntaxKind.FunctionExpression;
+ readonly modifiers?: NodeArray<Modifier>;
+ readonly name?: Identifier;
+ readonly body: FunctionBody;
+ }
+ export interface ArrowFunction extends Expression, FunctionLikeDeclarationBase, JSDocContainer {
+ readonly kind: SyntaxKind.ArrowFunction;
+ readonly modifiers?: NodeArray<Modifier>;
+ readonly equalsGreaterThanToken: EqualsGreaterThanToken;
+ readonly body: ConciseBody;
+ readonly name: never;
+ }
+ export interface LiteralLikeNode extends Node {
+ text: string;
+ isUnterminated?: boolean;
+ hasExtendedUnicodeEscape?: boolean;
+ }
+ export interface TemplateLiteralLikeNode extends LiteralLikeNode {
+ rawText?: string;
+ }
+ export interface LiteralExpression extends LiteralLikeNode, PrimaryExpression {
+ _literalExpressionBrand: any;
+ }
+ export interface RegularExpressionLiteral extends LiteralExpression {
+ readonly kind: SyntaxKind.RegularExpressionLiteral;
+ }
+ export interface NoSubstitutionTemplateLiteral extends LiteralExpression, TemplateLiteralLikeNode, Declaration {
+ readonly kind: SyntaxKind.NoSubstitutionTemplateLiteral;
+ }
+ export enum TokenFlags {
+ None = 0,
+ Scientific = 16,
+ Octal = 32,
+ HexSpecifier = 64,
+ BinarySpecifier = 128,
+ OctalSpecifier = 256,
+ }
+ export interface NumericLiteral extends LiteralExpression, Declaration {
+ readonly kind: SyntaxKind.NumericLiteral;
+ }
+ export interface BigIntLiteral extends LiteralExpression {
+ readonly kind: SyntaxKind.BigIntLiteral;
+ }
+ export type LiteralToken = NumericLiteral | BigIntLiteral | StringLiteral | JsxText | RegularExpressionLiteral | NoSubstitutionTemplateLiteral;
+ export interface TemplateHead extends TemplateLiteralLikeNode {
+ readonly kind: SyntaxKind.TemplateHead;
+ readonly parent: TemplateExpression | TemplateLiteralTypeNode;
+ }
+ export interface TemplateMiddle extends TemplateLiteralLikeNode {
+ readonly kind: SyntaxKind.TemplateMiddle;
+ readonly parent: TemplateSpan | TemplateLiteralTypeSpan;
+ }
+ export interface TemplateTail extends TemplateLiteralLikeNode {
+ readonly kind: SyntaxKind.TemplateTail;
+ readonly parent: TemplateSpan | TemplateLiteralTypeSpan;
+ }
+ export type PseudoLiteralToken = TemplateHead | TemplateMiddle | TemplateTail;
+ export type TemplateLiteralToken = NoSubstitutionTemplateLiteral | PseudoLiteralToken;
+ export interface TemplateExpression extends PrimaryExpression {
+ readonly kind: SyntaxKind.TemplateExpression;
+ readonly head: TemplateHead;
+ readonly templateSpans: NodeArray<TemplateSpan>;
+ }
+ export type TemplateLiteral = TemplateExpression | NoSubstitutionTemplateLiteral;
+ export interface TemplateSpan extends Node {
+ readonly kind: SyntaxKind.TemplateSpan;
+ readonly parent: TemplateExpression;
+ readonly expression: Expression;
+ readonly literal: TemplateMiddle | TemplateTail;
+ }
+ export interface ParenthesizedExpression extends PrimaryExpression, JSDocContainer {
+ readonly kind: SyntaxKind.ParenthesizedExpression;
+ readonly expression: Expression;
+ }
+ export interface ArrayLiteralExpression extends PrimaryExpression {
+ readonly kind: SyntaxKind.ArrayLiteralExpression;
+ readonly elements: NodeArray<Expression>;
+ }
+ export interface SpreadElement extends Expression {
+ readonly kind: SyntaxKind.SpreadElement;
+ readonly parent: ArrayLiteralExpression | CallExpression | NewExpression;
+ readonly expression: Expression;
+ }
+ /**
+ * This interface is a base interface for ObjectLiteralExpression and JSXAttributes to extend from. JSXAttributes is similar to
+ * ObjectLiteralExpression in that it contains array of properties; however, JSXAttributes' properties can only be
+ * JSXAttribute or JSXSpreadAttribute. ObjectLiteralExpression, on the other hand, can only have properties of type
+ * ObjectLiteralElement (e.g. PropertyAssignment, ShorthandPropertyAssignment etc.)
+ */
+ export interface ObjectLiteralExpressionBase<T extends ObjectLiteralElement> extends PrimaryExpression, Declaration {
+ readonly properties: NodeArray<T>;
+ }
+ export interface ObjectLiteralExpression extends ObjectLiteralExpressionBase<ObjectLiteralElementLike> {
+ readonly kind: SyntaxKind.ObjectLiteralExpression;
+ }
+ export type EntityNameExpression = Identifier | PropertyAccessEntityNameExpression;
+ export type EntityNameOrEntityNameExpression = EntityName | EntityNameExpression;
+ export type AccessExpression = PropertyAccessExpression | ElementAccessExpression;
+ export interface PropertyAccessExpression extends MemberExpression, NamedDeclaration {
+ readonly kind: SyntaxKind.PropertyAccessExpression;
+ readonly expression: LeftHandSideExpression;
+ readonly questionDotToken?: QuestionDotToken;
+ readonly name: MemberName;
+ }
+ export interface PropertyAccessChain extends PropertyAccessExpression {
+ _optionalChainBrand: any;
+ readonly name: MemberName;
+ }
+ export interface SuperPropertyAccessExpression extends PropertyAccessExpression {
+ readonly expression: SuperExpression;
+ }
+ /** Brand for a PropertyAccessExpression which, like a QualifiedName, consists of a sequence of identifiers separated by dots. */
+ export interface PropertyAccessEntityNameExpression extends PropertyAccessExpression {
+ _propertyAccessExpressionLikeQualifiedNameBrand?: any;
+ readonly expression: EntityNameExpression;
+ readonly name: Identifier;
+ }
+ export interface ElementAccessExpression extends MemberExpression {
+ readonly kind: SyntaxKind.ElementAccessExpression;
+ readonly expression: LeftHandSideExpression;
+ readonly questionDotToken?: QuestionDotToken;
+ readonly argumentExpression: Expression;
+ }
+ export interface ElementAccessChain extends ElementAccessExpression {
+ _optionalChainBrand: any;
+ }
+ export interface SuperElementAccessExpression extends ElementAccessExpression {
+ readonly expression: SuperExpression;
+ }
+ export type SuperProperty = SuperPropertyAccessExpression | SuperElementAccessExpression;
+ export interface CallExpression extends LeftHandSideExpression, Declaration {
+ readonly kind: SyntaxKind.CallExpression;
+ readonly expression: LeftHandSideExpression;
+ readonly questionDotToken?: QuestionDotToken;
+ readonly typeArguments?: NodeArray<TypeNode>;
+ readonly arguments: NodeArray<Expression>;
+ }
+ export interface CallChain extends CallExpression {
+ _optionalChainBrand: any;
+ }
+ export type OptionalChain = PropertyAccessChain | ElementAccessChain | CallChain | NonNullChain;
+ export interface SuperCall extends CallExpression {
+ readonly expression: SuperExpression;
+ }
+ export interface ImportCall extends CallExpression {
+ readonly expression: ImportExpression;
+ }
+ export interface ExpressionWithTypeArguments extends MemberExpression, NodeWithTypeArguments {
+ readonly kind: SyntaxKind.ExpressionWithTypeArguments;
+ readonly expression: LeftHandSideExpression;
+ }
+ export interface NewExpression extends PrimaryExpression, Declaration {
+ readonly kind: SyntaxKind.NewExpression;
+ readonly expression: LeftHandSideExpression;
+ readonly typeArguments?: NodeArray<TypeNode>;
+ readonly arguments?: NodeArray<Expression>;
+ }
+ export interface TaggedTemplateExpression extends MemberExpression {
+ readonly kind: SyntaxKind.TaggedTemplateExpression;
+ readonly tag: LeftHandSideExpression;
+ readonly typeArguments?: NodeArray<TypeNode>;
+ readonly template: TemplateLiteral;
+ }
+ export type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression | Decorator | JsxOpeningLikeElement;
+ export interface AsExpression extends Expression {
+ readonly kind: SyntaxKind.AsExpression;
+ readonly expression: Expression;
+ readonly type: TypeNode;
+ }
+ export interface TypeAssertion extends UnaryExpression {
+ readonly kind: SyntaxKind.TypeAssertionExpression;
+ readonly type: TypeNode;
+ readonly expression: UnaryExpression;
+ }
+ export type AssertionExpression = TypeAssertion | AsExpression;
+ export interface NonNullExpression extends LeftHandSideExpression {
+ readonly kind: SyntaxKind.NonNullExpression;
+ readonly expression: Expression;
+ }
+ export interface NonNullChain extends NonNullExpression {
+ _optionalChainBrand: any;
+ }
+ export interface MetaProperty extends PrimaryExpression {
+ readonly kind: SyntaxKind.MetaProperty;
+ readonly keywordToken: SyntaxKind.NewKeyword | SyntaxKind.ImportKeyword;
+ readonly name: Identifier;
+ }
+ export interface JsxElement extends PrimaryExpression {
+ readonly kind: SyntaxKind.JsxElement;
+ readonly openingElement: JsxOpeningElement;
+ readonly children: NodeArray<JsxChild>;
+ readonly closingElement: JsxClosingElement;
+ }
+ export type JsxOpeningLikeElement = JsxSelfClosingElement | JsxOpeningElement;
+ export type JsxAttributeLike = JsxAttribute | JsxSpreadAttribute;
+ export type JsxTagNameExpression = Identifier | ThisExpression | JsxTagNamePropertyAccess;
+ export interface JsxTagNamePropertyAccess extends PropertyAccessExpression {
+ readonly expression: JsxTagNameExpression;
+ }
+ export interface JsxAttributes extends ObjectLiteralExpressionBase<JsxAttributeLike> {
+ readonly kind: SyntaxKind.JsxAttributes;
+ readonly parent: JsxOpeningLikeElement;
+ }
+ export interface JsxOpeningElement extends Expression {
+ readonly kind: SyntaxKind.JsxOpeningElement;
+ readonly parent: JsxElement;
+ readonly tagName: JsxTagNameExpression;
+ readonly typeArguments?: NodeArray<TypeNode>;
+ readonly attributes: JsxAttributes;
+ }
+ export interface JsxSelfClosingElement extends PrimaryExpression {
+ readonly kind: SyntaxKind.JsxSelfClosingElement;
+ readonly tagName: JsxTagNameExpression;
+ readonly typeArguments?: NodeArray<TypeNode>;
+ readonly attributes: JsxAttributes;
+ }
+ export interface JsxFragment extends PrimaryExpression {
+ readonly kind: SyntaxKind.JsxFragment;
+ readonly openingFragment: JsxOpeningFragment;
+ readonly children: NodeArray<JsxChild>;
+ readonly closingFragment: JsxClosingFragment;
+ }
+ export interface JsxOpeningFragment extends Expression {
+ readonly kind: SyntaxKind.JsxOpeningFragment;
+ readonly parent: JsxFragment;
+ }
+ export interface JsxClosingFragment extends Expression {
+ readonly kind: SyntaxKind.JsxClosingFragment;
+ readonly parent: JsxFragment;
+ }
+ export interface JsxAttribute extends ObjectLiteralElement {
+ readonly kind: SyntaxKind.JsxAttribute;
+ readonly parent: JsxAttributes;
+ readonly name: Identifier;
+ readonly initializer?: JsxAttributeValue;
+ }
+ export type JsxAttributeValue = StringLiteral | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment;
+ export interface JsxSpreadAttribute extends ObjectLiteralElement {
+ readonly kind: SyntaxKind.JsxSpreadAttribute;
+ readonly parent: JsxAttributes;
+ readonly expression: Expression;
+ }
+ export interface JsxClosingElement extends Node {
+ readonly kind: SyntaxKind.JsxClosingElement;
+ readonly parent: JsxElement;
+ readonly tagName: JsxTagNameExpression;
+ }
+ export interface JsxExpression extends Expression {
+ readonly kind: SyntaxKind.JsxExpression;
+ readonly parent: JsxElement | JsxFragment | JsxAttributeLike;
+ readonly dotDotDotToken?: Token<SyntaxKind.DotDotDotToken>;
+ readonly expression?: Expression;
+ }
+ export interface JsxText extends LiteralLikeNode {
+ readonly kind: SyntaxKind.JsxText;
+ readonly parent: JsxElement | JsxFragment;
+ readonly containsOnlyTriviaWhiteSpaces: boolean;
+ }
+ export type JsxChild = JsxText | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment;
+ export interface Statement extends Node, JSDocContainer {
+ _statementBrand: any;
+ }
+ export interface NotEmittedStatement extends Statement {
+ readonly kind: SyntaxKind.NotEmittedStatement;
+ }
+ /**
+ * A list of comma-separated expressions. This node is only created by transformations.
+ */
+ export interface CommaListExpression extends Expression {
+ readonly kind: SyntaxKind.CommaListExpression;
+ readonly elements: NodeArray<Expression>;
+ }
+ export interface EmptyStatement extends Statement {
+ readonly kind: SyntaxKind.EmptyStatement;
+ }
+ export interface DebuggerStatement extends Statement {
+ readonly kind: SyntaxKind.DebuggerStatement;
+ }
+ export interface MissingDeclaration extends DeclarationStatement {
+ readonly kind: SyntaxKind.MissingDeclaration;
+ readonly name?: Identifier;
+ }
+ export type BlockLike = SourceFile | Block | ModuleBlock | CaseOrDefaultClause;
+ export interface Block extends Statement {
+ readonly kind: SyntaxKind.Block;
+ readonly statements: NodeArray<Statement>;
+ }
+ export interface VariableStatement extends Statement {
+ readonly kind: SyntaxKind.VariableStatement;
+ readonly modifiers?: NodeArray<Modifier>;
+ readonly declarationList: VariableDeclarationList;
+ }
+ export interface ExpressionStatement extends Statement {
+ readonly kind: SyntaxKind.ExpressionStatement;
+ readonly expression: Expression;
+ }
+ export interface IfStatement extends Statement {
+ readonly kind: SyntaxKind.IfStatement;
+ readonly expression: Expression;
+ readonly thenStatement: Statement;
+ readonly elseStatement?: Statement;
+ }
+ export interface IterationStatement extends Statement {
+ readonly statement: Statement;
+ }
+ export interface DoStatement extends IterationStatement {
+ readonly kind: SyntaxKind.DoStatement;
+ readonly expression: Expression;
+ }
+ export interface WhileStatement extends IterationStatement {
+ readonly kind: SyntaxKind.WhileStatement;
+ readonly expression: Expression;
+ }
+ export type ForInitializer = VariableDeclarationList | Expression;
+ export interface ForStatement extends IterationStatement {
+ readonly kind: SyntaxKind.ForStatement;
+ readonly initializer?: ForInitializer;
+ readonly condition?: Expression;
+ readonly incrementor?: Expression;
+ }
+ export type ForInOrOfStatement = ForInStatement | ForOfStatement;
+ export interface ForInStatement extends IterationStatement {
+ readonly kind: SyntaxKind.ForInStatement;
+ readonly initializer: ForInitializer;
+ readonly expression: Expression;
+ }
+ export interface ForOfStatement extends IterationStatement {
+ readonly kind: SyntaxKind.ForOfStatement;
+ readonly awaitModifier?: AwaitKeyword;
+ readonly initializer: ForInitializer;
+ readonly expression: Expression;
+ }
+ export interface BreakStatement extends Statement {
+ readonly kind: SyntaxKind.BreakStatement;
+ readonly label?: Identifier;
+ }
+ export interface ContinueStatement extends Statement {
+ readonly kind: SyntaxKind.ContinueStatement;
+ readonly label?: Identifier;
+ }
+ export type BreakOrContinueStatement = BreakStatement | ContinueStatement;
+ export interface ReturnStatement extends Statement {
+ readonly kind: SyntaxKind.ReturnStatement;
+ readonly expression?: Expression;
+ }
+ export interface WithStatement extends Statement {
+ readonly kind: SyntaxKind.WithStatement;
+ readonly expression: Expression;
+ readonly statement: Statement;
+ }
+ export interface SwitchStatement extends Statement {
+ readonly kind: SyntaxKind.SwitchStatement;
+ readonly expression: Expression;
+ readonly caseBlock: CaseBlock;
+ possiblyExhaustive?: boolean;
+ }
+ export interface CaseBlock extends Node {
+ readonly kind: SyntaxKind.CaseBlock;
+ readonly parent: SwitchStatement;
+ readonly clauses: NodeArray<CaseOrDefaultClause>;
+ }
+ export interface CaseClause extends Node, JSDocContainer {
+ readonly kind: SyntaxKind.CaseClause;
+ readonly parent: CaseBlock;
+ readonly expression: Expression;
+ readonly statements: NodeArray<Statement>;
+ }
+ export interface DefaultClause extends Node {
+ readonly kind: SyntaxKind.DefaultClause;
+ readonly parent: CaseBlock;
+ readonly statements: NodeArray<Statement>;
+ }
+ export type CaseOrDefaultClause = CaseClause | DefaultClause;
+ export interface LabeledStatement extends Statement {
+ readonly kind: SyntaxKind.LabeledStatement;
+ readonly label: Identifier;
+ readonly statement: Statement;
+ }
+ export interface ThrowStatement extends Statement {
+ readonly kind: SyntaxKind.ThrowStatement;
+ readonly expression: Expression;
+ }
+ export interface TryStatement extends Statement {
+ readonly kind: SyntaxKind.TryStatement;
+ readonly tryBlock: Block;
+ readonly catchClause?: CatchClause;
+ readonly finallyBlock?: Block;
+ }
+ export interface CatchClause extends Node {
+ readonly kind: SyntaxKind.CatchClause;
+ readonly parent: TryStatement;
+ readonly variableDeclaration?: VariableDeclaration;
+ readonly block: Block;
+ }
+ export type ObjectTypeDeclaration = ClassLikeDeclaration | InterfaceDeclaration | TypeLiteralNode;
+ export type DeclarationWithTypeParameters = DeclarationWithTypeParameterChildren | JSDocTypedefTag | JSDocCallbackTag | JSDocSignature;
+ export type DeclarationWithTypeParameterChildren = SignatureDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | JSDocTemplateTag;
+ export interface ClassLikeDeclarationBase extends NamedDeclaration, JSDocContainer {
+ readonly kind: SyntaxKind.ClassDeclaration | SyntaxKind.ClassExpression;
+ readonly name?: Identifier;
+ readonly typeParameters?: NodeArray<TypeParameterDeclaration>;
+ readonly heritageClauses?: NodeArray<HeritageClause>;
+ readonly members: NodeArray<ClassElement>;
+ }
+ export interface ClassDeclaration extends ClassLikeDeclarationBase, DeclarationStatement {
+ readonly kind: SyntaxKind.ClassDeclaration;
+ readonly modifiers?: NodeArray<ModifierLike>;
+ /** May be undefined in `export default class { ... }`. */
+ readonly name?: Identifier;
+ }
+ export interface ClassExpression extends ClassLikeDeclarationBase, PrimaryExpression {
+ readonly kind: SyntaxKind.ClassExpression;
+ readonly modifiers?: NodeArray<ModifierLike>;
+ }
+ export type ClassLikeDeclaration = ClassDeclaration | ClassExpression;
+ export interface ClassElement extends NamedDeclaration {
+ _classElementBrand: any;
+ readonly name?: PropertyName;
+ }
+ export interface TypeElement extends NamedDeclaration {
+ _typeElementBrand: any;
+ readonly name?: PropertyName;
+ readonly questionToken?: QuestionToken | undefined;
+ }
+ export interface InterfaceDeclaration extends DeclarationStatement, JSDocContainer {
+ readonly kind: SyntaxKind.InterfaceDeclaration;
+ readonly modifiers?: NodeArray<Modifier>;
+ readonly name: Identifier;
+ readonly typeParameters?: NodeArray<TypeParameterDeclaration>;
+ readonly heritageClauses?: NodeArray<HeritageClause>;
+ readonly members: NodeArray<TypeElement>;
+ }
+ export interface HeritageClause extends Node {
+ readonly kind: SyntaxKind.HeritageClause;
+ readonly parent: InterfaceDeclaration | ClassLikeDeclaration;
+ readonly token: SyntaxKind.ExtendsKeyword | SyntaxKind.ImplementsKeyword;
+ readonly types: NodeArray<ExpressionWithTypeArguments>;
+ }
+ export interface TypeAliasDeclaration extends DeclarationStatement, JSDocContainer {
+ readonly kind: SyntaxKind.TypeAliasDeclaration;
+ readonly modifiers?: NodeArray<Modifier>;
+ readonly name: Identifier;
+ readonly typeParameters?: NodeArray<TypeParameterDeclaration>;
+ readonly type: TypeNode;
+ }
+ export interface EnumMember extends NamedDeclaration, JSDocContainer {
+ readonly kind: SyntaxKind.EnumMember;
+ readonly parent: EnumDeclaration;
+ readonly name: PropertyName;
+ readonly initializer?: Expression;
+ }
+ export interface EnumDeclaration extends DeclarationStatement, JSDocContainer {
+ readonly kind: SyntaxKind.EnumDeclaration;
+ readonly modifiers?: NodeArray<Modifier>;
+ readonly name: Identifier;
+ readonly members: NodeArray<EnumMember>;
+ }
+ export type ModuleName = Identifier | StringLiteral;
+ export type ModuleBody = NamespaceBody | JSDocNamespaceBody;
+ export interface ModuleDeclaration extends DeclarationStatement, JSDocContainer {
+ readonly kind: SyntaxKind.ModuleDeclaration;
+ readonly parent: ModuleBody | SourceFile;
+ readonly modifiers?: NodeArray<Modifier>;
+ readonly name: ModuleName;
+ readonly body?: ModuleBody | JSDocNamespaceDeclaration;
+ }
+ export type NamespaceBody = ModuleBlock | NamespaceDeclaration;
+ export interface NamespaceDeclaration extends ModuleDeclaration {
+ readonly name: Identifier;
+ readonly body: NamespaceBody;
+ }
+ export type JSDocNamespaceBody = Identifier | JSDocNamespaceDeclaration;
+ export interface JSDocNamespaceDeclaration extends ModuleDeclaration {
+ readonly name: Identifier;
+ readonly body?: JSDocNamespaceBody;
+ }
+ export interface ModuleBlock extends Node, Statement {
+ readonly kind: SyntaxKind.ModuleBlock;
+ readonly parent: ModuleDeclaration;
+ readonly statements: NodeArray<Statement>;
+ }
+ export type ModuleReference = EntityName | ExternalModuleReference;
+ /**
+ * One of:
+ * - import x = require("mod");
+ * - import x = M.x;
+ */
+ export interface ImportEqualsDeclaration extends DeclarationStatement, JSDocContainer {
+ readonly kind: SyntaxKind.ImportEqualsDeclaration;
+ readonly parent: SourceFile | ModuleBlock;
+ readonly modifiers?: NodeArray<Modifier>;
+ readonly name: Identifier;
+ readonly isTypeOnly: boolean;
+ readonly moduleReference: ModuleReference;
+ }
+ export interface ExternalModuleReference extends Node {
+ readonly kind: SyntaxKind.ExternalModuleReference;
+ readonly parent: ImportEqualsDeclaration;
+ readonly expression: Expression;
+ }
+ export interface ImportDeclaration extends Statement {
+ readonly kind: SyntaxKind.ImportDeclaration;
+ readonly parent: SourceFile | ModuleBlock;
+ readonly modifiers?: NodeArray<Modifier>;
+ readonly importClause?: ImportClause;
+ /** If this is not a StringLiteral it will be a grammar error. */
+ readonly moduleSpecifier: Expression;
+ readonly assertClause?: AssertClause;
+ }
+ export type NamedImportBindings = NamespaceImport | NamedImports;
+ export type NamedExportBindings = NamespaceExport | NamedExports;
+ export interface ImportClause extends NamedDeclaration {
+ readonly kind: SyntaxKind.ImportClause;
+ readonly parent: ImportDeclaration;
+ readonly isTypeOnly: boolean;
+ readonly name?: Identifier;
+ readonly namedBindings?: NamedImportBindings;
+ }
+ export type AssertionKey = Identifier | StringLiteral;
+ export interface AssertEntry extends Node {
+ readonly kind: SyntaxKind.AssertEntry;
+ readonly parent: AssertClause;
+ readonly name: AssertionKey;
+ readonly value: Expression;
+ }
+ export interface AssertClause extends Node {
+ readonly kind: SyntaxKind.AssertClause;
+ readonly parent: ImportDeclaration | ExportDeclaration;
+ readonly elements: NodeArray<AssertEntry>;
+ readonly multiLine?: boolean;
+ }
+ export interface NamespaceImport extends NamedDeclaration {
+ readonly kind: SyntaxKind.NamespaceImport;
+ readonly parent: ImportClause;
+ readonly name: Identifier;
+ }
+ export interface NamespaceExport extends NamedDeclaration {
+ readonly kind: SyntaxKind.NamespaceExport;
+ readonly parent: ExportDeclaration;
+ readonly name: Identifier;
+ }
+ export interface NamespaceExportDeclaration extends DeclarationStatement, JSDocContainer {
+ readonly kind: SyntaxKind.NamespaceExportDeclaration;
+ readonly name: Identifier;
+ }
+ export interface ExportDeclaration extends DeclarationStatement, JSDocContainer {
+ readonly kind: SyntaxKind.ExportDeclaration;
+ readonly parent: SourceFile | ModuleBlock;
+ readonly modifiers?: NodeArray<Modifier>;
+ readonly isTypeOnly: boolean;
+ /** Will not be assigned in the case of `export * from "foo";` */
+ readonly exportClause?: NamedExportBindings;
+ /** If this is not a StringLiteral it will be a grammar error. */
+ readonly moduleSpecifier?: Expression;
+ readonly assertClause?: AssertClause;
+ }
+ export interface NamedImports extends Node {
+ readonly kind: SyntaxKind.NamedImports;
+ readonly parent: ImportClause;
+ readonly elements: NodeArray<ImportSpecifier>;
+ }
+ export interface NamedExports extends Node {
+ readonly kind: SyntaxKind.NamedExports;
+ readonly parent: ExportDeclaration;
+ readonly elements: NodeArray<ExportSpecifier>;
+ }
+ export type NamedImportsOrExports = NamedImports | NamedExports;
+ export interface ImportSpecifier extends NamedDeclaration {
+ readonly kind: SyntaxKind.ImportSpecifier;
+ readonly parent: NamedImports;
+ readonly propertyName?: Identifier;
+ readonly name: Identifier;
+ readonly isTypeOnly: boolean;
+ }
+ export interface ExportSpecifier extends NamedDeclaration, JSDocContainer {
+ readonly kind: SyntaxKind.ExportSpecifier;
+ readonly parent: NamedExports;
+ readonly isTypeOnly: boolean;
+ readonly propertyName?: Identifier;
+ readonly name: Identifier;
+ }
+ export type ImportOrExportSpecifier = ImportSpecifier | ExportSpecifier;
+ export type TypeOnlyCompatibleAliasDeclaration = ImportClause | ImportEqualsDeclaration | NamespaceImport | ImportOrExportSpecifier;
+ export type TypeOnlyAliasDeclaration = ImportClause & {
+ readonly isTypeOnly: true;
+ readonly name: Identifier;
+ } | ImportEqualsDeclaration & {
+ readonly isTypeOnly: true;
+ } | NamespaceImport & {
+ readonly parent: ImportClause & {
+ readonly isTypeOnly: true;
+ };
+ } | ImportSpecifier & ({
+ readonly isTypeOnly: true;
+ } | {
+ readonly parent: NamedImports & {
+ readonly parent: ImportClause & {
+ readonly isTypeOnly: true;
+ };
+ };
+ }) | ExportSpecifier & ({
+ readonly isTypeOnly: true;
+ } | {
+ readonly parent: NamedExports & {
+ readonly parent: ExportDeclaration & {
+ readonly isTypeOnly: true;
+ };
+ };
+ });
+ /**
+ * This is either an `export =` or an `export default` declaration.
+ * Unless `isExportEquals` is set, this node was parsed as an `export default`.
+ */
+ export interface ExportAssignment extends DeclarationStatement, JSDocContainer {
+ readonly kind: SyntaxKind.ExportAssignment;
+ readonly parent: SourceFile;
+ readonly modifiers?: NodeArray<Modifier>;
+ readonly isExportEquals?: boolean;
+ readonly expression: Expression;
+ }
+ export interface FileReference extends TextRange {
+ fileName: string;
+ resolutionMode?: SourceFile["impliedNodeFormat"];
+ }
+ export interface CheckJsDirective extends TextRange {
+ enabled: boolean;
+ }
+ export type CommentKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia;
+ export interface CommentRange extends TextRange {
+ hasTrailingNewLine?: boolean;
+ kind: CommentKind;
+ }
+ export interface SynthesizedComment extends CommentRange {
+ text: string;
+ pos: -1;
+ end: -1;
+ hasLeadingNewline?: boolean;
+ }
+ export interface JSDocTypeExpression extends TypeNode {
+ readonly kind: SyntaxKind.JSDocTypeExpression;
+ readonly type: TypeNode;
+ }
+ export interface JSDocNameReference extends Node {
+ readonly kind: SyntaxKind.JSDocNameReference;
+ readonly name: EntityName | JSDocMemberName;
+ }
+ /** Class#method reference in JSDoc */
+ export interface JSDocMemberName extends Node {
+ readonly kind: SyntaxKind.JSDocMemberName;
+ readonly left: EntityName | JSDocMemberName;
+ readonly right: Identifier;
+ }
+ export interface JSDocType extends TypeNode {
+ _jsDocTypeBrand: any;
+ }
+ export interface JSDocAllType extends JSDocType {
+ readonly kind: SyntaxKind.JSDocAllType;
+ }
+ export interface JSDocUnknownType extends JSDocType {
+ readonly kind: SyntaxKind.JSDocUnknownType;
+ }
+ export interface JSDocNonNullableType extends JSDocType {
+ readonly kind: SyntaxKind.JSDocNonNullableType;
+ readonly type: TypeNode;
+ readonly postfix: boolean;
+ }
+ export interface JSDocNullableType extends JSDocType {
+ readonly kind: SyntaxKind.JSDocNullableType;
+ readonly type: TypeNode;
+ readonly postfix: boolean;
+ }
+ export interface JSDocOptionalType extends JSDocType {
+ readonly kind: SyntaxKind.JSDocOptionalType;
+ readonly type: TypeNode;
+ }
+ export interface JSDocFunctionType extends JSDocType, SignatureDeclarationBase {
+ readonly kind: SyntaxKind.JSDocFunctionType;
+ }
+ export interface JSDocVariadicType extends JSDocType {
+ readonly kind: SyntaxKind.JSDocVariadicType;
+ readonly type: TypeNode;
+ }
+ export interface JSDocNamepathType extends JSDocType {
+ readonly kind: SyntaxKind.JSDocNamepathType;
+ readonly type: TypeNode;
+ }
+ export type JSDocTypeReferencingNode = JSDocVariadicType | JSDocOptionalType | JSDocNullableType | JSDocNonNullableType;
+ export interface JSDoc extends Node {
+ readonly kind: SyntaxKind.JSDoc;
+ readonly parent: HasJSDoc;
+ readonly tags?: NodeArray<JSDocTag>;
+ readonly comment?: string | NodeArray<JSDocComment>;
+ }
+ export interface JSDocTag extends Node {
+ readonly parent: JSDoc | JSDocTypeLiteral;
+ readonly tagName: Identifier;
+ readonly comment?: string | NodeArray<JSDocComment>;
+ }
+ export interface JSDocLink extends Node {
+ readonly kind: SyntaxKind.JSDocLink;
+ readonly name?: EntityName | JSDocMemberName;
+ text: string;
+ }
+ export interface JSDocLinkCode extends Node {
+ readonly kind: SyntaxKind.JSDocLinkCode;
+ readonly name?: EntityName | JSDocMemberName;
+ text: string;
+ }
+ export interface JSDocLinkPlain extends Node {
+ readonly kind: SyntaxKind.JSDocLinkPlain;
+ readonly name?: EntityName | JSDocMemberName;
+ text: string;
+ }
+ export type JSDocComment = JSDocText | JSDocLink | JSDocLinkCode | JSDocLinkPlain;
+ export interface JSDocText extends Node {
+ readonly kind: SyntaxKind.JSDocText;
+ text: string;
+ }
+ export interface JSDocUnknownTag extends JSDocTag {
+ readonly kind: SyntaxKind.JSDocTag;
+ }
+ /**
+ * Note that `@extends` is a synonym of `@augments`.
+ * Both tags are represented by this interface.
+ */
+ export interface JSDocAugmentsTag extends JSDocTag {
+ readonly kind: SyntaxKind.JSDocAugmentsTag;
+ readonly class: ExpressionWithTypeArguments & {
+ readonly expression: Identifier | PropertyAccessEntityNameExpression;
+ };
+ }
+ export interface JSDocImplementsTag extends JSDocTag {
+ readonly kind: SyntaxKind.JSDocImplementsTag;
+ readonly class: ExpressionWithTypeArguments & {
+ readonly expression: Identifier | PropertyAccessEntityNameExpression;
+ };
+ }
+ export interface JSDocAuthorTag extends JSDocTag {
+ readonly kind: SyntaxKind.JSDocAuthorTag;
+ }
+ export interface JSDocDeprecatedTag extends JSDocTag {
+ kind: SyntaxKind.JSDocDeprecatedTag;
+ }
+ export interface JSDocClassTag extends JSDocTag {
+ readonly kind: SyntaxKind.JSDocClassTag;
+ }
+ export interface JSDocPublicTag extends JSDocTag {
+ readonly kind: SyntaxKind.JSDocPublicTag;
+ }
+ export interface JSDocPrivateTag extends JSDocTag {
+ readonly kind: SyntaxKind.JSDocPrivateTag;
+ }
+ export interface JSDocProtectedTag extends JSDocTag {
+ readonly kind: SyntaxKind.JSDocProtectedTag;
+ }
+ export interface JSDocReadonlyTag extends JSDocTag {
+ readonly kind: SyntaxKind.JSDocReadonlyTag;
+ }
+ export interface JSDocOverrideTag extends JSDocTag {
+ readonly kind: SyntaxKind.JSDocOverrideTag;
+ }
+ export interface JSDocEnumTag extends JSDocTag, Declaration {
+ readonly kind: SyntaxKind.JSDocEnumTag;
+ readonly parent: JSDoc;
+ readonly typeExpression: JSDocTypeExpression;
+ }
+ export interface JSDocThisTag extends JSDocTag {
+ readonly kind: SyntaxKind.JSDocThisTag;
+ readonly typeExpression: JSDocTypeExpression;
+ }
+ export interface JSDocTemplateTag extends JSDocTag {
+ readonly kind: SyntaxKind.JSDocTemplateTag;
+ readonly constraint: JSDocTypeExpression | undefined;
+ readonly typeParameters: NodeArray<TypeParameterDeclaration>;
+ }
+ export interface JSDocSeeTag extends JSDocTag {
+ readonly kind: SyntaxKind.JSDocSeeTag;
+ readonly name?: JSDocNameReference;
+ }
+ export interface JSDocReturnTag extends JSDocTag {
+ readonly kind: SyntaxKind.JSDocReturnTag;
+ readonly typeExpression?: JSDocTypeExpression;
+ }
+ export interface JSDocTypeTag extends JSDocTag {
+ readonly kind: SyntaxKind.JSDocTypeTag;
+ readonly typeExpression: JSDocTypeExpression;
+ }
+ export interface JSDocTypedefTag extends JSDocTag, NamedDeclaration {
+ readonly kind: SyntaxKind.JSDocTypedefTag;
+ readonly parent: JSDoc;
+ readonly fullName?: JSDocNamespaceDeclaration | Identifier;
+ readonly name?: Identifier;
+ readonly typeExpression?: JSDocTypeExpression | JSDocTypeLiteral;
+ }
+ export interface JSDocCallbackTag extends JSDocTag, NamedDeclaration {
+ readonly kind: SyntaxKind.JSDocCallbackTag;
+ readonly parent: JSDoc;
+ readonly fullName?: JSDocNamespaceDeclaration | Identifier;
+ readonly name?: Identifier;
+ readonly typeExpression: JSDocSignature;
+ }
+ export interface JSDocSignature extends JSDocType, Declaration {
+ readonly kind: SyntaxKind.JSDocSignature;
+ readonly typeParameters?: readonly JSDocTemplateTag[];
+ readonly parameters: readonly JSDocParameterTag[];
+ readonly type: JSDocReturnTag | undefined;
+ }
+ export interface JSDocPropertyLikeTag extends JSDocTag, Declaration {
+ readonly parent: JSDoc;
+ readonly name: EntityName;
+ readonly typeExpression?: JSDocTypeExpression;
+ /** Whether the property name came before the type -- non-standard for JSDoc, but Typescript-like */
+ readonly isNameFirst: boolean;
+ readonly isBracketed: boolean;
+ }
+ export interface JSDocPropertyTag extends JSDocPropertyLikeTag {
+ readonly kind: SyntaxKind.JSDocPropertyTag;
+ }
+ export interface JSDocParameterTag extends JSDocPropertyLikeTag {
+ readonly kind: SyntaxKind.JSDocParameterTag;
+ }
+ export interface JSDocTypeLiteral extends JSDocType {
+ readonly kind: SyntaxKind.JSDocTypeLiteral;
+ readonly jsDocPropertyTags?: readonly JSDocPropertyLikeTag[];
+ /** If true, then this type literal represents an *array* of its type. */
+ readonly isArrayType: boolean;
+ }
+ export enum FlowFlags {
+ Unreachable = 1,
+ Start = 2,
+ BranchLabel = 4,
+ LoopLabel = 8,
+ Assignment = 16,
+ TrueCondition = 32,
+ FalseCondition = 64,
+ SwitchClause = 128,
+ ArrayMutation = 256,
+ Call = 512,
+ ReduceLabel = 1024,
+ Referenced = 2048,
+ Shared = 4096,
+ Label = 12,
+ Condition = 96
+ }
+ export type FlowNode = FlowStart | FlowLabel | FlowAssignment | FlowCondition | FlowSwitchClause | FlowArrayMutation | FlowCall | FlowReduceLabel;
+ export interface FlowNodeBase {
+ flags: FlowFlags;
+ id?: number;
+ }
+ export interface FlowStart extends FlowNodeBase {
+ node?: FunctionExpression | ArrowFunction | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration;
+ }
+ export interface FlowLabel extends FlowNodeBase {
+ antecedents: FlowNode[] | undefined;
+ }
+ export interface FlowAssignment extends FlowNodeBase {
+ node: Expression | VariableDeclaration | BindingElement;
+ antecedent: FlowNode;
+ }
+ export interface FlowCall extends FlowNodeBase {
+ node: CallExpression;
+ antecedent: FlowNode;
+ }
+ export interface FlowCondition extends FlowNodeBase {
+ node: Expression;
+ antecedent: FlowNode;
+ }
+ export interface FlowSwitchClause extends FlowNodeBase {
+ switchStatement: SwitchStatement;
+ clauseStart: number;
+ clauseEnd: number;
+ antecedent: FlowNode;
+ }
+ export interface FlowArrayMutation extends FlowNodeBase {
+ node: CallExpression | BinaryExpression;
+ antecedent: FlowNode;
+ }
+ export interface FlowReduceLabel extends FlowNodeBase {
+ target: FlowLabel;
+ antecedents: FlowNode[];
+ antecedent: FlowNode;
+ }
+ export type FlowType = Type | IncompleteType;
+ export interface IncompleteType {
+ flags: TypeFlags;
+ type: Type;
+ }
+ export interface AmdDependency {
+ path: string;
+ name?: string;
+ }
+ /**
+ * Subset of properties from SourceFile that are used in multiple utility functions
+ */
+ export interface SourceFileLike {
+ readonly text: string;
+ }
+ export interface SourceFile extends Declaration {
+ readonly kind: SyntaxKind.SourceFile;
+ readonly statements: NodeArray<Statement>;
+ readonly endOfFileToken: Token<SyntaxKind.EndOfFileToken>;
+ fileName: string;
+ text: string;
+ amdDependencies: readonly AmdDependency[];
+ moduleName?: string;
+ referencedFiles: readonly FileReference[];
+ typeReferenceDirectives: readonly FileReference[];
+ libReferenceDirectives: readonly FileReference[];
+ languageVariant: LanguageVariant;
+ isDeclarationFile: boolean;
+ /**
+ * lib.d.ts should have a reference comment like
+ *
+ * /// <reference no-default-lib="true"/>
+ *
+ * If any other file has this comment, it signals not to include lib.d.ts
+ * because this containing file is intended to act as a default library.
+ */
+ hasNoDefaultLib: boolean;
+ languageVersion: ScriptTarget;
+ /**
+ * When `module` is `Node16` or `NodeNext`, this field controls whether the
+ * source file in question is an ESNext-output-format file, or a CommonJS-output-format
+ * module. This is derived by the module resolver as it looks up the file, since
+ * it is derived from either the file extension of the module, or the containing
+ * `package.json` context, and affects both checking and emit.
+ *
+ * It is _public_ so that (pre)transformers can set this field,
+ * since it switches the builtin `node` module transform. Generally speaking, if unset,
+ * the field is treated as though it is `ModuleKind.CommonJS`.
+ *
+ * Note that this field is only set by the module resolution process when
+ * `moduleResolution` is `Node16` or `NodeNext`, which is implied by the `module` setting
+ * of `Node16` or `NodeNext`, respectively, but may be overriden (eg, by a `moduleResolution`
+ * of `node`). If so, this field will be unset and source files will be considered to be
+ * CommonJS-output-format by the node module transformer and type checker, regardless of extension or context.
+ */
+ impliedNodeFormat?: ModuleKind.ESNext | ModuleKind.CommonJS;
+ }
+ export interface Bundle extends Node {
+ readonly kind: SyntaxKind.Bundle;
+ readonly prepends: readonly (InputFiles | UnparsedSource)[];
+ readonly sourceFiles: readonly SourceFile[];
+ }
+ export interface InputFiles extends Node {
+ readonly kind: SyntaxKind.InputFiles;
+ javascriptPath?: string;
+ javascriptText: string;
+ javascriptMapPath?: string;
+ javascriptMapText?: string;
+ declarationPath?: string;
+ declarationText: string;
+ declarationMapPath?: string;
+ declarationMapText?: string;
+ }
+ export interface UnparsedSource extends Node {
+ readonly kind: SyntaxKind.UnparsedSource;
+ fileName: string;
+ text: string;
+ readonly prologues: readonly UnparsedPrologue[];
+ helpers: readonly UnscopedEmitHelper[] | undefined;
+ referencedFiles: readonly FileReference[];
+ typeReferenceDirectives: readonly FileReference[] | undefined;
+ libReferenceDirectives: readonly FileReference[];
+ hasNoDefaultLib?: boolean;
+ sourceMapPath?: string;
+ sourceMapText?: string;
+ readonly syntheticReferences?: readonly UnparsedSyntheticReference[];
+ readonly texts: readonly UnparsedSourceText[];
+ }
+ export type UnparsedSourceText = UnparsedPrepend | UnparsedTextLike;
+ export type UnparsedNode = UnparsedPrologue | UnparsedSourceText | UnparsedSyntheticReference;
+ export interface UnparsedSection extends Node {
+ readonly kind: SyntaxKind;
+ readonly parent: UnparsedSource;
+ readonly data?: string;
+ }
+ export interface UnparsedPrologue extends UnparsedSection {
+ readonly kind: SyntaxKind.UnparsedPrologue;
+ readonly parent: UnparsedSource;
+ readonly data: string;
+ }
+ export interface UnparsedPrepend extends UnparsedSection {
+ readonly kind: SyntaxKind.UnparsedPrepend;
+ readonly parent: UnparsedSource;
+ readonly data: string;
+ readonly texts: readonly UnparsedTextLike[];
+ }
+ export interface UnparsedTextLike extends UnparsedSection {
+ readonly kind: SyntaxKind.UnparsedText | SyntaxKind.UnparsedInternalText;
+ readonly parent: UnparsedSource;
+ }
+ export interface UnparsedSyntheticReference extends UnparsedSection {
+ readonly kind: SyntaxKind.UnparsedSyntheticReference;
+ readonly parent: UnparsedSource;
+ }
+ export interface JsonSourceFile extends SourceFile {
+ readonly statements: NodeArray<JsonObjectExpressionStatement>;
+ }
+ export interface TsConfigSourceFile extends JsonSourceFile {
+ extendedSourceFiles?: string[];
+ }
+ export interface JsonMinusNumericLiteral extends PrefixUnaryExpression {
+ readonly kind: SyntaxKind.PrefixUnaryExpression;
+ readonly operator: SyntaxKind.MinusToken;
+ readonly operand: NumericLiteral;
+ }
+ export type JsonObjectExpression = ObjectLiteralExpression | ArrayLiteralExpression | JsonMinusNumericLiteral | NumericLiteral | StringLiteral | BooleanLiteral | NullLiteral;
+ export interface JsonObjectExpressionStatement extends ExpressionStatement {
+ readonly expression: JsonObjectExpression;
+ }
+ export interface ScriptReferenceHost {
+ getCompilerOptions(): CompilerOptions;
+ getSourceFile(fileName: string): SourceFile | undefined;
+ getSourceFileByPath(path: Path): SourceFile | undefined;
+ getCurrentDirectory(): string;
+ }
+ export interface ParseConfigHost {
+ useCaseSensitiveFileNames: boolean;
+ readDirectory(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number): readonly string[];
+ /**
+ * Gets a value indicating whether the specified path exists and is a file.
+ * @param path The path to test.
+ */
+ fileExists(path: string): boolean;
+ readFile(path: string): string | undefined;
+ trace?(s: string): void;
+ }
+ /**
+ * Branded string for keeping track of when we've turned an ambiguous path
+ * specified like "./blah" to an absolute path to an actual
+ * tsconfig file, e.g. "/root/blah/tsconfig.json"
+ */
+ export type ResolvedConfigFileName = string & {
+ _isResolvedConfigFileName: never;
+ };
+ export interface WriteFileCallbackData {
+ }
+ export type WriteFileCallback = (fileName: string, text: string, writeByteOrderMark: boolean, onError?: (message: string) => void, sourceFiles?: readonly SourceFile[], data?: WriteFileCallbackData) => void;
+ export class OperationCanceledException {
+ }
+ export interface CancellationToken {
+ isCancellationRequested(): boolean;
+ /** @throws OperationCanceledException if isCancellationRequested is true */
+ throwIfCancellationRequested(): void;
+ }
+ export interface Program extends ScriptReferenceHost {
+ getCurrentDirectory(): string;
+ /**
+ * Get a list of root file names that were passed to a 'createProgram'
+ */
+ getRootFileNames(): readonly string[];
+ /**
+ * Get a list of files in the program
+ */
+ getSourceFiles(): readonly SourceFile[];
+ /**
+ * Emits the JavaScript and declaration files. If targetSourceFile is not specified, then
+ * the JavaScript and declaration files will be produced for all the files in this program.
+ * If targetSourceFile is specified, then only the JavaScript and declaration for that
+ * specific file will be generated.
+ *
+ * If writeFile is not specified then the writeFile callback from the compiler host will be
+ * used for writing the JavaScript and declaration files. Otherwise, the writeFile parameter
+ * will be invoked when writing the JavaScript and declaration files.
+ */
+ emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): EmitResult;
+ getOptionsDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[];
+ getGlobalDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[];
+ getSyntacticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly DiagnosticWithLocation[];
+ /** The first time this is called, it will return global diagnostics (no location). */
+ getSemanticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[];
+ getDeclarationDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly DiagnosticWithLocation[];
+ getConfigFileParsingDiagnostics(): readonly Diagnostic[];
+ /**
+ * Gets a type checker that can be used to semantically analyze source files in the program.
+ */
+ getTypeChecker(): TypeChecker;
+ getNodeCount(): number;
+ getIdentifierCount(): number;
+ getSymbolCount(): number;
+ getTypeCount(): number;
+ getInstantiationCount(): number;
+ getRelationCacheSizes(): {
+ assignable: number;
+ identity: number;
+ subtype: number;
+ strictSubtype: number;
+ };
+ isSourceFileFromExternalLibrary(file: SourceFile): boolean;
+ isSourceFileDefaultLibrary(file: SourceFile): boolean;
+ getProjectReferences(): readonly ProjectReference[] | undefined;
+ getResolvedProjectReferences(): readonly (ResolvedProjectReference | undefined)[] | undefined;
+ }
+ export interface ResolvedProjectReference {
+ commandLine: ParsedCommandLine;
+ sourceFile: SourceFile;
+ references?: readonly (ResolvedProjectReference | undefined)[];
+ }
+ export type CustomTransformerFactory = (context: TransformationContext) => CustomTransformer;
+ export interface CustomTransformer {
+ transformSourceFile(node: SourceFile): SourceFile;
+ transformBundle(node: Bundle): Bundle;
+ }
+ export interface CustomTransformers {
+ /** Custom transformers to evaluate before built-in .js transformations. */
+ before?: (TransformerFactory<SourceFile> | CustomTransformerFactory)[];
+ /** Custom transformers to evaluate after built-in .js transformations. */
+ after?: (TransformerFactory<SourceFile> | CustomTransformerFactory)[];
+ /** Custom transformers to evaluate after built-in .d.ts transformations. */
+ afterDeclarations?: (TransformerFactory<Bundle | SourceFile> | CustomTransformerFactory)[];
+ }
+ export interface SourceMapSpan {
+ /** Line number in the .js file. */
+ emittedLine: number;
+ /** Column number in the .js file. */
+ emittedColumn: number;
+ /** Line number in the .ts file. */
+ sourceLine: number;
+ /** Column number in the .ts file. */
+ sourceColumn: number;
+ /** Optional name (index into names array) associated with this span. */
+ nameIndex?: number;
+ /** .ts file (index into sources array) associated with this span */
+ sourceIndex: number;
+ }
+ /** Return code used by getEmitOutput function to indicate status of the function */
+ export enum ExitStatus {
+ Success = 0,
+ DiagnosticsPresent_OutputsSkipped = 1,
+ DiagnosticsPresent_OutputsGenerated = 2,
+ InvalidProject_OutputsSkipped = 3,
+ ProjectReferenceCycle_OutputsSkipped = 4,
+ /** @deprecated Use ProjectReferenceCycle_OutputsSkipped instead. */
+ ProjectReferenceCycle_OutputsSkupped = 4
+ }
+ export interface EmitResult {
+ emitSkipped: boolean;
+ /** Contains declaration emit diagnostics */
+ diagnostics: readonly Diagnostic[];
+ emittedFiles?: string[];
+ }
+ export interface TypeChecker {
+ getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type;
+ getDeclaredTypeOfSymbol(symbol: Symbol): Type;
+ getPropertiesOfType(type: Type): Symbol[];
+ getPropertyOfType(type: Type, propertyName: string): Symbol | undefined;
+ getPrivateIdentifierPropertyOfType(leftType: Type, name: string, location: Node): Symbol | undefined;
+ getIndexInfoOfType(type: Type, kind: IndexKind): IndexInfo | undefined;
+ getIndexInfosOfType(type: Type): readonly IndexInfo[];
+ getSignaturesOfType(type: Type, kind: SignatureKind): readonly Signature[];
+ getIndexTypeOfType(type: Type, kind: IndexKind): Type | undefined;
+ getBaseTypes(type: InterfaceType): BaseType[];
+ getBaseTypeOfLiteralType(type: Type): Type;
+ getWidenedType(type: Type): Type;
+ getReturnTypeOfSignature(signature: Signature): Type;
+ getNullableType(type: Type, flags: TypeFlags): Type;
+ getNonNullableType(type: Type): Type;
+ getTypeArguments(type: TypeReference): readonly Type[];
+ /** Note that the resulting nodes cannot be checked. */
+ typeToTypeNode(type: Type, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): TypeNode | undefined;
+ /** Note that the resulting nodes cannot be checked. */
+ signatureToSignatureDeclaration(signature: Signature, kind: SyntaxKind, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): SignatureDeclaration & {
+ typeArguments?: NodeArray<TypeNode>;
+ } | undefined;
+ /** Note that the resulting nodes cannot be checked. */
+ indexInfoToIndexSignatureDeclaration(indexInfo: IndexInfo, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): IndexSignatureDeclaration | undefined;
+ /** Note that the resulting nodes cannot be checked. */
+ symbolToEntityName(symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): EntityName | undefined;
+ /** Note that the resulting nodes cannot be checked. */
+ symbolToExpression(symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): Expression | undefined;
+ /** Note that the resulting nodes cannot be checked. */
+ symbolToTypeParameterDeclarations(symbol: Symbol, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): NodeArray<TypeParameterDeclaration> | undefined;
+ /** Note that the resulting nodes cannot be checked. */
+ symbolToParameterDeclaration(symbol: Symbol, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): ParameterDeclaration | undefined;
+ /** Note that the resulting nodes cannot be checked. */
+ typeParameterToDeclaration(parameter: TypeParameter, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): TypeParameterDeclaration | undefined;
+ getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[];
+ getSymbolAtLocation(node: Node): Symbol | undefined;
+ getSymbolsOfParameterPropertyDeclaration(parameter: ParameterDeclaration, parameterName: string): Symbol[];
+ /**
+ * The function returns the value (local variable) symbol of an identifier in the short-hand property assignment.
+ * This is necessary as an identifier in short-hand property assignment can contains two meaning: property name and property value.
+ */
+ getShorthandAssignmentValueSymbol(location: Node | undefined): Symbol | undefined;
+ getExportSpecifierLocalTargetSymbol(location: ExportSpecifier | Identifier): Symbol | undefined;
+ /**
+ * If a symbol is a local symbol with an associated exported symbol, returns the exported symbol.
+ * Otherwise returns its input.
+ * For example, at `export type T = number;`:
+ * - `getSymbolAtLocation` at the location `T` will return the exported symbol for `T`.
+ * - But the result of `getSymbolsInScope` will contain the *local* symbol for `T`, not the exported symbol.
+ * - Calling `getExportSymbolOfSymbol` on that local symbol will return the exported symbol.
+ */
+ getExportSymbolOfSymbol(symbol: Symbol): Symbol;
+ getPropertySymbolOfDestructuringAssignment(location: Identifier): Symbol | undefined;
+ getTypeOfAssignmentPattern(pattern: AssignmentPattern): Type;
+ getTypeAtLocation(node: Node): Type;
+ getTypeFromTypeNode(node: TypeNode): Type;
+ signatureToString(signature: Signature, enclosingDeclaration?: Node, flags?: TypeFormatFlags, kind?: SignatureKind): string;
+ typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string;
+ symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): string;
+ typePredicateToString(predicate: TypePredicate, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string;
+ getFullyQualifiedName(symbol: Symbol): string;
+ getAugmentedPropertiesOfType(type: Type): Symbol[];
+ getRootSymbols(symbol: Symbol): readonly Symbol[];
+ getSymbolOfExpando(node: Node, allowDeclaration: boolean): Symbol | undefined;
+ getContextualType(node: Expression): Type | undefined;
+ /**
+ * returns unknownSignature in the case of an error.
+ * returns undefined if the node is not valid.
+ * @param argumentCount Apparent number of arguments, passed in case of a possibly incomplete call. This should come from an ArgumentListInfo. See `signatureHelp.ts`.
+ */
+ getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[], argumentCount?: number): Signature | undefined;
+ getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature | undefined;
+ isImplementationOfOverload(node: SignatureDeclaration): boolean | undefined;
+ isUndefinedSymbol(symbol: Symbol): boolean;
+ isArgumentsSymbol(symbol: Symbol): boolean;
+ isUnknownSymbol(symbol: Symbol): boolean;
+ getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): string | number | undefined;
+ isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName | ImportTypeNode, propertyName: string): boolean;
+ /** Follow all aliases to get the original symbol. */
+ getAliasedSymbol(symbol: Symbol): Symbol;
+ /** Follow a *single* alias to get the immediately aliased symbol. */
+ getImmediateAliasedSymbol(symbol: Symbol): Symbol | undefined;
+ getExportsOfModule(moduleSymbol: Symbol): Symbol[];
+ getJsxIntrinsicTagNamesAt(location: Node): Symbol[];
+ isOptionalParameter(node: ParameterDeclaration): boolean;
+ getAmbientModules(): Symbol[];
+ tryGetMemberInModuleExports(memberName: string, moduleSymbol: Symbol): Symbol | undefined;
+ getApparentType(type: Type): Type;
+ getBaseConstraintOfType(type: Type): Type | undefined;
+ getDefaultFromTypeParameter(type: Type): Type | undefined;
+ getTypePredicateOfSignature(signature: Signature): TypePredicate | undefined;
+ /**
+ * Depending on the operation performed, it may be appropriate to throw away the checker
+ * if the cancellation token is triggered. Typically, if it is used for error checking
+ * and the operation is cancelled, then it should be discarded, otherwise it is safe to keep.
+ */
+ runWithCancellationToken<T>(token: CancellationToken, cb: (checker: TypeChecker) => T): T;
+ }
+ export enum NodeBuilderFlags {
+ None = 0,
+ NoTruncation = 1,
+ WriteArrayAsGenericType = 2,
+ GenerateNamesForShadowedTypeParams = 4,
+ UseStructuralFallback = 8,
+ ForbidIndexedAccessSymbolReferences = 16,
+ WriteTypeArgumentsOfSignature = 32,
+ UseFullyQualifiedType = 64,
+ UseOnlyExternalAliasing = 128,
+ SuppressAnyReturnType = 256,
+ WriteTypeParametersInQualifiedName = 512,
+ MultilineObjectLiterals = 1024,
+ WriteClassExpressionAsTypeLiteral = 2048,
+ UseTypeOfFunction = 4096,
+ OmitParameterModifiers = 8192,
+ UseAliasDefinedOutsideCurrentScope = 16384,
+ UseSingleQuotesForStringLiteralType = 268435456,
+ NoTypeReduction = 536870912,
+ OmitThisParameter = 33554432,
+ AllowThisInObjectLiteral = 32768,
+ AllowQualifiedNameInPlaceOfIdentifier = 65536,
+ /** @deprecated AllowQualifedNameInPlaceOfIdentifier. Use AllowQualifiedNameInPlaceOfIdentifier instead. */
+ AllowQualifedNameInPlaceOfIdentifier = 65536,
+ AllowAnonymousIdentifier = 131072,
+ AllowEmptyUnionOrIntersection = 262144,
+ AllowEmptyTuple = 524288,
+ AllowUniqueESSymbolType = 1048576,
+ AllowEmptyIndexInfoType = 2097152,
+ AllowNodeModulesRelativePaths = 67108864,
+ IgnoreErrors = 70221824,
+ InObjectTypeLiteral = 4194304,
+ InTypeAlias = 8388608,
+ InInitialEntityName = 16777216
+ }
+ export enum TypeFormatFlags {
+ None = 0,
+ NoTruncation = 1,
+ WriteArrayAsGenericType = 2,
+ UseStructuralFallback = 8,
+ WriteTypeArgumentsOfSignature = 32,
+ UseFullyQualifiedType = 64,
+ SuppressAnyReturnType = 256,
+ MultilineObjectLiterals = 1024,
+ WriteClassExpressionAsTypeLiteral = 2048,
+ UseTypeOfFunction = 4096,
+ OmitParameterModifiers = 8192,
+ UseAliasDefinedOutsideCurrentScope = 16384,
+ UseSingleQuotesForStringLiteralType = 268435456,
+ NoTypeReduction = 536870912,
+ OmitThisParameter = 33554432,
+ AllowUniqueESSymbolType = 1048576,
+ AddUndefined = 131072,
+ WriteArrowStyleSignature = 262144,
+ InArrayType = 524288,
+ InElementType = 2097152,
+ InFirstTypeArgument = 4194304,
+ InTypeAlias = 8388608,
+ /** @deprecated */ WriteOwnNameForAnyLike = 0,
+ NodeBuilderFlagsMask = 848330091
+ }
+ export enum SymbolFormatFlags {
+ None = 0,
+ WriteTypeParametersOrArguments = 1,
+ UseOnlyExternalAliasing = 2,
+ AllowAnyNodeKind = 4,
+ UseAliasDefinedOutsideCurrentScope = 8,
+ }
+ export enum TypePredicateKind {
+ This = 0,
+ Identifier = 1,
+ AssertsThis = 2,
+ AssertsIdentifier = 3
+ }
+ export interface TypePredicateBase {
+ kind: TypePredicateKind;
+ type: Type | undefined;
+ }
+ export interface ThisTypePredicate extends TypePredicateBase {
+ kind: TypePredicateKind.This;
+ parameterName: undefined;
+ parameterIndex: undefined;
+ type: Type;
+ }
+ export interface IdentifierTypePredicate extends TypePredicateBase {
+ kind: TypePredicateKind.Identifier;
+ parameterName: string;
+ parameterIndex: number;
+ type: Type;
+ }
+ export interface AssertsThisTypePredicate extends TypePredicateBase {
+ kind: TypePredicateKind.AssertsThis;
+ parameterName: undefined;
+ parameterIndex: undefined;
+ type: Type | undefined;
+ }
+ export interface AssertsIdentifierTypePredicate extends TypePredicateBase {
+ kind: TypePredicateKind.AssertsIdentifier;
+ parameterName: string;
+ parameterIndex: number;
+ type: Type | undefined;
+ }
+ export type TypePredicate = ThisTypePredicate | IdentifierTypePredicate | AssertsThisTypePredicate | AssertsIdentifierTypePredicate;
+ export enum SymbolFlags {
+ None = 0,
+ FunctionScopedVariable = 1,
+ BlockScopedVariable = 2,
+ Property = 4,
+ EnumMember = 8,
+ Function = 16,
+ Class = 32,
+ Interface = 64,
+ ConstEnum = 128,
+ RegularEnum = 256,
+ ValueModule = 512,
+ NamespaceModule = 1024,
+ TypeLiteral = 2048,
+ ObjectLiteral = 4096,
+ Method = 8192,
+ Constructor = 16384,
+ GetAccessor = 32768,
+ SetAccessor = 65536,
+ Signature = 131072,
+ TypeParameter = 262144,
+ TypeAlias = 524288,
+ ExportValue = 1048576,
+ Alias = 2097152,
+ Prototype = 4194304,
+ ExportStar = 8388608,
+ Optional = 16777216,
+ Transient = 33554432,
+ Assignment = 67108864,
+ ModuleExports = 134217728,
+ Enum = 384,
+ Variable = 3,
+ Value = 111551,
+ Type = 788968,
+ Namespace = 1920,
+ Module = 1536,
+ Accessor = 98304,
+ FunctionScopedVariableExcludes = 111550,
+ BlockScopedVariableExcludes = 111551,
+ ParameterExcludes = 111551,
+ PropertyExcludes = 0,
+ EnumMemberExcludes = 900095,
+ FunctionExcludes = 110991,
+ ClassExcludes = 899503,
+ InterfaceExcludes = 788872,
+ RegularEnumExcludes = 899327,
+ ConstEnumExcludes = 899967,
+ ValueModuleExcludes = 110735,
+ NamespaceModuleExcludes = 0,
+ MethodExcludes = 103359,
+ GetAccessorExcludes = 46015,
+ SetAccessorExcludes = 78783,
+ TypeParameterExcludes = 526824,
+ TypeAliasExcludes = 788968,
+ AliasExcludes = 2097152,
+ ModuleMember = 2623475,
+ ExportHasLocal = 944,
+ BlockScoped = 418,
+ PropertyOrAccessor = 98308,
+ ClassMember = 106500,
+ }
+ export interface Symbol {
+ flags: SymbolFlags;
+ escapedName: __String;
+ declarations?: Declaration[];
+ valueDeclaration?: Declaration;
+ members?: SymbolTable;
+ exports?: SymbolTable;
+ globalExports?: SymbolTable;
+ }
+ export enum InternalSymbolName {
+ Call = "__call",
+ Constructor = "__constructor",
+ New = "__new",
+ Index = "__index",
+ ExportStar = "__export",
+ Global = "__global",
+ Missing = "__missing",
+ Type = "__type",
+ Object = "__object",
+ JSXAttributes = "__jsxAttributes",
+ Class = "__class",
+ Function = "__function",
+ Computed = "__computed",
+ Resolving = "__resolving__",
+ ExportEquals = "export=",
+ Default = "default",
+ This = "this"
+ }
+ /**
+ * This represents a string whose leading underscore have been escaped by adding extra leading underscores.
+ * The shape of this brand is rather unique compared to others we've used.
+ * Instead of just an intersection of a string and an object, it is that union-ed
+ * with an intersection of void and an object. This makes it wholly incompatible
+ * with a normal string (which is good, it cannot be misused on assignment or on usage),
+ * while still being comparable with a normal string via === (also good) and castable from a string.
+ */
+ export type __String = (string & {
+ __escapedIdentifier: void;
+ }) | (void & {
+ __escapedIdentifier: void;
+ }) | InternalSymbolName;
+ /** ReadonlyMap where keys are `__String`s. */
+ export interface ReadonlyUnderscoreEscapedMap<T> extends ReadonlyESMap<__String, T> {
+ }
+ /** Map where keys are `__String`s. */
+ export interface UnderscoreEscapedMap<T> extends ESMap<__String, T>, ReadonlyUnderscoreEscapedMap<T> {
+ }
+ /** SymbolTable based on ES6 Map interface. */
+ export type SymbolTable = UnderscoreEscapedMap<Symbol>;
+ export enum TypeFlags {
+ Any = 1,
+ Unknown = 2,
+ String = 4,
+ Number = 8,
+ Boolean = 16,
+ Enum = 32,
+ BigInt = 64,
+ StringLiteral = 128,
+ NumberLiteral = 256,
+ BooleanLiteral = 512,
+ EnumLiteral = 1024,
+ BigIntLiteral = 2048,
+ ESSymbol = 4096,
+ UniqueESSymbol = 8192,
+ Void = 16384,
+ Undefined = 32768,
+ Null = 65536,
+ Never = 131072,
+ TypeParameter = 262144,
+ Object = 524288,
+ Union = 1048576,
+ Intersection = 2097152,
+ Index = 4194304,
+ IndexedAccess = 8388608,
+ Conditional = 16777216,
+ Substitution = 33554432,
+ NonPrimitive = 67108864,
+ TemplateLiteral = 134217728,
+ StringMapping = 268435456,
+ Literal = 2944,
+ Unit = 109440,
+ StringOrNumberLiteral = 384,
+ PossiblyFalsy = 117724,
+ StringLike = 402653316,
+ NumberLike = 296,
+ BigIntLike = 2112,
+ BooleanLike = 528,
+ EnumLike = 1056,
+ ESSymbolLike = 12288,
+ VoidLike = 49152,
+ UnionOrIntersection = 3145728,
+ StructuredType = 3670016,
+ TypeVariable = 8650752,
+ InstantiableNonPrimitive = 58982400,
+ InstantiablePrimitive = 406847488,
+ Instantiable = 465829888,
+ StructuredOrInstantiable = 469499904,
+ Narrowable = 536624127,
+ }
+ export type DestructuringPattern = BindingPattern | ObjectLiteralExpression | ArrayLiteralExpression;
+ export interface Type {
+ flags: TypeFlags;
+ symbol: Symbol;
+ pattern?: DestructuringPattern;
+ aliasSymbol?: Symbol;
+ aliasTypeArguments?: readonly Type[];
+ }
+ export interface LiteralType extends Type {
+ value: string | number | PseudoBigInt;
+ freshType: LiteralType;
+ regularType: LiteralType;
+ }
+ export interface UniqueESSymbolType extends Type {
+ symbol: Symbol;
+ escapedName: __String;
+ }
+ export interface StringLiteralType extends LiteralType {
+ value: string;
+ }
+ export interface NumberLiteralType extends LiteralType {
+ value: number;
+ }
+ export interface BigIntLiteralType extends LiteralType {
+ value: PseudoBigInt;
+ }
+ export interface EnumType extends Type {
+ }
+ export enum ObjectFlags {
+ Class = 1,
+ Interface = 2,
+ Reference = 4,
+ Tuple = 8,
+ Anonymous = 16,
+ Mapped = 32,
+ Instantiated = 64,
+ ObjectLiteral = 128,
+ EvolvingArray = 256,
+ ObjectLiteralPatternWithComputedProperties = 512,
+ ReverseMapped = 1024,
+ JsxAttributes = 2048,
+ JSLiteral = 4096,
+ FreshLiteral = 8192,
+ ArrayLiteral = 16384,
+ ClassOrInterface = 3,
+ ContainsSpread = 2097152,
+ ObjectRestType = 4194304,
+ InstantiationExpressionType = 8388608,
+ }
+ export interface ObjectType extends Type {
+ objectFlags: ObjectFlags;
+ }
+ /** Class and interface types (ObjectFlags.Class and ObjectFlags.Interface). */
+ export interface InterfaceType extends ObjectType {
+ typeParameters: TypeParameter[] | undefined;
+ outerTypeParameters: TypeParameter[] | undefined;
+ localTypeParameters: TypeParameter[] | undefined;
+ thisType: TypeParameter | undefined;
+ }
+ export type BaseType = ObjectType | IntersectionType | TypeVariable;
+ export interface InterfaceTypeWithDeclaredMembers extends InterfaceType {
+ declaredProperties: Symbol[];
+ declaredCallSignatures: Signature[];
+ declaredConstructSignatures: Signature[];
+ declaredIndexInfos: IndexInfo[];
+ }
+ /**
+ * Type references (ObjectFlags.Reference). When a class or interface has type parameters or
+ * a "this" type, references to the class or interface are made using type references. The
+ * typeArguments property specifies the types to substitute for the type parameters of the
+ * class or interface and optionally includes an extra element that specifies the type to
+ * substitute for "this" in the resulting instantiation. When no extra argument is present,
+ * the type reference itself is substituted for "this". The typeArguments property is undefined
+ * if the class or interface has no type parameters and the reference isn't specifying an
+ * explicit "this" argument.
+ */
+ export interface TypeReference extends ObjectType {
+ target: GenericType;
+ node?: TypeReferenceNode | ArrayTypeNode | TupleTypeNode;
+ }
+ export interface DeferredTypeReference extends TypeReference {
+ }
+ export interface GenericType extends InterfaceType, TypeReference {
+ }
+ export enum ElementFlags {
+ Required = 1,
+ Optional = 2,
+ Rest = 4,
+ Variadic = 8,
+ Fixed = 3,
+ Variable = 12,
+ NonRequired = 14,
+ NonRest = 11
+ }
+ export interface TupleType extends GenericType {
+ elementFlags: readonly ElementFlags[];
+ minLength: number;
+ fixedLength: number;
+ hasRestElement: boolean;
+ combinedFlags: ElementFlags;
+ readonly: boolean;
+ labeledElementDeclarations?: readonly (NamedTupleMember | ParameterDeclaration)[];
+ }
+ export interface TupleTypeReference extends TypeReference {
+ target: TupleType;
+ }
+ export interface UnionOrIntersectionType extends Type {
+ types: Type[];
+ }
+ export interface UnionType extends UnionOrIntersectionType {
+ }
+ export interface IntersectionType extends UnionOrIntersectionType {
+ }
+ export type StructuredType = ObjectType | UnionType | IntersectionType;
+ export interface EvolvingArrayType extends ObjectType {
+ elementType: Type;
+ finalArrayType?: Type;
+ }
+ export interface InstantiableType extends Type {
+ }
+ export interface TypeParameter extends InstantiableType {
+ }
+ export interface IndexedAccessType extends InstantiableType {
+ objectType: Type;
+ indexType: Type;
+ constraint?: Type;
+ simplifiedForReading?: Type;
+ simplifiedForWriting?: Type;
+ }
+ export type TypeVariable = TypeParameter | IndexedAccessType;
+ export interface IndexType extends InstantiableType {
+ type: InstantiableType | UnionOrIntersectionType;
+ }
+ export interface ConditionalRoot {
+ node: ConditionalTypeNode;
+ checkType: Type;
+ extendsType: Type;
+ isDistributive: boolean;
+ inferTypeParameters?: TypeParameter[];
+ outerTypeParameters?: TypeParameter[];
+ instantiations?: Map<Type>;
+ aliasSymbol?: Symbol;
+ aliasTypeArguments?: Type[];
+ }
+ export interface ConditionalType extends InstantiableType {
+ root: ConditionalRoot;
+ checkType: Type;
+ extendsType: Type;
+ resolvedTrueType?: Type;
+ resolvedFalseType?: Type;
+ }
+ export interface TemplateLiteralType extends InstantiableType {
+ texts: readonly string[];
+ types: readonly Type[];
+ }
+ export interface StringMappingType extends InstantiableType {
+ symbol: Symbol;
+ type: Type;
+ }
+ export interface SubstitutionType extends InstantiableType {
+ objectFlags: ObjectFlags;
+ baseType: Type;
+ substitute: Type;
+ }
+ export enum SignatureKind {
+ Call = 0,
+ Construct = 1
+ }
+ export interface Signature {
+ declaration?: SignatureDeclaration | JSDocSignature;
+ typeParameters?: readonly TypeParameter[];
+ parameters: readonly Symbol[];
+ }
+ export enum IndexKind {
+ String = 0,
+ Number = 1
+ }
+ export interface IndexInfo {
+ keyType: Type;
+ type: Type;
+ isReadonly: boolean;
+ declaration?: IndexSignatureDeclaration;
+ }
+ export enum InferencePriority {
+ NakedTypeVariable = 1,
+ SpeculativeTuple = 2,
+ SubstituteSource = 4,
+ HomomorphicMappedType = 8,
+ PartialHomomorphicMappedType = 16,
+ MappedTypeConstraint = 32,
+ ContravariantConditional = 64,
+ ReturnType = 128,
+ LiteralKeyof = 256,
+ NoConstraints = 512,
+ AlwaysStrict = 1024,
+ MaxValue = 2048,
+ PriorityImpliesCombination = 416,
+ Circularity = -1
+ }
+ /** @deprecated Use FileExtensionInfo instead. */
+ export type JsFileExtensionInfo = FileExtensionInfo;
+ export interface FileExtensionInfo {
+ extension: string;
+ isMixedContent: boolean;
+ scriptKind?: ScriptKind;
+ }
+ export interface DiagnosticMessage {
+ key: string;
+ category: DiagnosticCategory;
+ code: number;
+ message: string;
+ reportsUnnecessary?: {};
+ reportsDeprecated?: {};
+ }
+ /**
+ * A linked list of formatted diagnostic messages to be used as part of a multiline message.
+ * It is built from the bottom up, leaving the head to be the "main" diagnostic.
+ * While it seems that DiagnosticMessageChain is structurally similar to DiagnosticMessage,
+ * the difference is that messages are all preformatted in DMC.
+ */
+ export interface DiagnosticMessageChain {
+ messageText: string;
+ category: DiagnosticCategory;
+ code: number;
+ next?: DiagnosticMessageChain[];
+ }
+ export interface Diagnostic extends DiagnosticRelatedInformation {
+ /** May store more in future. For now, this will simply be `true` to indicate when a diagnostic is an unused-identifier diagnostic. */
+ reportsUnnecessary?: {};
+ reportsDeprecated?: {};
+ source?: string;
+ relatedInformation?: DiagnosticRelatedInformation[];
+ }
+ export interface DiagnosticRelatedInformation {
+ category: DiagnosticCategory;
+ code: number;
+ file: SourceFile | undefined;
+ start: number | undefined;
+ length: number | undefined;
+ messageText: string | DiagnosticMessageChain;
+ }
+ export interface DiagnosticWithLocation extends Diagnostic {
+ file: SourceFile;
+ start: number;
+ length: number;
+ }
+ export enum DiagnosticCategory {
+ Warning = 0,
+ Error = 1,
+ Suggestion = 2,
+ Message = 3
+ }
+ export enum ModuleResolutionKind {
+ Classic = 1,
+ NodeJs = 2,
+ Node16 = 3,
+ NodeNext = 99
+ }
+ export enum ModuleDetectionKind {
+ /**
+ * Files with imports, exports and/or import.meta are considered modules
+ */
+ Legacy = 1,
+ /**
+ * Legacy, but also files with jsx under react-jsx or react-jsxdev and esm mode files under moduleResolution: node16+
+ */
+ Auto = 2,
+ /**
+ * Consider all non-declaration files modules, regardless of present syntax
+ */
+ Force = 3
+ }
+ export interface PluginImport {
+ name: string;
+ }
+ export interface ProjectReference {
+ /** A normalized path on disk */
+ path: string;
+ /** The path as the user originally wrote it */
+ originalPath?: string;
+ /** True if the output of this reference should be prepended to the output of this project. Only valid for --outFile compilations */
+ prepend?: boolean;
+ /** True if it is intended that this reference form a circularity */
+ circular?: boolean;
+ }
+ export enum WatchFileKind {
+ FixedPollingInterval = 0,
+ PriorityPollingInterval = 1,
+ DynamicPriorityPolling = 2,
+ FixedChunkSizePolling = 3,
+ UseFsEvents = 4,
+ UseFsEventsOnParentDirectory = 5
+ }
+ export enum WatchDirectoryKind {
+ UseFsEvents = 0,
+ FixedPollingInterval = 1,
+ DynamicPriorityPolling = 2,
+ FixedChunkSizePolling = 3
+ }
+ export enum PollingWatchKind {
+ FixedInterval = 0,
+ PriorityInterval = 1,
+ DynamicPriority = 2,
+ FixedChunkSize = 3
+ }
+ export type CompilerOptionsValue = string | number | boolean | (string | number)[] | string[] | MapLike<string[]> | PluginImport[] | ProjectReference[] | null | undefined;
+ export interface CompilerOptions {
+ allowJs?: boolean;
+ allowSyntheticDefaultImports?: boolean;
+ allowUmdGlobalAccess?: boolean;
+ allowUnreachableCode?: boolean;
+ allowUnusedLabels?: boolean;
+ alwaysStrict?: boolean;
+ baseUrl?: string;
+ charset?: string;
+ checkJs?: boolean;
+ declaration?: boolean;
+ declarationMap?: boolean;
+ emitDeclarationOnly?: boolean;
+ declarationDir?: string;
+ disableSizeLimit?: boolean;
+ disableSourceOfProjectReferenceRedirect?: boolean;
+ disableSolutionSearching?: boolean;
+ disableReferencedProjectLoad?: boolean;
+ downlevelIteration?: boolean;
+ emitBOM?: boolean;
+ emitDecoratorMetadata?: boolean;
+ exactOptionalPropertyTypes?: boolean;
+ experimentalDecorators?: boolean;
+ forceConsistentCasingInFileNames?: boolean;
+ importHelpers?: boolean;
+ importsNotUsedAsValues?: ImportsNotUsedAsValues;
+ inlineSourceMap?: boolean;
+ inlineSources?: boolean;
+ isolatedModules?: boolean;
+ jsx?: JsxEmit;
+ keyofStringsOnly?: boolean;
+ lib?: string[];
+ locale?: string;
+ mapRoot?: string;
+ maxNodeModuleJsDepth?: number;
+ module?: ModuleKind;
+ moduleResolution?: ModuleResolutionKind;
+ moduleSuffixes?: string[];
+ moduleDetection?: ModuleDetectionKind;
+ newLine?: NewLineKind;
+ noEmit?: boolean;
+ noEmitHelpers?: boolean;
+ noEmitOnError?: boolean;
+ noErrorTruncation?: boolean;
+ noFallthroughCasesInSwitch?: boolean;
+ noImplicitAny?: boolean;
+ noImplicitReturns?: boolean;
+ noImplicitThis?: boolean;
+ noStrictGenericChecks?: boolean;
+ noUnusedLocals?: boolean;
+ noUnusedParameters?: boolean;
+ noImplicitUseStrict?: boolean;
+ noPropertyAccessFromIndexSignature?: boolean;
+ assumeChangesOnlyAffectDirectDependencies?: boolean;
+ noLib?: boolean;
+ noResolve?: boolean;
+ noUncheckedIndexedAccess?: boolean;
+ out?: string;
+ outDir?: string;
+ outFile?: string;
+ paths?: MapLike<string[]>;
+ preserveConstEnums?: boolean;
+ noImplicitOverride?: boolean;
+ preserveSymlinks?: boolean;
+ preserveValueImports?: boolean;
+ project?: string;
+ reactNamespace?: string;
+ jsxFactory?: string;
+ jsxFragmentFactory?: string;
+ jsxImportSource?: string;
+ composite?: boolean;
+ incremental?: boolean;
+ tsBuildInfoFile?: string;
+ removeComments?: boolean;
+ rootDir?: string;
+ rootDirs?: string[];
+ skipLibCheck?: boolean;
+ skipDefaultLibCheck?: boolean;
+ sourceMap?: boolean;
+ sourceRoot?: string;
+ strict?: boolean;
+ strictFunctionTypes?: boolean;
+ strictBindCallApply?: boolean;
+ strictNullChecks?: boolean;
+ strictPropertyInitialization?: boolean;
+ stripInternal?: boolean;
+ suppressExcessPropertyErrors?: boolean;
+ suppressImplicitAnyIndexErrors?: boolean;
+ target?: ScriptTarget;
+ traceResolution?: boolean;
+ useUnknownInCatchVariables?: boolean;
+ resolveJsonModule?: boolean;
+ types?: string[];
+ /** Paths used to compute primary types search locations */
+ typeRoots?: string[];
+ esModuleInterop?: boolean;
+ useDefineForClassFields?: boolean;
+ [option: string]: CompilerOptionsValue | TsConfigSourceFile | undefined;
+ }
+ export interface WatchOptions {
+ watchFile?: WatchFileKind;
+ watchDirectory?: WatchDirectoryKind;
+ fallbackPolling?: PollingWatchKind;
+ synchronousWatchDirectory?: boolean;
+ excludeDirectories?: string[];
+ excludeFiles?: string[];
+ [option: string]: CompilerOptionsValue | undefined;
+ }
+ export interface TypeAcquisition {
+ /**
+ * @deprecated typingOptions.enableAutoDiscovery
+ * Use typeAcquisition.enable instead.
+ */
+ enableAutoDiscovery?: boolean;
+ enable?: boolean;
+ include?: string[];
+ exclude?: string[];
+ disableFilenameBasedTypeAcquisition?: boolean;
+ [option: string]: CompilerOptionsValue | undefined;
+ }
+ export enum ModuleKind {
+ None = 0,
+ CommonJS = 1,
+ AMD = 2,
+ UMD = 3,
+ System = 4,
+ ES2015 = 5,
+ ES2020 = 6,
+ ES2022 = 7,
+ ESNext = 99,
+ Node16 = 100,
+ NodeNext = 199
+ }
+ export enum JsxEmit {
+ None = 0,
+ Preserve = 1,
+ React = 2,
+ ReactNative = 3,
+ ReactJSX = 4,
+ ReactJSXDev = 5
+ }
+ export enum ImportsNotUsedAsValues {
+ Remove = 0,
+ Preserve = 1,
+ Error = 2
+ }
+ export enum NewLineKind {
+ CarriageReturnLineFeed = 0,
+ LineFeed = 1
+ }
+ export interface LineAndCharacter {
+ /** 0-based. */
+ line: number;
+ character: number;
+ }
+ export enum ScriptKind {
+ Unknown = 0,
+ JS = 1,
+ JSX = 2,
+ TS = 3,
+ TSX = 4,
+ External = 5,
+ JSON = 6,
+ /**
+ * Used on extensions that doesn't define the ScriptKind but the content defines it.
+ * Deferred extensions are going to be included in all project contexts.
+ */
+ Deferred = 7
+ }
+ export enum ScriptTarget {
+ ES3 = 0,
+ ES5 = 1,
+ ES2015 = 2,
+ ES2016 = 3,
+ ES2017 = 4,
+ ES2018 = 5,
+ ES2019 = 6,
+ ES2020 = 7,
+ ES2021 = 8,
+ ES2022 = 9,
+ ESNext = 99,
+ JSON = 100,
+ Latest = 99
+ }
+ export enum LanguageVariant {
+ Standard = 0,
+ JSX = 1
+ }
+ /** Either a parsed command line or a parsed tsconfig.json */
+ export interface ParsedCommandLine {
+ options: CompilerOptions;
+ typeAcquisition?: TypeAcquisition;
+ fileNames: string[];
+ projectReferences?: readonly ProjectReference[];
+ watchOptions?: WatchOptions;
+ raw?: any;
+ errors: Diagnostic[];
+ wildcardDirectories?: MapLike<WatchDirectoryFlags>;
+ compileOnSave?: boolean;
+ }
+ export enum WatchDirectoryFlags {
+ None = 0,
+ Recursive = 1
+ }
+ export interface CreateProgramOptions {
+ rootNames: readonly string[];
+ options: CompilerOptions;
+ projectReferences?: readonly ProjectReference[];
+ host?: CompilerHost;
+ oldProgram?: Program;
+ configFileParsingDiagnostics?: readonly Diagnostic[];
+ }
+ export interface ModuleResolutionHost {
+ fileExists(fileName: string): boolean;
+ readFile(fileName: string): string | undefined;
+ trace?(s: string): void;
+ directoryExists?(directoryName: string): boolean;
+ /**
+ * Resolve a symbolic link.
+ * @see https://nodejs.org/api/fs.html#fs_fs_realpathsync_path_options
+ */
+ realpath?(path: string): string;
+ getCurrentDirectory?(): string;
+ getDirectories?(path: string): string[];
+ useCaseSensitiveFileNames?: boolean | (() => boolean) | undefined;
+ }
+ /**
+ * Used by services to specify the minimum host area required to set up source files under any compilation settings
+ */
+ export interface MinimalResolutionCacheHost extends ModuleResolutionHost {
+ getCompilationSettings(): CompilerOptions;
+ getCompilerHost?(): CompilerHost | undefined;
+ }
+ /**
+ * Represents the result of module resolution.
+ * Module resolution will pick up tsx/jsx/js files even if '--jsx' and '--allowJs' are turned off.
+ * The Program will then filter results based on these flags.
+ *
+ * Prefer to return a `ResolvedModuleFull` so that the file type does not have to be inferred.
+ */
+ export interface ResolvedModule {
+ /** Path of the file the module was resolved to. */
+ resolvedFileName: string;
+ /** True if `resolvedFileName` comes from `node_modules`. */
+ isExternalLibraryImport?: boolean;
+ }
+ /**
+ * ResolvedModule with an explicitly provided `extension` property.
+ * Prefer this over `ResolvedModule`.
+ * If changing this, remember to change `moduleResolutionIsEqualTo`.
+ */
+ export interface ResolvedModuleFull extends ResolvedModule {
+ /**
+ * Extension of resolvedFileName. This must match what's at the end of resolvedFileName.
+ * This is optional for backwards-compatibility, but will be added if not provided.
+ */
+ extension: Extension;
+ packageId?: PackageId;
+ }
+ /**
+ * Unique identifier with a package name and version.
+ * If changing this, remember to change `packageIdIsEqual`.
+ */
+ export interface PackageId {
+ /**
+ * Name of the package.
+ * Should not include `@types`.
+ * If accessing a non-index file, this should include its name e.g. "foo/bar".
+ */
+ name: string;
+ /**
+ * Name of a submodule within this package.
+ * May be "".
+ */
+ subModuleName: string;
+ /** Version of the package, e.g. "1.2.3" */
+ version: string;
+ }
+ export enum Extension {
+ Ts = ".ts",
+ Tsx = ".tsx",
+ Dts = ".d.ts",
+ Js = ".js",
+ Jsx = ".jsx",
+ Json = ".json",
+ TsBuildInfo = ".tsbuildinfo",
+ Mjs = ".mjs",
+ Mts = ".mts",
+ Dmts = ".d.mts",
+ Cjs = ".cjs",
+ Cts = ".cts",
+ Dcts = ".d.cts"
+ }
+ export interface ResolvedModuleWithFailedLookupLocations {
+ readonly resolvedModule: ResolvedModuleFull | undefined;
+ }
+ export interface ResolvedTypeReferenceDirective {
+ primary: boolean;
+ resolvedFileName: string | undefined;
+ packageId?: PackageId;
+ /** True if `resolvedFileName` comes from `node_modules`. */
+ isExternalLibraryImport?: boolean;
+ }
+ export interface ResolvedTypeReferenceDirectiveWithFailedLookupLocations {
+ readonly resolvedTypeReferenceDirective: ResolvedTypeReferenceDirective | undefined;
+ readonly failedLookupLocations: string[];
+ }
+ export interface CompilerHost extends ModuleResolutionHost {
+ getSourceFile(fileName: string, languageVersionOrOptions: ScriptTarget | CreateSourceFileOptions, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean): SourceFile | undefined;
+ getSourceFileByPath?(fileName: string, path: Path, languageVersionOrOptions: ScriptTarget | CreateSourceFileOptions, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean): SourceFile | undefined;
+ getCancellationToken?(): CancellationToken;
+ getDefaultLibFileName(options: CompilerOptions): string;
+ getDefaultLibLocation?(): string;
+ writeFile: WriteFileCallback;
+ getCurrentDirectory(): string;
+ getCanonicalFileName(fileName: string): string;
+ useCaseSensitiveFileNames(): boolean;
+ getNewLine(): string;
+ readDirectory?(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number): string[];
+ resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile): (ResolvedModule | undefined)[];
+ /**
+ * Returns the module resolution cache used by a provided `resolveModuleNames` implementation so that any non-name module resolution operations (eg, package.json lookup) can reuse it
+ */
+ getModuleResolutionCache?(): ModuleResolutionCache | undefined;
+ /**
+ * This method is a companion for 'resolveModuleNames' and is used to resolve 'types' references to actual type declaration files
+ */
+ resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: SourceFile["impliedNodeFormat"] | undefined): (ResolvedTypeReferenceDirective | undefined)[];
+ getEnvironmentVariable?(name: string): string | undefined;
+ createHash?(data: string): string;
+ getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined;
+ }
+ export interface SourceMapRange extends TextRange {
+ source?: SourceMapSource;
+ }
+ export interface SourceMapSource {
+ fileName: string;
+ text: string;
+ skipTrivia?: (pos: number) => number;
+ }
+ export enum EmitFlags {
+ None = 0,
+ SingleLine = 1,
+ AdviseOnEmitNode = 2,
+ NoSubstitution = 4,
+ CapturesThis = 8,
+ NoLeadingSourceMap = 16,
+ NoTrailingSourceMap = 32,
+ NoSourceMap = 48,
+ NoNestedSourceMaps = 64,
+ NoTokenLeadingSourceMaps = 128,
+ NoTokenTrailingSourceMaps = 256,
+ NoTokenSourceMaps = 384,
+ NoLeadingComments = 512,
+ NoTrailingComments = 1024,
+ NoComments = 1536,
+ NoNestedComments = 2048,
+ HelperName = 4096,
+ ExportName = 8192,
+ LocalName = 16384,
+ InternalName = 32768,
+ Indented = 65536,
+ NoIndentation = 131072,
+ AsyncFunctionBody = 262144,
+ ReuseTempVariableScope = 524288,
+ CustomPrologue = 1048576,
+ NoHoisting = 2097152,
+ HasEndOfDeclarationMarker = 4194304,
+ Iterator = 8388608,
+ NoAsciiEscaping = 16777216,
+ }
+ export interface EmitHelperBase {
+ readonly name: string;
+ readonly scoped: boolean;
+ readonly text: string | ((node: EmitHelperUniqueNameCallback) => string);
+ readonly priority?: number;
+ readonly dependencies?: EmitHelper[];
+ }
+ export interface ScopedEmitHelper extends EmitHelperBase {
+ readonly scoped: true;
+ }
+ export interface UnscopedEmitHelper extends EmitHelperBase {
+ readonly scoped: false;
+ readonly text: string;
+ }
+ export type EmitHelper = ScopedEmitHelper | UnscopedEmitHelper;
+ export type EmitHelperUniqueNameCallback = (name: string) => string;
+ export enum EmitHint {
+ SourceFile = 0,
+ Expression = 1,
+ IdentifierName = 2,
+ MappedTypeParameter = 3,
+ Unspecified = 4,
+ EmbeddedStatement = 5,
+ JsxAttributeValue = 6
+ }
+ export enum OuterExpressionKinds {
+ Parentheses = 1,
+ TypeAssertions = 2,
+ NonNullAssertions = 4,
+ PartiallyEmittedExpressions = 8,
+ Assertions = 6,
+ All = 15,
+ ExcludeJSDocTypeAssertion = 16
+ }
+ export type TypeOfTag = "undefined" | "number" | "bigint" | "boolean" | "string" | "symbol" | "object" | "function";
+ export interface NodeFactory {
+ createNodeArray<T extends Node>(elements?: readonly T[], hasTrailingComma?: boolean): NodeArray<T>;
+ createNumericLiteral(value: string | number, numericLiteralFlags?: TokenFlags): NumericLiteral;
+ createBigIntLiteral(value: string | PseudoBigInt): BigIntLiteral;
+ createStringLiteral(text: string, isSingleQuote?: boolean): StringLiteral;
+ createStringLiteralFromNode(sourceNode: PropertyNameLiteral, isSingleQuote?: boolean): StringLiteral;
+ createRegularExpressionLiteral(text: string): RegularExpressionLiteral;
+ createIdentifier(text: string): Identifier;
+ /**
+ * Create a unique temporary variable.
+ * @param recordTempVariable An optional callback used to record the temporary variable name. This
+ * should usually be a reference to `hoistVariableDeclaration` from a `TransformationContext`, but
+ * can be `undefined` if you plan to record the temporary variable manually.
+ * @param reservedInNestedScopes When `true`, reserves the temporary variable name in all nested scopes
+ * during emit so that the variable can be referenced in a nested function body. This is an alternative to
+ * setting `EmitFlags.ReuseTempVariableScope` on the nested function itself.
+ */
+ createTempVariable(recordTempVariable: ((node: Identifier) => void) | undefined, reservedInNestedScopes?: boolean): Identifier;
+ /**
+ * Create a unique temporary variable for use in a loop.
+ * @param reservedInNestedScopes When `true`, reserves the temporary variable name in all nested scopes
+ * during emit so that the variable can be referenced in a nested function body. This is an alternative to
+ * setting `EmitFlags.ReuseTempVariableScope` on the nested function itself.
+ */
+ createLoopVariable(reservedInNestedScopes?: boolean): Identifier;
+ /** Create a unique name based on the supplied text. */
+ createUniqueName(text: string, flags?: GeneratedIdentifierFlags): Identifier;
+ /** Create a unique name generated for a node. */
+ getGeneratedNameForNode(node: Node | undefined, flags?: GeneratedIdentifierFlags): Identifier;
+ createPrivateIdentifier(text: string): PrivateIdentifier;
+ createToken(token: SyntaxKind.SuperKeyword): SuperExpression;
+ createToken(token: SyntaxKind.ThisKeyword): ThisExpression;
+ createToken(token: SyntaxKind.NullKeyword): NullLiteral;
+ createToken(token: SyntaxKind.TrueKeyword): TrueLiteral;
+ createToken(token: SyntaxKind.FalseKeyword): FalseLiteral;
+ createToken<TKind extends PunctuationSyntaxKind>(token: TKind): PunctuationToken<TKind>;
+ createToken<TKind extends KeywordTypeSyntaxKind>(token: TKind): KeywordTypeNode<TKind>;
+ createToken<TKind extends ModifierSyntaxKind>(token: TKind): ModifierToken<TKind>;
+ createToken<TKind extends KeywordSyntaxKind>(token: TKind): KeywordToken<TKind>;
+ createToken<TKind extends SyntaxKind.Unknown | SyntaxKind.EndOfFileToken>(token: TKind): Token<TKind>;
+ createSuper(): SuperExpression;
+ createThis(): ThisExpression;
+ createNull(): NullLiteral;
+ createTrue(): TrueLiteral;
+ createFalse(): FalseLiteral;
+ createModifier<T extends ModifierSyntaxKind>(kind: T): ModifierToken<T>;
+ createModifiersFromModifierFlags(flags: ModifierFlags): Modifier[] | undefined;
+ createQualifiedName(left: EntityName, right: string | Identifier): QualifiedName;
+ updateQualifiedName(node: QualifiedName, left: EntityName, right: Identifier): QualifiedName;
+ createComputedPropertyName(expression: Expression): ComputedPropertyName;
+ updateComputedPropertyName(node: ComputedPropertyName, expression: Expression): ComputedPropertyName;
+ createTypeParameterDeclaration(modifiers: readonly Modifier[] | undefined, name: string | Identifier, constraint?: TypeNode, defaultType?: TypeNode): TypeParameterDeclaration;
+ updateTypeParameterDeclaration(node: TypeParameterDeclaration, modifiers: readonly Modifier[] | undefined, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration;
+ createParameterDeclaration(modifiers: readonly ModifierLike[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken?: QuestionToken, type?: TypeNode, initializer?: Expression): ParameterDeclaration;
+ updateParameterDeclaration(node: ParameterDeclaration, modifiers: readonly ModifierLike[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): ParameterDeclaration;
+ createDecorator(expression: Expression): Decorator;
+ updateDecorator(node: Decorator, expression: Expression): Decorator;
+ createPropertySignature(modifiers: readonly Modifier[] | undefined, name: PropertyName | string, questionToken: QuestionToken | undefined, type: TypeNode | undefined): PropertySignature;
+ updatePropertySignature(node: PropertySignature, modifiers: readonly Modifier[] | undefined, name: PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined): PropertySignature;
+ createPropertyDeclaration(modifiers: readonly ModifierLike[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration;
+ updatePropertyDeclaration(node: PropertyDeclaration, modifiers: readonly ModifierLike[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration;
+ createMethodSignature(modifiers: readonly Modifier[] | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): MethodSignature;
+ updateMethodSignature(node: MethodSignature, modifiers: readonly Modifier[] | undefined, name: PropertyName, questionToken: QuestionToken | undefined, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): MethodSignature;
+ createMethodDeclaration(modifiers: readonly ModifierLike[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): MethodDeclaration;
+ updateMethodDeclaration(node: MethodDeclaration, modifiers: readonly ModifierLike[] | undefined, asteriskToken: AsteriskToken | undefined, name: PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): MethodDeclaration;
+ createConstructorDeclaration(modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration;
+ updateConstructorDeclaration(node: ConstructorDeclaration, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration;
+ createGetAccessorDeclaration(modifiers: readonly ModifierLike[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration;
+ updateGetAccessorDeclaration(node: GetAccessorDeclaration, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration;
+ createSetAccessorDeclaration(modifiers: readonly ModifierLike[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration;
+ updateSetAccessorDeclaration(node: SetAccessorDeclaration, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration;
+ createCallSignature(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): CallSignatureDeclaration;
+ updateCallSignature(node: CallSignatureDeclaration, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): CallSignatureDeclaration;
+ createConstructSignature(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): ConstructSignatureDeclaration;
+ updateConstructSignature(node: ConstructSignatureDeclaration, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): ConstructSignatureDeclaration;
+ createIndexSignature(modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration;
+ updateIndexSignature(node: IndexSignatureDeclaration, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration;
+ createTemplateLiteralTypeSpan(type: TypeNode, literal: TemplateMiddle | TemplateTail): TemplateLiteralTypeSpan;
+ updateTemplateLiteralTypeSpan(node: TemplateLiteralTypeSpan, type: TypeNode, literal: TemplateMiddle | TemplateTail): TemplateLiteralTypeSpan;
+ createClassStaticBlockDeclaration(body: Block): ClassStaticBlockDeclaration;
+ updateClassStaticBlockDeclaration(node: ClassStaticBlockDeclaration, body: Block): ClassStaticBlockDeclaration;
+ createKeywordTypeNode<TKind extends KeywordTypeSyntaxKind>(kind: TKind): KeywordTypeNode<TKind>;
+ createTypePredicateNode(assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode | string, type: TypeNode | undefined): TypePredicateNode;
+ updateTypePredicateNode(node: TypePredicateNode, assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode, type: TypeNode | undefined): TypePredicateNode;
+ createTypeReferenceNode(typeName: string | EntityName, typeArguments?: readonly TypeNode[]): TypeReferenceNode;
+ updateTypeReferenceNode(node: TypeReferenceNode, typeName: EntityName, typeArguments: NodeArray<TypeNode> | undefined): TypeReferenceNode;
+ createFunctionTypeNode(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): FunctionTypeNode;
+ updateFunctionTypeNode(node: FunctionTypeNode, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode): FunctionTypeNode;
+ createConstructorTypeNode(modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): ConstructorTypeNode;
+ updateConstructorTypeNode(node: ConstructorTypeNode, modifiers: readonly Modifier[] | undefined, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode): ConstructorTypeNode;
+ createTypeQueryNode(exprName: EntityName, typeArguments?: readonly TypeNode[]): TypeQueryNode;
+ updateTypeQueryNode(node: TypeQueryNode, exprName: EntityName, typeArguments?: readonly TypeNode[]): TypeQueryNode;
+ createTypeLiteralNode(members: readonly TypeElement[] | undefined): TypeLiteralNode;
+ updateTypeLiteralNode(node: TypeLiteralNode, members: NodeArray<TypeElement>): TypeLiteralNode;
+ createArrayTypeNode(elementType: TypeNode): ArrayTypeNode;
+ updateArrayTypeNode(node: ArrayTypeNode, elementType: TypeNode): ArrayTypeNode;
+ createTupleTypeNode(elements: readonly (TypeNode | NamedTupleMember)[]): TupleTypeNode;
+ updateTupleTypeNode(node: TupleTypeNode, elements: readonly (TypeNode | NamedTupleMember)[]): TupleTypeNode;
+ createNamedTupleMember(dotDotDotToken: DotDotDotToken | undefined, name: Identifier, questionToken: QuestionToken | undefined, type: TypeNode): NamedTupleMember;
+ updateNamedTupleMember(node: NamedTupleMember, dotDotDotToken: DotDotDotToken | undefined, name: Identifier, questionToken: QuestionToken | undefined, type: TypeNode): NamedTupleMember;
+ createOptionalTypeNode(type: TypeNode): OptionalTypeNode;
+ updateOptionalTypeNode(node: OptionalTypeNode, type: TypeNode): OptionalTypeNode;
+ createRestTypeNode(type: TypeNode): RestTypeNode;
+ updateRestTypeNode(node: RestTypeNode, type: TypeNode): RestTypeNode;
+ createUnionTypeNode(types: readonly TypeNode[]): UnionTypeNode;
+ updateUnionTypeNode(node: UnionTypeNode, types: NodeArray<TypeNode>): UnionTypeNode;
+ createIntersectionTypeNode(types: readonly TypeNode[]): IntersectionTypeNode;
+ updateIntersectionTypeNode(node: IntersectionTypeNode, types: NodeArray<TypeNode>): IntersectionTypeNode;
+ createConditionalTypeNode(checkType: TypeNode, extendsType: TypeNode, trueType: TypeNode, falseType: TypeNode): ConditionalTypeNode;
+ updateConditionalTypeNode(node: ConditionalTypeNode, checkType: TypeNode, extendsType: TypeNode, trueType: TypeNode, falseType: TypeNode): ConditionalTypeNode;
+ createInferTypeNode(typeParameter: TypeParameterDeclaration): InferTypeNode;
+ updateInferTypeNode(node: InferTypeNode, typeParameter: TypeParameterDeclaration): InferTypeNode;
+ createImportTypeNode(argument: TypeNode, assertions?: ImportTypeAssertionContainer, qualifier?: EntityName, typeArguments?: readonly TypeNode[], isTypeOf?: boolean): ImportTypeNode;
+ updateImportTypeNode(node: ImportTypeNode, argument: TypeNode, assertions: ImportTypeAssertionContainer | undefined, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean): ImportTypeNode;
+ createParenthesizedType(type: TypeNode): ParenthesizedTypeNode;
+ updateParenthesizedType(node: ParenthesizedTypeNode, type: TypeNode): ParenthesizedTypeNode;
+ createThisTypeNode(): ThisTypeNode;
+ createTypeOperatorNode(operator: SyntaxKind.KeyOfKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.ReadonlyKeyword, type: TypeNode): TypeOperatorNode;
+ updateTypeOperatorNode(node: TypeOperatorNode, type: TypeNode): TypeOperatorNode;
+ createIndexedAccessTypeNode(objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode;
+ updateIndexedAccessTypeNode(node: IndexedAccessTypeNode, objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode;
+ createMappedTypeNode(readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, nameType: TypeNode | undefined, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined, members: NodeArray<TypeElement> | undefined): MappedTypeNode;
+ updateMappedTypeNode(node: MappedTypeNode, readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, nameType: TypeNode | undefined, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined, members: NodeArray<TypeElement> | undefined): MappedTypeNode;
+ createLiteralTypeNode(literal: LiteralTypeNode["literal"]): LiteralTypeNode;
+ updateLiteralTypeNode(node: LiteralTypeNode, literal: LiteralTypeNode["literal"]): LiteralTypeNode;
+ createTemplateLiteralType(head: TemplateHead, templateSpans: readonly TemplateLiteralTypeSpan[]): TemplateLiteralTypeNode;
+ updateTemplateLiteralType(node: TemplateLiteralTypeNode, head: TemplateHead, templateSpans: readonly TemplateLiteralTypeSpan[]): TemplateLiteralTypeNode;
+ createObjectBindingPattern(elements: readonly BindingElement[]): ObjectBindingPattern;
+ updateObjectBindingPattern(node: ObjectBindingPattern, elements: readonly BindingElement[]): ObjectBindingPattern;
+ createArrayBindingPattern(elements: readonly ArrayBindingElement[]): ArrayBindingPattern;
+ updateArrayBindingPattern(node: ArrayBindingPattern, elements: readonly ArrayBindingElement[]): ArrayBindingPattern;
+ createBindingElement(dotDotDotToken: DotDotDotToken | undefined, propertyName: string | PropertyName | undefined, name: string | BindingName, initializer?: Expression): BindingElement;
+ updateBindingElement(node: BindingElement, dotDotDotToken: DotDotDotToken | undefined, propertyName: PropertyName | undefined, name: BindingName, initializer: Expression | undefined): BindingElement;
+ createArrayLiteralExpression(elements?: readonly Expression[], multiLine?: boolean): ArrayLiteralExpression;
+ updateArrayLiteralExpression(node: ArrayLiteralExpression, elements: readonly Expression[]): ArrayLiteralExpression;
+ createObjectLiteralExpression(properties?: readonly ObjectLiteralElementLike[], multiLine?: boolean): ObjectLiteralExpression;
+ updateObjectLiteralExpression(node: ObjectLiteralExpression, properties: readonly ObjectLiteralElementLike[]): ObjectLiteralExpression;
+ createPropertyAccessExpression(expression: Expression, name: string | MemberName): PropertyAccessExpression;
+ updatePropertyAccessExpression(node: PropertyAccessExpression, expression: Expression, name: MemberName): PropertyAccessExpression;
+ createPropertyAccessChain(expression: Expression, questionDotToken: QuestionDotToken | undefined, name: string | MemberName): PropertyAccessChain;
+ updatePropertyAccessChain(node: PropertyAccessChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, name: MemberName): PropertyAccessChain;
+ createElementAccessExpression(expression: Expression, index: number | Expression): ElementAccessExpression;
+ updateElementAccessExpression(node: ElementAccessExpression, expression: Expression, argumentExpression: Expression): ElementAccessExpression;
+ createElementAccessChain(expression: Expression, questionDotToken: QuestionDotToken | undefined, index: number | Expression): ElementAccessChain;
+ updateElementAccessChain(node: ElementAccessChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, argumentExpression: Expression): ElementAccessChain;
+ createCallExpression(expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined): CallExpression;
+ updateCallExpression(node: CallExpression, expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[]): CallExpression;
+ createCallChain(expression: Expression, questionDotToken: QuestionDotToken | undefined, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined): CallChain;
+ updateCallChain(node: CallChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[]): CallChain;
+ createNewExpression(expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined): NewExpression;
+ updateNewExpression(node: NewExpression, expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined): NewExpression;
+ createTaggedTemplateExpression(tag: Expression, typeArguments: readonly TypeNode[] | undefined, template: TemplateLiteral): TaggedTemplateExpression;
+ updateTaggedTemplateExpression(node: TaggedTemplateExpression, tag: Expression, typeArguments: readonly TypeNode[] | undefined, template: TemplateLiteral): TaggedTemplateExpression;
+ createTypeAssertion(type: TypeNode, expression: Expression): TypeAssertion;
+ updateTypeAssertion(node: TypeAssertion, type: TypeNode, expression: Expression): TypeAssertion;
+ createParenthesizedExpression(expression: Expression): ParenthesizedExpression;
+ updateParenthesizedExpression(node: ParenthesizedExpression, expression: Expression): ParenthesizedExpression;
+ createFunctionExpression(modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[] | undefined, type: TypeNode | undefined, body: Block): FunctionExpression;
+ updateFunctionExpression(node: FunctionExpression, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block): FunctionExpression;
+ createArrowFunction(modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken | undefined, body: ConciseBody): ArrowFunction;
+ updateArrowFunction(node: ArrowFunction, modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken, body: ConciseBody): ArrowFunction;
+ createDeleteExpression(expression: Expression): DeleteExpression;
+ updateDeleteExpression(node: DeleteExpression, expression: Expression): DeleteExpression;
+ createTypeOfExpression(expression: Expression): TypeOfExpression;
+ updateTypeOfExpression(node: TypeOfExpression, expression: Expression): TypeOfExpression;
+ createVoidExpression(expression: Expression): VoidExpression;
+ updateVoidExpression(node: VoidExpression, expression: Expression): VoidExpression;
+ createAwaitExpression(expression: Expression): AwaitExpression;
+ updateAwaitExpression(node: AwaitExpression, expression: Expression): AwaitExpression;
+ createPrefixUnaryExpression(operator: PrefixUnaryOperator, operand: Expression): PrefixUnaryExpression;
+ updatePrefixUnaryExpression(node: PrefixUnaryExpression, operand: Expression): PrefixUnaryExpression;
+ createPostfixUnaryExpression(operand: Expression, operator: PostfixUnaryOperator): PostfixUnaryExpression;
+ updatePostfixUnaryExpression(node: PostfixUnaryExpression, operand: Expression): PostfixUnaryExpression;
+ createBinaryExpression(left: Expression, operator: BinaryOperator | BinaryOperatorToken, right: Expression): BinaryExpression;
+ updateBinaryExpression(node: BinaryExpression, left: Expression, operator: BinaryOperator | BinaryOperatorToken, right: Expression): BinaryExpression;
+ createConditionalExpression(condition: Expression, questionToken: QuestionToken | undefined, whenTrue: Expression, colonToken: ColonToken | undefined, whenFalse: Expression): ConditionalExpression;
+ updateConditionalExpression(node: ConditionalExpression, condition: Expression, questionToken: QuestionToken, whenTrue: Expression, colonToken: ColonToken, whenFalse: Expression): ConditionalExpression;
+ createTemplateExpression(head: TemplateHead, templateSpans: readonly TemplateSpan[]): TemplateExpression;
+ updateTemplateExpression(node: TemplateExpression, head: TemplateHead, templateSpans: readonly TemplateSpan[]): TemplateExpression;
+ createTemplateHead(text: string, rawText?: string, templateFlags?: TokenFlags): TemplateHead;
+ createTemplateHead(text: string | undefined, rawText: string, templateFlags?: TokenFlags): TemplateHead;
+ createTemplateMiddle(text: string, rawText?: string, templateFlags?: TokenFlags): TemplateMiddle;
+ createTemplateMiddle(text: string | undefined, rawText: string, templateFlags?: TokenFlags): TemplateMiddle;
+ createTemplateTail(text: string, rawText?: string, templateFlags?: TokenFlags): TemplateTail;
+ createTemplateTail(text: string | undefined, rawText: string, templateFlags?: TokenFlags): TemplateTail;
+ createNoSubstitutionTemplateLiteral(text: string, rawText?: string): NoSubstitutionTemplateLiteral;
+ createNoSubstitutionTemplateLiteral(text: string | undefined, rawText: string): NoSubstitutionTemplateLiteral;
+ createYieldExpression(asteriskToken: AsteriskToken, expression: Expression): YieldExpression;
+ createYieldExpression(asteriskToken: undefined, expression: Expression | undefined): YieldExpression;
+ updateYieldExpression(node: YieldExpression, asteriskToken: AsteriskToken | undefined, expression: Expression | undefined): YieldExpression;
+ createSpreadElement(expression: Expression): SpreadElement;
+ updateSpreadElement(node: SpreadElement, expression: Expression): SpreadElement;
+ createClassExpression(modifiers: readonly ModifierLike[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassExpression;
+ updateClassExpression(node: ClassExpression, modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassExpression;
+ createOmittedExpression(): OmittedExpression;
+ createExpressionWithTypeArguments(expression: Expression, typeArguments: readonly TypeNode[] | undefined): ExpressionWithTypeArguments;
+ updateExpressionWithTypeArguments(node: ExpressionWithTypeArguments, expression: Expression, typeArguments: readonly TypeNode[] | undefined): ExpressionWithTypeArguments;
+ createAsExpression(expression: Expression, type: TypeNode): AsExpression;
+ updateAsExpression(node: AsExpression, expression: Expression, type: TypeNode): AsExpression;
+ createNonNullExpression(expression: Expression): NonNullExpression;
+ updateNonNullExpression(node: NonNullExpression, expression: Expression): NonNullExpression;
+ createNonNullChain(expression: Expression): NonNullChain;
+ updateNonNullChain(node: NonNullChain, expression: Expression): NonNullChain;
+ createMetaProperty(keywordToken: MetaProperty["keywordToken"], name: Identifier): MetaProperty;
+ updateMetaProperty(node: MetaProperty, name: Identifier): MetaProperty;
+ createTemplateSpan(expression: Expression, literal: TemplateMiddle | TemplateTail): TemplateSpan;
+ updateTemplateSpan(node: TemplateSpan, expression: Expression, literal: TemplateMiddle | TemplateTail): TemplateSpan;
+ createSemicolonClassElement(): SemicolonClassElement;
+ createBlock(statements: readonly Statement[], multiLine?: boolean): Block;
+ updateBlock(node: Block, statements: readonly Statement[]): Block;
+ createVariableStatement(modifiers: readonly Modifier[] | undefined, declarationList: VariableDeclarationList | readonly VariableDeclaration[]): VariableStatement;
+ updateVariableStatement(node: VariableStatement, modifiers: readonly Modifier[] | undefined, declarationList: VariableDeclarationList): VariableStatement;
+ createEmptyStatement(): EmptyStatement;
+ createExpressionStatement(expression: Expression): ExpressionStatement;
+ updateExpressionStatement(node: ExpressionStatement, expression: Expression): ExpressionStatement;
+ createIfStatement(expression: Expression, thenStatement: Statement, elseStatement?: Statement): IfStatement;
+ updateIfStatement(node: IfStatement, expression: Expression, thenStatement: Statement, elseStatement: Statement | undefined): IfStatement;
+ createDoStatement(statement: Statement, expression: Expression): DoStatement;
+ updateDoStatement(node: DoStatement, statement: Statement, expression: Expression): DoStatement;
+ createWhileStatement(expression: Expression, statement: Statement): WhileStatement;
+ updateWhileStatement(node: WhileStatement, expression: Expression, statement: Statement): WhileStatement;
+ createForStatement(initializer: ForInitializer | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement): ForStatement;
+ updateForStatement(node: ForStatement, initializer: ForInitializer | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement): ForStatement;
+ createForInStatement(initializer: ForInitializer, expression: Expression, statement: Statement): ForInStatement;
+ updateForInStatement(node: ForInStatement, initializer: ForInitializer, expression: Expression, statement: Statement): ForInStatement;
+ createForOfStatement(awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, expression: Expression, statement: Statement): ForOfStatement;
+ updateForOfStatement(node: ForOfStatement, awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, expression: Expression, statement: Statement): ForOfStatement;
+ createContinueStatement(label?: string | Identifier): ContinueStatement;
+ updateContinueStatement(node: ContinueStatement, label: Identifier | undefined): ContinueStatement;
+ createBreakStatement(label?: string | Identifier): BreakStatement;
+ updateBreakStatement(node: BreakStatement, label: Identifier | undefined): BreakStatement;
+ createReturnStatement(expression?: Expression): ReturnStatement;
+ updateReturnStatement(node: ReturnStatement, expression: Expression | undefined): ReturnStatement;
+ createWithStatement(expression: Expression, statement: Statement): WithStatement;
+ updateWithStatement(node: WithStatement, expression: Expression, statement: Statement): WithStatement;
+ createSwitchStatement(expression: Expression, caseBlock: CaseBlock): SwitchStatement;
+ updateSwitchStatement(node: SwitchStatement, expression: Expression, caseBlock: CaseBlock): SwitchStatement;
+ createLabeledStatement(label: string | Identifier, statement: Statement): LabeledStatement;
+ updateLabeledStatement(node: LabeledStatement, label: Identifier, statement: Statement): LabeledStatement;
+ createThrowStatement(expression: Expression): ThrowStatement;
+ updateThrowStatement(node: ThrowStatement, expression: Expression): ThrowStatement;
+ createTryStatement(tryBlock: Block, catchClause: CatchClause | undefined, finallyBlock: Block | undefined): TryStatement;
+ updateTryStatement(node: TryStatement, tryBlock: Block, catchClause: CatchClause | undefined, finallyBlock: Block | undefined): TryStatement;
+ createDebuggerStatement(): DebuggerStatement;
+ createVariableDeclaration(name: string | BindingName, exclamationToken?: ExclamationToken, type?: TypeNode, initializer?: Expression): VariableDeclaration;
+ updateVariableDeclaration(node: VariableDeclaration, name: BindingName, exclamationToken: ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration;
+ createVariableDeclarationList(declarations: readonly VariableDeclaration[], flags?: NodeFlags): VariableDeclarationList;
+ updateVariableDeclarationList(node: VariableDeclarationList, declarations: readonly VariableDeclaration[]): VariableDeclarationList;
+ createFunctionDeclaration(modifiers: readonly ModifierLike[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): FunctionDeclaration;
+ updateFunctionDeclaration(node: FunctionDeclaration, modifiers: readonly ModifierLike[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): FunctionDeclaration;
+ createClassDeclaration(modifiers: readonly ModifierLike[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration;
+ updateClassDeclaration(node: ClassDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration;
+ createInterfaceDeclaration(modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration;
+ updateInterfaceDeclaration(node: InterfaceDeclaration, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration;
+ createTypeAliasDeclaration(modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration;
+ updateTypeAliasDeclaration(node: TypeAliasDeclaration, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration;
+ createEnumDeclaration(modifiers: readonly Modifier[] | undefined, name: string | Identifier, members: readonly EnumMember[]): EnumDeclaration;
+ updateEnumDeclaration(node: EnumDeclaration, modifiers: readonly Modifier[] | undefined, name: Identifier, members: readonly EnumMember[]): EnumDeclaration;
+ createModuleDeclaration(modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined, flags?: NodeFlags): ModuleDeclaration;
+ updateModuleDeclaration(node: ModuleDeclaration, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined): ModuleDeclaration;
+ createModuleBlock(statements: readonly Statement[]): ModuleBlock;
+ updateModuleBlock(node: ModuleBlock, statements: readonly Statement[]): ModuleBlock;
+ createCaseBlock(clauses: readonly CaseOrDefaultClause[]): CaseBlock;
+ updateCaseBlock(node: CaseBlock, clauses: readonly CaseOrDefaultClause[]): CaseBlock;
+ createNamespaceExportDeclaration(name: string | Identifier): NamespaceExportDeclaration;
+ updateNamespaceExportDeclaration(node: NamespaceExportDeclaration, name: Identifier): NamespaceExportDeclaration;
+ createImportEqualsDeclaration(modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, name: string | Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration;
+ updateImportEqualsDeclaration(node: ImportEqualsDeclaration, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, name: Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration;
+ createImportDeclaration(modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause?: AssertClause): ImportDeclaration;
+ updateImportDeclaration(node: ImportDeclaration, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause: AssertClause | undefined): ImportDeclaration;
+ createImportClause(isTypeOnly: boolean, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause;
+ updateImportClause(node: ImportClause, isTypeOnly: boolean, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause;
+ createAssertClause(elements: NodeArray<AssertEntry>, multiLine?: boolean): AssertClause;
+ updateAssertClause(node: AssertClause, elements: NodeArray<AssertEntry>, multiLine?: boolean): AssertClause;
+ createAssertEntry(name: AssertionKey, value: Expression): AssertEntry;
+ updateAssertEntry(node: AssertEntry, name: AssertionKey, value: Expression): AssertEntry;
+ createImportTypeAssertionContainer(clause: AssertClause, multiLine?: boolean): ImportTypeAssertionContainer;
+ updateImportTypeAssertionContainer(node: ImportTypeAssertionContainer, clause: AssertClause, multiLine?: boolean): ImportTypeAssertionContainer;
+ createNamespaceImport(name: Identifier): NamespaceImport;
+ updateNamespaceImport(node: NamespaceImport, name: Identifier): NamespaceImport;
+ createNamespaceExport(name: Identifier): NamespaceExport;
+ updateNamespaceExport(node: NamespaceExport, name: Identifier): NamespaceExport;
+ createNamedImports(elements: readonly ImportSpecifier[]): NamedImports;
+ updateNamedImports(node: NamedImports, elements: readonly ImportSpecifier[]): NamedImports;
+ createImportSpecifier(isTypeOnly: boolean, propertyName: Identifier | undefined, name: Identifier): ImportSpecifier;
+ updateImportSpecifier(node: ImportSpecifier, isTypeOnly: boolean, propertyName: Identifier | undefined, name: Identifier): ImportSpecifier;
+ createExportAssignment(modifiers: readonly Modifier[] | undefined, isExportEquals: boolean | undefined, expression: Expression): ExportAssignment;
+ updateExportAssignment(node: ExportAssignment, modifiers: readonly Modifier[] | undefined, expression: Expression): ExportAssignment;
+ createExportDeclaration(modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier?: Expression, assertClause?: AssertClause): ExportDeclaration;
+ updateExportDeclaration(node: ExportDeclaration, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier: Expression | undefined, assertClause: AssertClause | undefined): ExportDeclaration;
+ createNamedExports(elements: readonly ExportSpecifier[]): NamedExports;
+ updateNamedExports(node: NamedExports, elements: readonly ExportSpecifier[]): NamedExports;
+ createExportSpecifier(isTypeOnly: boolean, propertyName: string | Identifier | undefined, name: string | Identifier): ExportSpecifier;
+ updateExportSpecifier(node: ExportSpecifier, isTypeOnly: boolean, propertyName: Identifier | undefined, name: Identifier): ExportSpecifier;
+ createExternalModuleReference(expression: Expression): ExternalModuleReference;
+ updateExternalModuleReference(node: ExternalModuleReference, expression: Expression): ExternalModuleReference;
+ createJSDocAllType(): JSDocAllType;
+ createJSDocUnknownType(): JSDocUnknownType;
+ createJSDocNonNullableType(type: TypeNode, postfix?: boolean): JSDocNonNullableType;
+ updateJSDocNonNullableType(node: JSDocNonNullableType, type: TypeNode): JSDocNonNullableType;
+ createJSDocNullableType(type: TypeNode, postfix?: boolean): JSDocNullableType;
+ updateJSDocNullableType(node: JSDocNullableType, type: TypeNode): JSDocNullableType;
+ createJSDocOptionalType(type: TypeNode): JSDocOptionalType;
+ updateJSDocOptionalType(node: JSDocOptionalType, type: TypeNode): JSDocOptionalType;
+ createJSDocFunctionType(parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): JSDocFunctionType;
+ updateJSDocFunctionType(node: JSDocFunctionType, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): JSDocFunctionType;
+ createJSDocVariadicType(type: TypeNode): JSDocVariadicType;
+ updateJSDocVariadicType(node: JSDocVariadicType, type: TypeNode): JSDocVariadicType;
+ createJSDocNamepathType(type: TypeNode): JSDocNamepathType;
+ updateJSDocNamepathType(node: JSDocNamepathType, type: TypeNode): JSDocNamepathType;
+ createJSDocTypeExpression(type: TypeNode): JSDocTypeExpression;
+ updateJSDocTypeExpression(node: JSDocTypeExpression, type: TypeNode): JSDocTypeExpression;
+ createJSDocNameReference(name: EntityName | JSDocMemberName): JSDocNameReference;
+ updateJSDocNameReference(node: JSDocNameReference, name: EntityName | JSDocMemberName): JSDocNameReference;
+ createJSDocMemberName(left: EntityName | JSDocMemberName, right: Identifier): JSDocMemberName;
+ updateJSDocMemberName(node: JSDocMemberName, left: EntityName | JSDocMemberName, right: Identifier): JSDocMemberName;
+ createJSDocLink(name: EntityName | JSDocMemberName | undefined, text: string): JSDocLink;
+ updateJSDocLink(node: JSDocLink, name: EntityName | JSDocMemberName | undefined, text: string): JSDocLink;
+ createJSDocLinkCode(name: EntityName | JSDocMemberName | undefined, text: string): JSDocLinkCode;
+ updateJSDocLinkCode(node: JSDocLinkCode, name: EntityName | JSDocMemberName | undefined, text: string): JSDocLinkCode;
+ createJSDocLinkPlain(name: EntityName | JSDocMemberName | undefined, text: string): JSDocLinkPlain;
+ updateJSDocLinkPlain(node: JSDocLinkPlain, name: EntityName | JSDocMemberName | undefined, text: string): JSDocLinkPlain;
+ createJSDocTypeLiteral(jsDocPropertyTags?: readonly JSDocPropertyLikeTag[], isArrayType?: boolean): JSDocTypeLiteral;
+ updateJSDocTypeLiteral(node: JSDocTypeLiteral, jsDocPropertyTags: readonly JSDocPropertyLikeTag[] | undefined, isArrayType: boolean | undefined): JSDocTypeLiteral;
+ createJSDocSignature(typeParameters: readonly JSDocTemplateTag[] | undefined, parameters: readonly JSDocParameterTag[], type?: JSDocReturnTag): JSDocSignature;
+ updateJSDocSignature(node: JSDocSignature, typeParameters: readonly JSDocTemplateTag[] | undefined, parameters: readonly JSDocParameterTag[], type: JSDocReturnTag | undefined): JSDocSignature;
+ createJSDocTemplateTag(tagName: Identifier | undefined, constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment?: string | NodeArray<JSDocComment>): JSDocTemplateTag;
+ updateJSDocTemplateTag(node: JSDocTemplateTag, tagName: Identifier | undefined, constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment: string | NodeArray<JSDocComment> | undefined): JSDocTemplateTag;
+ createJSDocTypedefTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression | JSDocTypeLiteral, fullName?: Identifier | JSDocNamespaceDeclaration, comment?: string | NodeArray<JSDocComment>): JSDocTypedefTag;
+ updateJSDocTypedefTag(node: JSDocTypedefTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | JSDocTypeLiteral | undefined, fullName: Identifier | JSDocNamespaceDeclaration | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocTypedefTag;
+ createJSDocParameterTag(tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression, isNameFirst?: boolean, comment?: string | NodeArray<JSDocComment>): JSDocParameterTag;
+ updateJSDocParameterTag(node: JSDocParameterTag, tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression: JSDocTypeExpression | undefined, isNameFirst: boolean, comment: string | NodeArray<JSDocComment> | undefined): JSDocParameterTag;
+ createJSDocPropertyTag(tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression, isNameFirst?: boolean, comment?: string | NodeArray<JSDocComment>): JSDocPropertyTag;
+ updateJSDocPropertyTag(node: JSDocPropertyTag, tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression: JSDocTypeExpression | undefined, isNameFirst: boolean, comment: string | NodeArray<JSDocComment> | undefined): JSDocPropertyTag;
+ createJSDocTypeTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment>): JSDocTypeTag;
+ updateJSDocTypeTag(node: JSDocTypeTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | NodeArray<JSDocComment> | undefined): JSDocTypeTag;
+ createJSDocSeeTag(tagName: Identifier | undefined, nameExpression: JSDocNameReference | undefined, comment?: string | NodeArray<JSDocComment>): JSDocSeeTag;
+ updateJSDocSeeTag(node: JSDocSeeTag, tagName: Identifier | undefined, nameExpression: JSDocNameReference | undefined, comment?: string | NodeArray<JSDocComment>): JSDocSeeTag;
+ createJSDocReturnTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment>): JSDocReturnTag;
+ updateJSDocReturnTag(node: JSDocReturnTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocReturnTag;
+ createJSDocThisTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment>): JSDocThisTag;
+ updateJSDocThisTag(node: JSDocThisTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocThisTag;
+ createJSDocEnumTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment>): JSDocEnumTag;
+ updateJSDocEnumTag(node: JSDocEnumTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | NodeArray<JSDocComment> | undefined): JSDocEnumTag;
+ createJSDocCallbackTag(tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName?: Identifier | JSDocNamespaceDeclaration, comment?: string | NodeArray<JSDocComment>): JSDocCallbackTag;
+ updateJSDocCallbackTag(node: JSDocCallbackTag, tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName: Identifier | JSDocNamespaceDeclaration | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocCallbackTag;
+ createJSDocAugmentsTag(tagName: Identifier | undefined, className: JSDocAugmentsTag["class"], comment?: string | NodeArray<JSDocComment>): JSDocAugmentsTag;
+ updateJSDocAugmentsTag(node: JSDocAugmentsTag, tagName: Identifier | undefined, className: JSDocAugmentsTag["class"], comment: string | NodeArray<JSDocComment> | undefined): JSDocAugmentsTag;
+ createJSDocImplementsTag(tagName: Identifier | undefined, className: JSDocImplementsTag["class"], comment?: string | NodeArray<JSDocComment>): JSDocImplementsTag;
+ updateJSDocImplementsTag(node: JSDocImplementsTag, tagName: Identifier | undefined, className: JSDocImplementsTag["class"], comment: string | NodeArray<JSDocComment> | undefined): JSDocImplementsTag;
+ createJSDocAuthorTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocAuthorTag;
+ updateJSDocAuthorTag(node: JSDocAuthorTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocAuthorTag;
+ createJSDocClassTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocClassTag;
+ updateJSDocClassTag(node: JSDocClassTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocClassTag;
+ createJSDocPublicTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocPublicTag;
+ updateJSDocPublicTag(node: JSDocPublicTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocPublicTag;
+ createJSDocPrivateTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocPrivateTag;
+ updateJSDocPrivateTag(node: JSDocPrivateTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocPrivateTag;
+ createJSDocProtectedTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocProtectedTag;
+ updateJSDocProtectedTag(node: JSDocProtectedTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocProtectedTag;
+ createJSDocReadonlyTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocReadonlyTag;
+ updateJSDocReadonlyTag(node: JSDocReadonlyTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocReadonlyTag;
+ createJSDocUnknownTag(tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocUnknownTag;
+ updateJSDocUnknownTag(node: JSDocUnknownTag, tagName: Identifier, comment: string | NodeArray<JSDocComment> | undefined): JSDocUnknownTag;
+ createJSDocDeprecatedTag(tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocDeprecatedTag;
+ updateJSDocDeprecatedTag(node: JSDocDeprecatedTag, tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocDeprecatedTag;
+ createJSDocOverrideTag(tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocOverrideTag;
+ updateJSDocOverrideTag(node: JSDocOverrideTag, tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocOverrideTag;
+ createJSDocText(text: string): JSDocText;
+ updateJSDocText(node: JSDocText, text: string): JSDocText;
+ createJSDocComment(comment?: string | NodeArray<JSDocComment> | undefined, tags?: readonly JSDocTag[] | undefined): JSDoc;
+ updateJSDocComment(node: JSDoc, comment: string | NodeArray<JSDocComment> | undefined, tags: readonly JSDocTag[] | undefined): JSDoc;
+ createJsxElement(openingElement: JsxOpeningElement, children: readonly JsxChild[], closingElement: JsxClosingElement): JsxElement;
+ updateJsxElement(node: JsxElement, openingElement: JsxOpeningElement, children: readonly JsxChild[], closingElement: JsxClosingElement): JsxElement;
+ createJsxSelfClosingElement(tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxSelfClosingElement;
+ updateJsxSelfClosingElement(node: JsxSelfClosingElement, tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxSelfClosingElement;
+ createJsxOpeningElement(tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxOpeningElement;
+ updateJsxOpeningElement(node: JsxOpeningElement, tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxOpeningElement;
+ createJsxClosingElement(tagName: JsxTagNameExpression): JsxClosingElement;
+ updateJsxClosingElement(node: JsxClosingElement, tagName: JsxTagNameExpression): JsxClosingElement;
+ createJsxFragment(openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment): JsxFragment;
+ createJsxText(text: string, containsOnlyTriviaWhiteSpaces?: boolean): JsxText;
+ updateJsxText(node: JsxText, text: string, containsOnlyTriviaWhiteSpaces?: boolean): JsxText;
+ createJsxOpeningFragment(): JsxOpeningFragment;
+ createJsxJsxClosingFragment(): JsxClosingFragment;
+ updateJsxFragment(node: JsxFragment, openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment): JsxFragment;
+ createJsxAttribute(name: Identifier, initializer: JsxAttributeValue | undefined): JsxAttribute;
+ updateJsxAttribute(node: JsxAttribute, name: Identifier, initializer: JsxAttributeValue | undefined): JsxAttribute;
+ createJsxAttributes(properties: readonly JsxAttributeLike[]): JsxAttributes;
+ updateJsxAttributes(node: JsxAttributes, properties: readonly JsxAttributeLike[]): JsxAttributes;
+ createJsxSpreadAttribute(expression: Expression): JsxSpreadAttribute;
+ updateJsxSpreadAttribute(node: JsxSpreadAttribute, expression: Expression): JsxSpreadAttribute;
+ createJsxExpression(dotDotDotToken: DotDotDotToken | undefined, expression: Expression | undefined): JsxExpression;
+ updateJsxExpression(node: JsxExpression, expression: Expression | undefined): JsxExpression;
+ createCaseClause(expression: Expression, statements: readonly Statement[]): CaseClause;
+ updateCaseClause(node: CaseClause, expression: Expression, statements: readonly Statement[]): CaseClause;
+ createDefaultClause(statements: readonly Statement[]): DefaultClause;
+ updateDefaultClause(node: DefaultClause, statements: readonly Statement[]): DefaultClause;
+ createHeritageClause(token: HeritageClause["token"], types: readonly ExpressionWithTypeArguments[]): HeritageClause;
+ updateHeritageClause(node: HeritageClause, types: readonly ExpressionWithTypeArguments[]): HeritageClause;
+ createCatchClause(variableDeclaration: string | BindingName | VariableDeclaration | undefined, block: Block): CatchClause;
+ updateCatchClause(node: CatchClause, variableDeclaration: VariableDeclaration | undefined, block: Block): CatchClause;
+ createPropertyAssignment(name: string | PropertyName, initializer: Expression): PropertyAssignment;
+ updatePropertyAssignment(node: PropertyAssignment, name: PropertyName, initializer: Expression): PropertyAssignment;
+ createShorthandPropertyAssignment(name: string | Identifier, objectAssignmentInitializer?: Expression): ShorthandPropertyAssignment;
+ updateShorthandPropertyAssignment(node: ShorthandPropertyAssignment, name: Identifier, objectAssignmentInitializer: Expression | undefined): ShorthandPropertyAssignment;
+ createSpreadAssignment(expression: Expression): SpreadAssignment;
+ updateSpreadAssignment(node: SpreadAssignment, expression: Expression): SpreadAssignment;
+ createEnumMember(name: string | PropertyName, initializer?: Expression): EnumMember;
+ updateEnumMember(node: EnumMember, name: PropertyName, initializer: Expression | undefined): EnumMember;
+ createSourceFile(statements: readonly Statement[], endOfFileToken: EndOfFileToken, flags: NodeFlags): SourceFile;
+ updateSourceFile(node: SourceFile, statements: readonly Statement[], isDeclarationFile?: boolean, referencedFiles?: readonly FileReference[], typeReferences?: readonly FileReference[], hasNoDefaultLib?: boolean, libReferences?: readonly FileReference[]): SourceFile;
+ createNotEmittedStatement(original: Node): NotEmittedStatement;
+ createPartiallyEmittedExpression(expression: Expression, original?: Node): PartiallyEmittedExpression;
+ updatePartiallyEmittedExpression(node: PartiallyEmittedExpression, expression: Expression): PartiallyEmittedExpression;
+ createCommaListExpression(elements: readonly Expression[]): CommaListExpression;
+ updateCommaListExpression(node: CommaListExpression, elements: readonly Expression[]): CommaListExpression;
+ createBundle(sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[]): Bundle;
+ updateBundle(node: Bundle, sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[]): Bundle;
+ createComma(left: Expression, right: Expression): BinaryExpression;
+ createAssignment(left: ObjectLiteralExpression | ArrayLiteralExpression, right: Expression): DestructuringAssignment;
+ createAssignment(left: Expression, right: Expression): AssignmentExpression<EqualsToken>;
+ createLogicalOr(left: Expression, right: Expression): BinaryExpression;
+ createLogicalAnd(left: Expression, right: Expression): BinaryExpression;
+ createBitwiseOr(left: Expression, right: Expression): BinaryExpression;
+ createBitwiseXor(left: Expression, right: Expression): BinaryExpression;
+ createBitwiseAnd(left: Expression, right: Expression): BinaryExpression;
+ createStrictEquality(left: Expression, right: Expression): BinaryExpression;
+ createStrictInequality(left: Expression, right: Expression): BinaryExpression;
+ createEquality(left: Expression, right: Expression): BinaryExpression;
+ createInequality(left: Expression, right: Expression): BinaryExpression;
+ createLessThan(left: Expression, right: Expression): BinaryExpression;
+ createLessThanEquals(left: Expression, right: Expression): BinaryExpression;
+ createGreaterThan(left: Expression, right: Expression): BinaryExpression;
+ createGreaterThanEquals(left: Expression, right: Expression): BinaryExpression;
+ createLeftShift(left: Expression, right: Expression): BinaryExpression;
+ createRightShift(left: Expression, right: Expression): BinaryExpression;
+ createUnsignedRightShift(left: Expression, right: Expression): BinaryExpression;
+ createAdd(left: Expression, right: Expression): BinaryExpression;
+ createSubtract(left: Expression, right: Expression): BinaryExpression;
+ createMultiply(left: Expression, right: Expression): BinaryExpression;
+ createDivide(left: Expression, right: Expression): BinaryExpression;
+ createModulo(left: Expression, right: Expression): BinaryExpression;
+ createExponent(left: Expression, right: Expression): BinaryExpression;
+ createPrefixPlus(operand: Expression): PrefixUnaryExpression;
+ createPrefixMinus(operand: Expression): PrefixUnaryExpression;
+ createPrefixIncrement(operand: Expression): PrefixUnaryExpression;
+ createPrefixDecrement(operand: Expression): PrefixUnaryExpression;
+ createBitwiseNot(operand: Expression): PrefixUnaryExpression;
+ createLogicalNot(operand: Expression): PrefixUnaryExpression;
+ createPostfixIncrement(operand: Expression): PostfixUnaryExpression;
+ createPostfixDecrement(operand: Expression): PostfixUnaryExpression;
+ createImmediatelyInvokedFunctionExpression(statements: readonly Statement[]): CallExpression;
+ createImmediatelyInvokedFunctionExpression(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression;
+ createImmediatelyInvokedArrowFunction(statements: readonly Statement[]): CallExpression;
+ createImmediatelyInvokedArrowFunction(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression;
+ createVoidZero(): VoidExpression;
+ createExportDefault(expression: Expression): ExportAssignment;
+ createExternalModuleExport(exportName: Identifier): ExportDeclaration;
+ restoreOuterExpressions(outerExpression: Expression | undefined, innerExpression: Expression, kinds?: OuterExpressionKinds): Expression;
+ }
+ export interface CoreTransformationContext {
+ readonly factory: NodeFactory;
+ /** Gets the compiler options supplied to the transformer. */
+ getCompilerOptions(): CompilerOptions;
+ /** Starts a new lexical environment. */
+ startLexicalEnvironment(): void;
+ /** Suspends the current lexical environment, usually after visiting a parameter list. */
+ suspendLexicalEnvironment(): void;
+ /** Resumes a suspended lexical environment, usually before visiting a function body. */
+ resumeLexicalEnvironment(): void;
+ /** Ends a lexical environment, returning any declarations. */
+ endLexicalEnvironment(): Statement[] | undefined;
+ /** Hoists a function declaration to the containing scope. */
+ hoistFunctionDeclaration(node: FunctionDeclaration): void;
+ /** Hoists a variable declaration to the containing scope. */
+ hoistVariableDeclaration(node: Identifier): void;
+ }
+ export interface TransformationContext extends CoreTransformationContext {
+ /** Records a request for a non-scoped emit helper in the current context. */
+ requestEmitHelper(helper: EmitHelper): void;
+ /** Gets and resets the requested non-scoped emit helpers. */
+ readEmitHelpers(): EmitHelper[] | undefined;
+ /** Enables expression substitutions in the pretty printer for the provided SyntaxKind. */
+ enableSubstitution(kind: SyntaxKind): void;
+ /** Determines whether expression substitutions are enabled for the provided node. */
+ isSubstitutionEnabled(node: Node): boolean;
+ /**
+ * Hook used by transformers to substitute expressions just before they
+ * are emitted by the pretty printer.
+ *
+ * NOTE: Transformation hooks should only be modified during `Transformer` initialization,
+ * before returning the `NodeTransformer` callback.
+ */
+ onSubstituteNode: (hint: EmitHint, node: Node) => Node;
+ /**
+ * Enables before/after emit notifications in the pretty printer for the provided
+ * SyntaxKind.
+ */
+ enableEmitNotification(kind: SyntaxKind): void;
+ /**
+ * Determines whether before/after emit notifications should be raised in the pretty
+ * printer when it emits a node.
+ */
+ isEmitNotificationEnabled(node: Node): boolean;
+ /**
+ * Hook used to allow transformers to capture state before or after
+ * the printer emits a node.
+ *
+ * NOTE: Transformation hooks should only be modified during `Transformer` initialization,
+ * before returning the `NodeTransformer` callback.
+ */
+ onEmitNode: (hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void) => void;
+ }
+ export interface TransformationResult<T extends Node> {
+ /** Gets the transformed source files. */
+ transformed: T[];
+ /** Gets diagnostics for the transformation. */
+ diagnostics?: DiagnosticWithLocation[];
+ /**
+ * Gets a substitute for a node, if one is available; otherwise, returns the original node.
+ *
+ * @param hint A hint as to the intended usage of the node.
+ * @param node The node to substitute.
+ */
+ substituteNode(hint: EmitHint, node: Node): Node;
+ /**
+ * Emits a node with possible notification.
+ *
+ * @param hint A hint as to the intended usage of the node.
+ * @param node The node to emit.
+ * @param emitCallback A callback used to emit the node.
+ */
+ emitNodeWithNotification(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void): void;
+ /**
+ * Indicates if a given node needs an emit notification
+ *
+ * @param node The node to emit.
+ */
+ isEmitNotificationEnabled?(node: Node): boolean;
+ /**
+ * Clean up EmitNode entries on any parse-tree nodes.
+ */
+ dispose(): void;
+ }
+ /**
+ * A function that is used to initialize and return a `Transformer` callback, which in turn
+ * will be used to transform one or more nodes.
+ */
+ export type TransformerFactory<T extends Node> = (context: TransformationContext) => Transformer<T>;
+ /**
+ * A function that transforms a node.
+ */
+ export type Transformer<T extends Node> = (node: T) => T;
+ /**
+ * A function that accepts and possibly transforms a node.
+ */
+ export type Visitor = (node: Node) => VisitResult<Node>;
+ export interface NodeVisitor {
+ <T extends Node>(nodes: T, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: readonly Node[]) => T): T;
+ <T extends Node>(nodes: T | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: readonly Node[]) => T): T | undefined;
+ }
+ export interface NodesVisitor {
+ <T extends Node>(nodes: NodeArray<T>, visitor: Visitor | undefined, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<T>;
+ <T extends Node>(nodes: NodeArray<T> | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<T> | undefined;
+ }
+ export type VisitResult<T extends Node> = T | T[] | undefined;
+ export interface Printer {
+ /**
+ * Print a node and its subtree as-is, without any emit transformations.
+ * @param hint A value indicating the purpose of a node. This is primarily used to
+ * distinguish between an `Identifier` used in an expression position, versus an
+ * `Identifier` used as an `IdentifierName` as part of a declaration. For most nodes you
+ * should just pass `Unspecified`.
+ * @param node The node to print. The node and its subtree are printed as-is, without any
+ * emit transformations.
+ * @param sourceFile A source file that provides context for the node. The source text of
+ * the file is used to emit the original source content for literals and identifiers, while
+ * the identifiers of the source file are used when generating unique names to avoid
+ * collisions.
+ */
+ printNode(hint: EmitHint, node: Node, sourceFile: SourceFile): string;
+ /**
+ * Prints a list of nodes using the given format flags
+ */
+ printList<T extends Node>(format: ListFormat, list: NodeArray<T>, sourceFile: SourceFile): string;
+ /**
+ * Prints a source file as-is, without any emit transformations.
+ */
+ printFile(sourceFile: SourceFile): string;
+ /**
+ * Prints a bundle of source files as-is, without any emit transformations.
+ */
+ printBundle(bundle: Bundle): string;
+ }
+ export interface PrintHandlers {
+ /**
+ * A hook used by the Printer when generating unique names to avoid collisions with
+ * globally defined names that exist outside of the current source file.
+ */
+ hasGlobalName?(name: string): boolean;
+ /**
+ * A hook used by the Printer to provide notifications prior to emitting a node. A
+ * compatible implementation **must** invoke `emitCallback` with the provided `hint` and
+ * `node` values.
+ * @param hint A hint indicating the intended purpose of the node.
+ * @param node The node to emit.
+ * @param emitCallback A callback that, when invoked, will emit the node.
+ * @example
+ * ```ts
+ * var printer = createPrinter(printerOptions, {
+ * onEmitNode(hint, node, emitCallback) {
+ * // set up or track state prior to emitting the node...
+ * emitCallback(hint, node);
+ * // restore state after emitting the node...
+ * }
+ * });
+ * ```
+ */
+ onEmitNode?(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void): void;
+ /**
+ * A hook used to check if an emit notification is required for a node.
+ * @param node The node to emit.
+ */
+ isEmitNotificationEnabled?(node: Node): boolean;
+ /**
+ * A hook used by the Printer to perform just-in-time substitution of a node. This is
+ * primarily used by node transformations that need to substitute one node for another,
+ * such as replacing `myExportedVar` with `exports.myExportedVar`.
+ * @param hint A hint indicating the intended purpose of the node.
+ * @param node The node to emit.
+ * @example
+ * ```ts
+ * var printer = createPrinter(printerOptions, {
+ * substituteNode(hint, node) {
+ * // perform substitution if necessary...
+ * return node;
+ * }
+ * });
+ * ```
+ */
+ substituteNode?(hint: EmitHint, node: Node): Node;
+ }
+ export interface PrinterOptions {
+ removeComments?: boolean;
+ newLine?: NewLineKind;
+ omitTrailingSemicolon?: boolean;
+ noEmitHelpers?: boolean;
+ }
+ export interface GetEffectiveTypeRootsHost {
+ directoryExists?(directoryName: string): boolean;
+ getCurrentDirectory?(): string;
+ }
+ export interface TextSpan {
+ start: number;
+ length: number;
+ }
+ export interface TextChangeRange {
+ span: TextSpan;
+ newLength: number;
+ }
+ export interface SyntaxList extends Node {
+ kind: SyntaxKind.SyntaxList;
+ _children: Node[];
+ }
+ export enum ListFormat {
+ None = 0,
+ SingleLine = 0,
+ MultiLine = 1,
+ PreserveLines = 2,
+ LinesMask = 3,
+ NotDelimited = 0,
+ BarDelimited = 4,
+ AmpersandDelimited = 8,
+ CommaDelimited = 16,
+ AsteriskDelimited = 32,
+ DelimitersMask = 60,
+ AllowTrailingComma = 64,
+ Indented = 128,
+ SpaceBetweenBraces = 256,
+ SpaceBetweenSiblings = 512,
+ Braces = 1024,
+ Parenthesis = 2048,
+ AngleBrackets = 4096,
+ SquareBrackets = 8192,
+ BracketsMask = 15360,
+ OptionalIfUndefined = 16384,
+ OptionalIfEmpty = 32768,
+ Optional = 49152,
+ PreferNewLine = 65536,
+ NoTrailingNewLine = 131072,
+ NoInterveningComments = 262144,
+ NoSpaceIfEmpty = 524288,
+ SingleElement = 1048576,
+ SpaceAfterList = 2097152,
+ Modifiers = 2359808,
+ HeritageClauses = 512,
+ SingleLineTypeLiteralMembers = 768,
+ MultiLineTypeLiteralMembers = 32897,
+ SingleLineTupleTypeElements = 528,
+ MultiLineTupleTypeElements = 657,
+ UnionTypeConstituents = 516,
+ IntersectionTypeConstituents = 520,
+ ObjectBindingPatternElements = 525136,
+ ArrayBindingPatternElements = 524880,
+ ObjectLiteralExpressionProperties = 526226,
+ ImportClauseEntries = 526226,
+ ArrayLiteralExpressionElements = 8914,
+ CommaListElements = 528,
+ CallExpressionArguments = 2576,
+ NewExpressionArguments = 18960,
+ TemplateExpressionSpans = 262144,
+ SingleLineBlockStatements = 768,
+ MultiLineBlockStatements = 129,
+ VariableDeclarationList = 528,
+ SingleLineFunctionBodyStatements = 768,
+ MultiLineFunctionBodyStatements = 1,
+ ClassHeritageClauses = 0,
+ ClassMembers = 129,
+ InterfaceMembers = 129,
+ EnumMembers = 145,
+ CaseBlockClauses = 129,
+ NamedImportsOrExportsElements = 525136,
+ JsxElementOrFragmentChildren = 262144,
+ JsxElementAttributes = 262656,
+ CaseOrDefaultClauseStatements = 163969,
+ HeritageClauseTypes = 528,
+ SourceFileStatements = 131073,
+ Decorators = 2146305,
+ TypeArguments = 53776,
+ TypeParameters = 53776,
+ Parameters = 2576,
+ IndexSignatureParameters = 8848,
+ JSDocComment = 33
+ }
+ export interface UserPreferences {
+ readonly disableSuggestions?: boolean;
+ readonly quotePreference?: "auto" | "double" | "single";
+ readonly includeCompletionsForModuleExports?: boolean;
+ readonly includeCompletionsForImportStatements?: boolean;
+ readonly includeCompletionsWithSnippetText?: boolean;
+ readonly includeAutomaticOptionalChainCompletions?: boolean;
+ readonly includeCompletionsWithInsertText?: boolean;
+ readonly includeCompletionsWithClassMemberSnippets?: boolean;
+ readonly includeCompletionsWithObjectLiteralMethodSnippets?: boolean;
+ readonly useLabelDetailsInCompletionEntries?: boolean;
+ readonly allowIncompleteCompletions?: boolean;
+ readonly importModuleSpecifierPreference?: "shortest" | "project-relative" | "relative" | "non-relative";
+ /** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */
+ readonly importModuleSpecifierEnding?: "auto" | "minimal" | "index" | "js";
+ readonly allowTextChangesInNewFiles?: boolean;
+ readonly providePrefixAndSuffixTextForRename?: boolean;
+ readonly includePackageJsonAutoImports?: "auto" | "on" | "off";
+ readonly provideRefactorNotApplicableReason?: boolean;
+ readonly jsxAttributeCompletionStyle?: "auto" | "braces" | "none";
+ readonly includeInlayParameterNameHints?: "none" | "literals" | "all";
+ readonly includeInlayParameterNameHintsWhenArgumentMatchesName?: boolean;
+ readonly includeInlayFunctionParameterTypeHints?: boolean;
+ readonly includeInlayVariableTypeHints?: boolean;
+ readonly includeInlayVariableTypeHintsWhenTypeMatchesName?: boolean;
+ readonly includeInlayPropertyDeclarationTypeHints?: boolean;
+ readonly includeInlayFunctionLikeReturnTypeHints?: boolean;
+ readonly includeInlayEnumMemberValueHints?: boolean;
+ readonly allowRenameOfImportPath?: boolean;
+ readonly autoImportFileExcludePatterns?: string[];
+ }
+ /** Represents a bigint literal value without requiring bigint support */
+ export interface PseudoBigInt {
+ negative: boolean;
+ base10Value: string;
+ }
+ export {};
+}
+declare function setTimeout(handler: (...args: any[]) => void, timeout: number): any;
+declare function clearTimeout(handle: any): void;
+declare namespace ts {
+ export enum FileWatcherEventKind {
+ Created = 0,
+ Changed = 1,
+ Deleted = 2
+ }
+ export type FileWatcherCallback = (fileName: string, eventKind: FileWatcherEventKind, modifiedTime?: Date) => void;
+ export type DirectoryWatcherCallback = (fileName: string) => void;
+ export interface System {
+ args: string[];
+ newLine: string;
+ useCaseSensitiveFileNames: boolean;
+ write(s: string): void;
+ writeOutputIsTTY?(): boolean;
+ getWidthOfTerminal?(): number;
+ readFile(path: string, encoding?: string): string | undefined;
+ getFileSize?(path: string): number;
+ writeFile(path: string, data: string, writeByteOrderMark?: boolean): void;
+ /**
+ * @pollingInterval - this parameter is used in polling-based watchers and ignored in watchers that
+ * use native OS file watching
+ */
+ watchFile?(path: string, callback: FileWatcherCallback, pollingInterval?: number, options?: WatchOptions): FileWatcher;
+ watchDirectory?(path: string, callback: DirectoryWatcherCallback, recursive?: boolean, options?: WatchOptions): FileWatcher;
+ resolvePath(path: string): string;
+ fileExists(path: string): boolean;
+ directoryExists(path: string): boolean;
+ createDirectory(path: string): void;
+ getExecutingFilePath(): string;
+ getCurrentDirectory(): string;
+ getDirectories(path: string): string[];
+ readDirectory(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[];
+ getModifiedTime?(path: string): Date | undefined;
+ setModifiedTime?(path: string, time: Date): void;
+ deleteFile?(path: string): void;
+ /**
+ * A good implementation is node.js' `crypto.createHash`. (https://nodejs.org/api/crypto.html#crypto_crypto_createhash_algorithm)
+ */
+ createHash?(data: string): string;
+ /** This must be cryptographically secure. Only implement this method using `crypto.createHash("sha256")`. */
+ createSHA256Hash?(data: string): string;
+ getMemoryUsage?(): number;
+ exit(exitCode?: number): void;
+ realpath?(path: string): string;
+ setTimeout?(callback: (...args: any[]) => void, ms: number, ...args: any[]): any;
+ clearTimeout?(timeoutId: any): void;
+ clearScreen?(): void;
+ base64decode?(input: string): string;
+ base64encode?(input: string): string;
+ }
+ export interface FileWatcher {
+ close(): void;
+ }
+ export function getNodeMajorVersion(): number | undefined;
+ export let sys: System;
+ export {};
+}
+declare namespace ts {
+ type ErrorCallback = (message: DiagnosticMessage, length: number) => void;
+ interface Scanner {
+ getStartPos(): number;
+ getToken(): SyntaxKind;
+ getTextPos(): number;
+ getTokenPos(): number;
+ getTokenText(): string;
+ getTokenValue(): string;
+ hasUnicodeEscape(): boolean;
+ hasExtendedUnicodeEscape(): boolean;
+ hasPrecedingLineBreak(): boolean;
+ isIdentifier(): boolean;
+ isReservedWord(): boolean;
+ isUnterminated(): boolean;
+ reScanGreaterToken(): SyntaxKind;
+ reScanSlashToken(): SyntaxKind;
+ reScanAsteriskEqualsToken(): SyntaxKind;
+ reScanTemplateToken(isTaggedTemplate: boolean): SyntaxKind;
+ reScanTemplateHeadOrNoSubstitutionTemplate(): SyntaxKind;
+ scanJsxIdentifier(): SyntaxKind;
+ scanJsxAttributeValue(): SyntaxKind;
+ reScanJsxAttributeValue(): SyntaxKind;
+ reScanJsxToken(allowMultilineJsxText?: boolean): JsxTokenSyntaxKind;
+ reScanLessThanToken(): SyntaxKind;
+ reScanHashToken(): SyntaxKind;
+ reScanQuestionToken(): SyntaxKind;
+ reScanInvalidIdentifier(): SyntaxKind;
+ scanJsxToken(): JsxTokenSyntaxKind;
+ scanJsDocToken(): JSDocSyntaxKind;
+ scan(): SyntaxKind;
+ getText(): string;
+ setText(text: string | undefined, start?: number, length?: number): void;
+ setOnError(onError: ErrorCallback | undefined): void;
+ setScriptTarget(scriptTarget: ScriptTarget): void;
+ setLanguageVariant(variant: LanguageVariant): void;
+ setTextPos(textPos: number): void;
+ lookAhead<T>(callback: () => T): T;
+ scanRange<T>(start: number, length: number, callback: () => T): T;
+ tryScan<T>(callback: () => T): T;
+ }
+ function tokenToString(t: SyntaxKind): string | undefined;
+ function getPositionOfLineAndCharacter(sourceFile: SourceFileLike, line: number, character: number): number;
+ function getLineAndCharacterOfPosition(sourceFile: SourceFileLike, position: number): LineAndCharacter;
+ function isWhiteSpaceLike(ch: number): boolean;
+ /** Does not include line breaks. For that, see isWhiteSpaceLike. */
+ function isWhiteSpaceSingleLine(ch: number): boolean;
+ function isLineBreak(ch: number): boolean;
+ function couldStartTrivia(text: string, pos: number): boolean;
+ function forEachLeadingCommentRange<U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean) => U): U | undefined;
+ function forEachLeadingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state: T): U | undefined;
+ function forEachTrailingCommentRange<U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean) => U): U | undefined;
+ function forEachTrailingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state: T): U | undefined;
+ function reduceEachLeadingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T, memo: U) => U, state: T, initial: U): U | undefined;
+ function reduceEachTrailingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T, memo: U) => U, state: T, initial: U): U | undefined;
+ function getLeadingCommentRanges(text: string, pos: number): CommentRange[] | undefined;
+ function getTrailingCommentRanges(text: string, pos: number): CommentRange[] | undefined;
+ /** Optionally, get the shebang */
+ function getShebang(text: string): string | undefined;
+ function isIdentifierStart(ch: number, languageVersion: ScriptTarget | undefined): boolean;
+ function isIdentifierPart(ch: number, languageVersion: ScriptTarget | undefined, identifierVariant?: LanguageVariant): boolean;
+ function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, languageVariant?: LanguageVariant, textInitial?: string, onError?: ErrorCallback, start?: number, length?: number): Scanner;
+}
+declare namespace ts {
+ function isExternalModuleNameRelative(moduleName: string): boolean;
+ function sortAndDeduplicateDiagnostics<T extends Diagnostic>(diagnostics: readonly T[]): SortedReadonlyArray<T>;
+ function getDefaultLibFileName(options: CompilerOptions): string;
+ function textSpanEnd(span: TextSpan): number;
+ function textSpanIsEmpty(span: TextSpan): boolean;
+ function textSpanContainsPosition(span: TextSpan, position: number): boolean;
+ function textSpanContainsTextSpan(span: TextSpan, other: TextSpan): boolean;
+ function textSpanOverlapsWith(span: TextSpan, other: TextSpan): boolean;
+ function textSpanOverlap(span1: TextSpan, span2: TextSpan): TextSpan | undefined;
+ function textSpanIntersectsWithTextSpan(span: TextSpan, other: TextSpan): boolean;
+ function textSpanIntersectsWith(span: TextSpan, start: number, length: number): boolean;
+ function decodedTextSpanIntersectsWith(start1: number, length1: number, start2: number, length2: number): boolean;
+ function textSpanIntersectsWithPosition(span: TextSpan, position: number): boolean;
+ function textSpanIntersection(span1: TextSpan, span2: TextSpan): TextSpan | undefined;
+ function createTextSpan(start: number, length: number): TextSpan;
+ function createTextSpanFromBounds(start: number, end: number): TextSpan;
+ function textChangeRangeNewSpan(range: TextChangeRange): TextSpan;
+ function textChangeRangeIsUnchanged(range: TextChangeRange): boolean;
+ function createTextChangeRange(span: TextSpan, newLength: number): TextChangeRange;
+ let unchangedTextChangeRange: TextChangeRange;
+ /**
+ * Called to merge all the changes that occurred across several versions of a script snapshot
+ * into a single change. i.e. if a user keeps making successive edits to a script we will
+ * have a text change from V1 to V2, V2 to V3, ..., Vn.
+ *
+ * This function will then merge those changes into a single change range valid between V1 and
+ * Vn.
+ */
+ function collapseTextChangeRangesAcrossMultipleVersions(changes: readonly TextChangeRange[]): TextChangeRange;
+ function getTypeParameterOwner(d: Declaration): Declaration | undefined;
+ type ParameterPropertyDeclaration = ParameterDeclaration & {
+ parent: ConstructorDeclaration;
+ name: Identifier;
+ };
+ function isParameterPropertyDeclaration(node: Node, parent: Node): node is ParameterPropertyDeclaration;
+ function isEmptyBindingPattern(node: BindingName): node is BindingPattern;
+ function isEmptyBindingElement(node: BindingElement): boolean;
+ function walkUpBindingElementsAndPatterns(binding: BindingElement): VariableDeclaration | ParameterDeclaration;
+ function getCombinedModifierFlags(node: Declaration): ModifierFlags;
+ function getCombinedNodeFlags(node: Node): NodeFlags;
+ /**
+ * Checks to see if the locale is in the appropriate format,
+ * and if it is, attempts to set the appropriate language.
+ */
+ function validateLocaleAndSetLanguage(locale: string, sys: {
+ getExecutingFilePath(): string;
+ resolvePath(path: string): string;
+ fileExists(fileName: string): boolean;
+ readFile(fileName: string): string | undefined;
+ }, errors?: Push<Diagnostic>): void;
+ function getOriginalNode(node: Node): Node;
+ function getOriginalNode<T extends Node>(node: Node, nodeTest: (node: Node) => node is T): T;
+ function getOriginalNode(node: Node | undefined): Node | undefined;
+ function getOriginalNode<T extends Node>(node: Node | undefined, nodeTest: (node: Node | undefined) => node is T): T | undefined;
+ /**
+ * Iterates through the parent chain of a node and performs the callback on each parent until the callback
+ * returns a truthy value, then returns that value.
+ * If no such value is found, it applies the callback until the parent pointer is undefined or the callback returns "quit"
+ * At that point findAncestor returns undefined.
+ */
+ function findAncestor<T extends Node>(node: Node | undefined, callback: (element: Node) => element is T): T | undefined;
+ function findAncestor(node: Node | undefined, callback: (element: Node) => boolean | "quit"): Node | undefined;
+ /**
+ * Gets a value indicating whether a node originated in the parse tree.
+ *
+ * @param node The node to test.
+ */
+ function isParseTreeNode(node: Node): boolean;
+ /**
+ * Gets the original parse tree node for a node.
+ *
+ * @param node The original node.
+ * @returns The original parse tree node if found; otherwise, undefined.
+ */
+ function getParseTreeNode(node: Node | undefined): Node | undefined;
+ /**
+ * Gets the original parse tree node for a node.
+ *
+ * @param node The original node.
+ * @param nodeTest A callback used to ensure the correct type of parse tree node is returned.
+ * @returns The original parse tree node if found; otherwise, undefined.
+ */
+ function getParseTreeNode<T extends Node>(node: T | undefined, nodeTest?: (node: Node) => node is T): T | undefined;
+ /** Add an extra underscore to identifiers that start with two underscores to avoid issues with magic names like '__proto__' */
+ function escapeLeadingUnderscores(identifier: string): __String;
+ /**
+ * Remove extra underscore from escaped identifier text content.
+ *
+ * @param identifier The escaped identifier text.
+ * @returns The unescaped identifier text.
+ */
+ function unescapeLeadingUnderscores(identifier: __String): string;
+ function idText(identifierOrPrivateName: Identifier | PrivateIdentifier): string;
+ function symbolName(symbol: Symbol): string;
+ function getNameOfJSDocTypedef(declaration: JSDocTypedefTag): Identifier | PrivateIdentifier | undefined;
+ function getNameOfDeclaration(declaration: Declaration | Expression | undefined): DeclarationName | undefined;
+ function getDecorators(node: HasDecorators): readonly Decorator[] | undefined;
+ function getModifiers(node: HasModifiers): readonly Modifier[] | undefined;
+ /**
+ * Gets the JSDoc parameter tags for the node if present.
+ *
+ * @remarks Returns any JSDoc param tag whose name matches the provided
+ * parameter, whether a param tag on a containing function
+ * expression, or a param tag on a variable declaration whose
+ * initializer is the containing function. The tags closest to the
+ * node are returned first, so in the previous example, the param
+ * tag on the containing function expression would be first.
+ *
+ * For binding patterns, parameter tags are matched by position.
+ */
+ function getJSDocParameterTags(param: ParameterDeclaration): readonly JSDocParameterTag[];
+ /**
+ * Gets the JSDoc type parameter tags for the node if present.
+ *
+ * @remarks Returns any JSDoc template tag whose names match the provided
+ * parameter, whether a template tag on a containing function
+ * expression, or a template tag on a variable declaration whose
+ * initializer is the containing function. The tags closest to the
+ * node are returned first, so in the previous example, the template
+ * tag on the containing function expression would be first.
+ */
+ function getJSDocTypeParameterTags(param: TypeParameterDeclaration): readonly JSDocTemplateTag[];
+ /**
+ * Return true if the node has JSDoc parameter tags.
+ *
+ * @remarks Includes parameter tags that are not directly on the node,
+ * for example on a variable declaration whose initializer is a function expression.
+ */
+ function hasJSDocParameterTags(node: FunctionLikeDeclaration | SignatureDeclaration): boolean;
+ /** Gets the JSDoc augments tag for the node if present */
+ function getJSDocAugmentsTag(node: Node): JSDocAugmentsTag | undefined;
+ /** Gets the JSDoc implements tags for the node if present */
+ function getJSDocImplementsTags(node: Node): readonly JSDocImplementsTag[];
+ /** Gets the JSDoc class tag for the node if present */
+ function getJSDocClassTag(node: Node): JSDocClassTag | undefined;
+ /** Gets the JSDoc public tag for the node if present */
+ function getJSDocPublicTag(node: Node): JSDocPublicTag | undefined;
+ /** Gets the JSDoc private tag for the node if present */
+ function getJSDocPrivateTag(node: Node): JSDocPrivateTag | undefined;
+ /** Gets the JSDoc protected tag for the node if present */
+ function getJSDocProtectedTag(node: Node): JSDocProtectedTag | undefined;
+ /** Gets the JSDoc protected tag for the node if present */
+ function getJSDocReadonlyTag(node: Node): JSDocReadonlyTag | undefined;
+ function getJSDocOverrideTagNoCache(node: Node): JSDocOverrideTag | undefined;
+ /** Gets the JSDoc deprecated tag for the node if present */
+ function getJSDocDeprecatedTag(node: Node): JSDocDeprecatedTag | undefined;
+ /** Gets the JSDoc enum tag for the node if present */
+ function getJSDocEnumTag(node: Node): JSDocEnumTag | undefined;
+ /** Gets the JSDoc this tag for the node if present */
+ function getJSDocThisTag(node: Node): JSDocThisTag | undefined;
+ /** Gets the JSDoc return tag for the node if present */
+ function getJSDocReturnTag(node: Node): JSDocReturnTag | undefined;
+ /** Gets the JSDoc template tag for the node if present */
+ function getJSDocTemplateTag(node: Node): JSDocTemplateTag | undefined;
+ /** Gets the JSDoc type tag for the node if present and valid */
+ function getJSDocTypeTag(node: Node): JSDocTypeTag | undefined;
+ /**
+ * Gets the type node for the node if provided via JSDoc.
+ *
+ * @remarks The search includes any JSDoc param tag that relates
+ * to the provided parameter, for example a type tag on the
+ * parameter itself, or a param tag on a containing function
+ * expression, or a param tag on a variable declaration whose
+ * initializer is the containing function. The tags closest to the
+ * node are examined first, so in the previous example, the type
+ * tag directly on the node would be returned.
+ */
+ function getJSDocType(node: Node): TypeNode | undefined;
+ /**
+ * Gets the return type node for the node if provided via JSDoc return tag or type tag.
+ *
+ * @remarks `getJSDocReturnTag` just gets the whole JSDoc tag. This function
+ * gets the type from inside the braces, after the fat arrow, etc.
+ */
+ function getJSDocReturnType(node: Node): TypeNode | undefined;
+ /** Get all JSDoc tags related to a node, including those on parent nodes. */
+ function getJSDocTags(node: Node): readonly JSDocTag[];
+ /** Gets all JSDoc tags that match a specified predicate */
+ function getAllJSDocTags<T extends JSDocTag>(node: Node, predicate: (tag: JSDocTag) => tag is T): readonly T[];
+ /** Gets all JSDoc tags of a specified kind */
+ function getAllJSDocTagsOfKind(node: Node, kind: SyntaxKind): readonly JSDocTag[];
+ /** Gets the text of a jsdoc comment, flattening links to their text. */
+ function getTextOfJSDocComment(comment?: string | NodeArray<JSDocComment>): string | undefined;
+ /**
+ * Gets the effective type parameters. If the node was parsed in a
+ * JavaScript file, gets the type parameters from the `@template` tag from JSDoc.
+ *
+ * This does *not* return type parameters from a jsdoc reference to a generic type, eg
+ *
+ * type Id = <T>(x: T) => T
+ * /** @type {Id} /
+ * function id(x) { return x }
+ */
+ function getEffectiveTypeParameterDeclarations(node: DeclarationWithTypeParameters): readonly TypeParameterDeclaration[];
+ function getEffectiveConstraintOfTypeParameter(node: TypeParameterDeclaration): TypeNode | undefined;
+ function isMemberName(node: Node): node is MemberName;
+ function isPropertyAccessChain(node: Node): node is PropertyAccessChain;
+ function isElementAccessChain(node: Node): node is ElementAccessChain;
+ function isCallChain(node: Node): node is CallChain;
+ function isOptionalChain(node: Node): node is PropertyAccessChain | ElementAccessChain | CallChain | NonNullChain;
+ function isNullishCoalesce(node: Node): boolean;
+ function isConstTypeReference(node: Node): boolean;
+ function skipPartiallyEmittedExpressions(node: Expression): Expression;
+ function skipPartiallyEmittedExpressions(node: Node): Node;
+ function isNonNullChain(node: Node): node is NonNullChain;
+ function isBreakOrContinueStatement(node: Node): node is BreakOrContinueStatement;
+ function isNamedExportBindings(node: Node): node is NamedExportBindings;
+ function isUnparsedTextLike(node: Node): node is UnparsedTextLike;
+ function isUnparsedNode(node: Node): node is UnparsedNode;
+ function isJSDocPropertyLikeTag(node: Node): node is JSDocPropertyLikeTag;
+ /**
+ * True if kind is of some token syntax kind.
+ * For example, this is true for an IfKeyword but not for an IfStatement.
+ * Literals are considered tokens, except TemplateLiteral, but does include TemplateHead/Middle/Tail.
+ */
+ function isTokenKind(kind: SyntaxKind): boolean;
+ /**
+ * True if node is of some token syntax kind.
+ * For example, this is true for an IfKeyword but not for an IfStatement.
+ * Literals are considered tokens, except TemplateLiteral, but does include TemplateHead/Middle/Tail.
+ */
+ function isToken(n: Node): boolean;
+ function isLiteralExpression(node: Node): node is LiteralExpression;
+ function isTemplateLiteralToken(node: Node): node is TemplateLiteralToken;
+ function isTemplateMiddleOrTemplateTail(node: Node): node is TemplateMiddle | TemplateTail;
+ function isImportOrExportSpecifier(node: Node): node is ImportSpecifier | ExportSpecifier;
+ function isTypeOnlyImportOrExportDeclaration(node: Node): node is TypeOnlyAliasDeclaration;
+ function isAssertionKey(node: Node): node is AssertionKey;
+ function isStringTextContainingNode(node: Node): node is StringLiteral | TemplateLiteralToken;
+ function isModifier(node: Node): node is Modifier;
+ function isEntityName(node: Node): node is EntityName;
+ function isPropertyName(node: Node): node is PropertyName;
+ function isBindingName(node: Node): node is BindingName;
+ function isFunctionLike(node: Node | undefined): node is SignatureDeclaration;
+ function isClassElement(node: Node): node is ClassElement;
+ function isClassLike(node: Node): node is ClassLikeDeclaration;
+ function isAccessor(node: Node): node is AccessorDeclaration;
+ function isModifierLike(node: Node): node is ModifierLike;
+ function isTypeElement(node: Node): node is TypeElement;
+ function isClassOrTypeElement(node: Node): node is ClassElement | TypeElement;
+ function isObjectLiteralElementLike(node: Node): node is ObjectLiteralElementLike;
+ /**
+ * Node test that determines whether a node is a valid type node.
+ * This differs from the `isPartOfTypeNode` function which determines whether a node is *part*
+ * of a TypeNode.
+ */
+ function isTypeNode(node: Node): node is TypeNode;
+ function isFunctionOrConstructorTypeNode(node: Node): node is FunctionTypeNode | ConstructorTypeNode;
+ function isPropertyAccessOrQualifiedName(node: Node): node is PropertyAccessExpression | QualifiedName;
+ function isCallLikeExpression(node: Node): node is CallLikeExpression;
+ function isCallOrNewExpression(node: Node): node is CallExpression | NewExpression;
+ function isTemplateLiteral(node: Node): node is TemplateLiteral;
+ function isAssertionExpression(node: Node): node is AssertionExpression;
+ function isIterationStatement(node: Node, lookInLabeledStatements: false): node is IterationStatement;
+ function isIterationStatement(node: Node, lookInLabeledStatements: boolean): node is IterationStatement | LabeledStatement;
+ function isJsxOpeningLikeElement(node: Node): node is JsxOpeningLikeElement;
+ function isCaseOrDefaultClause(node: Node): node is CaseOrDefaultClause;
+ /** True if node is of a kind that may contain comment text. */
+ function isJSDocCommentContainingNode(node: Node): boolean;
+ function isSetAccessor(node: Node): node is SetAccessorDeclaration;
+ function isGetAccessor(node: Node): node is GetAccessorDeclaration;
+ /** True if has initializer node attached to it. */
+ function hasOnlyExpressionInitializer(node: Node): node is HasExpressionInitializer;
+ function isObjectLiteralElement(node: Node): node is ObjectLiteralElement;
+ function isStringLiteralLike(node: Node): node is StringLiteralLike;
+ function isJSDocLinkLike(node: Node): node is JSDocLink | JSDocLinkCode | JSDocLinkPlain;
+ function hasRestParameter(s: SignatureDeclaration | JSDocSignature): boolean;
+ function isRestParameter(node: ParameterDeclaration | JSDocParameterTag): boolean;
+}
+declare namespace ts {
+ const factory: NodeFactory;
+ function createUnparsedSourceFile(text: string): UnparsedSource;
+ function createUnparsedSourceFile(inputFile: InputFiles, type: "js" | "dts", stripInternal?: boolean): UnparsedSource;
+ function createUnparsedSourceFile(text: string, mapPath: string | undefined, map: string | undefined): UnparsedSource;
+ function createInputFiles(javascriptText: string, declarationText: string): InputFiles;
+ function createInputFiles(readFileText: (path: string) => string | undefined, javascriptPath: string, javascriptMapPath: string | undefined, declarationPath: string, declarationMapPath: string | undefined, buildInfoPath: string | undefined): InputFiles;
+ function createInputFiles(javascriptText: string, declarationText: string, javascriptMapPath: string | undefined, javascriptMapText: string | undefined, declarationMapPath: string | undefined, declarationMapText: string | undefined): InputFiles;
+ /**
+ * Create an external source map source file reference
+ */
+ function createSourceMapSource(fileName: string, text: string, skipTrivia?: (pos: number) => number): SourceMapSource;
+ function setOriginalNode<T extends Node>(node: T, original: Node | undefined): T;
+}
+declare namespace ts {
+ /**
+ * Clears any `EmitNode` entries from parse-tree nodes.
+ * @param sourceFile A source file.
+ */
+ function disposeEmitNodes(sourceFile: SourceFile | undefined): void;
+ /**
+ * Sets flags that control emit behavior of a node.
+ */
+ function setEmitFlags<T extends Node>(node: T, emitFlags: EmitFlags): T;
+ /**
+ * Gets a custom text range to use when emitting source maps.
+ */
+ function getSourceMapRange(node: Node): SourceMapRange;
+ /**
+ * Sets a custom text range to use when emitting source maps.
+ */
+ function setSourceMapRange<T extends Node>(node: T, range: SourceMapRange | undefined): T;
+ /**
+ * Gets the TextRange to use for source maps for a token of a node.
+ */
+ function getTokenSourceMapRange(node: Node, token: SyntaxKind): SourceMapRange | undefined;
+ /**
+ * Sets the TextRange to use for source maps for a token of a node.
+ */
+ function setTokenSourceMapRange<T extends Node>(node: T, token: SyntaxKind, range: SourceMapRange | undefined): T;
+ /**
+ * Gets a custom text range to use when emitting comments.
+ */
+ function getCommentRange(node: Node): TextRange;
+ /**
+ * Sets a custom text range to use when emitting comments.
+ */
+ function setCommentRange<T extends Node>(node: T, range: TextRange): T;
+ function getSyntheticLeadingComments(node: Node): SynthesizedComment[] | undefined;
+ function setSyntheticLeadingComments<T extends Node>(node: T, comments: SynthesizedComment[] | undefined): T;
+ function addSyntheticLeadingComment<T extends Node>(node: T, kind: SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia, text: string, hasTrailingNewLine?: boolean): T;
+ function getSyntheticTrailingComments(node: Node): SynthesizedComment[] | undefined;
+ function setSyntheticTrailingComments<T extends Node>(node: T, comments: SynthesizedComment[] | undefined): T;
+ function addSyntheticTrailingComment<T extends Node>(node: T, kind: SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia, text: string, hasTrailingNewLine?: boolean): T;
+ function moveSyntheticComments<T extends Node>(node: T, original: Node): T;
+ /**
+ * Gets the constant value to emit for an expression representing an enum.
+ */
+ function getConstantValue(node: AccessExpression): string | number | undefined;
+ /**
+ * Sets the constant value to emit for an expression.
+ */
+ function setConstantValue(node: AccessExpression, value: string | number): AccessExpression;
+ /**
+ * Adds an EmitHelper to a node.
+ */
+ function addEmitHelper<T extends Node>(node: T, helper: EmitHelper): T;
+ /**
+ * Add EmitHelpers to a node.
+ */
+ function addEmitHelpers<T extends Node>(node: T, helpers: EmitHelper[] | undefined): T;
+ /**
+ * Removes an EmitHelper from a node.
+ */
+ function removeEmitHelper(node: Node, helper: EmitHelper): boolean;
+ /**
+ * Gets the EmitHelpers of a node.
+ */
+ function getEmitHelpers(node: Node): EmitHelper[] | undefined;
+ /**
+ * Moves matching emit helpers from a source node to a target node.
+ */
+ function moveEmitHelpers(source: Node, target: Node, predicate: (helper: EmitHelper) => boolean): void;
+}
+declare namespace ts {
+ function isNumericLiteral(node: Node): node is NumericLiteral;
+ function isBigIntLiteral(node: Node): node is BigIntLiteral;
+ function isStringLiteral(node: Node): node is StringLiteral;
+ function isJsxText(node: Node): node is JsxText;
+ function isRegularExpressionLiteral(node: Node): node is RegularExpressionLiteral;
+ function isNoSubstitutionTemplateLiteral(node: Node): node is NoSubstitutionTemplateLiteral;
+ function isTemplateHead(node: Node): node is TemplateHead;
+ function isTemplateMiddle(node: Node): node is TemplateMiddle;
+ function isTemplateTail(node: Node): node is TemplateTail;
+ function isDotDotDotToken(node: Node): node is DotDotDotToken;
+ function isPlusToken(node: Node): node is PlusToken;
+ function isMinusToken(node: Node): node is MinusToken;
+ function isAsteriskToken(node: Node): node is AsteriskToken;
+ function isIdentifier(node: Node): node is Identifier;
+ function isPrivateIdentifier(node: Node): node is PrivateIdentifier;
+ function isQualifiedName(node: Node): node is QualifiedName;
+ function isComputedPropertyName(node: Node): node is ComputedPropertyName;
+ function isTypeParameterDeclaration(node: Node): node is TypeParameterDeclaration;
+ function isParameter(node: Node): node is ParameterDeclaration;
+ function isDecorator(node: Node): node is Decorator;
+ function isPropertySignature(node: Node): node is PropertySignature;
+ function isPropertyDeclaration(node: Node): node is PropertyDeclaration;
+ function isMethodSignature(node: Node): node is MethodSignature;
+ function isMethodDeclaration(node: Node): node is MethodDeclaration;
+ function isClassStaticBlockDeclaration(node: Node): node is ClassStaticBlockDeclaration;
+ function isConstructorDeclaration(node: Node): node is ConstructorDeclaration;
+ function isGetAccessorDeclaration(node: Node): node is GetAccessorDeclaration;
+ function isSetAccessorDeclaration(node: Node): node is SetAccessorDeclaration;
+ function isCallSignatureDeclaration(node: Node): node is CallSignatureDeclaration;
+ function isConstructSignatureDeclaration(node: Node): node is ConstructSignatureDeclaration;
+ function isIndexSignatureDeclaration(node: Node): node is IndexSignatureDeclaration;
+ function isTypePredicateNode(node: Node): node is TypePredicateNode;
+ function isTypeReferenceNode(node: Node): node is TypeReferenceNode;
+ function isFunctionTypeNode(node: Node): node is FunctionTypeNode;
+ function isConstructorTypeNode(node: Node): node is ConstructorTypeNode;
+ function isTypeQueryNode(node: Node): node is TypeQueryNode;
+ function isTypeLiteralNode(node: Node): node is TypeLiteralNode;
+ function isArrayTypeNode(node: Node): node is ArrayTypeNode;
+ function isTupleTypeNode(node: Node): node is TupleTypeNode;
+ function isNamedTupleMember(node: Node): node is NamedTupleMember;
+ function isOptionalTypeNode(node: Node): node is OptionalTypeNode;
+ function isRestTypeNode(node: Node): node is RestTypeNode;
+ function isUnionTypeNode(node: Node): node is UnionTypeNode;
+ function isIntersectionTypeNode(node: Node): node is IntersectionTypeNode;
+ function isConditionalTypeNode(node: Node): node is ConditionalTypeNode;
+ function isInferTypeNode(node: Node): node is InferTypeNode;
+ function isParenthesizedTypeNode(node: Node): node is ParenthesizedTypeNode;
+ function isThisTypeNode(node: Node): node is ThisTypeNode;
+ function isTypeOperatorNode(node: Node): node is TypeOperatorNode;
+ function isIndexedAccessTypeNode(node: Node): node is IndexedAccessTypeNode;
+ function isMappedTypeNode(node: Node): node is MappedTypeNode;
+ function isLiteralTypeNode(node: Node): node is LiteralTypeNode;
+ function isImportTypeNode(node: Node): node is ImportTypeNode;
+ function isTemplateLiteralTypeSpan(node: Node): node is TemplateLiteralTypeSpan;
+ function isTemplateLiteralTypeNode(node: Node): node is TemplateLiteralTypeNode;
+ function isObjectBindingPattern(node: Node): node is ObjectBindingPattern;
+ function isArrayBindingPattern(node: Node): node is ArrayBindingPattern;
+ function isBindingElement(node: Node): node is BindingElement;
+ function isArrayLiteralExpression(node: Node): node is ArrayLiteralExpression;
+ function isObjectLiteralExpression(node: Node): node is ObjectLiteralExpression;
+ function isPropertyAccessExpression(node: Node): node is PropertyAccessExpression;
+ function isElementAccessExpression(node: Node): node is ElementAccessExpression;
+ function isCallExpression(node: Node): node is CallExpression;
+ function isNewExpression(node: Node): node is NewExpression;
+ function isTaggedTemplateExpression(node: Node): node is TaggedTemplateExpression;
+ function isTypeAssertionExpression(node: Node): node is TypeAssertion;
+ function isParenthesizedExpression(node: Node): node is ParenthesizedExpression;
+ function isFunctionExpression(node: Node): node is FunctionExpression;
+ function isArrowFunction(node: Node): node is ArrowFunction;
+ function isDeleteExpression(node: Node): node is DeleteExpression;
+ function isTypeOfExpression(node: Node): node is TypeOfExpression;
+ function isVoidExpression(node: Node): node is VoidExpression;
+ function isAwaitExpression(node: Node): node is AwaitExpression;
+ function isPrefixUnaryExpression(node: Node): node is PrefixUnaryExpression;
+ function isPostfixUnaryExpression(node: Node): node is PostfixUnaryExpression;
+ function isBinaryExpression(node: Node): node is BinaryExpression;
+ function isConditionalExpression(node: Node): node is ConditionalExpression;
+ function isTemplateExpression(node: Node): node is TemplateExpression;
+ function isYieldExpression(node: Node): node is YieldExpression;
+ function isSpreadElement(node: Node): node is SpreadElement;
+ function isClassExpression(node: Node): node is ClassExpression;
+ function isOmittedExpression(node: Node): node is OmittedExpression;
+ function isExpressionWithTypeArguments(node: Node): node is ExpressionWithTypeArguments;
+ function isAsExpression(node: Node): node is AsExpression;
+ function isNonNullExpression(node: Node): node is NonNullExpression;
+ function isMetaProperty(node: Node): node is MetaProperty;
+ function isSyntheticExpression(node: Node): node is SyntheticExpression;
+ function isPartiallyEmittedExpression(node: Node): node is PartiallyEmittedExpression;
+ function isCommaListExpression(node: Node): node is CommaListExpression;
+ function isTemplateSpan(node: Node): node is TemplateSpan;
+ function isSemicolonClassElement(node: Node): node is SemicolonClassElement;
+ function isBlock(node: Node): node is Block;
+ function isVariableStatement(node: Node): node is VariableStatement;
+ function isEmptyStatement(node: Node): node is EmptyStatement;
+ function isExpressionStatement(node: Node): node is ExpressionStatement;
+ function isIfStatement(node: Node): node is IfStatement;
+ function isDoStatement(node: Node): node is DoStatement;
+ function isWhileStatement(node: Node): node is WhileStatement;
+ function isForStatement(node: Node): node is ForStatement;
+ function isForInStatement(node: Node): node is ForInStatement;
+ function isForOfStatement(node: Node): node is ForOfStatement;
+ function isContinueStatement(node: Node): node is ContinueStatement;
+ function isBreakStatement(node: Node): node is BreakStatement;
+ function isReturnStatement(node: Node): node is ReturnStatement;
+ function isWithStatement(node: Node): node is WithStatement;
+ function isSwitchStatement(node: Node): node is SwitchStatement;
+ function isLabeledStatement(node: Node): node is LabeledStatement;
+ function isThrowStatement(node: Node): node is ThrowStatement;
+ function isTryStatement(node: Node): node is TryStatement;
+ function isDebuggerStatement(node: Node): node is DebuggerStatement;
+ function isVariableDeclaration(node: Node): node is VariableDeclaration;
+ function isVariableDeclarationList(node: Node): node is VariableDeclarationList;
+ function isFunctionDeclaration(node: Node): node is FunctionDeclaration;
+ function isClassDeclaration(node: Node): node is ClassDeclaration;
+ function isInterfaceDeclaration(node: Node): node is InterfaceDeclaration;
+ function isTypeAliasDeclaration(node: Node): node is TypeAliasDeclaration;
+ function isEnumDeclaration(node: Node): node is EnumDeclaration;
+ function isModuleDeclaration(node: Node): node is ModuleDeclaration;
+ function isModuleBlock(node: Node): node is ModuleBlock;
+ function isCaseBlock(node: Node): node is CaseBlock;
+ function isNamespaceExportDeclaration(node: Node): node is NamespaceExportDeclaration;
+ function isImportEqualsDeclaration(node: Node): node is ImportEqualsDeclaration;
+ function isImportDeclaration(node: Node): node is ImportDeclaration;
+ function isImportClause(node: Node): node is ImportClause;
+ function isImportTypeAssertionContainer(node: Node): node is ImportTypeAssertionContainer;
+ function isAssertClause(node: Node): node is AssertClause;
+ function isAssertEntry(node: Node): node is AssertEntry;
+ function isNamespaceImport(node: Node): node is NamespaceImport;
+ function isNamespaceExport(node: Node): node is NamespaceExport;
+ function isNamedImports(node: Node): node is NamedImports;
+ function isImportSpecifier(node: Node): node is ImportSpecifier;
+ function isExportAssignment(node: Node): node is ExportAssignment;
+ function isExportDeclaration(node: Node): node is ExportDeclaration;
+ function isNamedExports(node: Node): node is NamedExports;
+ function isExportSpecifier(node: Node): node is ExportSpecifier;
+ function isMissingDeclaration(node: Node): node is MissingDeclaration;
+ function isNotEmittedStatement(node: Node): node is NotEmittedStatement;
+ function isExternalModuleReference(node: Node): node is ExternalModuleReference;
+ function isJsxElement(node: Node): node is JsxElement;
+ function isJsxSelfClosingElement(node: Node): node is JsxSelfClosingElement;
+ function isJsxOpeningElement(node: Node): node is JsxOpeningElement;
+ function isJsxClosingElement(node: Node): node is JsxClosingElement;
+ function isJsxFragment(node: Node): node is JsxFragment;
+ function isJsxOpeningFragment(node: Node): node is JsxOpeningFragment;
+ function isJsxClosingFragment(node: Node): node is JsxClosingFragment;
+ function isJsxAttribute(node: Node): node is JsxAttribute;
+ function isJsxAttributes(node: Node): node is JsxAttributes;
+ function isJsxSpreadAttribute(node: Node): node is JsxSpreadAttribute;
+ function isJsxExpression(node: Node): node is JsxExpression;
+ function isCaseClause(node: Node): node is CaseClause;
+ function isDefaultClause(node: Node): node is DefaultClause;
+ function isHeritageClause(node: Node): node is HeritageClause;
+ function isCatchClause(node: Node): node is CatchClause;
+ function isPropertyAssignment(node: Node): node is PropertyAssignment;
+ function isShorthandPropertyAssignment(node: Node): node is ShorthandPropertyAssignment;
+ function isSpreadAssignment(node: Node): node is SpreadAssignment;
+ function isEnumMember(node: Node): node is EnumMember;
+ function isUnparsedPrepend(node: Node): node is UnparsedPrepend;
+ function isSourceFile(node: Node): node is SourceFile;
+ function isBundle(node: Node): node is Bundle;
+ function isUnparsedSource(node: Node): node is UnparsedSource;
+ function isJSDocTypeExpression(node: Node): node is JSDocTypeExpression;
+ function isJSDocNameReference(node: Node): node is JSDocNameReference;
+ function isJSDocMemberName(node: Node): node is JSDocMemberName;
+ function isJSDocLink(node: Node): node is JSDocLink;
+ function isJSDocLinkCode(node: Node): node is JSDocLinkCode;
+ function isJSDocLinkPlain(node: Node): node is JSDocLinkPlain;
+ function isJSDocAllType(node: Node): node is JSDocAllType;
+ function isJSDocUnknownType(node: Node): node is JSDocUnknownType;
+ function isJSDocNullableType(node: Node): node is JSDocNullableType;
+ function isJSDocNonNullableType(node: Node): node is JSDocNonNullableType;
+ function isJSDocOptionalType(node: Node): node is JSDocOptionalType;
+ function isJSDocFunctionType(node: Node): node is JSDocFunctionType;
+ function isJSDocVariadicType(node: Node): node is JSDocVariadicType;
+ function isJSDocNamepathType(node: Node): node is JSDocNamepathType;
+ function isJSDoc(node: Node): node is JSDoc;
+ function isJSDocTypeLiteral(node: Node): node is JSDocTypeLiteral;
+ function isJSDocSignature(node: Node): node is JSDocSignature;
+ function isJSDocAugmentsTag(node: Node): node is JSDocAugmentsTag;
+ function isJSDocAuthorTag(node: Node): node is JSDocAuthorTag;
+ function isJSDocClassTag(node: Node): node is JSDocClassTag;
+ function isJSDocCallbackTag(node: Node): node is JSDocCallbackTag;
+ function isJSDocPublicTag(node: Node): node is JSDocPublicTag;
+ function isJSDocPrivateTag(node: Node): node is JSDocPrivateTag;
+ function isJSDocProtectedTag(node: Node): node is JSDocProtectedTag;
+ function isJSDocReadonlyTag(node: Node): node is JSDocReadonlyTag;
+ function isJSDocOverrideTag(node: Node): node is JSDocOverrideTag;
+ function isJSDocDeprecatedTag(node: Node): node is JSDocDeprecatedTag;
+ function isJSDocSeeTag(node: Node): node is JSDocSeeTag;
+ function isJSDocEnumTag(node: Node): node is JSDocEnumTag;
+ function isJSDocParameterTag(node: Node): node is JSDocParameterTag;
+ function isJSDocReturnTag(node: Node): node is JSDocReturnTag;
+ function isJSDocThisTag(node: Node): node is JSDocThisTag;
+ function isJSDocTypeTag(node: Node): node is JSDocTypeTag;
+ function isJSDocTemplateTag(node: Node): node is JSDocTemplateTag;
+ function isJSDocTypedefTag(node: Node): node is JSDocTypedefTag;
+ function isJSDocUnknownTag(node: Node): node is JSDocUnknownTag;
+ function isJSDocPropertyTag(node: Node): node is JSDocPropertyTag;
+ function isJSDocImplementsTag(node: Node): node is JSDocImplementsTag;
+}
+declare namespace ts {
+ function setTextRange<T extends TextRange>(range: T, location: TextRange | undefined): T;
+ function canHaveModifiers(node: Node): node is HasModifiers;
+ function canHaveDecorators(node: Node): node is HasDecorators;
+}
+declare namespace ts {
+ /**
+ * Invokes a callback for each child of the given node. The 'cbNode' callback is invoked for all child nodes
+ * stored in properties. If a 'cbNodes' callback is specified, it is invoked for embedded arrays; otherwise,
+ * embedded arrays are flattened and the 'cbNode' callback is invoked for each element. If a callback returns
+ * a truthy value, iteration stops and that value is returned. Otherwise, undefined is returned.
+ *
+ * @param node a given node to visit its children
+ * @param cbNode a callback to be invoked for all child nodes
+ * @param cbNodes a callback to be invoked for embedded array
+ *
+ * @remarks `forEachChild` must visit the children of a node in the order
+ * that they appear in the source code. The language service depends on this property to locate nodes by position.
+ */
+ export function forEachChild<T>(node: Node, cbNode: (node: Node) => T | undefined, cbNodes?: (nodes: NodeArray<Node>) => T | undefined): T | undefined;
+ export interface CreateSourceFileOptions {
+ languageVersion: ScriptTarget;
+ /**
+ * Controls the format the file is detected as - this can be derived from only the path
+ * and files on disk, but needs to be done with a module resolution cache in scope to be performant.
+ * This is usually `undefined` for compilations that do not have `moduleResolution` values of `node16` or `nodenext`.
+ */
+ impliedNodeFormat?: ModuleKind.ESNext | ModuleKind.CommonJS;
+ /**
+ * Controls how module-y-ness is set for the given file. Usually the result of calling
+ * `getSetExternalModuleIndicator` on a valid `CompilerOptions` object. If not present, the default
+ * check specified by `isFileProbablyExternalModule` will be used to set the field.
+ */
+ setExternalModuleIndicator?: (file: SourceFile) => void;
+ }
+ export function createSourceFile(fileName: string, sourceText: string, languageVersionOrOptions: ScriptTarget | CreateSourceFileOptions, setParentNodes?: boolean, scriptKind?: ScriptKind): SourceFile;
+ export function parseIsolatedEntityName(text: string, languageVersion: ScriptTarget): EntityName | undefined;
+ /**
+ * Parse json text into SyntaxTree and return node and parse errors if any
+ * @param fileName
+ * @param sourceText
+ */
+ export function parseJsonText(fileName: string, sourceText: string): JsonSourceFile;
+ export function isExternalModule(file: SourceFile): boolean;
+ export function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile;
+ export {};
+}
+declare namespace ts {
+ export function parseCommandLine(commandLine: readonly string[], readFile?: (path: string) => string | undefined): ParsedCommandLine;
+ export type DiagnosticReporter = (diagnostic: Diagnostic) => void;
+ /**
+ * Reports config file diagnostics
+ */
+ export interface ConfigFileDiagnosticsReporter {
+ /**
+ * Reports unrecoverable error when parsing config file
+ */
+ onUnRecoverableConfigFileDiagnostic: DiagnosticReporter;
+ }
+ /**
+ * Interface extending ParseConfigHost to support ParseConfigFile that reads config file and reports errors
+ */
+ export interface ParseConfigFileHost extends ParseConfigHost, ConfigFileDiagnosticsReporter {
+ getCurrentDirectory(): string;
+ }
+ /**
+ * Reads the config file, reports errors if any and exits if the config file cannot be found
+ */
+ export function getParsedCommandLineOfConfigFile(configFileName: string, optionsToExtend: CompilerOptions | undefined, host: ParseConfigFileHost, extendedConfigCache?: Map<ExtendedConfigCacheEntry>, watchOptionsToExtend?: WatchOptions, extraFileExtensions?: readonly FileExtensionInfo[]): ParsedCommandLine | undefined;
+ /**
+ * Read tsconfig.json file
+ * @param fileName The path to the config file
+ */
+ export function readConfigFile(fileName: string, readFile: (path: string) => string | undefined): {
+ config?: any;
+ error?: Diagnostic;
+ };
+ /**
+ * Parse the text of the tsconfig.json file
+ * @param fileName The path to the config file
+ * @param jsonText The text of the config file
+ */
+ export function parseConfigFileTextToJson(fileName: string, jsonText: string): {
+ config?: any;
+ error?: Diagnostic;
+ };
+ /**
+ * Read tsconfig.json file
+ * @param fileName The path to the config file
+ */
+ export function readJsonConfigFile(fileName: string, readFile: (path: string) => string | undefined): TsConfigSourceFile;
+ /**
+ * Convert the json syntax tree into the json value
+ */
+ export function convertToObject(sourceFile: JsonSourceFile, errors: Push<Diagnostic>): any;
+ /**
+ * Parse the contents of a config file (tsconfig.json).
+ * @param json The contents of the config file to parse
+ * @param host Instance of ParseConfigHost used to enumerate files in folder.
+ * @param basePath A root directory to resolve relative path entries in the config
+ * file to. e.g. outDir
+ */
+ export function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: readonly FileExtensionInfo[], extendedConfigCache?: Map<ExtendedConfigCacheEntry>, existingWatchOptions?: WatchOptions): ParsedCommandLine;
+ /**
+ * Parse the contents of a config file (tsconfig.json).
+ * @param jsonNode The contents of the config file to parse
+ * @param host Instance of ParseConfigHost used to enumerate files in folder.
+ * @param basePath A root directory to resolve relative path entries in the config
+ * file to. e.g. outDir
+ */
+ export function parseJsonSourceFileConfigFileContent(sourceFile: TsConfigSourceFile, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: readonly FileExtensionInfo[], extendedConfigCache?: Map<ExtendedConfigCacheEntry>, existingWatchOptions?: WatchOptions): ParsedCommandLine;
+ export interface ParsedTsconfig {
+ raw: any;
+ options?: CompilerOptions;
+ watchOptions?: WatchOptions;
+ typeAcquisition?: TypeAcquisition;
+ /**
+ * Note that the case of the config path has not yet been normalized, as no files have been imported into the project yet
+ */
+ extendedConfigPath?: string;
+ }
+ export interface ExtendedConfigCacheEntry {
+ extendedResult: TsConfigSourceFile;
+ extendedConfig: ParsedTsconfig | undefined;
+ }
+ export function convertCompilerOptionsFromJson(jsonOptions: any, basePath: string, configFileName?: string): {
+ options: CompilerOptions;
+ errors: Diagnostic[];
+ };
+ export function convertTypeAcquisitionFromJson(jsonOptions: any, basePath: string, configFileName?: string): {
+ options: TypeAcquisition;
+ errors: Diagnostic[];
+ };
+ export {};
+}
+declare namespace ts {
+ export function getEffectiveTypeRoots(options: CompilerOptions, host: GetEffectiveTypeRootsHost): string[] | undefined;
+ /**
+ * @param {string | undefined} containingFile - file that contains type reference directive, can be undefined if containing file is unknown.
+ * This is possible in case if resolution is performed for directives specified via 'types' parameter. In this case initial path for secondary lookups
+ * is assumed to be the same as root directory of the project.
+ */
+ export function resolveTypeReferenceDirective(typeReferenceDirectiveName: string, containingFile: string | undefined, options: CompilerOptions, host: ModuleResolutionHost, redirectedReference?: ResolvedProjectReference, cache?: TypeReferenceDirectiveResolutionCache, resolutionMode?: SourceFile["impliedNodeFormat"]): ResolvedTypeReferenceDirectiveWithFailedLookupLocations;
+ /**
+ * Given a set of options, returns the set of type directive names
+ * that should be included for this program automatically.
+ * This list could either come from the config file,
+ * or from enumerating the types root + initial secondary types lookup location.
+ * More type directives might appear in the program later as a result of loading actual source files;
+ * this list is only the set of defaults that are implicitly included.
+ */
+ export function getAutomaticTypeDirectiveNames(options: CompilerOptions, host: ModuleResolutionHost): string[];
+ export interface TypeReferenceDirectiveResolutionCache extends PerDirectoryResolutionCache<ResolvedTypeReferenceDirectiveWithFailedLookupLocations>, PackageJsonInfoCache {
+ }
+ export interface ModeAwareCache<T> {
+ get(key: string, mode: ModuleKind.CommonJS | ModuleKind.ESNext | undefined): T | undefined;
+ set(key: string, mode: ModuleKind.CommonJS | ModuleKind.ESNext | undefined, value: T): this;
+ delete(key: string, mode: ModuleKind.CommonJS | ModuleKind.ESNext | undefined): this;
+ has(key: string, mode: ModuleKind.CommonJS | ModuleKind.ESNext | undefined): boolean;
+ forEach(cb: (elem: T, key: string, mode: ModuleKind.CommonJS | ModuleKind.ESNext | undefined) => void): void;
+ size(): number;
+ }
+ /**
+ * Cached resolutions per containing directory.
+ * This assumes that any module id will have the same resolution for sibling files located in the same folder.
+ */
+ export interface PerDirectoryResolutionCache<T> {
+ getOrCreateCacheForDirectory(directoryName: string, redirectedReference?: ResolvedProjectReference): ModeAwareCache<T>;
+ clear(): void;
+ /**
+ * Updates with the current compilerOptions the cache will operate with.
+ * This updates the redirects map as well if needed so module resolutions are cached if they can across the projects
+ */
+ update(options: CompilerOptions): void;
+ }
+ export interface ModuleResolutionCache extends PerDirectoryResolutionCache<ResolvedModuleWithFailedLookupLocations>, NonRelativeModuleNameResolutionCache, PackageJsonInfoCache {
+ getPackageJsonInfoCache(): PackageJsonInfoCache;
+ }
+ /**
+ * Stored map from non-relative module name to a table: directory -> result of module lookup in this directory
+ * We support only non-relative module names because resolution of relative module names is usually more deterministic and thus less expensive.
+ */
+ export interface NonRelativeModuleNameResolutionCache extends PackageJsonInfoCache {
+ getOrCreateCacheForModuleName(nonRelativeModuleName: string, mode: ModuleKind.CommonJS | ModuleKind.ESNext | undefined, redirectedReference?: ResolvedProjectReference): PerModuleNameCache;
+ }
+ export interface PackageJsonInfoCache {
+ clear(): void;
+ }
+ export interface PerModuleNameCache {
+ get(directory: string): ResolvedModuleWithFailedLookupLocations | undefined;
+ set(directory: string, result: ResolvedModuleWithFailedLookupLocations): void;
+ }
+ export function createModuleResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string, options?: CompilerOptions): ModuleResolutionCache;
+ export function createTypeReferenceDirectiveResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string, options?: CompilerOptions, packageJsonInfoCache?: PackageJsonInfoCache): TypeReferenceDirectiveResolutionCache;
+ export function resolveModuleNameFromCache(moduleName: string, containingFile: string, cache: ModuleResolutionCache, mode?: ModuleKind.CommonJS | ModuleKind.ESNext): ResolvedModuleWithFailedLookupLocations | undefined;
+ export function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference, resolutionMode?: ModuleKind.CommonJS | ModuleKind.ESNext): ResolvedModuleWithFailedLookupLocations;
+ export function nodeModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;
+ export function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: NonRelativeModuleNameResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;
+ export {};
+}
+declare namespace ts {
+ /**
+ * Visits a Node using the supplied visitor, possibly returning a new Node in its place.
+ *
+ * @param node The Node to visit.
+ * @param visitor The callback used to visit the Node.
+ * @param test A callback to execute to verify the Node is valid.
+ * @param lift An optional callback to execute to lift a NodeArray into a valid Node.
+ */
+ function visitNode<T extends Node>(node: T, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: readonly Node[]) => T): T;
+ /**
+ * Visits a Node using the supplied visitor, possibly returning a new Node in its place.
+ *
+ * @param node The Node to visit.
+ * @param visitor The callback used to visit the Node.
+ * @param test A callback to execute to verify the Node is valid.
+ * @param lift An optional callback to execute to lift a NodeArray into a valid Node.
+ */
+ function visitNode<T extends Node>(node: T | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: readonly Node[]) => T): T | undefined;
+ /**
+ * Visits a NodeArray using the supplied visitor, possibly returning a new NodeArray in its place.
+ *
+ * @param nodes The NodeArray to visit.
+ * @param visitor The callback used to visit a Node.
+ * @param test A node test to execute for each node.
+ * @param start An optional value indicating the starting offset at which to start visiting.
+ * @param count An optional value indicating the maximum number of nodes to visit.
+ */
+ function visitNodes<T extends Node>(nodes: NodeArray<T>, visitor: Visitor | undefined, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<T>;
+ /**
+ * Visits a NodeArray using the supplied visitor, possibly returning a new NodeArray in its place.
+ *
+ * @param nodes The NodeArray to visit.
+ * @param visitor The callback used to visit a Node.
+ * @param test A node test to execute for each node.
+ * @param start An optional value indicating the starting offset at which to start visiting.
+ * @param count An optional value indicating the maximum number of nodes to visit.
+ */
+ function visitNodes<T extends Node>(nodes: NodeArray<T> | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<T> | undefined;
+ /**
+ * Starts a new lexical environment and visits a statement list, ending the lexical environment
+ * and merging hoisted declarations upon completion.
+ */
+ function visitLexicalEnvironment(statements: NodeArray<Statement>, visitor: Visitor, context: TransformationContext, start?: number, ensureUseStrict?: boolean, nodesVisitor?: NodesVisitor): NodeArray<Statement>;
+ /**
+ * Starts a new lexical environment and visits a parameter list, suspending the lexical
+ * environment upon completion.
+ */
+ function visitParameterList(nodes: NodeArray<ParameterDeclaration>, visitor: Visitor, context: TransformationContext, nodesVisitor?: NodesVisitor): NodeArray<ParameterDeclaration>;
+ function visitParameterList(nodes: NodeArray<ParameterDeclaration> | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor?: NodesVisitor): NodeArray<ParameterDeclaration> | undefined;
+ /**
+ * Resumes a suspended lexical environment and visits a function body, ending the lexical
+ * environment and merging hoisted declarations upon completion.
+ */
+ function visitFunctionBody(node: FunctionBody, visitor: Visitor, context: TransformationContext): FunctionBody;
+ /**
+ * Resumes a suspended lexical environment and visits a function body, ending the lexical
+ * environment and merging hoisted declarations upon completion.
+ */
+ function visitFunctionBody(node: FunctionBody | undefined, visitor: Visitor, context: TransformationContext): FunctionBody | undefined;
+ /**
+ * Resumes a suspended lexical environment and visits a concise body, ending the lexical
+ * environment and merging hoisted declarations upon completion.
+ */
+ function visitFunctionBody(node: ConciseBody, visitor: Visitor, context: TransformationContext): ConciseBody;
+ /**
+ * Visits an iteration body, adding any block-scoped variables required by the transformation.
+ */
+ function visitIterationBody(body: Statement, visitor: Visitor, context: TransformationContext): Statement;
+ /**
+ * Visits each child of a Node using the supplied visitor, possibly returning a new Node of the same kind in its place.
+ *
+ * @param node The Node whose children will be visited.
+ * @param visitor The callback used to visit each child.
+ * @param context A lexical environment context for the visitor.
+ */
+ function visitEachChild<T extends Node>(node: T, visitor: Visitor, context: TransformationContext): T;
+ /**
+ * Visits each child of a Node using the supplied visitor, possibly returning a new Node of the same kind in its place.
+ *
+ * @param node The Node whose children will be visited.
+ * @param visitor The callback used to visit each child.
+ * @param context A lexical environment context for the visitor.
+ */
+ function visitEachChild<T extends Node>(node: T | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor?: typeof visitNodes, tokenVisitor?: Visitor): T | undefined;
+}
+declare namespace ts {
+ function getTsBuildInfoEmitOutputFilePath(options: CompilerOptions): string | undefined;
+ function getOutputFileNames(commandLine: ParsedCommandLine, inputFileName: string, ignoreCase: boolean): readonly string[];
+ function createPrinter(printerOptions?: PrinterOptions, handlers?: PrintHandlers): Printer;
+}
+declare namespace ts {
+ export function findConfigFile(searchPath: string, fileExists: (fileName: string) => boolean, configName?: string): string | undefined;
+ export function resolveTripleslashReference(moduleName: string, containingFile: string): string;
+ export function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost;
+ export function getPreEmitDiagnostics(program: Program, sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[];
+ export interface FormatDiagnosticsHost {
+ getCurrentDirectory(): string;
+ getCanonicalFileName(fileName: string): string;
+ getNewLine(): string;
+ }
+ export function formatDiagnostics(diagnostics: readonly Diagnostic[], host: FormatDiagnosticsHost): string;
+ export function formatDiagnostic(diagnostic: Diagnostic, host: FormatDiagnosticsHost): string;
+ export function formatDiagnosticsWithColorAndContext(diagnostics: readonly Diagnostic[], host: FormatDiagnosticsHost): string;
+ export function flattenDiagnosticMessageText(diag: string | DiagnosticMessageChain | undefined, newLine: string, indent?: number): string;
+ /**
+ * Calculates the resulting resolution mode for some reference in some file - this is generally the explicitly
+ * provided resolution mode in the reference, unless one is not present, in which case it is the mode of the containing file.
+ */
+ export function getModeForFileReference(ref: FileReference | string, containingFileMode: SourceFile["impliedNodeFormat"]): ModuleKind.CommonJS | ModuleKind.ESNext | undefined;
+ /**
+ * Calculates the final resolution mode for an import at some index within a file's imports list. This is generally the explicitly
+ * defined mode of the import if provided, or, if not, the mode of the containing file (with some exceptions: import=require is always commonjs, dynamic import is always esm).
+ * If you have an actual import node, prefer using getModeForUsageLocation on the reference string node.
+ * @param file File to fetch the resolution mode within
+ * @param index Index into the file's complete resolution list to get the resolution of - this is a concatenation of the file's imports and module augmentations
+ */
+ export function getModeForResolutionAtIndex(file: SourceFile, index: number): ModuleKind.CommonJS | ModuleKind.ESNext | undefined;
+ /**
+ * Calculates the final resolution mode for a given module reference node. This is generally the explicitly provided resolution mode, if
+ * one exists, or the mode of the containing source file. (Excepting import=require, which is always commonjs, and dynamic import, which is always esm).
+ * Notably, this function always returns `undefined` if the containing file has an `undefined` `impliedNodeFormat` - this field is only set when
+ * `moduleResolution` is `node16`+.
+ * @param file The file the import or import-like reference is contained within
+ * @param usage The module reference string
+ * @returns The final resolution mode of the import
+ */
+ export function getModeForUsageLocation(file: {
+ impliedNodeFormat?: SourceFile["impliedNodeFormat"];
+ }, usage: StringLiteralLike): ModuleKind.CommonJS | ModuleKind.ESNext | undefined;
+ export function getConfigFileParsingDiagnostics(configFileParseResult: ParsedCommandLine): readonly Diagnostic[];
+ /**
+ * A function for determining if a given file is esm or cjs format, assuming modern node module resolution rules, as configured by the
+ * `options` parameter.
+ *
+ * @param fileName The normalized absolute path to check the format of (it need not exist on disk)
+ * @param [packageJsonInfoCache] A cache for package file lookups - it's best to have a cache when this function is called often
+ * @param host The ModuleResolutionHost which can perform the filesystem lookups for package json data
+ * @param options The compiler options to perform the analysis under - relevant options are `moduleResolution` and `traceResolution`
+ * @returns `undefined` if the path has no relevant implied format, `ModuleKind.ESNext` for esm format, and `ModuleKind.CommonJS` for cjs format
+ */
+ export function getImpliedNodeFormatForFile(fileName: Path, packageJsonInfoCache: PackageJsonInfoCache | undefined, host: ModuleResolutionHost, options: CompilerOptions): ModuleKind.ESNext | ModuleKind.CommonJS | undefined;
+ /**
+ * Create a new 'Program' instance. A Program is an immutable collection of 'SourceFile's and a 'CompilerOptions'
+ * that represent a compilation unit.
+ *
+ * Creating a program proceeds from a set of root files, expanding the set of inputs by following imports and
+ * triple-slash-reference-path directives transitively. '@types' and triple-slash-reference-types are also pulled in.
+ *
+ * @param createProgramOptions - The options for creating a program.
+ * @returns A 'Program' object.
+ */
+ export function createProgram(createProgramOptions: CreateProgramOptions): Program;
+ /**
+ * Create a new 'Program' instance. A Program is an immutable collection of 'SourceFile's and a 'CompilerOptions'
+ * that represent a compilation unit.
+ *
+ * Creating a program proceeds from a set of root files, expanding the set of inputs by following imports and
+ * triple-slash-reference-path directives transitively. '@types' and triple-slash-reference-types are also pulled in.
+ *
+ * @param rootNames - A set of root files.
+ * @param options - The compiler options which should be used.
+ * @param host - The host interacts with the underlying file system.
+ * @param oldProgram - Reuses an old program structure.
+ * @param configFileParsingDiagnostics - error during config file parsing
+ * @returns A 'Program' object.
+ */
+ export function createProgram(rootNames: readonly string[], options: CompilerOptions, host?: CompilerHost, oldProgram?: Program, configFileParsingDiagnostics?: readonly Diagnostic[]): Program;
+ /** @deprecated */ export interface ResolveProjectReferencePathHost {
+ fileExists(fileName: string): boolean;
+ }
+ /**
+ * Returns the target config filename of a project reference.
+ * Note: The file might not exist.
+ */
+ export function resolveProjectReferencePath(ref: ProjectReference): ResolvedConfigFileName;
+ /** @deprecated */ export function resolveProjectReferencePath(host: ResolveProjectReferencePathHost, ref: ProjectReference): ResolvedConfigFileName;
+ export {};
+}
+declare namespace ts {
+ interface EmitOutput {
+ outputFiles: OutputFile[];
+ emitSkipped: boolean;
+ }
+ interface OutputFile {
+ name: string;
+ writeByteOrderMark: boolean;
+ text: string;
+ }
+}
+declare namespace ts {
+ type AffectedFileResult<T> = {
+ result: T;
+ affected: SourceFile | Program;
+ } | undefined;
+ interface BuilderProgramHost {
+ /**
+ * return true if file names are treated with case sensitivity
+ */
+ useCaseSensitiveFileNames(): boolean;
+ /**
+ * If provided this would be used this hash instead of actual file shape text for detecting changes
+ */
+ createHash?: (data: string) => string;
+ /**
+ * When emit or emitNextAffectedFile are called without writeFile,
+ * this callback if present would be used to write files
+ */
+ writeFile?: WriteFileCallback;
+ }
+ /**
+ * Builder to manage the program state changes
+ */
+ interface BuilderProgram {
+ /**
+ * Returns current program
+ */
+ getProgram(): Program;
+ /**
+ * Get compiler options of the program
+ */
+ getCompilerOptions(): CompilerOptions;
+ /**
+ * Get the source file in the program with file name
+ */
+ getSourceFile(fileName: string): SourceFile | undefined;
+ /**
+ * Get a list of files in the program
+ */
+ getSourceFiles(): readonly SourceFile[];
+ /**
+ * Get the diagnostics for compiler options
+ */
+ getOptionsDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[];
+ /**
+ * Get the diagnostics that dont belong to any file
+ */
+ getGlobalDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[];
+ /**
+ * Get the diagnostics from config file parsing
+ */
+ getConfigFileParsingDiagnostics(): readonly Diagnostic[];
+ /**
+ * Get the syntax diagnostics, for all source files if source file is not supplied
+ */
+ getSyntacticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[];
+ /**
+ * Get the declaration diagnostics, for all source files if source file is not supplied
+ */
+ getDeclarationDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly DiagnosticWithLocation[];
+ /**
+ * Get all the dependencies of the file
+ */
+ getAllDependencies(sourceFile: SourceFile): readonly string[];
+ /**
+ * Gets the semantic diagnostics from the program corresponding to this state of file (if provided) or whole program
+ * The semantic diagnostics are cached and managed here
+ * Note that it is assumed that when asked about semantic diagnostics through this API,
+ * the file has been taken out of affected files so it is safe to use cache or get from program and cache the diagnostics
+ * In case of SemanticDiagnosticsBuilderProgram if the source file is not provided,
+ * it will iterate through all the affected files, to ensure that cache stays valid and yet provide a way to get all semantic diagnostics
+ */
+ getSemanticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[];
+ /**
+ * Emits the JavaScript and declaration files.
+ * When targetSource file is specified, emits the files corresponding to that source file,
+ * otherwise for the whole program.
+ * In case of EmitAndSemanticDiagnosticsBuilderProgram, when targetSourceFile is specified,
+ * it is assumed that that file is handled from affected file list. If targetSourceFile is not specified,
+ * it will only emit all the affected files instead of whole program
+ *
+ * The first of writeFile if provided, writeFile of BuilderProgramHost if provided, writeFile of compiler host
+ * in that order would be used to write the files
+ */
+ emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): EmitResult;
+ /**
+ * Get the current directory of the program
+ */
+ getCurrentDirectory(): string;
+ }
+ /**
+ * The builder that caches the semantic diagnostics for the program and handles the changed files and affected files
+ */
+ interface SemanticDiagnosticsBuilderProgram extends BuilderProgram {
+ /**
+ * Gets the semantic diagnostics from the program for the next affected file and caches it
+ * Returns undefined if the iteration is complete
+ */
+ getSemanticDiagnosticsOfNextAffectedFile(cancellationToken?: CancellationToken, ignoreSourceFile?: (sourceFile: SourceFile) => boolean): AffectedFileResult<readonly Diagnostic[]>;
+ }
+ /**
+ * The builder that can handle the changes in program and iterate through changed file to emit the files
+ * The semantic diagnostics are cached per file and managed by clearing for the changed/affected files
+ */
+ interface EmitAndSemanticDiagnosticsBuilderProgram extends SemanticDiagnosticsBuilderProgram {
+ /**
+ * Emits the next affected file's emit result (EmitResult and sourceFiles emitted) or returns undefined if iteration is complete
+ * The first of writeFile if provided, writeFile of BuilderProgramHost if provided, writeFile of compiler host
+ * in that order would be used to write the files
+ */
+ emitNextAffectedFile(writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): AffectedFileResult<EmitResult>;
+ }
+ /**
+ * Create the builder to manage semantic diagnostics and cache them
+ */
+ function createSemanticDiagnosticsBuilderProgram(newProgram: Program, host: BuilderProgramHost, oldProgram?: SemanticDiagnosticsBuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[]): SemanticDiagnosticsBuilderProgram;
+ function createSemanticDiagnosticsBuilderProgram(rootNames: readonly string[] | undefined, options: CompilerOptions | undefined, host?: CompilerHost, oldProgram?: SemanticDiagnosticsBuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[], projectReferences?: readonly ProjectReference[]): SemanticDiagnosticsBuilderProgram;
+ /**
+ * Create the builder that can handle the changes in program and iterate through changed files
+ * to emit the those files and manage semantic diagnostics cache as well
+ */
+ function createEmitAndSemanticDiagnosticsBuilderProgram(newProgram: Program, host: BuilderProgramHost, oldProgram?: EmitAndSemanticDiagnosticsBuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[]): EmitAndSemanticDiagnosticsBuilderProgram;
+ function createEmitAndSemanticDiagnosticsBuilderProgram(rootNames: readonly string[] | undefined, options: CompilerOptions | undefined, host?: CompilerHost, oldProgram?: EmitAndSemanticDiagnosticsBuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[], projectReferences?: readonly ProjectReference[]): EmitAndSemanticDiagnosticsBuilderProgram;
+ /**
+ * Creates a builder thats just abstraction over program and can be used with watch
+ */
+ function createAbstractBuilder(newProgram: Program, host: BuilderProgramHost, oldProgram?: BuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[]): BuilderProgram;
+ function createAbstractBuilder(rootNames: readonly string[] | undefined, options: CompilerOptions | undefined, host?: CompilerHost, oldProgram?: BuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[], projectReferences?: readonly ProjectReference[]): BuilderProgram;
+}
+declare namespace ts {
+ interface ReadBuildProgramHost {
+ useCaseSensitiveFileNames(): boolean;
+ getCurrentDirectory(): string;
+ readFile(fileName: string): string | undefined;
+ }
+ function readBuilderProgram(compilerOptions: CompilerOptions, host: ReadBuildProgramHost): EmitAndSemanticDiagnosticsBuilderProgram | undefined;
+ function createIncrementalCompilerHost(options: CompilerOptions, system?: System): CompilerHost;
+ interface IncrementalProgramOptions<T extends BuilderProgram> {
+ rootNames: readonly string[];
+ options: CompilerOptions;
+ configFileParsingDiagnostics?: readonly Diagnostic[];
+ projectReferences?: readonly ProjectReference[];
+ host?: CompilerHost;
+ createProgram?: CreateProgram<T>;
+ }
+ function createIncrementalProgram<T extends BuilderProgram = EmitAndSemanticDiagnosticsBuilderProgram>({ rootNames, options, configFileParsingDiagnostics, projectReferences, host, createProgram }: IncrementalProgramOptions<T>): T;
+ type WatchStatusReporter = (diagnostic: Diagnostic, newLine: string, options: CompilerOptions, errorCount?: number) => void;
+ /** Create the program with rootNames and options, if they are undefined, oldProgram and new configFile diagnostics create new program */
+ type CreateProgram<T extends BuilderProgram> = (rootNames: readonly string[] | undefined, options: CompilerOptions | undefined, host?: CompilerHost, oldProgram?: T, configFileParsingDiagnostics?: readonly Diagnostic[], projectReferences?: readonly ProjectReference[] | undefined) => T;
+ /** Host that has watch functionality used in --watch mode */
+ interface WatchHost {
+ /** If provided, called with Diagnostic message that informs about change in watch status */
+ onWatchStatusChange?(diagnostic: Diagnostic, newLine: string, options: CompilerOptions, errorCount?: number): void;
+ /** Used to watch changes in source files, missing files needed to update the program or config file */
+ watchFile(path: string, callback: FileWatcherCallback, pollingInterval?: number, options?: CompilerOptions): FileWatcher;
+ /** Used to watch resolved module's failed lookup locations, config file specs, type roots where auto type reference directives are added */
+ watchDirectory(path: string, callback: DirectoryWatcherCallback, recursive?: boolean, options?: CompilerOptions): FileWatcher;
+ /** If provided, will be used to set delayed compilation, so that multiple changes in short span are compiled together */
+ setTimeout?(callback: (...args: any[]) => void, ms: number, ...args: any[]): any;
+ /** If provided, will be used to reset existing delayed compilation */
+ clearTimeout?(timeoutId: any): void;
+ }
+ interface ProgramHost<T extends BuilderProgram> {
+ /**
+ * Used to create the program when need for program creation or recreation detected
+ */
+ createProgram: CreateProgram<T>;
+ useCaseSensitiveFileNames(): boolean;
+ getNewLine(): string;
+ getCurrentDirectory(): string;
+ getDefaultLibFileName(options: CompilerOptions): string;
+ getDefaultLibLocation?(): string;
+ createHash?(data: string): string;
+ /**
+ * Use to check file presence for source files and
+ * if resolveModuleNames is not provided (complier is in charge of module resolution) then module files as well
+ */
+ fileExists(path: string): boolean;
+ /**
+ * Use to read file text for source files and
+ * if resolveModuleNames is not provided (complier is in charge of module resolution) then module files as well
+ */
+ readFile(path: string, encoding?: string): string | undefined;
+ /** If provided, used for module resolution as well as to handle directory structure */
+ directoryExists?(path: string): boolean;
+ /** If provided, used in resolutions as well as handling directory structure */
+ getDirectories?(path: string): string[];
+ /** If provided, used to cache and handle directory structure modifications */
+ readDirectory?(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[];
+ /** Symbol links resolution */
+ realpath?(path: string): string;
+ /** If provided would be used to write log about compilation */
+ trace?(s: string): void;
+ /** If provided is used to get the environment variable */
+ getEnvironmentVariable?(name: string): string | undefined;
+ /** If provided, used to resolve the module names, otherwise typescript's default module resolution */
+ resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile): (ResolvedModule | undefined)[];
+ /** If provided, used to resolve type reference directives, otherwise typescript's default resolution */
+ resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: SourceFile["impliedNodeFormat"] | undefined): (ResolvedTypeReferenceDirective | undefined)[];
+ /**
+ * Returns the module resolution cache used by a provided `resolveModuleNames` implementation so that any non-name module resolution operations (eg, package.json lookup) can reuse it
+ */
+ getModuleResolutionCache?(): ModuleResolutionCache | undefined;
+ }
+ interface WatchCompilerHost<T extends BuilderProgram> extends ProgramHost<T>, WatchHost {
+ /** Instead of using output d.ts file from project reference, use its source file */
+ useSourceOfProjectReferenceRedirect?(): boolean;
+ /** If provided, use this method to get parsed command lines for referenced projects */
+ getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined;
+ /** If provided, callback to invoke after every new program creation */
+ afterProgramCreate?(program: T): void;
+ }
+ /**
+ * Host to create watch with root files and options
+ */
+ interface WatchCompilerHostOfFilesAndCompilerOptions<T extends BuilderProgram> extends WatchCompilerHost<T> {
+ /** root files to use to generate program */
+ rootFiles: string[];
+ /** Compiler options */
+ options: CompilerOptions;
+ watchOptions?: WatchOptions;
+ /** Project References */
+ projectReferences?: readonly ProjectReference[];
+ }
+ /**
+ * Host to create watch with config file
+ */
+ interface WatchCompilerHostOfConfigFile<T extends BuilderProgram> extends WatchCompilerHost<T>, ConfigFileDiagnosticsReporter {
+ /** Name of the config file to compile */
+ configFileName: string;
+ /** Options to extend */
+ optionsToExtend?: CompilerOptions;
+ watchOptionsToExtend?: WatchOptions;
+ extraFileExtensions?: readonly FileExtensionInfo[];
+ /**
+ * Used to generate source file names from the config file and its include, exclude, files rules
+ * and also to cache the directory stucture
+ */
+ readDirectory(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[];
+ }
+ interface Watch<T> {
+ /** Synchronize with host and get updated program */
+ getProgram(): T;
+ /** Closes the watch */
+ close(): void;
+ }
+ /**
+ * Creates the watch what generates program using the config file
+ */
+ interface WatchOfConfigFile<T> extends Watch<T> {
+ }
+ /**
+ * Creates the watch that generates program using the root files and compiler options
+ */
+ interface WatchOfFilesAndCompilerOptions<T> extends Watch<T> {
+ /** Updates the root files in the program, only if this is not config file compilation */
+ updateRootFileNames(fileNames: string[]): void;
+ }
+ /**
+ * Create the watch compiler host for either configFile or fileNames and its options
+ */
+ function createWatchCompilerHost<T extends BuilderProgram>(configFileName: string, optionsToExtend: CompilerOptions | undefined, system: System, createProgram?: CreateProgram<T>, reportDiagnostic?: DiagnosticReporter, reportWatchStatus?: WatchStatusReporter, watchOptionsToExtend?: WatchOptions, extraFileExtensions?: readonly FileExtensionInfo[]): WatchCompilerHostOfConfigFile<T>;
+ function createWatchCompilerHost<T extends BuilderProgram>(rootFiles: string[], options: CompilerOptions, system: System, createProgram?: CreateProgram<T>, reportDiagnostic?: DiagnosticReporter, reportWatchStatus?: WatchStatusReporter, projectReferences?: readonly ProjectReference[], watchOptions?: WatchOptions): WatchCompilerHostOfFilesAndCompilerOptions<T>;
+ /**
+ * Creates the watch from the host for root files and compiler options
+ */
+ function createWatchProgram<T extends BuilderProgram>(host: WatchCompilerHostOfFilesAndCompilerOptions<T>): WatchOfFilesAndCompilerOptions<T>;
+ /**
+ * Creates the watch from the host for config file
+ */
+ function createWatchProgram<T extends BuilderProgram>(host: WatchCompilerHostOfConfigFile<T>): WatchOfConfigFile<T>;
+}
+declare namespace ts {
+ interface BuildOptions {
+ dry?: boolean;
+ force?: boolean;
+ verbose?: boolean;
+ incremental?: boolean;
+ assumeChangesOnlyAffectDirectDependencies?: boolean;
+ traceResolution?: boolean;
+ [option: string]: CompilerOptionsValue | undefined;
+ }
+ type ReportEmitErrorSummary = (errorCount: number, filesInError: (ReportFileInError | undefined)[]) => void;
+ interface ReportFileInError {
+ fileName: string;
+ line: number;
+ }
+ interface SolutionBuilderHostBase<T extends BuilderProgram> extends ProgramHost<T> {
+ createDirectory?(path: string): void;
+ /**
+ * Should provide create directory and writeFile if done of invalidatedProjects is not invoked with
+ * writeFileCallback
+ */
+ writeFile?(path: string, data: string, writeByteOrderMark?: boolean): void;
+ getCustomTransformers?: (project: string) => CustomTransformers | undefined;
+ getModifiedTime(fileName: string): Date | undefined;
+ setModifiedTime(fileName: string, date: Date): void;
+ deleteFile(fileName: string): void;
+ getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined;
+ reportDiagnostic: DiagnosticReporter;
+ reportSolutionBuilderStatus: DiagnosticReporter;
+ afterProgramEmitAndDiagnostics?(program: T): void;
+ }
+ interface SolutionBuilderHost<T extends BuilderProgram> extends SolutionBuilderHostBase<T> {
+ reportErrorSummary?: ReportEmitErrorSummary;
+ }
+ interface SolutionBuilderWithWatchHost<T extends BuilderProgram> extends SolutionBuilderHostBase<T>, WatchHost {
+ }
+ interface SolutionBuilder<T extends BuilderProgram> {
+ build(project?: string, cancellationToken?: CancellationToken, writeFile?: WriteFileCallback, getCustomTransformers?: (project: string) => CustomTransformers): ExitStatus;
+ clean(project?: string): ExitStatus;
+ buildReferences(project: string, cancellationToken?: CancellationToken, writeFile?: WriteFileCallback, getCustomTransformers?: (project: string) => CustomTransformers): ExitStatus;
+ cleanReferences(project?: string): ExitStatus;
+ getNextInvalidatedProject(cancellationToken?: CancellationToken): InvalidatedProject<T> | undefined;
+ }
+ /**
+ * Create a function that reports watch status by writing to the system and handles the formating of the diagnostic
+ */
+ function createBuilderStatusReporter(system: System, pretty?: boolean): DiagnosticReporter;
+ function createSolutionBuilderHost<T extends BuilderProgram = EmitAndSemanticDiagnosticsBuilderProgram>(system?: System, createProgram?: CreateProgram<T>, reportDiagnostic?: DiagnosticReporter, reportSolutionBuilderStatus?: DiagnosticReporter, reportErrorSummary?: ReportEmitErrorSummary): SolutionBuilderHost<T>;
+ function createSolutionBuilderWithWatchHost<T extends BuilderProgram = EmitAndSemanticDiagnosticsBuilderProgram>(system?: System, createProgram?: CreateProgram<T>, reportDiagnostic?: DiagnosticReporter, reportSolutionBuilderStatus?: DiagnosticReporter, reportWatchStatus?: WatchStatusReporter): SolutionBuilderWithWatchHost<T>;
+ function createSolutionBuilder<T extends BuilderProgram>(host: SolutionBuilderHost<T>, rootNames: readonly string[], defaultOptions: BuildOptions): SolutionBuilder<T>;
+ function createSolutionBuilderWithWatch<T extends BuilderProgram>(host: SolutionBuilderWithWatchHost<T>, rootNames: readonly string[], defaultOptions: BuildOptions, baseWatchOptions?: WatchOptions): SolutionBuilder<T>;
+ enum InvalidatedProjectKind {
+ Build = 0,
+ UpdateBundle = 1,
+ UpdateOutputFileStamps = 2
+ }
+ interface InvalidatedProjectBase {
+ readonly kind: InvalidatedProjectKind;
+ readonly project: ResolvedConfigFileName;
+ /**
+ * To dispose this project and ensure that all the necessary actions are taken and state is updated accordingly
+ */
+ done(cancellationToken?: CancellationToken, writeFile?: WriteFileCallback, customTransformers?: CustomTransformers): ExitStatus;
+ getCompilerOptions(): CompilerOptions;
+ getCurrentDirectory(): string;
+ }
+ interface UpdateOutputFileStampsProject extends InvalidatedProjectBase {
+ readonly kind: InvalidatedProjectKind.UpdateOutputFileStamps;
+ updateOutputFileStatmps(): void;
+ }
+ interface BuildInvalidedProject<T extends BuilderProgram> extends InvalidatedProjectBase {
+ readonly kind: InvalidatedProjectKind.Build;
+ getBuilderProgram(): T | undefined;
+ getProgram(): Program | undefined;
+ getSourceFile(fileName: string): SourceFile | undefined;
+ getSourceFiles(): readonly SourceFile[];
+ getOptionsDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[];
+ getGlobalDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[];
+ getConfigFileParsingDiagnostics(): readonly Diagnostic[];
+ getSyntacticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[];
+ getAllDependencies(sourceFile: SourceFile): readonly string[];
+ getSemanticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[];
+ getSemanticDiagnosticsOfNextAffectedFile(cancellationToken?: CancellationToken, ignoreSourceFile?: (sourceFile: SourceFile) => boolean): AffectedFileResult<readonly Diagnostic[]>;
+ emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): EmitResult | undefined;
+ }
+ interface UpdateBundleProject<T extends BuilderProgram> extends InvalidatedProjectBase {
+ readonly kind: InvalidatedProjectKind.UpdateBundle;
+ emit(writeFile?: WriteFileCallback, customTransformers?: CustomTransformers): EmitResult | BuildInvalidedProject<T> | undefined;
+ }
+ type InvalidatedProject<T extends BuilderProgram> = UpdateOutputFileStampsProject | BuildInvalidedProject<T> | UpdateBundleProject<T>;
+}
+declare namespace ts.server {
+ type ActionSet = "action::set";
+ type ActionInvalidate = "action::invalidate";
+ type ActionPackageInstalled = "action::packageInstalled";
+ type EventTypesRegistry = "event::typesRegistry";
+ type EventBeginInstallTypes = "event::beginInstallTypes";
+ type EventEndInstallTypes = "event::endInstallTypes";
+ type EventInitializationFailed = "event::initializationFailed";
+}
+declare namespace ts.server {
+ interface TypingInstallerResponse {
+ readonly kind: ActionSet | ActionInvalidate | EventTypesRegistry | ActionPackageInstalled | EventBeginInstallTypes | EventEndInstallTypes | EventInitializationFailed;
+ }
+ interface TypingInstallerRequestWithProjectName {
+ readonly projectName: string;
+ }
+ interface DiscoverTypings extends TypingInstallerRequestWithProjectName {
+ readonly fileNames: string[];
+ readonly projectRootPath: Path;
+ readonly compilerOptions: CompilerOptions;
+ readonly watchOptions?: WatchOptions;
+ readonly typeAcquisition: TypeAcquisition;
+ readonly unresolvedImports: SortedReadonlyArray<string>;
+ readonly cachePath?: string;
+ readonly kind: "discover";
+ }
+ interface CloseProject extends TypingInstallerRequestWithProjectName {
+ readonly kind: "closeProject";
+ }
+ interface TypesRegistryRequest {
+ readonly kind: "typesRegistry";
+ }
+ interface InstallPackageRequest extends TypingInstallerRequestWithProjectName {
+ readonly kind: "installPackage";
+ readonly fileName: Path;
+ readonly packageName: string;
+ readonly projectRootPath: Path;
+ }
+ interface PackageInstalledResponse extends ProjectResponse {
+ readonly kind: ActionPackageInstalled;
+ readonly success: boolean;
+ readonly message: string;
+ }
+ interface InitializationFailedResponse extends TypingInstallerResponse {
+ readonly kind: EventInitializationFailed;
+ readonly message: string;
+ readonly stack?: string;
+ }
+ interface ProjectResponse extends TypingInstallerResponse {
+ readonly projectName: string;
+ }
+ interface InvalidateCachedTypings extends ProjectResponse {
+ readonly kind: ActionInvalidate;
+ }
+ interface InstallTypes extends ProjectResponse {
+ readonly kind: EventBeginInstallTypes | EventEndInstallTypes;
+ readonly eventId: number;
+ readonly typingsInstallerVersion: string;
+ readonly packagesToInstall: readonly string[];
+ }
+ interface BeginInstallTypes extends InstallTypes {
+ readonly kind: EventBeginInstallTypes;
+ }
+ interface EndInstallTypes extends InstallTypes {
+ readonly kind: EventEndInstallTypes;
+ readonly installSuccess: boolean;
+ }
+ interface SetTypings extends ProjectResponse {
+ readonly typeAcquisition: TypeAcquisition;
+ readonly compilerOptions: CompilerOptions;
+ readonly typings: string[];
+ readonly unresolvedImports: SortedReadonlyArray<string>;
+ readonly kind: ActionSet;
+ }
+}
+declare namespace ts {
+ interface Node {
+ getSourceFile(): SourceFile;
+ getChildCount(sourceFile?: SourceFile): number;
+ getChildAt(index: number, sourceFile?: SourceFile): Node;
+ getChildren(sourceFile?: SourceFile): Node[];
+ getStart(sourceFile?: SourceFile, includeJsDocComment?: boolean): number;
+ getFullStart(): number;
+ getEnd(): number;
+ getWidth(sourceFile?: SourceFileLike): number;
+ getFullWidth(): number;
+ getLeadingTriviaWidth(sourceFile?: SourceFile): number;
+ getFullText(sourceFile?: SourceFile): string;
+ getText(sourceFile?: SourceFile): string;
+ getFirstToken(sourceFile?: SourceFile): Node | undefined;
+ getLastToken(sourceFile?: SourceFile): Node | undefined;
+ forEachChild<T>(cbNode: (node: Node) => T | undefined, cbNodeArray?: (nodes: NodeArray<Node>) => T | undefined): T | undefined;
+ }
+ interface Identifier {
+ readonly text: string;
+ }
+ interface PrivateIdentifier {
+ readonly text: string;
+ }
+ interface Symbol {
+ readonly name: string;
+ getFlags(): SymbolFlags;
+ getEscapedName(): __String;
+ getName(): string;
+ getDeclarations(): Declaration[] | undefined;
+ getDocumentationComment(typeChecker: TypeChecker | undefined): SymbolDisplayPart[];
+ getJsDocTags(checker?: TypeChecker): JSDocTagInfo[];
+ }
+ interface Type {
+ getFlags(): TypeFlags;
+ getSymbol(): Symbol | undefined;
+ getProperties(): Symbol[];
+ getProperty(propertyName: string): Symbol | undefined;
+ getApparentProperties(): Symbol[];
+ getCallSignatures(): readonly Signature[];
+ getConstructSignatures(): readonly Signature[];
+ getStringIndexType(): Type | undefined;
+ getNumberIndexType(): Type | undefined;
+ getBaseTypes(): BaseType[] | undefined;
+ getNonNullableType(): Type;
+ getConstraint(): Type | undefined;
+ getDefault(): Type | undefined;
+ isUnion(): this is UnionType;
+ isIntersection(): this is IntersectionType;
+ isUnionOrIntersection(): this is UnionOrIntersectionType;
+ isLiteral(): this is LiteralType;
+ isStringLiteral(): this is StringLiteralType;
+ isNumberLiteral(): this is NumberLiteralType;
+ isTypeParameter(): this is TypeParameter;
+ isClassOrInterface(): this is InterfaceType;
+ isClass(): this is InterfaceType;
+ isIndexType(): this is IndexType;
+ }
+ interface TypeReference {
+ typeArguments?: readonly Type[];
+ }
+ interface Signature {
+ getDeclaration(): SignatureDeclaration;
+ getTypeParameters(): TypeParameter[] | undefined;
+ getParameters(): Symbol[];
+ getTypeParameterAtPosition(pos: number): Type;
+ getReturnType(): Type;
+ getDocumentationComment(typeChecker: TypeChecker | undefined): SymbolDisplayPart[];
+ getJsDocTags(): JSDocTagInfo[];
+ }
+ interface SourceFile {
+ getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
+ getLineEndOfPosition(pos: number): number;
+ getLineStarts(): readonly number[];
+ getPositionOfLineAndCharacter(line: number, character: number): number;
+ update(newText: string, textChangeRange: TextChangeRange): SourceFile;
+ }
+ interface SourceFileLike {
+ getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
+ }
+ interface SourceMapSource {
+ getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
+ }
+ /**
+ * Represents an immutable snapshot of a script at a specified time.Once acquired, the
+ * snapshot is observably immutable. i.e. the same calls with the same parameters will return
+ * the same values.
+ */
+ interface IScriptSnapshot {
+ /** Gets a portion of the script snapshot specified by [start, end). */
+ getText(start: number, end: number): string;
+ /** Gets the length of this script snapshot. */
+ getLength(): number;
+ /**
+ * Gets the TextChangeRange that describe how the text changed between this text and
+ * an older version. This information is used by the incremental parser to determine
+ * what sections of the script need to be re-parsed. 'undefined' can be returned if the
+ * change range cannot be determined. However, in that case, incremental parsing will
+ * not happen and the entire document will be re - parsed.
+ */
+ getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange | undefined;
+ /** Releases all resources held by this script snapshot */
+ dispose?(): void;
+ }
+ namespace ScriptSnapshot {
+ function fromString(text: string): IScriptSnapshot;
+ }
+ interface PreProcessedFileInfo {
+ referencedFiles: FileReference[];
+ typeReferenceDirectives: FileReference[];
+ libReferenceDirectives: FileReference[];
+ importedFiles: FileReference[];
+ ambientExternalModules?: string[];
+ isLibFile: boolean;
+ }
+ interface HostCancellationToken {
+ isCancellationRequested(): boolean;
+ }
+ interface InstallPackageOptions {
+ fileName: Path;
+ packageName: string;
+ }
+ interface PerformanceEvent {
+ kind: "UpdateGraph" | "CreatePackageJsonAutoImportProvider";
+ durationMs: number;
+ }
+ enum LanguageServiceMode {
+ Semantic = 0,
+ PartialSemantic = 1,
+ Syntactic = 2
+ }
+ interface IncompleteCompletionsCache {
+ get(): CompletionInfo | undefined;
+ set(response: CompletionInfo): void;
+ clear(): void;
+ }
+ interface LanguageServiceHost extends GetEffectiveTypeRootsHost, MinimalResolutionCacheHost {
+ getCompilationSettings(): CompilerOptions;
+ getNewLine?(): string;
+ getProjectVersion?(): string;
+ getScriptFileNames(): string[];
+ getScriptKind?(fileName: string): ScriptKind;
+ getScriptVersion(fileName: string): string;
+ getScriptSnapshot(fileName: string): IScriptSnapshot | undefined;
+ getProjectReferences?(): readonly ProjectReference[] | undefined;
+ getLocalizedDiagnosticMessages?(): any;
+ getCancellationToken?(): HostCancellationToken;
+ getCurrentDirectory(): string;
+ getDefaultLibFileName(options: CompilerOptions): string;
+ log?(s: string): void;
+ trace?(s: string): void;
+ error?(s: string): void;
+ useCaseSensitiveFileNames?(): boolean;
+ readDirectory?(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[];
+ realpath?(path: string): string;
+ readFile(path: string, encoding?: string): string | undefined;
+ fileExists(path: string): boolean;
+ getTypeRootsVersion?(): number;
+ resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile): (ResolvedModule | undefined)[];
+ getResolvedModuleWithFailedLookupLocationsFromCache?(modulename: string, containingFile: string, resolutionMode?: ModuleKind.CommonJS | ModuleKind.ESNext): ResolvedModuleWithFailedLookupLocations | undefined;
+ resolveTypeReferenceDirectives?(typeDirectiveNames: string[] | FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: SourceFile["impliedNodeFormat"] | undefined): (ResolvedTypeReferenceDirective | undefined)[];
+ getDirectories?(directoryName: string): string[];
+ /**
+ * Gets a set of custom transformers to use during emit.
+ */
+ getCustomTransformers?(): CustomTransformers | undefined;
+ isKnownTypesPackageName?(name: string): boolean;
+ installPackage?(options: InstallPackageOptions): Promise<ApplyCodeActionCommandResult>;
+ writeFile?(fileName: string, content: string): void;
+ getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined;
+ }
+ type WithMetadata<T> = T & {
+ metadata?: unknown;
+ };
+ enum SemanticClassificationFormat {
+ Original = "original",
+ TwentyTwenty = "2020"
+ }
+ interface LanguageService {
+ /** This is used as a part of restarting the language service. */
+ cleanupSemanticCache(): void;
+ /**
+ * Gets errors indicating invalid syntax in a file.
+ *
+ * In English, "this cdeo have, erorrs" is syntactically invalid because it has typos,
+ * grammatical errors, and misplaced punctuation. Likewise, examples of syntax
+ * errors in TypeScript are missing parentheses in an `if` statement, mismatched
+ * curly braces, and using a reserved keyword as a variable name.
+ *
+ * These diagnostics are inexpensive to compute and don't require knowledge of
+ * other files. Note that a non-empty result increases the likelihood of false positives
+ * from `getSemanticDiagnostics`.
+ *
+ * While these represent the majority of syntax-related diagnostics, there are some
+ * that require the type system, which will be present in `getSemanticDiagnostics`.
+ *
+ * @param fileName A path to the file you want syntactic diagnostics for
+ */
+ getSyntacticDiagnostics(fileName: string): DiagnosticWithLocation[];
+ /**
+ * Gets warnings or errors indicating type system issues in a given file.
+ * Requesting semantic diagnostics may start up the type system and
+ * run deferred work, so the first call may take longer than subsequent calls.
+ *
+ * Unlike the other get*Diagnostics functions, these diagnostics can potentially not
+ * include a reference to a source file. Specifically, the first time this is called,
+ * it will return global diagnostics with no associated location.
+ *
+ * To contrast the differences between semantic and syntactic diagnostics, consider the
+ * sentence: "The sun is green." is syntactically correct; those are real English words with
+ * correct sentence structure. However, it is semantically invalid, because it is not true.
+ *
+ * @param fileName A path to the file you want semantic diagnostics for
+ */
+ getSemanticDiagnostics(fileName: string): Diagnostic[];
+ /**
+ * Gets suggestion diagnostics for a specific file. These diagnostics tend to
+ * proactively suggest refactors, as opposed to diagnostics that indicate
+ * potentially incorrect runtime behavior.
+ *
+ * @param fileName A path to the file you want semantic diagnostics for
+ */
+ getSuggestionDiagnostics(fileName: string): DiagnosticWithLocation[];
+ /**
+ * Gets global diagnostics related to the program configuration and compiler options.
+ */
+ getCompilerOptionsDiagnostics(): Diagnostic[];
+ /** @deprecated Use getEncodedSyntacticClassifications instead. */
+ getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[];
+ getSyntacticClassifications(fileName: string, span: TextSpan, format: SemanticClassificationFormat): ClassifiedSpan[] | ClassifiedSpan2020[];
+ /** @deprecated Use getEncodedSemanticClassifications instead. */
+ getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[];
+ getSemanticClassifications(fileName: string, span: TextSpan, format: SemanticClassificationFormat): ClassifiedSpan[] | ClassifiedSpan2020[];
+ /** Encoded as triples of [start, length, ClassificationType]. */
+ getEncodedSyntacticClassifications(fileName: string, span: TextSpan): Classifications;
+ /**
+ * Gets semantic highlights information for a particular file. Has two formats, an older
+ * version used by VS and a format used by VS Code.
+ *
+ * @param fileName The path to the file
+ * @param position A text span to return results within
+ * @param format Which format to use, defaults to "original"
+ * @returns a number array encoded as triples of [start, length, ClassificationType, ...].
+ */
+ getEncodedSemanticClassifications(fileName: string, span: TextSpan, format?: SemanticClassificationFormat): Classifications;
+ /**
+ * Gets completion entries at a particular position in a file.
+ *
+ * @param fileName The path to the file
+ * @param position A zero-based index of the character where you want the entries
+ * @param options An object describing how the request was triggered and what kinds
+ * of code actions can be returned with the completions.
+ * @param formattingSettings settings needed for calling formatting functions.
+ */
+ getCompletionsAtPosition(fileName: string, position: number, options: GetCompletionsAtPositionOptions | undefined, formattingSettings?: FormatCodeSettings): WithMetadata<CompletionInfo> | undefined;
+ /**
+ * Gets the extended details for a completion entry retrieved from `getCompletionsAtPosition`.
+ *
+ * @param fileName The path to the file
+ * @param position A zero based index of the character where you want the entries
+ * @param entryName The `name` from an existing completion which came from `getCompletionsAtPosition`
+ * @param formatOptions How should code samples in the completions be formatted, can be undefined for backwards compatibility
+ * @param source `source` property from the completion entry
+ * @param preferences User settings, can be undefined for backwards compatibility
+ * @param data `data` property from the completion entry
+ */
+ getCompletionEntryDetails(fileName: string, position: number, entryName: string, formatOptions: FormatCodeOptions | FormatCodeSettings | undefined, source: string | undefined, preferences: UserPreferences | undefined, data: CompletionEntryData | undefined): CompletionEntryDetails | undefined;
+ getCompletionEntrySymbol(fileName: string, position: number, name: string, source: string | undefined): Symbol | undefined;
+ /**
+ * Gets semantic information about the identifier at a particular position in a
+ * file. Quick info is what you typically see when you hover in an editor.
+ *
+ * @param fileName The path to the file
+ * @param position A zero-based index of the character where you want the quick info
+ */
+ getQuickInfoAtPosition(fileName: string, position: number): QuickInfo | undefined;
+ getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan | undefined;
+ getBreakpointStatementAtPosition(fileName: string, position: number): TextSpan | undefined;
+ getSignatureHelpItems(fileName: string, position: number, options: SignatureHelpItemsOptions | undefined): SignatureHelpItems | undefined;
+ getRenameInfo(fileName: string, position: number, preferences: UserPreferences): RenameInfo;
+ /** @deprecated Use the signature with `UserPreferences` instead. */
+ getRenameInfo(fileName: string, position: number, options?: RenameInfoOptions): RenameInfo;
+ findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean, providePrefixAndSuffixTextForRename?: boolean): readonly RenameLocation[] | undefined;
+ getSmartSelectionRange(fileName: string, position: number): SelectionRange;
+ getDefinitionAtPosition(fileName: string, position: number): readonly DefinitionInfo[] | undefined;
+ getDefinitionAndBoundSpan(fileName: string, position: number): DefinitionInfoAndBoundSpan | undefined;
+ getTypeDefinitionAtPosition(fileName: string, position: number): readonly DefinitionInfo[] | undefined;
+ getImplementationAtPosition(fileName: string, position: number): readonly ImplementationLocation[] | undefined;
+ getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[] | undefined;
+ findReferences(fileName: string, position: number): ReferencedSymbol[] | undefined;
+ getDocumentHighlights(fileName: string, position: number, filesToSearch: string[]): DocumentHighlights[] | undefined;
+ getFileReferences(fileName: string): ReferenceEntry[];
+ /** @deprecated */
+ getOccurrencesAtPosition(fileName: string, position: number): readonly ReferenceEntry[] | undefined;
+ getNavigateToItems(searchValue: string, maxResultCount?: number, fileName?: string, excludeDtsFiles?: boolean): NavigateToItem[];
+ getNavigationBarItems(fileName: string): NavigationBarItem[];
+ getNavigationTree(fileName: string): NavigationTree;
+ prepareCallHierarchy(fileName: string, position: number): CallHierarchyItem | CallHierarchyItem[] | undefined;
+ provideCallHierarchyIncomingCalls(fileName: string, position: number): CallHierarchyIncomingCall[];
+ provideCallHierarchyOutgoingCalls(fileName: string, position: number): CallHierarchyOutgoingCall[];
+ provideInlayHints(fileName: string, span: TextSpan, preferences: UserPreferences | undefined): InlayHint[];
+ getOutliningSpans(fileName: string): OutliningSpan[];
+ getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[];
+ getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[];
+ getIndentationAtPosition(fileName: string, position: number, options: EditorOptions | EditorSettings): number;
+ getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions | FormatCodeSettings): TextChange[];
+ getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions | FormatCodeSettings): TextChange[];
+ getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions | FormatCodeSettings): TextChange[];
+ getDocCommentTemplateAtPosition(fileName: string, position: number, options?: DocCommentTemplateOptions): TextInsertion | undefined;
+ isValidBraceCompletionAtPosition(fileName: string, position: number, openingBrace: number): boolean;
+ /**
+ * This will return a defined result if the position is after the `>` of the opening tag, or somewhere in the text, of a JSXElement with no closing tag.
+ * Editors should call this after `>` is typed.
+ */
+ getJsxClosingTagAtPosition(fileName: string, position: number): JsxClosingTagInfo | undefined;
+ getSpanOfEnclosingComment(fileName: string, position: number, onlyMultiLine: boolean): TextSpan | undefined;
+ toLineColumnOffset?(fileName: string, position: number): LineAndCharacter;
+ getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: readonly number[], formatOptions: FormatCodeSettings, preferences: UserPreferences): readonly CodeFixAction[];
+ getCombinedCodeFix(scope: CombinedCodeFixScope, fixId: {}, formatOptions: FormatCodeSettings, preferences: UserPreferences): CombinedCodeActions;
+ applyCodeActionCommand(action: CodeActionCommand, formatSettings?: FormatCodeSettings): Promise<ApplyCodeActionCommandResult>;
+ applyCodeActionCommand(action: CodeActionCommand[], formatSettings?: FormatCodeSettings): Promise<ApplyCodeActionCommandResult[]>;
+ applyCodeActionCommand(action: CodeActionCommand | CodeActionCommand[], formatSettings?: FormatCodeSettings): Promise<ApplyCodeActionCommandResult | ApplyCodeActionCommandResult[]>;
+ /** @deprecated `fileName` will be ignored */
+ applyCodeActionCommand(fileName: string, action: CodeActionCommand): Promise<ApplyCodeActionCommandResult>;
+ /** @deprecated `fileName` will be ignored */
+ applyCodeActionCommand(fileName: string, action: CodeActionCommand[]): Promise<ApplyCodeActionCommandResult[]>;
+ /** @deprecated `fileName` will be ignored */
+ applyCodeActionCommand(fileName: string, action: CodeActionCommand | CodeActionCommand[]): Promise<ApplyCodeActionCommandResult | ApplyCodeActionCommandResult[]>;
+ getApplicableRefactors(fileName: string, positionOrRange: number | TextRange, preferences: UserPreferences | undefined, triggerReason?: RefactorTriggerReason, kind?: string): ApplicableRefactorInfo[];
+ getEditsForRefactor(fileName: string, formatOptions: FormatCodeSettings, positionOrRange: number | TextRange, refactorName: string, actionName: string, preferences: UserPreferences | undefined): RefactorEditInfo | undefined;
+ organizeImports(args: OrganizeImportsArgs, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[];
+ getEditsForFileRename(oldFilePath: string, newFilePath: string, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[];
+ getEmitOutput(fileName: string, emitOnlyDtsFiles?: boolean, forceDtsEmit?: boolean): EmitOutput;
+ getProgram(): Program | undefined;
+ toggleLineComment(fileName: string, textRange: TextRange): TextChange[];
+ toggleMultilineComment(fileName: string, textRange: TextRange): TextChange[];
+ commentSelection(fileName: string, textRange: TextRange): TextChange[];
+ uncommentSelection(fileName: string, textRange: TextRange): TextChange[];
+ dispose(): void;
+ }
+ interface JsxClosingTagInfo {
+ readonly newText: string;
+ }
+ interface CombinedCodeFixScope {
+ type: "file";
+ fileName: string;
+ }
+ interface OrganizeImportsArgs extends CombinedCodeFixScope {
+ skipDestructiveCodeActions?: boolean;
+ }
+ type CompletionsTriggerCharacter = "." | '"' | "'" | "`" | "/" | "@" | "<" | "#" | " ";
+ enum CompletionTriggerKind {
+ /** Completion was triggered by typing an identifier, manual invocation (e.g Ctrl+Space) or via API. */
+ Invoked = 1,
+ /** Completion was triggered by a trigger character. */
+ TriggerCharacter = 2,
+ /** Completion was re-triggered as the current completion list is incomplete. */
+ TriggerForIncompleteCompletions = 3
+ }
+ interface GetCompletionsAtPositionOptions extends UserPreferences {
+ /**
+ * If the editor is asking for completions because a certain character was typed
+ * (as opposed to when the user explicitly requested them) this should be set.
+ */
+ triggerCharacter?: CompletionsTriggerCharacter;
+ triggerKind?: CompletionTriggerKind;
+ /** @deprecated Use includeCompletionsForModuleExports */
+ includeExternalModuleExports?: boolean;
+ /** @deprecated Use includeCompletionsWithInsertText */
+ includeInsertTextCompletions?: boolean;
+ }
+ type SignatureHelpTriggerCharacter = "," | "(" | "<";
+ type SignatureHelpRetriggerCharacter = SignatureHelpTriggerCharacter | ")";
+ interface SignatureHelpItemsOptions {
+ triggerReason?: SignatureHelpTriggerReason;
+ }
+ type SignatureHelpTriggerReason = SignatureHelpInvokedReason | SignatureHelpCharacterTypedReason | SignatureHelpRetriggeredReason;
+ /**
+ * Signals that the user manually requested signature help.
+ * The language service will unconditionally attempt to provide a result.
+ */
+ interface SignatureHelpInvokedReason {
+ kind: "invoked";
+ triggerCharacter?: undefined;
+ }
+ /**
+ * Signals that the signature help request came from a user typing a character.
+ * Depending on the character and the syntactic context, the request may or may not be served a result.
+ */
+ interface SignatureHelpCharacterTypedReason {
+ kind: "characterTyped";
+ /**
+ * Character that was responsible for triggering signature help.
+ */
+ triggerCharacter: SignatureHelpTriggerCharacter;
+ }
+ /**
+ * Signals that this signature help request came from typing a character or moving the cursor.
+ * This should only occur if a signature help session was already active and the editor needs to see if it should adjust.
+ * The language service will unconditionally attempt to provide a result.
+ * `triggerCharacter` can be `undefined` for a retrigger caused by a cursor move.
+ */
+ interface SignatureHelpRetriggeredReason {
+ kind: "retrigger";
+ /**
+ * Character that was responsible for triggering signature help.
+ */
+ triggerCharacter?: SignatureHelpRetriggerCharacter;
+ }
+ interface ApplyCodeActionCommandResult {
+ successMessage: string;
+ }
+ interface Classifications {
+ spans: number[];
+ endOfLineState: EndOfLineState;
+ }
+ interface ClassifiedSpan {
+ textSpan: TextSpan;
+ classificationType: ClassificationTypeNames;
+ }
+ interface ClassifiedSpan2020 {
+ textSpan: TextSpan;
+ classificationType: number;
+ }
+ /**
+ * Navigation bar interface designed for visual studio's dual-column layout.
+ * This does not form a proper tree.
+ * The navbar is returned as a list of top-level items, each of which has a list of child items.
+ * Child items always have an empty array for their `childItems`.
+ */
+ interface NavigationBarItem {
+ text: string;
+ kind: ScriptElementKind;
+ kindModifiers: string;
+ spans: TextSpan[];
+ childItems: NavigationBarItem[];
+ indent: number;
+ bolded: boolean;
+ grayed: boolean;
+ }
+ /**
+ * Node in a tree of nested declarations in a file.
+ * The top node is always a script or module node.
+ */
+ interface NavigationTree {
+ /** Name of the declaration, or a short description, e.g. "<class>". */
+ text: string;
+ kind: ScriptElementKind;
+ /** ScriptElementKindModifier separated by commas, e.g. "public,abstract" */
+ kindModifiers: string;
+ /**
+ * Spans of the nodes that generated this declaration.
+ * There will be more than one if this is the result of merging.
+ */
+ spans: TextSpan[];
+ nameSpan: TextSpan | undefined;
+ /** Present if non-empty */
+ childItems?: NavigationTree[];
+ }
+ interface CallHierarchyItem {
+ name: string;
+ kind: ScriptElementKind;
+ kindModifiers?: string;
+ file: string;
+ span: TextSpan;
+ selectionSpan: TextSpan;
+ containerName?: string;
+ }
+ interface CallHierarchyIncomingCall {
+ from: CallHierarchyItem;
+ fromSpans: TextSpan[];
+ }
+ interface CallHierarchyOutgoingCall {
+ to: CallHierarchyItem;
+ fromSpans: TextSpan[];
+ }
+ enum InlayHintKind {
+ Type = "Type",
+ Parameter = "Parameter",
+ Enum = "Enum"
+ }
+ interface InlayHint {
+ text: string;
+ position: number;
+ kind: InlayHintKind;
+ whitespaceBefore?: boolean;
+ whitespaceAfter?: boolean;
+ }
+ interface TodoCommentDescriptor {
+ text: string;
+ priority: number;
+ }
+ interface TodoComment {
+ descriptor: TodoCommentDescriptor;
+ message: string;
+ position: number;
+ }
+ interface TextChange {
+ span: TextSpan;
+ newText: string;
+ }
+ interface FileTextChanges {
+ fileName: string;
+ textChanges: readonly TextChange[];
+ isNewFile?: boolean;
+ }
+ interface CodeAction {
+ /** Description of the code action to display in the UI of the editor */
+ description: string;
+ /** Text changes to apply to each file as part of the code action */
+ changes: FileTextChanges[];
+ /**
+ * If the user accepts the code fix, the editor should send the action back in a `applyAction` request.
+ * This allows the language service to have side effects (e.g. installing dependencies) upon a code fix.
+ */
+ commands?: CodeActionCommand[];
+ }
+ interface CodeFixAction extends CodeAction {
+ /** Short name to identify the fix, for use by telemetry. */
+ fixName: string;
+ /**
+ * If present, one may call 'getCombinedCodeFix' with this fixId.
+ * This may be omitted to indicate that the code fix can't be applied in a group.
+ */
+ fixId?: {};
+ fixAllDescription?: string;
+ }
+ interface CombinedCodeActions {
+ changes: readonly FileTextChanges[];
+ commands?: readonly CodeActionCommand[];
+ }
+ type CodeActionCommand = InstallPackageAction;
+ interface InstallPackageAction {
+ }
+ /**
+ * A set of one or more available refactoring actions, grouped under a parent refactoring.
+ */
+ interface ApplicableRefactorInfo {
+ /**
+ * The programmatic name of the refactoring
+ */
+ name: string;
+ /**
+ * A description of this refactoring category to show to the user.
+ * If the refactoring gets inlined (see below), this text will not be visible.
+ */
+ description: string;
+ /**
+ * Inlineable refactorings can have their actions hoisted out to the top level
+ * of a context menu. Non-inlineanable refactorings should always be shown inside
+ * their parent grouping.
+ *
+ * If not specified, this value is assumed to be 'true'
+ */
+ inlineable?: boolean;
+ actions: RefactorActionInfo[];
+ }
+ /**
+ * Represents a single refactoring action - for example, the "Extract Method..." refactor might
+ * offer several actions, each corresponding to a surround class or closure to extract into.
+ */
+ interface RefactorActionInfo {
+ /**
+ * The programmatic name of the refactoring action
+ */
+ name: string;
+ /**
+ * A description of this refactoring action to show to the user.
+ * If the parent refactoring is inlined away, this will be the only text shown,
+ * so this description should make sense by itself if the parent is inlineable=true
+ */
+ description: string;
+ /**
+ * A message to show to the user if the refactoring cannot be applied in
+ * the current context.
+ */
+ notApplicableReason?: string;
+ /**
+ * The hierarchical dotted name of the refactor action.
+ */
+ kind?: string;
+ }
+ /**
+ * A set of edits to make in response to a refactor action, plus an optional
+ * location where renaming should be invoked from
+ */
+ interface RefactorEditInfo {
+ edits: FileTextChanges[];
+ renameFilename?: string;
+ renameLocation?: number;
+ commands?: CodeActionCommand[];
+ }
+ type RefactorTriggerReason = "implicit" | "invoked";
+ interface TextInsertion {
+ newText: string;
+ /** The position in newText the caret should point to after the insertion. */
+ caretOffset: number;
+ }
+ interface DocumentSpan {
+ textSpan: TextSpan;
+ fileName: string;
+ /**
+ * If the span represents a location that was remapped (e.g. via a .d.ts.map file),
+ * then the original filename and span will be specified here
+ */
+ originalTextSpan?: TextSpan;
+ originalFileName?: string;
+ /**
+ * If DocumentSpan.textSpan is the span for name of the declaration,
+ * then this is the span for relevant declaration
+ */
+ contextSpan?: TextSpan;
+ originalContextSpan?: TextSpan;
+ }
+ interface RenameLocation extends DocumentSpan {
+ readonly prefixText?: string;
+ readonly suffixText?: string;
+ }
+ interface ReferenceEntry extends DocumentSpan {
+ isWriteAccess: boolean;
+ isInString?: true;
+ }
+ interface ImplementationLocation extends DocumentSpan {
+ kind: ScriptElementKind;
+ displayParts: SymbolDisplayPart[];
+ }
+ enum HighlightSpanKind {
+ none = "none",
+ definition = "definition",
+ reference = "reference",
+ writtenReference = "writtenReference"
+ }
+ interface HighlightSpan {
+ fileName?: string;
+ isInString?: true;
+ textSpan: TextSpan;
+ contextSpan?: TextSpan;
+ kind: HighlightSpanKind;
+ }
+ interface NavigateToItem {
+ name: string;
+ kind: ScriptElementKind;
+ kindModifiers: string;
+ matchKind: "exact" | "prefix" | "substring" | "camelCase";
+ isCaseSensitive: boolean;
+ fileName: string;
+ textSpan: TextSpan;
+ containerName: string;
+ containerKind: ScriptElementKind;
+ }
+ enum IndentStyle {
+ None = 0,
+ Block = 1,
+ Smart = 2
+ }
+ enum SemicolonPreference {
+ Ignore = "ignore",
+ Insert = "insert",
+ Remove = "remove"
+ }
+ /** @deprecated - consider using EditorSettings instead */
+ interface EditorOptions {
+ BaseIndentSize?: number;
+ IndentSize: number;
+ TabSize: number;
+ NewLineCharacter: string;
+ ConvertTabsToSpaces: boolean;
+ IndentStyle: IndentStyle;
+ }
+ interface EditorSettings {
+ baseIndentSize?: number;
+ indentSize?: number;
+ tabSize?: number;
+ newLineCharacter?: string;
+ convertTabsToSpaces?: boolean;
+ indentStyle?: IndentStyle;
+ trimTrailingWhitespace?: boolean;
+ }
+ /** @deprecated - consider using FormatCodeSettings instead */
+ interface FormatCodeOptions extends EditorOptions {
+ InsertSpaceAfterCommaDelimiter: boolean;
+ InsertSpaceAfterSemicolonInForStatements: boolean;
+ InsertSpaceBeforeAndAfterBinaryOperators: boolean;
+ InsertSpaceAfterConstructor?: boolean;
+ InsertSpaceAfterKeywordsInControlFlowStatements: boolean;
+ InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean;
+ InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean;
+ InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: boolean;
+ InsertSpaceAfterOpeningAndBeforeClosingNonemptyBraces?: boolean;
+ InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: boolean;
+ InsertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean;
+ InsertSpaceAfterTypeAssertion?: boolean;
+ InsertSpaceBeforeFunctionParenthesis?: boolean;
+ PlaceOpenBraceOnNewLineForFunctions: boolean;
+ PlaceOpenBraceOnNewLineForControlBlocks: boolean;
+ insertSpaceBeforeTypeAnnotation?: boolean;
+ }
+ interface FormatCodeSettings extends EditorSettings {
+ readonly insertSpaceAfterCommaDelimiter?: boolean;
+ readonly insertSpaceAfterSemicolonInForStatements?: boolean;
+ readonly insertSpaceBeforeAndAfterBinaryOperators?: boolean;
+ readonly insertSpaceAfterConstructor?: boolean;
+ readonly insertSpaceAfterKeywordsInControlFlowStatements?: boolean;
+ readonly insertSpaceAfterFunctionKeywordForAnonymousFunctions?: boolean;
+ readonly insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis?: boolean;
+ readonly insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets?: boolean;
+ readonly insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces?: boolean;
+ readonly insertSpaceAfterOpeningAndBeforeClosingEmptyBraces?: boolean;
+ readonly insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces?: boolean;
+ readonly insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean;
+ readonly insertSpaceAfterTypeAssertion?: boolean;
+ readonly insertSpaceBeforeFunctionParenthesis?: boolean;
+ readonly placeOpenBraceOnNewLineForFunctions?: boolean;
+ readonly placeOpenBraceOnNewLineForControlBlocks?: boolean;
+ readonly insertSpaceBeforeTypeAnnotation?: boolean;
+ readonly indentMultiLineObjectLiteralBeginningOnBlankLine?: boolean;
+ readonly semicolons?: SemicolonPreference;
+ }
+ function getDefaultFormatCodeSettings(newLineCharacter?: string): FormatCodeSettings;
+ interface DefinitionInfo extends DocumentSpan {
+ kind: ScriptElementKind;
+ name: string;
+ containerKind: ScriptElementKind;
+ containerName: string;
+ unverified?: boolean;
+ }
+ interface DefinitionInfoAndBoundSpan {
+ definitions?: readonly DefinitionInfo[];
+ textSpan: TextSpan;
+ }
+ interface ReferencedSymbolDefinitionInfo extends DefinitionInfo {
+ displayParts: SymbolDisplayPart[];
+ }
+ interface ReferencedSymbol {
+ definition: ReferencedSymbolDefinitionInfo;
+ references: ReferencedSymbolEntry[];
+ }
+ interface ReferencedSymbolEntry extends ReferenceEntry {
+ isDefinition?: boolean;
+ }
+ enum SymbolDisplayPartKind {
+ aliasName = 0,
+ className = 1,
+ enumName = 2,
+ fieldName = 3,
+ interfaceName = 4,
+ keyword = 5,
+ lineBreak = 6,
+ numericLiteral = 7,
+ stringLiteral = 8,
+ localName = 9,
+ methodName = 10,
+ moduleName = 11,
+ operator = 12,
+ parameterName = 13,
+ propertyName = 14,
+ punctuation = 15,
+ space = 16,
+ text = 17,
+ typeParameterName = 18,
+ enumMemberName = 19,
+ functionName = 20,
+ regularExpressionLiteral = 21,
+ link = 22,
+ linkName = 23,
+ linkText = 24
+ }
+ interface SymbolDisplayPart {
+ text: string;
+ kind: string;
+ }
+ interface JSDocLinkDisplayPart extends SymbolDisplayPart {
+ target: DocumentSpan;
+ }
+ interface JSDocTagInfo {
+ name: string;
+ text?: SymbolDisplayPart[];
+ }
+ interface QuickInfo {
+ kind: ScriptElementKind;
+ kindModifiers: string;
+ textSpan: TextSpan;
+ displayParts?: SymbolDisplayPart[];
+ documentation?: SymbolDisplayPart[];
+ tags?: JSDocTagInfo[];
+ }
+ type RenameInfo = RenameInfoSuccess | RenameInfoFailure;
+ interface RenameInfoSuccess {
+ canRename: true;
+ /**
+ * File or directory to rename.
+ * If set, `getEditsForFileRename` should be called instead of `findRenameLocations`.
+ */
+ fileToRename?: string;
+ displayName: string;
+ fullDisplayName: string;
+ kind: ScriptElementKind;
+ kindModifiers: string;
+ triggerSpan: TextSpan;
+ }
+ interface RenameInfoFailure {
+ canRename: false;
+ localizedErrorMessage: string;
+ }
+ /**
+ * @deprecated Use `UserPreferences` instead.
+ */
+ interface RenameInfoOptions {
+ readonly allowRenameOfImportPath?: boolean;
+ }
+ interface DocCommentTemplateOptions {
+ readonly generateReturnInDocTemplate?: boolean;
+ }
+ interface SignatureHelpParameter {
+ name: string;
+ documentation: SymbolDisplayPart[];
+ displayParts: SymbolDisplayPart[];
+ isOptional: boolean;
+ isRest?: boolean;
+ }
+ interface SelectionRange {
+ textSpan: TextSpan;
+ parent?: SelectionRange;
+ }
+ /**
+ * Represents a single signature to show in signature help.
+ * The id is used for subsequent calls into the language service to ask questions about the
+ * signature help item in the context of any documents that have been updated. i.e. after
+ * an edit has happened, while signature help is still active, the host can ask important
+ * questions like 'what parameter is the user currently contained within?'.
+ */
+ interface SignatureHelpItem {
+ isVariadic: boolean;
+ prefixDisplayParts: SymbolDisplayPart[];
+ suffixDisplayParts: SymbolDisplayPart[];
+ separatorDisplayParts: SymbolDisplayPart[];
+ parameters: SignatureHelpParameter[];
+ documentation: SymbolDisplayPart[];
+ tags: JSDocTagInfo[];
+ }
+ /**
+ * Represents a set of signature help items, and the preferred item that should be selected.
+ */
+ interface SignatureHelpItems {
+ items: SignatureHelpItem[];
+ applicableSpan: TextSpan;
+ selectedItemIndex: number;
+ argumentIndex: number;
+ argumentCount: number;
+ }
+ enum CompletionInfoFlags {
+ None = 0,
+ MayIncludeAutoImports = 1,
+ IsImportStatementCompletion = 2,
+ IsContinuation = 4,
+ ResolvedModuleSpecifiers = 8,
+ ResolvedModuleSpecifiersBeyondLimit = 16,
+ MayIncludeMethodSnippets = 32
+ }
+ interface CompletionInfo {
+ /** For performance telemetry. */
+ flags?: CompletionInfoFlags;
+ /** Not true for all global completions. This will be true if the enclosing scope matches a few syntax kinds. See `isSnippetScope`. */
+ isGlobalCompletion: boolean;
+ isMemberCompletion: boolean;
+ /**
+ * In the absence of `CompletionEntry["replacementSpan"], the editor may choose whether to use
+ * this span or its default one. If `CompletionEntry["replacementSpan"]` is defined, that span
+ * must be used to commit that completion entry.
+ */
+ optionalReplacementSpan?: TextSpan;
+ /**
+ * true when the current location also allows for a new identifier
+ */
+ isNewIdentifierLocation: boolean;
+ /**
+ * Indicates to client to continue requesting completions on subsequent keystrokes.
+ */
+ isIncomplete?: true;
+ entries: CompletionEntry[];
+ }
+ interface CompletionEntryDataAutoImport {
+ /**
+ * The name of the property or export in the module's symbol table. Differs from the completion name
+ * in the case of InternalSymbolName.ExportEquals and InternalSymbolName.Default.
+ */
+ exportName: string;
+ moduleSpecifier?: string;
+ /** The file name declaring the export's module symbol, if it was an external module */
+ fileName?: string;
+ /** The module name (with quotes stripped) of the export's module symbol, if it was an ambient module */
+ ambientModuleName?: string;
+ /** True if the export was found in the package.json AutoImportProvider */
+ isPackageJsonImport?: true;
+ }
+ interface CompletionEntryDataUnresolved extends CompletionEntryDataAutoImport {
+ /** The key in the `ExportMapCache` where the completion entry's `SymbolExportInfo[]` is found */
+ exportMapKey: string;
+ }
+ interface CompletionEntryDataResolved extends CompletionEntryDataAutoImport {
+ moduleSpecifier: string;
+ }
+ type CompletionEntryData = CompletionEntryDataUnresolved | CompletionEntryDataResolved;
+ interface CompletionEntry {
+ name: string;
+ kind: ScriptElementKind;
+ kindModifiers?: string;
+ sortText: string;
+ insertText?: string;
+ isSnippet?: true;
+ /**
+ * An optional span that indicates the text to be replaced by this completion item.
+ * If present, this span should be used instead of the default one.
+ * It will be set if the required span differs from the one generated by the default replacement behavior.
+ */
+ replacementSpan?: TextSpan;
+ hasAction?: true;
+ source?: string;
+ sourceDisplay?: SymbolDisplayPart[];
+ labelDetails?: CompletionEntryLabelDetails;
+ isRecommended?: true;
+ isFromUncheckedFile?: true;
+ isPackageJsonImport?: true;
+ isImportStatementCompletion?: true;
+ /**
+ * A property to be sent back to TS Server in the CompletionDetailsRequest, along with `name`,
+ * that allows TS Server to look up the symbol represented by the completion item, disambiguating
+ * items with the same name. Currently only defined for auto-import completions, but the type is
+ * `unknown` in the protocol, so it can be changed as needed to support other kinds of completions.
+ * The presence of this property should generally not be used to assume that this completion entry
+ * is an auto-import.
+ */
+ data?: CompletionEntryData;
+ }
+ interface CompletionEntryLabelDetails {
+ detail?: string;
+ description?: string;
+ }
+ interface CompletionEntryDetails {
+ name: string;
+ kind: ScriptElementKind;
+ kindModifiers: string;
+ displayParts: SymbolDisplayPart[];
+ documentation?: SymbolDisplayPart[];
+ tags?: JSDocTagInfo[];
+ codeActions?: CodeAction[];
+ /** @deprecated Use `sourceDisplay` instead. */
+ source?: SymbolDisplayPart[];
+ sourceDisplay?: SymbolDisplayPart[];
+ }
+ interface OutliningSpan {
+ /** The span of the document to actually collapse. */
+ textSpan: TextSpan;
+ /** The span of the document to display when the user hovers over the collapsed span. */
+ hintSpan: TextSpan;
+ /** The text to display in the editor for the collapsed region. */
+ bannerText: string;
+ /**
+ * Whether or not this region should be automatically collapsed when
+ * the 'Collapse to Definitions' command is invoked.
+ */
+ autoCollapse: boolean;
+ /**
+ * Classification of the contents of the span
+ */
+ kind: OutliningSpanKind;
+ }
+ enum OutliningSpanKind {
+ /** Single or multi-line comments */
+ Comment = "comment",
+ /** Sections marked by '// #region' and '// #endregion' comments */
+ Region = "region",
+ /** Declarations and expressions */
+ Code = "code",
+ /** Contiguous blocks of import declarations */
+ Imports = "imports"
+ }
+ enum OutputFileType {
+ JavaScript = 0,
+ SourceMap = 1,
+ Declaration = 2
+ }
+ enum EndOfLineState {
+ None = 0,
+ InMultiLineCommentTrivia = 1,
+ InSingleQuoteStringLiteral = 2,
+ InDoubleQuoteStringLiteral = 3,
+ InTemplateHeadOrNoSubstitutionTemplate = 4,
+ InTemplateMiddleOrTail = 5,
+ InTemplateSubstitutionPosition = 6
+ }
+ enum TokenClass {
+ Punctuation = 0,
+ Keyword = 1,
+ Operator = 2,
+ Comment = 3,
+ Whitespace = 4,
+ Identifier = 5,
+ NumberLiteral = 6,
+ BigIntLiteral = 7,
+ StringLiteral = 8,
+ RegExpLiteral = 9
+ }
+ interface ClassificationResult {
+ finalLexState: EndOfLineState;
+ entries: ClassificationInfo[];
+ }
+ interface ClassificationInfo {
+ length: number;
+ classification: TokenClass;
+ }
+ interface Classifier {
+ /**
+ * Gives lexical classifications of tokens on a line without any syntactic context.
+ * For instance, a token consisting of the text 'string' can be either an identifier
+ * named 'string' or the keyword 'string', however, because this classifier is not aware,
+ * it relies on certain heuristics to give acceptable results. For classifications where
+ * speed trumps accuracy, this function is preferable; however, for true accuracy, the
+ * syntactic classifier is ideal. In fact, in certain editing scenarios, combining the
+ * lexical, syntactic, and semantic classifiers may issue the best user experience.
+ *
+ * @param text The text of a line to classify.
+ * @param lexState The state of the lexical classifier at the end of the previous line.
+ * @param syntacticClassifierAbsent Whether the client is *not* using a syntactic classifier.
+ * If there is no syntactic classifier (syntacticClassifierAbsent=true),
+ * certain heuristics may be used in its place; however, if there is a
+ * syntactic classifier (syntacticClassifierAbsent=false), certain
+ * classifications which may be incorrectly categorized will be given
+ * back as Identifiers in order to allow the syntactic classifier to
+ * subsume the classification.
+ * @deprecated Use getLexicalClassifications instead.
+ */
+ getClassificationsForLine(text: string, lexState: EndOfLineState, syntacticClassifierAbsent: boolean): ClassificationResult;
+ getEncodedLexicalClassifications(text: string, endOfLineState: EndOfLineState, syntacticClassifierAbsent: boolean): Classifications;
+ }
+ enum ScriptElementKind {
+ unknown = "",
+ warning = "warning",
+ /** predefined type (void) or keyword (class) */
+ keyword = "keyword",
+ /** top level script node */
+ scriptElement = "script",
+ /** module foo {} */
+ moduleElement = "module",
+ /** class X {} */
+ classElement = "class",
+ /** var x = class X {} */
+ localClassElement = "local class",
+ /** interface Y {} */
+ interfaceElement = "interface",
+ /** type T = ... */
+ typeElement = "type",
+ /** enum E */
+ enumElement = "enum",
+ enumMemberElement = "enum member",
+ /**
+ * Inside module and script only
+ * const v = ..
+ */
+ variableElement = "var",
+ /** Inside function */
+ localVariableElement = "local var",
+ /**
+ * Inside module and script only
+ * function f() { }
+ */
+ functionElement = "function",
+ /** Inside function */
+ localFunctionElement = "local function",
+ /** class X { [public|private]* foo() {} } */
+ memberFunctionElement = "method",
+ /** class X { [public|private]* [get|set] foo:number; } */
+ memberGetAccessorElement = "getter",
+ memberSetAccessorElement = "setter",
+ /**
+ * class X { [public|private]* foo:number; }
+ * interface Y { foo:number; }
+ */
+ memberVariableElement = "property",
+ /**
+ * class X { constructor() { } }
+ * class X { static { } }
+ */
+ constructorImplementationElement = "constructor",
+ /** interface Y { ():number; } */
+ callSignatureElement = "call",
+ /** interface Y { []:number; } */
+ indexSignatureElement = "index",
+ /** interface Y { new():Y; } */
+ constructSignatureElement = "construct",
+ /** function foo(*Y*: string) */
+ parameterElement = "parameter",
+ typeParameterElement = "type parameter",
+ primitiveType = "primitive type",
+ label = "label",
+ alias = "alias",
+ constElement = "const",
+ letElement = "let",
+ directory = "directory",
+ externalModuleName = "external module name",
+ /**
+ * <JsxTagName attribute1 attribute2={0} />
+ * @deprecated
+ */
+ jsxAttribute = "JSX attribute",
+ /** String literal */
+ string = "string",
+ /** Jsdoc @link: in `{@link C link text}`, the before and after text "{@link " and "}" */
+ link = "link",
+ /** Jsdoc @link: in `{@link C link text}`, the entity name "C" */
+ linkName = "link name",
+ /** Jsdoc @link: in `{@link C link text}`, the link text "link text" */
+ linkText = "link text"
+ }
+ enum ScriptElementKindModifier {
+ none = "",
+ publicMemberModifier = "public",
+ privateMemberModifier = "private",
+ protectedMemberModifier = "protected",
+ exportedModifier = "export",
+ ambientModifier = "declare",
+ staticModifier = "static",
+ abstractModifier = "abstract",
+ optionalModifier = "optional",
+ deprecatedModifier = "deprecated",
+ dtsModifier = ".d.ts",
+ tsModifier = ".ts",
+ tsxModifier = ".tsx",
+ jsModifier = ".js",
+ jsxModifier = ".jsx",
+ jsonModifier = ".json",
+ dmtsModifier = ".d.mts",
+ mtsModifier = ".mts",
+ mjsModifier = ".mjs",
+ dctsModifier = ".d.cts",
+ ctsModifier = ".cts",
+ cjsModifier = ".cjs"
+ }
+ enum ClassificationTypeNames {
+ comment = "comment",
+ identifier = "identifier",
+ keyword = "keyword",
+ numericLiteral = "number",
+ bigintLiteral = "bigint",
+ operator = "operator",
+ stringLiteral = "string",
+ whiteSpace = "whitespace",
+ text = "text",
+ punctuation = "punctuation",
+ className = "class name",
+ enumName = "enum name",
+ interfaceName = "interface name",
+ moduleName = "module name",
+ typeParameterName = "type parameter name",
+ typeAliasName = "type alias name",
+ parameterName = "parameter name",
+ docCommentTagName = "doc comment tag name",
+ jsxOpenTagName = "jsx open tag name",
+ jsxCloseTagName = "jsx close tag name",
+ jsxSelfClosingTagName = "jsx self closing tag name",
+ jsxAttribute = "jsx attribute",
+ jsxText = "jsx text",
+ jsxAttributeStringLiteralValue = "jsx attribute string literal value"
+ }
+ enum ClassificationType {
+ comment = 1,
+ identifier = 2,
+ keyword = 3,
+ numericLiteral = 4,
+ operator = 5,
+ stringLiteral = 6,
+ regularExpressionLiteral = 7,
+ whiteSpace = 8,
+ text = 9,
+ punctuation = 10,
+ className = 11,
+ enumName = 12,
+ interfaceName = 13,
+ moduleName = 14,
+ typeParameterName = 15,
+ typeAliasName = 16,
+ parameterName = 17,
+ docCommentTagName = 18,
+ jsxOpenTagName = 19,
+ jsxCloseTagName = 20,
+ jsxSelfClosingTagName = 21,
+ jsxAttribute = 22,
+ jsxText = 23,
+ jsxAttributeStringLiteralValue = 24,
+ bigintLiteral = 25
+ }
+ interface InlayHintsContext {
+ file: SourceFile;
+ program: Program;
+ cancellationToken: CancellationToken;
+ host: LanguageServiceHost;
+ span: TextSpan;
+ preferences: UserPreferences;
+ }
+}
+declare namespace ts {
+ /** The classifier is used for syntactic highlighting in editors via the TSServer */
+ function createClassifier(): Classifier;
+}
+declare namespace ts {
+ interface DocumentHighlights {
+ fileName: string;
+ highlightSpans: HighlightSpan[];
+ }
+}
+declare namespace ts {
+ /**
+ * The document registry represents a store of SourceFile objects that can be shared between
+ * multiple LanguageService instances. A LanguageService instance holds on the SourceFile (AST)
+ * of files in the context.
+ * SourceFile objects account for most of the memory usage by the language service. Sharing
+ * the same DocumentRegistry instance between different instances of LanguageService allow
+ * for more efficient memory utilization since all projects will share at least the library
+ * file (lib.d.ts).
+ *
+ * A more advanced use of the document registry is to serialize sourceFile objects to disk
+ * and re-hydrate them when needed.
+ *
+ * To create a default DocumentRegistry, use createDocumentRegistry to create one, and pass it
+ * to all subsequent createLanguageService calls.
+ */
+ interface DocumentRegistry {
+ /**
+ * Request a stored SourceFile with a given fileName and compilationSettings.
+ * The first call to acquire will call createLanguageServiceSourceFile to generate
+ * the SourceFile if was not found in the registry.
+ *
+ * @param fileName The name of the file requested
+ * @param compilationSettingsOrHost Some compilation settings like target affects the
+ * shape of a the resulting SourceFile. This allows the DocumentRegistry to store
+ * multiple copies of the same file for different compilation settings. A minimal
+ * resolution cache is needed to fully define a source file's shape when
+ * the compilation settings include `module: node16`+, so providing a cache host
+ * object should be preferred. A common host is a language service `ConfiguredProject`.
+ * @param scriptSnapshot Text of the file. Only used if the file was not found
+ * in the registry and a new one was created.
+ * @param version Current version of the file. Only used if the file was not found
+ * in the registry and a new one was created.
+ */
+ acquireDocument(fileName: string, compilationSettingsOrHost: CompilerOptions | MinimalResolutionCacheHost, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind, sourceFileOptions?: CreateSourceFileOptions | ScriptTarget): SourceFile;
+ acquireDocumentWithKey(fileName: string, path: Path, compilationSettingsOrHost: CompilerOptions | MinimalResolutionCacheHost, key: DocumentRegistryBucketKey, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind, sourceFileOptions?: CreateSourceFileOptions | ScriptTarget): SourceFile;
+ /**
+ * Request an updated version of an already existing SourceFile with a given fileName
+ * and compilationSettings. The update will in-turn call updateLanguageServiceSourceFile
+ * to get an updated SourceFile.
+ *
+ * @param fileName The name of the file requested
+ * @param compilationSettingsOrHost Some compilation settings like target affects the
+ * shape of a the resulting SourceFile. This allows the DocumentRegistry to store
+ * multiple copies of the same file for different compilation settings. A minimal
+ * resolution cache is needed to fully define a source file's shape when
+ * the compilation settings include `module: node16`+, so providing a cache host
+ * object should be preferred. A common host is a language service `ConfiguredProject`.
+ * @param scriptSnapshot Text of the file.
+ * @param version Current version of the file.
+ */
+ updateDocument(fileName: string, compilationSettingsOrHost: CompilerOptions | MinimalResolutionCacheHost, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind, sourceFileOptions?: CreateSourceFileOptions | ScriptTarget): SourceFile;
+ updateDocumentWithKey(fileName: string, path: Path, compilationSettingsOrHost: CompilerOptions | MinimalResolutionCacheHost, key: DocumentRegistryBucketKey, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind, sourceFileOptions?: CreateSourceFileOptions | ScriptTarget): SourceFile;
+ getKeyForCompilationSettings(settings: CompilerOptions): DocumentRegistryBucketKey;
+ /**
+ * Informs the DocumentRegistry that a file is not needed any longer.
+ *
+ * Note: It is not allowed to call release on a SourceFile that was not acquired from
+ * this registry originally.
+ *
+ * @param fileName The name of the file to be released
+ * @param compilationSettings The compilation settings used to acquire the file
+ * @param scriptKind The script kind of the file to be released
+ */
+ /**@deprecated pass scriptKind and impliedNodeFormat for correctness */
+ releaseDocument(fileName: string, compilationSettings: CompilerOptions, scriptKind?: ScriptKind): void;
+ /**
+ * Informs the DocumentRegistry that a file is not needed any longer.
+ *
+ * Note: It is not allowed to call release on a SourceFile that was not acquired from
+ * this registry originally.
+ *
+ * @param fileName The name of the file to be released
+ * @param compilationSettings The compilation settings used to acquire the file
+ * @param scriptKind The script kind of the file to be released
+ * @param impliedNodeFormat The implied source file format of the file to be released
+ */
+ releaseDocument(fileName: string, compilationSettings: CompilerOptions, scriptKind: ScriptKind, impliedNodeFormat: SourceFile["impliedNodeFormat"]): void;
+ /**
+ * @deprecated pass scriptKind for and impliedNodeFormat correctness */
+ releaseDocumentWithKey(path: Path, key: DocumentRegistryBucketKey, scriptKind?: ScriptKind): void;
+ releaseDocumentWithKey(path: Path, key: DocumentRegistryBucketKey, scriptKind: ScriptKind, impliedNodeFormat: SourceFile["impliedNodeFormat"]): void;
+ reportStats(): string;
+ }
+ type DocumentRegistryBucketKey = string & {
+ __bucketKey: any;
+ };
+ function createDocumentRegistry(useCaseSensitiveFileNames?: boolean, currentDirectory?: string): DocumentRegistry;
+}
+declare namespace ts {
+ function preProcessFile(sourceText: string, readImportFiles?: boolean, detectJavaScriptImports?: boolean): PreProcessedFileInfo;
+}
+declare namespace ts {
+ interface TranspileOptions {
+ compilerOptions?: CompilerOptions;
+ fileName?: string;
+ reportDiagnostics?: boolean;
+ moduleName?: string;
+ renamedDependencies?: MapLike<string>;
+ transformers?: CustomTransformers;
+ }
+ interface TranspileOutput {
+ outputText: string;
+ diagnostics?: Diagnostic[];
+ sourceMapText?: string;
+ }
+ function transpileModule(input: string, transpileOptions: TranspileOptions): TranspileOutput;
+ function transpile(input: string, compilerOptions?: CompilerOptions, fileName?: string, diagnostics?: Diagnostic[], moduleName?: string): string;
+}
+declare namespace ts {
+ /** The version of the language service API */
+ const servicesVersion = "0.8";
+ function toEditorSettings(options: EditorOptions | EditorSettings): EditorSettings;
+ function displayPartsToString(displayParts: SymbolDisplayPart[] | undefined): string;
+ function getDefaultCompilerOptions(): CompilerOptions;
+ function getSupportedCodeFixes(): string[];
+ function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTargetOrOptions: ScriptTarget | CreateSourceFileOptions, version: string, setNodeParents: boolean, scriptKind?: ScriptKind): SourceFile;
+ function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange | undefined, aggressiveChecks?: boolean): SourceFile;
+ function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry, syntaxOnlyOrLanguageServiceMode?: boolean | LanguageServiceMode): LanguageService;
+ /**
+ * Get the path of the default library files (lib.d.ts) as distributed with the typescript
+ * node package.
+ * The functionality is not supported if the ts module is consumed outside of a node module.
+ */
+ function getDefaultLibFilePath(options: CompilerOptions): string;
+}
+declare namespace ts {
+ /**
+ * Transform one or more nodes using the supplied transformers.
+ * @param source A single `Node` or an array of `Node` objects.
+ * @param transformers An array of `TransformerFactory` callbacks used to process the transformation.
+ * @param compilerOptions Optional compiler options.
+ */
+ function transform<T extends Node>(source: T | T[], transformers: TransformerFactory<T>[], compilerOptions?: CompilerOptions): TransformationResult<T>;
+}
+declare namespace ts {
+ /** @deprecated Use `factory.createNodeArray` or the factory supplied by your transformation context instead. */
+ const createNodeArray: <T extends Node>(elements?: readonly T[] | undefined, hasTrailingComma?: boolean | undefined) => NodeArray<T>;
+ /** @deprecated Use `factory.createNumericLiteral` or the factory supplied by your transformation context instead. */
+ const createNumericLiteral: (value: string | number, numericLiteralFlags?: TokenFlags | undefined) => NumericLiteral;
+ /** @deprecated Use `factory.createBigIntLiteral` or the factory supplied by your transformation context instead. */
+ const createBigIntLiteral: (value: string | PseudoBigInt) => BigIntLiteral;
+ /** @deprecated Use `factory.createStringLiteral` or the factory supplied by your transformation context instead. */
+ const createStringLiteral: {
+ (text: string, isSingleQuote?: boolean | undefined): StringLiteral;
+ (text: string, isSingleQuote?: boolean | undefined, hasExtendedUnicodeEscape?: boolean | undefined): StringLiteral;
+ };
+ /** @deprecated Use `factory.createStringLiteralFromNode` or the factory supplied by your transformation context instead. */
+ const createStringLiteralFromNode: (sourceNode: PropertyNameLiteral, isSingleQuote?: boolean | undefined) => StringLiteral;
+ /** @deprecated Use `factory.createRegularExpressionLiteral` or the factory supplied by your transformation context instead. */
+ const createRegularExpressionLiteral: (text: string) => RegularExpressionLiteral;
+ /** @deprecated Use `factory.createLoopVariable` or the factory supplied by your transformation context instead. */
+ const createLoopVariable: (reservedInNestedScopes?: boolean | undefined) => Identifier;
+ /** @deprecated Use `factory.createUniqueName` or the factory supplied by your transformation context instead. */
+ const createUniqueName: (text: string, flags?: GeneratedIdentifierFlags | undefined) => Identifier;
+ /** @deprecated Use `factory.createPrivateIdentifier` or the factory supplied by your transformation context instead. */
+ const createPrivateIdentifier: (text: string) => PrivateIdentifier;
+ /** @deprecated Use `factory.createSuper` or the factory supplied by your transformation context instead. */
+ const createSuper: () => SuperExpression;
+ /** @deprecated Use `factory.createThis` or the factory supplied by your transformation context instead. */
+ const createThis: () => ThisExpression;
+ /** @deprecated Use `factory.createNull` or the factory supplied by your transformation context instead. */
+ const createNull: () => NullLiteral;
+ /** @deprecated Use `factory.createTrue` or the factory supplied by your transformation context instead. */
+ const createTrue: () => TrueLiteral;
+ /** @deprecated Use `factory.createFalse` or the factory supplied by your transformation context instead. */
+ const createFalse: () => FalseLiteral;
+ /** @deprecated Use `factory.createModifier` or the factory supplied by your transformation context instead. */
+ const createModifier: <T extends ModifierSyntaxKind>(kind: T) => ModifierToken<T>;
+ /** @deprecated Use `factory.createModifiersFromModifierFlags` or the factory supplied by your transformation context instead. */
+ const createModifiersFromModifierFlags: (flags: ModifierFlags) => Modifier[] | undefined;
+ /** @deprecated Use `factory.createQualifiedName` or the factory supplied by your transformation context instead. */
+ const createQualifiedName: (left: EntityName, right: string | Identifier) => QualifiedName;
+ /** @deprecated Use `factory.updateQualifiedName` or the factory supplied by your transformation context instead. */
+ const updateQualifiedName: (node: QualifiedName, left: EntityName, right: Identifier) => QualifiedName;
+ /** @deprecated Use `factory.createComputedPropertyName` or the factory supplied by your transformation context instead. */
+ const createComputedPropertyName: (expression: Expression) => ComputedPropertyName;
+ /** @deprecated Use `factory.updateComputedPropertyName` or the factory supplied by your transformation context instead. */
+ const updateComputedPropertyName: (node: ComputedPropertyName, expression: Expression) => ComputedPropertyName;
+ /** @deprecated Use `factory.createTypeParameterDeclaration` or the factory supplied by your transformation context instead. */
+ const createTypeParameterDeclaration: {
+ (modifiers: readonly Modifier[] | undefined, name: string | Identifier, constraint?: TypeNode | undefined, defaultType?: TypeNode | undefined): TypeParameterDeclaration;
+ (name: string | Identifier, constraint?: TypeNode | undefined, defaultType?: TypeNode | undefined): TypeParameterDeclaration;
+ };
+ /** @deprecated Use `factory.updateTypeParameterDeclaration` or the factory supplied by your transformation context instead. */
+ const updateTypeParameterDeclaration: {
+ (node: TypeParameterDeclaration, modifiers: readonly Modifier[] | undefined, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration;
+ (node: TypeParameterDeclaration, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration;
+ };
+ /** @deprecated Use `factory.createParameterDeclaration` or the factory supplied by your transformation context instead. */
+ const createParameter: {
+ (modifiers: readonly ModifierLike[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken?: QuestionToken | undefined, type?: TypeNode | undefined, initializer?: Expression | undefined): ParameterDeclaration;
+ (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken?: QuestionToken | undefined, type?: TypeNode | undefined, initializer?: Expression | undefined): ParameterDeclaration;
+ };
+ /** @deprecated Use `factory.updateParameterDeclaration` or the factory supplied by your transformation context instead. */
+ const updateParameter: {
+ (node: ParameterDeclaration, modifiers: readonly ModifierLike[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): ParameterDeclaration;
+ (node: ParameterDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): ParameterDeclaration;
+ };
+ /** @deprecated Use `factory.createDecorator` or the factory supplied by your transformation context instead. */
+ const createDecorator: (expression: Expression) => Decorator;
+ /** @deprecated Use `factory.updateDecorator` or the factory supplied by your transformation context instead. */
+ const updateDecorator: (node: Decorator, expression: Expression) => Decorator;
+ /** @deprecated Use `factory.createPropertyDeclaration` or the factory supplied by your transformation context instead. */
+ const createProperty: {
+ (modifiers: readonly ModifierLike[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration;
+ (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration;
+ };
+ /** @deprecated Use `factory.updatePropertyDeclaration` or the factory supplied by your transformation context instead. */
+ const updateProperty: {
+ (node: PropertyDeclaration, modifiers: readonly ModifierLike[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration;
+ (node: PropertyDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration;
+ };
+ /** @deprecated Use `factory.createMethodDeclaration` or the factory supplied by your transformation context instead. */
+ const createMethod: {
+ (modifiers: readonly ModifierLike[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): MethodDeclaration;
+ (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): MethodDeclaration;
+ };
+ /** @deprecated Use `factory.updateMethodDeclaration` or the factory supplied by your transformation context instead. */
+ const updateMethod: {
+ (node: MethodDeclaration, modifiers: readonly ModifierLike[] | undefined, asteriskToken: AsteriskToken | undefined, name: PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): MethodDeclaration;
+ (node: MethodDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): MethodDeclaration;
+ };
+ /** @deprecated Use `factory.createConstructorDeclaration` or the factory supplied by your transformation context instead. */
+ const createConstructor: {
+ (modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration;
+ (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration;
+ };
+ /** @deprecated Use `factory.updateConstructorDeclaration` or the factory supplied by your transformation context instead. */
+ const updateConstructor: {
+ (node: ConstructorDeclaration, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration;
+ (node: ConstructorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration;
+ };
+ /** @deprecated Use `factory.createGetAccessorDeclaration` or the factory supplied by your transformation context instead. */
+ const createGetAccessor: {
+ (modifiers: readonly ModifierLike[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration;
+ (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration;
+ };
+ /** @deprecated Use `factory.updateGetAccessorDeclaration` or the factory supplied by your transformation context instead. */
+ const updateGetAccessor: {
+ (node: GetAccessorDeclaration, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration;
+ (node: GetAccessorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration;
+ };
+ /** @deprecated Use `factory.createSetAccessorDeclaration` or the factory supplied by your transformation context instead. */
+ const createSetAccessor: {
+ (modifiers: readonly ModifierLike[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration;
+ (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration;
+ };
+ /** @deprecated Use `factory.updateSetAccessorDeclaration` or the factory supplied by your transformation context instead. */
+ const updateSetAccessor: {
+ (node: SetAccessorDeclaration, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration;
+ (node: SetAccessorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration;
+ };
+ /** @deprecated Use `factory.createCallSignature` or the factory supplied by your transformation context instead. */
+ const createCallSignature: (typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined) => CallSignatureDeclaration;
+ /** @deprecated Use `factory.updateCallSignature` or the factory supplied by your transformation context instead. */
+ const updateCallSignature: (node: CallSignatureDeclaration, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined) => CallSignatureDeclaration;
+ /** @deprecated Use `factory.createConstructSignature` or the factory supplied by your transformation context instead. */
+ const createConstructSignature: (typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined) => ConstructSignatureDeclaration;
+ /** @deprecated Use `factory.updateConstructSignature` or the factory supplied by your transformation context instead. */
+ const updateConstructSignature: (node: ConstructSignatureDeclaration, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined) => ConstructSignatureDeclaration;
+ /** @deprecated Use `factory.updateIndexSignature` or the factory supplied by your transformation context instead. */
+ const updateIndexSignature: {
+ (node: IndexSignatureDeclaration, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration;
+ (node: IndexSignatureDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration;
+ };
+ /** @deprecated Use `factory.createKeywordTypeNode` or the factory supplied by your transformation context instead. */
+ const createKeywordTypeNode: <TKind extends KeywordTypeSyntaxKind>(kind: TKind) => KeywordTypeNode<TKind>;
+ /** @deprecated Use `factory.createTypePredicateNode` or the factory supplied by your transformation context instead. */
+ const createTypePredicateNodeWithModifier: (assertsModifier: AssertsKeyword | undefined, parameterName: string | Identifier | ThisTypeNode, type: TypeNode | undefined) => TypePredicateNode;
+ /** @deprecated Use `factory.updateTypePredicateNode` or the factory supplied by your transformation context instead. */
+ const updateTypePredicateNodeWithModifier: (node: TypePredicateNode, assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode, type: TypeNode | undefined) => TypePredicateNode;
+ /** @deprecated Use `factory.createTypeReferenceNode` or the factory supplied by your transformation context instead. */
+ const createTypeReferenceNode: (typeName: string | EntityName, typeArguments?: readonly TypeNode[] | undefined) => TypeReferenceNode;
+ /** @deprecated Use `factory.updateTypeReferenceNode` or the factory supplied by your transformation context instead. */
+ const updateTypeReferenceNode: (node: TypeReferenceNode, typeName: EntityName, typeArguments: NodeArray<TypeNode> | undefined) => TypeReferenceNode;
+ /** @deprecated Use `factory.createFunctionTypeNode` or the factory supplied by your transformation context instead. */
+ const createFunctionTypeNode: (typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode) => FunctionTypeNode;
+ /** @deprecated Use `factory.updateFunctionTypeNode` or the factory supplied by your transformation context instead. */
+ const updateFunctionTypeNode: (node: FunctionTypeNode, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode) => FunctionTypeNode;
+ /** @deprecated Use `factory.createConstructorTypeNode` or the factory supplied by your transformation context instead. */
+ const createConstructorTypeNode: (typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode) => ConstructorTypeNode;
+ /** @deprecated Use `factory.updateConstructorTypeNode` or the factory supplied by your transformation context instead. */
+ const updateConstructorTypeNode: (node: ConstructorTypeNode, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode) => ConstructorTypeNode;
+ /** @deprecated Use `factory.createTypeQueryNode` or the factory supplied by your transformation context instead. */
+ const createTypeQueryNode: (exprName: EntityName, typeArguments?: readonly TypeNode[] | undefined) => TypeQueryNode;
+ /** @deprecated Use `factory.updateTypeQueryNode` or the factory supplied by your transformation context instead. */
+ const updateTypeQueryNode: (node: TypeQueryNode, exprName: EntityName, typeArguments?: readonly TypeNode[] | undefined) => TypeQueryNode;
+ /** @deprecated Use `factory.createTypeLiteralNode` or the factory supplied by your transformation context instead. */
+ const createTypeLiteralNode: (members: readonly TypeElement[] | undefined) => TypeLiteralNode;
+ /** @deprecated Use `factory.updateTypeLiteralNode` or the factory supplied by your transformation context instead. */
+ const updateTypeLiteralNode: (node: TypeLiteralNode, members: NodeArray<TypeElement>) => TypeLiteralNode;
+ /** @deprecated Use `factory.createArrayTypeNode` or the factory supplied by your transformation context instead. */
+ const createArrayTypeNode: (elementType: TypeNode) => ArrayTypeNode;
+ /** @deprecated Use `factory.updateArrayTypeNode` or the factory supplied by your transformation context instead. */
+ const updateArrayTypeNode: (node: ArrayTypeNode, elementType: TypeNode) => ArrayTypeNode;
+ /** @deprecated Use `factory.createTupleTypeNode` or the factory supplied by your transformation context instead. */
+ const createTupleTypeNode: (elements: readonly (TypeNode | NamedTupleMember)[]) => TupleTypeNode;
+ /** @deprecated Use `factory.updateTupleTypeNode` or the factory supplied by your transformation context instead. */
+ const updateTupleTypeNode: (node: TupleTypeNode, elements: readonly (TypeNode | NamedTupleMember)[]) => TupleTypeNode;
+ /** @deprecated Use `factory.createOptionalTypeNode` or the factory supplied by your transformation context instead. */
+ const createOptionalTypeNode: (type: TypeNode) => OptionalTypeNode;
+ /** @deprecated Use `factory.updateOptionalTypeNode` or the factory supplied by your transformation context instead. */
+ const updateOptionalTypeNode: (node: OptionalTypeNode, type: TypeNode) => OptionalTypeNode;
+ /** @deprecated Use `factory.createRestTypeNode` or the factory supplied by your transformation context instead. */
+ const createRestTypeNode: (type: TypeNode) => RestTypeNode;
+ /** @deprecated Use `factory.updateRestTypeNode` or the factory supplied by your transformation context instead. */
+ const updateRestTypeNode: (node: RestTypeNode, type: TypeNode) => RestTypeNode;
+ /** @deprecated Use `factory.createUnionTypeNode` or the factory supplied by your transformation context instead. */
+ const createUnionTypeNode: (types: readonly TypeNode[]) => UnionTypeNode;
+ /** @deprecated Use `factory.updateUnionTypeNode` or the factory supplied by your transformation context instead. */
+ const updateUnionTypeNode: (node: UnionTypeNode, types: NodeArray<TypeNode>) => UnionTypeNode;
+ /** @deprecated Use `factory.createIntersectionTypeNode` or the factory supplied by your transformation context instead. */
+ const createIntersectionTypeNode: (types: readonly TypeNode[]) => IntersectionTypeNode;
+ /** @deprecated Use `factory.updateIntersectionTypeNode` or the factory supplied by your transformation context instead. */
+ const updateIntersectionTypeNode: (node: IntersectionTypeNode, types: NodeArray<TypeNode>) => IntersectionTypeNode;
+ /** @deprecated Use `factory.createConditionalTypeNode` or the factory supplied by your transformation context instead. */
+ const createConditionalTypeNode: (checkType: TypeNode, extendsType: TypeNode, trueType: TypeNode, falseType: TypeNode) => ConditionalTypeNode;
+ /** @deprecated Use `factory.updateConditionalTypeNode` or the factory supplied by your transformation context instead. */
+ const updateConditionalTypeNode: (node: ConditionalTypeNode, checkType: TypeNode, extendsType: TypeNode, trueType: TypeNode, falseType: TypeNode) => ConditionalTypeNode;
+ /** @deprecated Use `factory.createInferTypeNode` or the factory supplied by your transformation context instead. */
+ const createInferTypeNode: (typeParameter: TypeParameterDeclaration) => InferTypeNode;
+ /** @deprecated Use `factory.updateInferTypeNode` or the factory supplied by your transformation context instead. */
+ const updateInferTypeNode: (node: InferTypeNode, typeParameter: TypeParameterDeclaration) => InferTypeNode;
+ /** @deprecated Use `factory.createImportTypeNode` or the factory supplied by your transformation context instead. */
+ const createImportTypeNode: {
+ (argument: TypeNode, assertions?: ImportTypeAssertionContainer | undefined, qualifier?: EntityName | undefined, typeArguments?: readonly TypeNode[] | undefined, isTypeOf?: boolean | undefined): ImportTypeNode;
+ (argument: TypeNode, assertions?: ImportTypeAssertionContainer | undefined, qualifier?: EntityName | undefined, typeArguments?: readonly TypeNode[] | undefined, isTypeOf?: boolean | undefined): ImportTypeNode;
+ (argument: TypeNode, qualifier?: EntityName | undefined, typeArguments?: readonly TypeNode[] | undefined, isTypeOf?: boolean | undefined): ImportTypeNode;
+ };
+ /** @deprecated Use `factory.updateImportTypeNode` or the factory supplied by your transformation context instead. */
+ const updateImportTypeNode: {
+ (node: ImportTypeNode, argument: TypeNode, assertions: ImportTypeAssertionContainer | undefined, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean | undefined): ImportTypeNode;
+ (node: ImportTypeNode, argument: TypeNode, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean | undefined): ImportTypeNode;
+ };
+ /** @deprecated Use `factory.createParenthesizedType` or the factory supplied by your transformation context instead. */
+ const createParenthesizedType: (type: TypeNode) => ParenthesizedTypeNode;
+ /** @deprecated Use `factory.updateParenthesizedType` or the factory supplied by your transformation context instead. */
+ const updateParenthesizedType: (node: ParenthesizedTypeNode, type: TypeNode) => ParenthesizedTypeNode;
+ /** @deprecated Use `factory.createThisTypeNode` or the factory supplied by your transformation context instead. */
+ const createThisTypeNode: () => ThisTypeNode;
+ /** @deprecated Use `factory.updateTypeOperatorNode` or the factory supplied by your transformation context instead. */
+ const updateTypeOperatorNode: (node: TypeOperatorNode, type: TypeNode) => TypeOperatorNode;
+ /** @deprecated Use `factory.createIndexedAccessTypeNode` or the factory supplied by your transformation context instead. */
+ const createIndexedAccessTypeNode: (objectType: TypeNode, indexType: TypeNode) => IndexedAccessTypeNode;
+ /** @deprecated Use `factory.updateIndexedAccessTypeNode` or the factory supplied by your transformation context instead. */
+ const updateIndexedAccessTypeNode: (node: IndexedAccessTypeNode, objectType: TypeNode, indexType: TypeNode) => IndexedAccessTypeNode;
+ /** @deprecated Use `factory.createMappedTypeNode` or the factory supplied by your transformation context instead. */
+ const createMappedTypeNode: (readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, nameType: TypeNode | undefined, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined, members: NodeArray<TypeElement> | undefined) => MappedTypeNode;
+ /** @deprecated Use `factory.updateMappedTypeNode` or the factory supplied by your transformation context instead. */
+ const updateMappedTypeNode: (node: MappedTypeNode, readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, nameType: TypeNode | undefined, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined, members: NodeArray<TypeElement> | undefined) => MappedTypeNode;
+ /** @deprecated Use `factory.createLiteralTypeNode` or the factory supplied by your transformation context instead. */
+ const createLiteralTypeNode: (literal: LiteralExpression | BooleanLiteral | PrefixUnaryExpression | NullLiteral) => LiteralTypeNode;
+ /** @deprecated Use `factory.updateLiteralTypeNode` or the factory supplied by your transformation context instead. */
+ const updateLiteralTypeNode: (node: LiteralTypeNode, literal: LiteralExpression | BooleanLiteral | PrefixUnaryExpression | NullLiteral) => LiteralTypeNode;
+ /** @deprecated Use `factory.createObjectBindingPattern` or the factory supplied by your transformation context instead. */
+ const createObjectBindingPattern: (elements: readonly BindingElement[]) => ObjectBindingPattern;
+ /** @deprecated Use `factory.updateObjectBindingPattern` or the factory supplied by your transformation context instead. */
+ const updateObjectBindingPattern: (node: ObjectBindingPattern, elements: readonly BindingElement[]) => ObjectBindingPattern;
+ /** @deprecated Use `factory.createArrayBindingPattern` or the factory supplied by your transformation context instead. */
+ const createArrayBindingPattern: (elements: readonly ArrayBindingElement[]) => ArrayBindingPattern;
+ /** @deprecated Use `factory.updateArrayBindingPattern` or the factory supplied by your transformation context instead. */
+ const updateArrayBindingPattern: (node: ArrayBindingPattern, elements: readonly ArrayBindingElement[]) => ArrayBindingPattern;
+ /** @deprecated Use `factory.createBindingElement` or the factory supplied by your transformation context instead. */
+ const createBindingElement: (dotDotDotToken: DotDotDotToken | undefined, propertyName: string | PropertyName | undefined, name: string | BindingName, initializer?: Expression | undefined) => BindingElement;
+ /** @deprecated Use `factory.updateBindingElement` or the factory supplied by your transformation context instead. */
+ const updateBindingElement: (node: BindingElement, dotDotDotToken: DotDotDotToken | undefined, propertyName: PropertyName | undefined, name: BindingName, initializer: Expression | undefined) => BindingElement;
+ /** @deprecated Use `factory.createArrayLiteralExpression` or the factory supplied by your transformation context instead. */
+ const createArrayLiteral: (elements?: readonly Expression[] | undefined, multiLine?: boolean | undefined) => ArrayLiteralExpression;
+ /** @deprecated Use `factory.updateArrayLiteralExpression` or the factory supplied by your transformation context instead. */
+ const updateArrayLiteral: (node: ArrayLiteralExpression, elements: readonly Expression[]) => ArrayLiteralExpression;
+ /** @deprecated Use `factory.createObjectLiteralExpression` or the factory supplied by your transformation context instead. */
+ const createObjectLiteral: (properties?: readonly ObjectLiteralElementLike[] | undefined, multiLine?: boolean | undefined) => ObjectLiteralExpression;
+ /** @deprecated Use `factory.updateObjectLiteralExpression` or the factory supplied by your transformation context instead. */
+ const updateObjectLiteral: (node: ObjectLiteralExpression, properties: readonly ObjectLiteralElementLike[]) => ObjectLiteralExpression;
+ /** @deprecated Use `factory.createPropertyAccessExpression` or the factory supplied by your transformation context instead. */
+ const createPropertyAccess: (expression: Expression, name: string | MemberName) => PropertyAccessExpression;
+ /** @deprecated Use `factory.updatePropertyAccessExpression` or the factory supplied by your transformation context instead. */
+ const updatePropertyAccess: (node: PropertyAccessExpression, expression: Expression, name: MemberName) => PropertyAccessExpression;
+ /** @deprecated Use `factory.createPropertyAccessChain` or the factory supplied by your transformation context instead. */
+ const createPropertyAccessChain: (expression: Expression, questionDotToken: QuestionDotToken | undefined, name: string | MemberName) => PropertyAccessChain;
+ /** @deprecated Use `factory.updatePropertyAccessChain` or the factory supplied by your transformation context instead. */
+ const updatePropertyAccessChain: (node: PropertyAccessChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, name: MemberName) => PropertyAccessChain;
+ /** @deprecated Use `factory.createElementAccessExpression` or the factory supplied by your transformation context instead. */
+ const createElementAccess: (expression: Expression, index: number | Expression) => ElementAccessExpression;
+ /** @deprecated Use `factory.updateElementAccessExpression` or the factory supplied by your transformation context instead. */
+ const updateElementAccess: (node: ElementAccessExpression, expression: Expression, argumentExpression: Expression) => ElementAccessExpression;
+ /** @deprecated Use `factory.createElementAccessChain` or the factory supplied by your transformation context instead. */
+ const createElementAccessChain: (expression: Expression, questionDotToken: QuestionDotToken | undefined, index: number | Expression) => ElementAccessChain;
+ /** @deprecated Use `factory.updateElementAccessChain` or the factory supplied by your transformation context instead. */
+ const updateElementAccessChain: (node: ElementAccessChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, argumentExpression: Expression) => ElementAccessChain;
+ /** @deprecated Use `factory.createCallExpression` or the factory supplied by your transformation context instead. */
+ const createCall: (expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined) => CallExpression;
+ /** @deprecated Use `factory.updateCallExpression` or the factory supplied by your transformation context instead. */
+ const updateCall: (node: CallExpression, expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[]) => CallExpression;
+ /** @deprecated Use `factory.createCallChain` or the factory supplied by your transformation context instead. */
+ const createCallChain: (expression: Expression, questionDotToken: QuestionDotToken | undefined, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined) => CallChain;
+ /** @deprecated Use `factory.updateCallChain` or the factory supplied by your transformation context instead. */
+ const updateCallChain: (node: CallChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[]) => CallChain;
+ /** @deprecated Use `factory.createNewExpression` or the factory supplied by your transformation context instead. */
+ const createNew: (expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined) => NewExpression;
+ /** @deprecated Use `factory.updateNewExpression` or the factory supplied by your transformation context instead. */
+ const updateNew: (node: NewExpression, expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined) => NewExpression;
+ /** @deprecated Use `factory.createTypeAssertion` or the factory supplied by your transformation context instead. */
+ const createTypeAssertion: (type: TypeNode, expression: Expression) => TypeAssertion;
+ /** @deprecated Use `factory.updateTypeAssertion` or the factory supplied by your transformation context instead. */
+ const updateTypeAssertion: (node: TypeAssertion, type: TypeNode, expression: Expression) => TypeAssertion;
+ /** @deprecated Use `factory.createParenthesizedExpression` or the factory supplied by your transformation context instead. */
+ const createParen: (expression: Expression) => ParenthesizedExpression;
+ /** @deprecated Use `factory.updateParenthesizedExpression` or the factory supplied by your transformation context instead. */
+ const updateParen: (node: ParenthesizedExpression, expression: Expression) => ParenthesizedExpression;
+ /** @deprecated Use `factory.createFunctionExpression` or the factory supplied by your transformation context instead. */
+ const createFunctionExpression: (modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[] | undefined, type: TypeNode | undefined, body: Block) => FunctionExpression;
+ /** @deprecated Use `factory.updateFunctionExpression` or the factory supplied by your transformation context instead. */
+ const updateFunctionExpression: (node: FunctionExpression, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block) => FunctionExpression;
+ /** @deprecated Use `factory.createDeleteExpression` or the factory supplied by your transformation context instead. */
+ const createDelete: (expression: Expression) => DeleteExpression;
+ /** @deprecated Use `factory.updateDeleteExpression` or the factory supplied by your transformation context instead. */
+ const updateDelete: (node: DeleteExpression, expression: Expression) => DeleteExpression;
+ /** @deprecated Use `factory.createTypeOfExpression` or the factory supplied by your transformation context instead. */
+ const createTypeOf: (expression: Expression) => TypeOfExpression;
+ /** @deprecated Use `factory.updateTypeOfExpression` or the factory supplied by your transformation context instead. */
+ const updateTypeOf: (node: TypeOfExpression, expression: Expression) => TypeOfExpression;
+ /** @deprecated Use `factory.createVoidExpression` or the factory supplied by your transformation context instead. */
+ const createVoid: (expression: Expression) => VoidExpression;
+ /** @deprecated Use `factory.updateVoidExpression` or the factory supplied by your transformation context instead. */
+ const updateVoid: (node: VoidExpression, expression: Expression) => VoidExpression;
+ /** @deprecated Use `factory.createAwaitExpression` or the factory supplied by your transformation context instead. */
+ const createAwait: (expression: Expression) => AwaitExpression;
+ /** @deprecated Use `factory.updateAwaitExpression` or the factory supplied by your transformation context instead. */
+ const updateAwait: (node: AwaitExpression, expression: Expression) => AwaitExpression;
+ /** @deprecated Use `factory.createPrefixExpression` or the factory supplied by your transformation context instead. */
+ const createPrefix: (operator: PrefixUnaryOperator, operand: Expression) => PrefixUnaryExpression;
+ /** @deprecated Use `factory.updatePrefixExpression` or the factory supplied by your transformation context instead. */
+ const updatePrefix: (node: PrefixUnaryExpression, operand: Expression) => PrefixUnaryExpression;
+ /** @deprecated Use `factory.createPostfixUnaryExpression` or the factory supplied by your transformation context instead. */
+ const createPostfix: (operand: Expression, operator: PostfixUnaryOperator) => PostfixUnaryExpression;
+ /** @deprecated Use `factory.updatePostfixUnaryExpression` or the factory supplied by your transformation context instead. */
+ const updatePostfix: (node: PostfixUnaryExpression, operand: Expression) => PostfixUnaryExpression;
+ /** @deprecated Use `factory.createBinaryExpression` or the factory supplied by your transformation context instead. */
+ const createBinary: (left: Expression, operator: BinaryOperator | BinaryOperatorToken, right: Expression) => BinaryExpression;
+ /** @deprecated Use `factory.updateConditionalExpression` or the factory supplied by your transformation context instead. */
+ const updateConditional: (node: ConditionalExpression, condition: Expression, questionToken: QuestionToken, whenTrue: Expression, colonToken: ColonToken, whenFalse: Expression) => ConditionalExpression;
+ /** @deprecated Use `factory.createTemplateExpression` or the factory supplied by your transformation context instead. */
+ const createTemplateExpression: (head: TemplateHead, templateSpans: readonly TemplateSpan[]) => TemplateExpression;
+ /** @deprecated Use `factory.updateTemplateExpression` or the factory supplied by your transformation context instead. */
+ const updateTemplateExpression: (node: TemplateExpression, head: TemplateHead, templateSpans: readonly TemplateSpan[]) => TemplateExpression;
+ /** @deprecated Use `factory.createTemplateHead` or the factory supplied by your transformation context instead. */
+ const createTemplateHead: {
+ (text: string, rawText?: string | undefined, templateFlags?: TokenFlags | undefined): TemplateHead;
+ (text: string | undefined, rawText: string, templateFlags?: TokenFlags | undefined): TemplateHead;
+ };
+ /** @deprecated Use `factory.createTemplateMiddle` or the factory supplied by your transformation context instead. */
+ const createTemplateMiddle: {
+ (text: string, rawText?: string | undefined, templateFlags?: TokenFlags | undefined): TemplateMiddle;
+ (text: string | undefined, rawText: string, templateFlags?: TokenFlags | undefined): TemplateMiddle;
+ };
+ /** @deprecated Use `factory.createTemplateTail` or the factory supplied by your transformation context instead. */
+ const createTemplateTail: {
+ (text: string, rawText?: string | undefined, templateFlags?: TokenFlags | undefined): TemplateTail;
+ (text: string | undefined, rawText: string, templateFlags?: TokenFlags | undefined): TemplateTail;
+ };
+ /** @deprecated Use `factory.createNoSubstitutionTemplateLiteral` or the factory supplied by your transformation context instead. */
+ const createNoSubstitutionTemplateLiteral: {
+ (text: string, rawText?: string | undefined): NoSubstitutionTemplateLiteral;
+ (text: string | undefined, rawText: string): NoSubstitutionTemplateLiteral;
+ };
+ /** @deprecated Use `factory.updateYieldExpression` or the factory supplied by your transformation context instead. */
+ const updateYield: (node: YieldExpression, asteriskToken: AsteriskToken | undefined, expression: Expression | undefined) => YieldExpression;
+ /** @deprecated Use `factory.createSpreadExpression` or the factory supplied by your transformation context instead. */
+ const createSpread: (expression: Expression) => SpreadElement;
+ /** @deprecated Use `factory.updateSpreadExpression` or the factory supplied by your transformation context instead. */
+ const updateSpread: (node: SpreadElement, expression: Expression) => SpreadElement;
+ /** @deprecated Use `factory.createOmittedExpression` or the factory supplied by your transformation context instead. */
+ const createOmittedExpression: () => OmittedExpression;
+ /** @deprecated Use `factory.createAsExpression` or the factory supplied by your transformation context instead. */
+ const createAsExpression: (expression: Expression, type: TypeNode) => AsExpression;
+ /** @deprecated Use `factory.updateAsExpression` or the factory supplied by your transformation context instead. */
+ const updateAsExpression: (node: AsExpression, expression: Expression, type: TypeNode) => AsExpression;
+ /** @deprecated Use `factory.createNonNullExpression` or the factory supplied by your transformation context instead. */
+ const createNonNullExpression: (expression: Expression) => NonNullExpression;
+ /** @deprecated Use `factory.updateNonNullExpression` or the factory supplied by your transformation context instead. */
+ const updateNonNullExpression: (node: NonNullExpression, expression: Expression) => NonNullExpression;
+ /** @deprecated Use `factory.createNonNullChain` or the factory supplied by your transformation context instead. */
+ const createNonNullChain: (expression: Expression) => NonNullChain;
+ /** @deprecated Use `factory.updateNonNullChain` or the factory supplied by your transformation context instead. */
+ const updateNonNullChain: (node: NonNullChain, expression: Expression) => NonNullChain;
+ /** @deprecated Use `factory.createMetaProperty` or the factory supplied by your transformation context instead. */
+ const createMetaProperty: (keywordToken: SyntaxKind.ImportKeyword | SyntaxKind.NewKeyword, name: Identifier) => MetaProperty;
+ /** @deprecated Use `factory.updateMetaProperty` or the factory supplied by your transformation context instead. */
+ const updateMetaProperty: (node: MetaProperty, name: Identifier) => MetaProperty;
+ /** @deprecated Use `factory.createTemplateSpan` or the factory supplied by your transformation context instead. */
+ const createTemplateSpan: (expression: Expression, literal: TemplateMiddle | TemplateTail) => TemplateSpan;
+ /** @deprecated Use `factory.updateTemplateSpan` or the factory supplied by your transformation context instead. */
+ const updateTemplateSpan: (node: TemplateSpan, expression: Expression, literal: TemplateMiddle | TemplateTail) => TemplateSpan;
+ /** @deprecated Use `factory.createSemicolonClassElement` or the factory supplied by your transformation context instead. */
+ const createSemicolonClassElement: () => SemicolonClassElement;
+ /** @deprecated Use `factory.createBlock` or the factory supplied by your transformation context instead. */
+ const createBlock: (statements: readonly Statement[], multiLine?: boolean | undefined) => Block;
+ /** @deprecated Use `factory.updateBlock` or the factory supplied by your transformation context instead. */
+ const updateBlock: (node: Block, statements: readonly Statement[]) => Block;
+ /** @deprecated Use `factory.createVariableStatement` or the factory supplied by your transformation context instead. */
+ const createVariableStatement: (modifiers: readonly Modifier[] | undefined, declarationList: VariableDeclarationList | readonly VariableDeclaration[]) => VariableStatement;
+ /** @deprecated Use `factory.updateVariableStatement` or the factory supplied by your transformation context instead. */
+ const updateVariableStatement: (node: VariableStatement, modifiers: readonly Modifier[] | undefined, declarationList: VariableDeclarationList) => VariableStatement;
+ /** @deprecated Use `factory.createEmptyStatement` or the factory supplied by your transformation context instead. */
+ const createEmptyStatement: () => EmptyStatement;
+ /** @deprecated Use `factory.createExpressionStatement` or the factory supplied by your transformation context instead. */
+ const createExpressionStatement: (expression: Expression) => ExpressionStatement;
+ /** @deprecated Use `factory.updateExpressionStatement` or the factory supplied by your transformation context instead. */
+ const updateExpressionStatement: (node: ExpressionStatement, expression: Expression) => ExpressionStatement;
+ /** @deprecated Use `factory.createExpressionStatement` or the factory supplied by your transformation context instead. */
+ const createStatement: (expression: Expression) => ExpressionStatement;
+ /** @deprecated Use `factory.updateExpressionStatement` or the factory supplied by your transformation context instead. */
+ const updateStatement: (node: ExpressionStatement, expression: Expression) => ExpressionStatement;
+ /** @deprecated Use `factory.createIfStatement` or the factory supplied by your transformation context instead. */
+ const createIf: (expression: Expression, thenStatement: Statement, elseStatement?: Statement | undefined) => IfStatement;
+ /** @deprecated Use `factory.updateIfStatement` or the factory supplied by your transformation context instead. */
+ const updateIf: (node: IfStatement, expression: Expression, thenStatement: Statement, elseStatement: Statement | undefined) => IfStatement;
+ /** @deprecated Use `factory.createDoStatement` or the factory supplied by your transformation context instead. */
+ const createDo: (statement: Statement, expression: Expression) => DoStatement;
+ /** @deprecated Use `factory.updateDoStatement` or the factory supplied by your transformation context instead. */
+ const updateDo: (node: DoStatement, statement: Statement, expression: Expression) => DoStatement;
+ /** @deprecated Use `factory.createWhileStatement` or the factory supplied by your transformation context instead. */
+ const createWhile: (expression: Expression, statement: Statement) => WhileStatement;
+ /** @deprecated Use `factory.updateWhileStatement` or the factory supplied by your transformation context instead. */
+ const updateWhile: (node: WhileStatement, expression: Expression, statement: Statement) => WhileStatement;
+ /** @deprecated Use `factory.createForStatement` or the factory supplied by your transformation context instead. */
+ const createFor: (initializer: ForInitializer | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement) => ForStatement;
+ /** @deprecated Use `factory.updateForStatement` or the factory supplied by your transformation context instead. */
+ const updateFor: (node: ForStatement, initializer: ForInitializer | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement) => ForStatement;
+ /** @deprecated Use `factory.createForInStatement` or the factory supplied by your transformation context instead. */
+ const createForIn: (initializer: ForInitializer, expression: Expression, statement: Statement) => ForInStatement;
+ /** @deprecated Use `factory.updateForInStatement` or the factory supplied by your transformation context instead. */
+ const updateForIn: (node: ForInStatement, initializer: ForInitializer, expression: Expression, statement: Statement) => ForInStatement;
+ /** @deprecated Use `factory.createForOfStatement` or the factory supplied by your transformation context instead. */
+ const createForOf: (awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, expression: Expression, statement: Statement) => ForOfStatement;
+ /** @deprecated Use `factory.updateForOfStatement` or the factory supplied by your transformation context instead. */
+ const updateForOf: (node: ForOfStatement, awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, expression: Expression, statement: Statement) => ForOfStatement;
+ /** @deprecated Use `factory.createContinueStatement` or the factory supplied by your transformation context instead. */
+ const createContinue: (label?: string | Identifier | undefined) => ContinueStatement;
+ /** @deprecated Use `factory.updateContinueStatement` or the factory supplied by your transformation context instead. */
+ const updateContinue: (node: ContinueStatement, label: Identifier | undefined) => ContinueStatement;
+ /** @deprecated Use `factory.createBreakStatement` or the factory supplied by your transformation context instead. */
+ const createBreak: (label?: string | Identifier | undefined) => BreakStatement;
+ /** @deprecated Use `factory.updateBreakStatement` or the factory supplied by your transformation context instead. */
+ const updateBreak: (node: BreakStatement, label: Identifier | undefined) => BreakStatement;
+ /** @deprecated Use `factory.createReturnStatement` or the factory supplied by your transformation context instead. */
+ const createReturn: (expression?: Expression | undefined) => ReturnStatement;
+ /** @deprecated Use `factory.updateReturnStatement` or the factory supplied by your transformation context instead. */
+ const updateReturn: (node: ReturnStatement, expression: Expression | undefined) => ReturnStatement;
+ /** @deprecated Use `factory.createWithStatement` or the factory supplied by your transformation context instead. */
+ const createWith: (expression: Expression, statement: Statement) => WithStatement;
+ /** @deprecated Use `factory.updateWithStatement` or the factory supplied by your transformation context instead. */
+ const updateWith: (node: WithStatement, expression: Expression, statement: Statement) => WithStatement;
+ /** @deprecated Use `factory.createSwitchStatement` or the factory supplied by your transformation context instead. */
+ const createSwitch: (expression: Expression, caseBlock: CaseBlock) => SwitchStatement;
+ /** @deprecated Use `factory.updateSwitchStatement` or the factory supplied by your transformation context instead. */
+ const updateSwitch: (node: SwitchStatement, expression: Expression, caseBlock: CaseBlock) => SwitchStatement;
+ /** @deprecated Use `factory.createLabelStatement` or the factory supplied by your transformation context instead. */
+ const createLabel: (label: string | Identifier, statement: Statement) => LabeledStatement;
+ /** @deprecated Use `factory.updateLabelStatement` or the factory supplied by your transformation context instead. */
+ const updateLabel: (node: LabeledStatement, label: Identifier, statement: Statement) => LabeledStatement;
+ /** @deprecated Use `factory.createThrowStatement` or the factory supplied by your transformation context instead. */
+ const createThrow: (expression: Expression) => ThrowStatement;
+ /** @deprecated Use `factory.updateThrowStatement` or the factory supplied by your transformation context instead. */
+ const updateThrow: (node: ThrowStatement, expression: Expression) => ThrowStatement;
+ /** @deprecated Use `factory.createTryStatement` or the factory supplied by your transformation context instead. */
+ const createTry: (tryBlock: Block, catchClause: CatchClause | undefined, finallyBlock: Block | undefined) => TryStatement;
+ /** @deprecated Use `factory.updateTryStatement` or the factory supplied by your transformation context instead. */
+ const updateTry: (node: TryStatement, tryBlock: Block, catchClause: CatchClause | undefined, finallyBlock: Block | undefined) => TryStatement;
+ /** @deprecated Use `factory.createDebuggerStatement` or the factory supplied by your transformation context instead. */
+ const createDebuggerStatement: () => DebuggerStatement;
+ /** @deprecated Use `factory.createVariableDeclarationList` or the factory supplied by your transformation context instead. */
+ const createVariableDeclarationList: (declarations: readonly VariableDeclaration[], flags?: NodeFlags | undefined) => VariableDeclarationList;
+ /** @deprecated Use `factory.updateVariableDeclarationList` or the factory supplied by your transformation context instead. */
+ const updateVariableDeclarationList: (node: VariableDeclarationList, declarations: readonly VariableDeclaration[]) => VariableDeclarationList;
+ /** @deprecated Use `factory.createFunctionDeclaration` or the factory supplied by your transformation context instead. */
+ const createFunctionDeclaration: {
+ (modifiers: readonly ModifierLike[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): FunctionDeclaration;
+ (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): FunctionDeclaration;
+ };
+ /** @deprecated Use `factory.updateFunctionDeclaration` or the factory supplied by your transformation context instead. */
+ const updateFunctionDeclaration: {
+ (node: FunctionDeclaration, modifiers: readonly ModifierLike[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): FunctionDeclaration;
+ (node: FunctionDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): FunctionDeclaration;
+ };
+ /** @deprecated Use `factory.createClassDeclaration` or the factory supplied by your transformation context instead. */
+ const createClassDeclaration: {
+ (modifiers: readonly ModifierLike[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration;
+ (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration;
+ };
+ /** @deprecated Use `factory.updateClassDeclaration` or the factory supplied by your transformation context instead. */
+ const updateClassDeclaration: {
+ (node: ClassDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration;
+ (node: ClassDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration;
+ };
+ /** @deprecated Use `factory.createInterfaceDeclaration` or the factory supplied by your transformation context instead. */
+ const createInterfaceDeclaration: {
+ (modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration;
+ (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration;
+ };
+ /** @deprecated Use `factory.updateInterfaceDeclaration` or the factory supplied by your transformation context instead. */
+ const updateInterfaceDeclaration: {
+ (node: InterfaceDeclaration, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration;
+ (node: InterfaceDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration;
+ };
+ /** @deprecated Use `factory.createTypeAliasDeclaration` or the factory supplied by your transformation context instead. */
+ const createTypeAliasDeclaration: {
+ (modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration;
+ (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration;
+ };
+ /** @deprecated Use `factory.updateTypeAliasDeclaration` or the factory supplied by your transformation context instead. */
+ const updateTypeAliasDeclaration: {
+ (node: TypeAliasDeclaration, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration;
+ (node: TypeAliasDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration;
+ };
+ /** @deprecated Use `factory.createEnumDeclaration` or the factory supplied by your transformation context instead. */
+ const createEnumDeclaration: {
+ (modifiers: readonly Modifier[] | undefined, name: string | Identifier, members: readonly EnumMember[]): EnumDeclaration;
+ (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, members: readonly EnumMember[]): EnumDeclaration;
+ };
+ /** @deprecated Use `factory.updateEnumDeclaration` or the factory supplied by your transformation context instead. */
+ const updateEnumDeclaration: {
+ (node: EnumDeclaration, modifiers: readonly Modifier[] | undefined, name: Identifier, members: readonly EnumMember[]): EnumDeclaration;
+ (node: EnumDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, members: readonly EnumMember[]): EnumDeclaration;
+ };
+ /** @deprecated Use `factory.createModuleDeclaration` or the factory supplied by your transformation context instead. */
+ const createModuleDeclaration: {
+ (modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined, flags?: NodeFlags | undefined): ModuleDeclaration;
+ (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined, flags?: NodeFlags | undefined): ModuleDeclaration;
+ };
+ /** @deprecated Use `factory.updateModuleDeclaration` or the factory supplied by your transformation context instead. */
+ const updateModuleDeclaration: {
+ (node: ModuleDeclaration, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined): ModuleDeclaration;
+ (node: ModuleDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined): ModuleDeclaration;
+ };
+ /** @deprecated Use `factory.createModuleBlock` or the factory supplied by your transformation context instead. */
+ const createModuleBlock: (statements: readonly Statement[]) => ModuleBlock;
+ /** @deprecated Use `factory.updateModuleBlock` or the factory supplied by your transformation context instead. */
+ const updateModuleBlock: (node: ModuleBlock, statements: readonly Statement[]) => ModuleBlock;
+ /** @deprecated Use `factory.createCaseBlock` or the factory supplied by your transformation context instead. */
+ const createCaseBlock: (clauses: readonly CaseOrDefaultClause[]) => CaseBlock;
+ /** @deprecated Use `factory.updateCaseBlock` or the factory supplied by your transformation context instead. */
+ const updateCaseBlock: (node: CaseBlock, clauses: readonly CaseOrDefaultClause[]) => CaseBlock;
+ /** @deprecated Use `factory.createNamespaceExportDeclaration` or the factory supplied by your transformation context instead. */
+ const createNamespaceExportDeclaration: (name: string | Identifier) => NamespaceExportDeclaration;
+ /** @deprecated Use `factory.updateNamespaceExportDeclaration` or the factory supplied by your transformation context instead. */
+ const updateNamespaceExportDeclaration: (node: NamespaceExportDeclaration, name: Identifier) => NamespaceExportDeclaration;
+ /** @deprecated Use `factory.createImportEqualsDeclaration` or the factory supplied by your transformation context instead. */
+ const createImportEqualsDeclaration: {
+ (modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, name: string | Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration;
+ (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, name: string | Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration;
+ };
+ /** @deprecated Use `factory.updateImportEqualsDeclaration` or the factory supplied by your transformation context instead. */
+ const updateImportEqualsDeclaration: {
+ (node: ImportEqualsDeclaration, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, name: Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration;
+ (node: ImportEqualsDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, name: Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration;
+ };
+ /** @deprecated Use `factory.createImportDeclaration` or the factory supplied by your transformation context instead. */
+ const createImportDeclaration: {
+ (modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause?: AssertClause | undefined): ImportDeclaration;
+ (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause?: AssertClause | undefined): ImportDeclaration;
+ };
+ /** @deprecated Use `factory.updateImportDeclaration` or the factory supplied by your transformation context instead. */
+ const updateImportDeclaration: {
+ (node: ImportDeclaration, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause: AssertClause | undefined): ImportDeclaration;
+ (node: ImportDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause: AssertClause | undefined): ImportDeclaration;
+ };
+ /** @deprecated Use `factory.createNamespaceImport` or the factory supplied by your transformation context instead. */
+ const createNamespaceImport: (name: Identifier) => NamespaceImport;
+ /** @deprecated Use `factory.updateNamespaceImport` or the factory supplied by your transformation context instead. */
+ const updateNamespaceImport: (node: NamespaceImport, name: Identifier) => NamespaceImport;
+ /** @deprecated Use `factory.createNamedImports` or the factory supplied by your transformation context instead. */
+ const createNamedImports: (elements: readonly ImportSpecifier[]) => NamedImports;
+ /** @deprecated Use `factory.updateNamedImports` or the factory supplied by your transformation context instead. */
+ const updateNamedImports: (node: NamedImports, elements: readonly ImportSpecifier[]) => NamedImports;
+ /** @deprecated Use `factory.createImportSpecifier` or the factory supplied by your transformation context instead. */
+ const createImportSpecifier: (isTypeOnly: boolean, propertyName: Identifier | undefined, name: Identifier) => ImportSpecifier;
+ /** @deprecated Use `factory.updateImportSpecifier` or the factory supplied by your transformation context instead. */
+ const updateImportSpecifier: (node: ImportSpecifier, isTypeOnly: boolean, propertyName: Identifier | undefined, name: Identifier) => ImportSpecifier;
+ /** @deprecated Use `factory.createExportAssignment` or the factory supplied by your transformation context instead. */
+ const createExportAssignment: {
+ (modifiers: readonly Modifier[] | undefined, isExportEquals: boolean | undefined, expression: Expression): ExportAssignment;
+ (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isExportEquals: boolean | undefined, expression: Expression): ExportAssignment;
+ };
+ /** @deprecated Use `factory.updateExportAssignment` or the factory supplied by your transformation context instead. */
+ const updateExportAssignment: {
+ (node: ExportAssignment, modifiers: readonly Modifier[] | undefined, expression: Expression): ExportAssignment;
+ (node: ExportAssignment, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, expression: Expression): ExportAssignment;
+ };
+ /** @deprecated Use `factory.createNamedExports` or the factory supplied by your transformation context instead. */
+ const createNamedExports: (elements: readonly ExportSpecifier[]) => NamedExports;
+ /** @deprecated Use `factory.updateNamedExports` or the factory supplied by your transformation context instead. */
+ const updateNamedExports: (node: NamedExports, elements: readonly ExportSpecifier[]) => NamedExports;
+ /** @deprecated Use `factory.createExportSpecifier` or the factory supplied by your transformation context instead. */
+ const createExportSpecifier: (isTypeOnly: boolean, propertyName: string | Identifier | undefined, name: string | Identifier) => ExportSpecifier;
+ /** @deprecated Use `factory.updateExportSpecifier` or the factory supplied by your transformation context instead. */
+ const updateExportSpecifier: (node: ExportSpecifier, isTypeOnly: boolean, propertyName: Identifier | undefined, name: Identifier) => ExportSpecifier;
+ /** @deprecated Use `factory.createExternalModuleReference` or the factory supplied by your transformation context instead. */
+ const createExternalModuleReference: (expression: Expression) => ExternalModuleReference;
+ /** @deprecated Use `factory.updateExternalModuleReference` or the factory supplied by your transformation context instead. */
+ const updateExternalModuleReference: (node: ExternalModuleReference, expression: Expression) => ExternalModuleReference;
+ /** @deprecated Use `factory.createJSDocTypeExpression` or the factory supplied by your transformation context instead. */
+ const createJSDocTypeExpression: (type: TypeNode) => JSDocTypeExpression;
+ /** @deprecated Use `factory.createJSDocTypeTag` or the factory supplied by your transformation context instead. */
+ const createJSDocTypeTag: (tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocTypeTag;
+ /** @deprecated Use `factory.createJSDocReturnTag` or the factory supplied by your transformation context instead. */
+ const createJSDocReturnTag: (tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocReturnTag;
+ /** @deprecated Use `factory.createJSDocThisTag` or the factory supplied by your transformation context instead. */
+ const createJSDocThisTag: (tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocThisTag;
+ /** @deprecated Use `factory.createJSDocComment` or the factory supplied by your transformation context instead. */
+ const createJSDocComment: (comment?: string | NodeArray<JSDocComment> | undefined, tags?: readonly JSDocTag[] | undefined) => JSDoc;
+ /** @deprecated Use `factory.createJSDocParameterTag` or the factory supplied by your transformation context instead. */
+ const createJSDocParameterTag: (tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression | undefined, isNameFirst?: boolean | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocParameterTag;
+ /** @deprecated Use `factory.createJSDocClassTag` or the factory supplied by your transformation context instead. */
+ const createJSDocClassTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocClassTag;
+ /** @deprecated Use `factory.createJSDocAugmentsTag` or the factory supplied by your transformation context instead. */
+ const createJSDocAugmentsTag: (tagName: Identifier | undefined, className: ExpressionWithTypeArguments & {
+ readonly expression: Identifier | PropertyAccessEntityNameExpression;
+ }, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocAugmentsTag;
+ /** @deprecated Use `factory.createJSDocEnumTag` or the factory supplied by your transformation context instead. */
+ const createJSDocEnumTag: (tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocEnumTag;
+ /** @deprecated Use `factory.createJSDocTemplateTag` or the factory supplied by your transformation context instead. */
+ const createJSDocTemplateTag: (tagName: Identifier | undefined, constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment?: string | NodeArray<JSDocComment> | undefined) => JSDocTemplateTag;
+ /** @deprecated Use `factory.createJSDocTypedefTag` or the factory supplied by your transformation context instead. */
+ const createJSDocTypedefTag: (tagName: Identifier | undefined, typeExpression?: JSDocTypeLiteral | JSDocTypeExpression | undefined, fullName?: Identifier | JSDocNamespaceDeclaration | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocTypedefTag;
+ /** @deprecated Use `factory.createJSDocCallbackTag` or the factory supplied by your transformation context instead. */
+ const createJSDocCallbackTag: (tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName?: Identifier | JSDocNamespaceDeclaration | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocCallbackTag;
+ /** @deprecated Use `factory.createJSDocSignature` or the factory supplied by your transformation context instead. */
+ const createJSDocSignature: (typeParameters: readonly JSDocTemplateTag[] | undefined, parameters: readonly JSDocParameterTag[], type?: JSDocReturnTag | undefined) => JSDocSignature;
+ /** @deprecated Use `factory.createJSDocPropertyTag` or the factory supplied by your transformation context instead. */
+ const createJSDocPropertyTag: (tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression | undefined, isNameFirst?: boolean | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocPropertyTag;
+ /** @deprecated Use `factory.createJSDocTypeLiteral` or the factory supplied by your transformation context instead. */
+ const createJSDocTypeLiteral: (jsDocPropertyTags?: readonly JSDocPropertyLikeTag[] | undefined, isArrayType?: boolean | undefined) => JSDocTypeLiteral;
+ /** @deprecated Use `factory.createJSDocImplementsTag` or the factory supplied by your transformation context instead. */
+ const createJSDocImplementsTag: (tagName: Identifier | undefined, className: ExpressionWithTypeArguments & {
+ readonly expression: Identifier | PropertyAccessEntityNameExpression;
+ }, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocImplementsTag;
+ /** @deprecated Use `factory.createJSDocAuthorTag` or the factory supplied by your transformation context instead. */
+ const createJSDocAuthorTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocAuthorTag;
+ /** @deprecated Use `factory.createJSDocPublicTag` or the factory supplied by your transformation context instead. */
+ const createJSDocPublicTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocPublicTag;
+ /** @deprecated Use `factory.createJSDocPrivateTag` or the factory supplied by your transformation context instead. */
+ const createJSDocPrivateTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocPrivateTag;
+ /** @deprecated Use `factory.createJSDocProtectedTag` or the factory supplied by your transformation context instead. */
+ const createJSDocProtectedTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocProtectedTag;
+ /** @deprecated Use `factory.createJSDocReadonlyTag` or the factory supplied by your transformation context instead. */
+ const createJSDocReadonlyTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocReadonlyTag;
+ /** @deprecated Use `factory.createJSDocUnknownTag` or the factory supplied by your transformation context instead. */
+ const createJSDocTag: (tagName: Identifier, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocUnknownTag;
+ /** @deprecated Use `factory.createJsxElement` or the factory supplied by your transformation context instead. */
+ const createJsxElement: (openingElement: JsxOpeningElement, children: readonly JsxChild[], closingElement: JsxClosingElement) => JsxElement;
+ /** @deprecated Use `factory.updateJsxElement` or the factory supplied by your transformation context instead. */
+ const updateJsxElement: (node: JsxElement, openingElement: JsxOpeningElement, children: readonly JsxChild[], closingElement: JsxClosingElement) => JsxElement;
+ /** @deprecated Use `factory.createJsxSelfClosingElement` or the factory supplied by your transformation context instead. */
+ const createJsxSelfClosingElement: (tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes) => JsxSelfClosingElement;
+ /** @deprecated Use `factory.updateJsxSelfClosingElement` or the factory supplied by your transformation context instead. */
+ const updateJsxSelfClosingElement: (node: JsxSelfClosingElement, tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes) => JsxSelfClosingElement;
+ /** @deprecated Use `factory.createJsxOpeningElement` or the factory supplied by your transformation context instead. */
+ const createJsxOpeningElement: (tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes) => JsxOpeningElement;
+ /** @deprecated Use `factory.updateJsxOpeningElement` or the factory supplied by your transformation context instead. */
+ const updateJsxOpeningElement: (node: JsxOpeningElement, tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes) => JsxOpeningElement;
+ /** @deprecated Use `factory.createJsxClosingElement` or the factory supplied by your transformation context instead. */
+ const createJsxClosingElement: (tagName: JsxTagNameExpression) => JsxClosingElement;
+ /** @deprecated Use `factory.updateJsxClosingElement` or the factory supplied by your transformation context instead. */
+ const updateJsxClosingElement: (node: JsxClosingElement, tagName: JsxTagNameExpression) => JsxClosingElement;
+ /** @deprecated Use `factory.createJsxFragment` or the factory supplied by your transformation context instead. */
+ const createJsxFragment: (openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment) => JsxFragment;
+ /** @deprecated Use `factory.createJsxText` or the factory supplied by your transformation context instead. */
+ const createJsxText: (text: string, containsOnlyTriviaWhiteSpaces?: boolean | undefined) => JsxText;
+ /** @deprecated Use `factory.updateJsxText` or the factory supplied by your transformation context instead. */
+ const updateJsxText: (node: JsxText, text: string, containsOnlyTriviaWhiteSpaces?: boolean | undefined) => JsxText;
+ /** @deprecated Use `factory.createJsxOpeningFragment` or the factory supplied by your transformation context instead. */
+ const createJsxOpeningFragment: () => JsxOpeningFragment;
+ /** @deprecated Use `factory.createJsxJsxClosingFragment` or the factory supplied by your transformation context instead. */
+ const createJsxJsxClosingFragment: () => JsxClosingFragment;
+ /** @deprecated Use `factory.updateJsxFragment` or the factory supplied by your transformation context instead. */
+ const updateJsxFragment: (node: JsxFragment, openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment) => JsxFragment;
+ /** @deprecated Use `factory.createJsxAttribute` or the factory supplied by your transformation context instead. */
+ const createJsxAttribute: (name: Identifier, initializer: JsxAttributeValue | undefined) => JsxAttribute;
+ /** @deprecated Use `factory.updateJsxAttribute` or the factory supplied by your transformation context instead. */
+ const updateJsxAttribute: (node: JsxAttribute, name: Identifier, initializer: JsxAttributeValue | undefined) => JsxAttribute;
+ /** @deprecated Use `factory.createJsxAttributes` or the factory supplied by your transformation context instead. */
+ const createJsxAttributes: (properties: readonly JsxAttributeLike[]) => JsxAttributes;
+ /** @deprecated Use `factory.updateJsxAttributes` or the factory supplied by your transformation context instead. */
+ const updateJsxAttributes: (node: JsxAttributes, properties: readonly JsxAttributeLike[]) => JsxAttributes;
+ /** @deprecated Use `factory.createJsxSpreadAttribute` or the factory supplied by your transformation context instead. */
+ const createJsxSpreadAttribute: (expression: Expression) => JsxSpreadAttribute;
+ /** @deprecated Use `factory.updateJsxSpreadAttribute` or the factory supplied by your transformation context instead. */
+ const updateJsxSpreadAttribute: (node: JsxSpreadAttribute, expression: Expression) => JsxSpreadAttribute;
+ /** @deprecated Use `factory.createJsxExpression` or the factory supplied by your transformation context instead. */
+ const createJsxExpression: (dotDotDotToken: DotDotDotToken | undefined, expression: Expression | undefined) => JsxExpression;
+ /** @deprecated Use `factory.updateJsxExpression` or the factory supplied by your transformation context instead. */
+ const updateJsxExpression: (node: JsxExpression, expression: Expression | undefined) => JsxExpression;
+ /** @deprecated Use `factory.createCaseClause` or the factory supplied by your transformation context instead. */
+ const createCaseClause: (expression: Expression, statements: readonly Statement[]) => CaseClause;
+ /** @deprecated Use `factory.updateCaseClause` or the factory supplied by your transformation context instead. */
+ const updateCaseClause: (node: CaseClause, expression: Expression, statements: readonly Statement[]) => CaseClause;
+ /** @deprecated Use `factory.createDefaultClause` or the factory supplied by your transformation context instead. */
+ const createDefaultClause: (statements: readonly Statement[]) => DefaultClause;
+ /** @deprecated Use `factory.updateDefaultClause` or the factory supplied by your transformation context instead. */
+ const updateDefaultClause: (node: DefaultClause, statements: readonly Statement[]) => DefaultClause;
+ /** @deprecated Use `factory.createHeritageClause` or the factory supplied by your transformation context instead. */
+ const createHeritageClause: (token: SyntaxKind.ExtendsKeyword | SyntaxKind.ImplementsKeyword, types: readonly ExpressionWithTypeArguments[]) => HeritageClause;
+ /** @deprecated Use `factory.updateHeritageClause` or the factory supplied by your transformation context instead. */
+ const updateHeritageClause: (node: HeritageClause, types: readonly ExpressionWithTypeArguments[]) => HeritageClause;
+ /** @deprecated Use `factory.createCatchClause` or the factory supplied by your transformation context instead. */
+ const createCatchClause: (variableDeclaration: string | VariableDeclaration | BindingName | undefined, block: Block) => CatchClause;
+ /** @deprecated Use `factory.updateCatchClause` or the factory supplied by your transformation context instead. */
+ const updateCatchClause: (node: CatchClause, variableDeclaration: VariableDeclaration | undefined, block: Block) => CatchClause;
+ /** @deprecated Use `factory.createPropertyAssignment` or the factory supplied by your transformation context instead. */
+ const createPropertyAssignment: (name: string | PropertyName, initializer: Expression) => PropertyAssignment;
+ /** @deprecated Use `factory.updatePropertyAssignment` or the factory supplied by your transformation context instead. */
+ const updatePropertyAssignment: (node: PropertyAssignment, name: PropertyName, initializer: Expression) => PropertyAssignment;
+ /** @deprecated Use `factory.createShorthandPropertyAssignment` or the factory supplied by your transformation context instead. */
+ const createShorthandPropertyAssignment: (name: string | Identifier, objectAssignmentInitializer?: Expression | undefined) => ShorthandPropertyAssignment;
+ /** @deprecated Use `factory.updateShorthandPropertyAssignment` or the factory supplied by your transformation context instead. */
+ const updateShorthandPropertyAssignment: (node: ShorthandPropertyAssignment, name: Identifier, objectAssignmentInitializer: Expression | undefined) => ShorthandPropertyAssignment;
+ /** @deprecated Use `factory.createSpreadAssignment` or the factory supplied by your transformation context instead. */
+ const createSpreadAssignment: (expression: Expression) => SpreadAssignment;
+ /** @deprecated Use `factory.updateSpreadAssignment` or the factory supplied by your transformation context instead. */
+ const updateSpreadAssignment: (node: SpreadAssignment, expression: Expression) => SpreadAssignment;
+ /** @deprecated Use `factory.createEnumMember` or the factory supplied by your transformation context instead. */
+ const createEnumMember: (name: string | PropertyName, initializer?: Expression | undefined) => EnumMember;
+ /** @deprecated Use `factory.updateEnumMember` or the factory supplied by your transformation context instead. */
+ const updateEnumMember: (node: EnumMember, name: PropertyName, initializer: Expression | undefined) => EnumMember;
+ /** @deprecated Use `factory.updateSourceFile` or the factory supplied by your transformation context instead. */
+ const updateSourceFileNode: (node: SourceFile, statements: readonly Statement[], isDeclarationFile?: boolean | undefined, referencedFiles?: readonly FileReference[] | undefined, typeReferences?: readonly FileReference[] | undefined, hasNoDefaultLib?: boolean | undefined, libReferences?: readonly FileReference[] | undefined) => SourceFile;
+ /** @deprecated Use `factory.createNotEmittedStatement` or the factory supplied by your transformation context instead. */
+ const createNotEmittedStatement: (original: Node) => NotEmittedStatement;
+ /** @deprecated Use `factory.createPartiallyEmittedExpression` or the factory supplied by your transformation context instead. */
+ const createPartiallyEmittedExpression: (expression: Expression, original?: Node | undefined) => PartiallyEmittedExpression;
+ /** @deprecated Use `factory.updatePartiallyEmittedExpression` or the factory supplied by your transformation context instead. */
+ const updatePartiallyEmittedExpression: (node: PartiallyEmittedExpression, expression: Expression) => PartiallyEmittedExpression;
+ /** @deprecated Use `factory.createCommaListExpression` or the factory supplied by your transformation context instead. */
+ const createCommaList: (elements: readonly Expression[]) => CommaListExpression;
+ /** @deprecated Use `factory.updateCommaListExpression` or the factory supplied by your transformation context instead. */
+ const updateCommaList: (node: CommaListExpression, elements: readonly Expression[]) => CommaListExpression;
+ /** @deprecated Use `factory.createBundle` or the factory supplied by your transformation context instead. */
+ const createBundle: (sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[] | undefined) => Bundle;
+ /** @deprecated Use `factory.updateBundle` or the factory supplied by your transformation context instead. */
+ const updateBundle: (node: Bundle, sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[] | undefined) => Bundle;
+ /** @deprecated Use `factory.createImmediatelyInvokedFunctionExpression` or the factory supplied by your transformation context instead. */
+ const createImmediatelyInvokedFunctionExpression: {
+ (statements: readonly Statement[]): CallExpression;
+ (statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression;
+ };
+ /** @deprecated Use `factory.createImmediatelyInvokedArrowFunction` or the factory supplied by your transformation context instead. */
+ const createImmediatelyInvokedArrowFunction: {
+ (statements: readonly Statement[]): CallExpression;
+ (statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression;
+ };
+ /** @deprecated Use `factory.createVoidZero` or the factory supplied by your transformation context instead. */
+ const createVoidZero: () => VoidExpression;
+ /** @deprecated Use `factory.createExportDefault` or the factory supplied by your transformation context instead. */
+ const createExportDefault: (expression: Expression) => ExportAssignment;
+ /** @deprecated Use `factory.createExternalModuleExport` or the factory supplied by your transformation context instead. */
+ const createExternalModuleExport: (exportName: Identifier) => ExportDeclaration;
+ /** @deprecated Use `factory.createNamespaceExport` or the factory supplied by your transformation context instead. */
+ const createNamespaceExport: (name: Identifier) => NamespaceExport;
+ /** @deprecated Use `factory.updateNamespaceExport` or the factory supplied by your transformation context instead. */
+ const updateNamespaceExport: (node: NamespaceExport, name: Identifier) => NamespaceExport;
+ /** @deprecated Use `factory.createToken` or the factory supplied by your transformation context instead. */
+ const createToken: <TKind extends SyntaxKind>(kind: TKind) => Token<TKind>;
+ /** @deprecated Use `factory.createIdentifier` or the factory supplied by your transformation context instead. */
+ const createIdentifier: (text: string) => Identifier;
+ /** @deprecated Use `factory.createTempVariable` or the factory supplied by your transformation context instead. */
+ const createTempVariable: (recordTempVariable: ((node: Identifier) => void) | undefined) => Identifier;
+ /** @deprecated Use `factory.getGeneratedNameForNode` or the factory supplied by your transformation context instead. */
+ const getGeneratedNameForNode: (node: Node | undefined) => Identifier;
+ /** @deprecated Use `factory.createUniqueName(text, GeneratedIdentifierFlags.Optimistic)` or the factory supplied by your transformation context instead. */
+ const createOptimisticUniqueName: (text: string) => Identifier;
+ /** @deprecated Use `factory.createUniqueName(text, GeneratedIdentifierFlags.Optimistic | GeneratedIdentifierFlags.FileLevel)` or the factory supplied by your transformation context instead. */
+ const createFileLevelUniqueName: (text: string) => Identifier;
+ /** @deprecated Use `factory.createIndexSignature` or the factory supplied by your transformation context instead. */
+ const createIndexSignature: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode) => IndexSignatureDeclaration;
+ /** @deprecated Use `factory.createTypePredicateNode` or the factory supplied by your transformation context instead. */
+ const createTypePredicateNode: (parameterName: Identifier | ThisTypeNode | string, type: TypeNode) => TypePredicateNode;
+ /** @deprecated Use `factory.updateTypePredicateNode` or the factory supplied by your transformation context instead. */
+ const updateTypePredicateNode: (node: TypePredicateNode, parameterName: Identifier | ThisTypeNode, type: TypeNode) => TypePredicateNode;
+ /** @deprecated Use `factory.createStringLiteral`, `factory.createStringLiteralFromNode`, `factory.createNumericLiteral`, `factory.createBigIntLiteral`, `factory.createTrue`, `factory.createFalse`, or the factory supplied by your transformation context instead. */
+ const createLiteral: {
+ (value: string | StringLiteral | NoSubstitutionTemplateLiteral | NumericLiteral | Identifier): StringLiteral;
+ (value: number | PseudoBigInt): NumericLiteral;
+ (value: boolean): BooleanLiteral;
+ (value: string | number | PseudoBigInt | boolean): PrimaryExpression;
+ };
+ /** @deprecated Use `factory.createMethodSignature` or the factory supplied by your transformation context instead. */
+ const createMethodSignature: (typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined) => MethodSignature;
+ /** @deprecated Use `factory.updateMethodSignature` or the factory supplied by your transformation context instead. */
+ const updateMethodSignature: (node: MethodSignature, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined, name: PropertyName, questionToken: QuestionToken | undefined) => MethodSignature;
+ /** @deprecated Use `factory.createTypeOperatorNode` or the factory supplied by your transformation context instead. */
+ const createTypeOperatorNode: {
+ (type: TypeNode): TypeOperatorNode;
+ (operator: SyntaxKind.KeyOfKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.ReadonlyKeyword, type: TypeNode): TypeOperatorNode;
+ };
+ /** @deprecated Use `factory.createTaggedTemplate` or the factory supplied by your transformation context instead. */
+ const createTaggedTemplate: {
+ (tag: Expression, template: TemplateLiteral): TaggedTemplateExpression;
+ (tag: Expression, typeArguments: readonly TypeNode[] | undefined, template: TemplateLiteral): TaggedTemplateExpression;
+ };
+ /** @deprecated Use `factory.updateTaggedTemplate` or the factory supplied by your transformation context instead. */
+ const updateTaggedTemplate: {
+ (node: TaggedTemplateExpression, tag: Expression, template: TemplateLiteral): TaggedTemplateExpression;
+ (node: TaggedTemplateExpression, tag: Expression, typeArguments: readonly TypeNode[] | undefined, template: TemplateLiteral): TaggedTemplateExpression;
+ };
+ /** @deprecated Use `factory.updateBinary` or the factory supplied by your transformation context instead. */
+ const updateBinary: (node: BinaryExpression, left: Expression, right: Expression, operator?: BinaryOperator | BinaryOperatorToken) => BinaryExpression;
+ /** @deprecated Use `factory.createConditional` or the factory supplied by your transformation context instead. */
+ const createConditional: {
+ (condition: Expression, whenTrue: Expression, whenFalse: Expression): ConditionalExpression;
+ (condition: Expression, questionToken: QuestionToken, whenTrue: Expression, colonToken: ColonToken, whenFalse: Expression): ConditionalExpression;
+ };
+ /** @deprecated Use `factory.createYield` or the factory supplied by your transformation context instead. */
+ const createYield: {
+ (expression?: Expression | undefined): YieldExpression;
+ (asteriskToken: AsteriskToken | undefined, expression: Expression): YieldExpression;
+ };
+ /** @deprecated Use `factory.createClassExpression` or the factory supplied by your transformation context instead. */
+ const createClassExpression: (modifiers: readonly Modifier[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]) => ClassExpression;
+ /** @deprecated Use `factory.updateClassExpression` or the factory supplied by your transformation context instead. */
+ const updateClassExpression: (node: ClassExpression, modifiers: readonly Modifier[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]) => ClassExpression;
+ /** @deprecated Use `factory.createPropertySignature` or the factory supplied by your transformation context instead. */
+ const createPropertySignature: (modifiers: readonly Modifier[] | undefined, name: PropertyName | string, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer?: Expression | undefined) => PropertySignature;
+ /** @deprecated Use `factory.updatePropertySignature` or the factory supplied by your transformation context instead. */
+ const updatePropertySignature: (node: PropertySignature, modifiers: readonly Modifier[] | undefined, name: PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined) => PropertySignature;
+ /** @deprecated Use `factory.createExpressionWithTypeArguments` or the factory supplied by your transformation context instead. */
+ const createExpressionWithTypeArguments: (typeArguments: readonly TypeNode[] | undefined, expression: Expression) => ExpressionWithTypeArguments;
+ /** @deprecated Use `factory.updateExpressionWithTypeArguments` or the factory supplied by your transformation context instead. */
+ const updateExpressionWithTypeArguments: (node: ExpressionWithTypeArguments, typeArguments: readonly TypeNode[] | undefined, expression: Expression) => ExpressionWithTypeArguments;
+ /** @deprecated Use `factory.createArrowFunction` or the factory supplied by your transformation context instead. */
+ const createArrowFunction: {
+ (modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken | undefined, body: ConciseBody): ArrowFunction;
+ (modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: ConciseBody): ArrowFunction;
+ };
+ /** @deprecated Use `factory.updateArrowFunction` or the factory supplied by your transformation context instead. */
+ const updateArrowFunction: {
+ (node: ArrowFunction, modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken, body: ConciseBody): ArrowFunction;
+ (node: ArrowFunction, modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: ConciseBody): ArrowFunction;
+ };
+ /** @deprecated Use `factory.createVariableDeclaration` or the factory supplied by your transformation context instead. */
+ const createVariableDeclaration: {
+ (name: string | BindingName, type?: TypeNode | undefined, initializer?: Expression | undefined): VariableDeclaration;
+ (name: string | BindingName, exclamationToken: ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration;
+ };
+ /** @deprecated Use `factory.updateVariableDeclaration` or the factory supplied by your transformation context instead. */
+ const updateVariableDeclaration: {
+ (node: VariableDeclaration, name: BindingName, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration;
+ (node: VariableDeclaration, name: BindingName, exclamationToken: ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration;
+ };
+ /** @deprecated Use `factory.createImportClause` or the factory supplied by your transformation context instead. */
+ const createImportClause: (name: Identifier | undefined, namedBindings: NamedImportBindings | undefined, isTypeOnly?: any) => ImportClause;
+ /** @deprecated Use `factory.updateImportClause` or the factory supplied by your transformation context instead. */
+ const updateImportClause: (node: ImportClause, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined, isTypeOnly: boolean) => ImportClause;
+ /** @deprecated Use `factory.createExportDeclaration` or the factory supplied by your transformation context instead. */
+ const createExportDeclaration: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, exportClause: NamedExportBindings | undefined, moduleSpecifier?: Expression | undefined, isTypeOnly?: any) => ExportDeclaration;
+ /** @deprecated Use `factory.updateExportDeclaration` or the factory supplied by your transformation context instead. */
+ const updateExportDeclaration: (node: ExportDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, exportClause: NamedExportBindings | undefined, moduleSpecifier: Expression | undefined, isTypeOnly: boolean) => ExportDeclaration;
+ /** @deprecated Use `factory.createJSDocParameterTag` or the factory supplied by your transformation context instead. */
+ const createJSDocParamTag: (name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression | undefined, comment?: string | undefined) => JSDocParameterTag;
+ /** @deprecated Use `factory.createComma` or the factory supplied by your transformation context instead. */
+ const createComma: (left: Expression, right: Expression) => Expression;
+ /** @deprecated Use `factory.createLessThan` or the factory supplied by your transformation context instead. */
+ const createLessThan: (left: Expression, right: Expression) => Expression;
+ /** @deprecated Use `factory.createAssignment` or the factory supplied by your transformation context instead. */
+ const createAssignment: (left: Expression, right: Expression) => BinaryExpression;
+ /** @deprecated Use `factory.createStrictEquality` or the factory supplied by your transformation context instead. */
+ const createStrictEquality: (left: Expression, right: Expression) => BinaryExpression;
+ /** @deprecated Use `factory.createStrictInequality` or the factory supplied by your transformation context instead. */
+ const createStrictInequality: (left: Expression, right: Expression) => BinaryExpression;
+ /** @deprecated Use `factory.createAdd` or the factory supplied by your transformation context instead. */
+ const createAdd: (left: Expression, right: Expression) => BinaryExpression;
+ /** @deprecated Use `factory.createSubtract` or the factory supplied by your transformation context instead. */
+ const createSubtract: (left: Expression, right: Expression) => BinaryExpression;
+ /** @deprecated Use `factory.createLogicalAnd` or the factory supplied by your transformation context instead. */
+ const createLogicalAnd: (left: Expression, right: Expression) => BinaryExpression;
+ /** @deprecated Use `factory.createLogicalOr` or the factory supplied by your transformation context instead. */
+ const createLogicalOr: (left: Expression, right: Expression) => BinaryExpression;
+ /** @deprecated Use `factory.createPostfixIncrement` or the factory supplied by your transformation context instead. */
+ const createPostfixIncrement: (operand: Expression) => PostfixUnaryExpression;
+ /** @deprecated Use `factory.createLogicalNot` or the factory supplied by your transformation context instead. */
+ const createLogicalNot: (operand: Expression) => PrefixUnaryExpression;
+ /** @deprecated Use an appropriate `factory` method instead. */
+ const createNode: (kind: SyntaxKind, pos?: any, end?: any) => Node;
+ /**
+ * Creates a shallow, memberwise clone of a node ~for mutation~ with its `pos`, `end`, and `parent` set.
+ *
+ * NOTE: It is unsafe to change any properties of a `Node` that relate to its AST children, as those changes won't be
+ * captured with respect to transformations.
+ *
+ * @deprecated Use an appropriate `factory.update...` method instead, use `setCommentRange` or `setSourceMapRange`, and avoid setting `parent`.
+ */
+ const getMutableClone: <T extends Node>(node: T) => T;
+}
+declare namespace ts {
+ /** @deprecated Use `isTypeAssertionExpression` instead. */
+ const isTypeAssertion: (node: Node) => node is TypeAssertion;
+}
+declare namespace ts {
+ /**
+ * @deprecated Use `ts.ReadonlyESMap<K, V>` instead.
+ */
+ interface ReadonlyMap<T> extends ReadonlyESMap<string, T> {
+ }
+ /**
+ * @deprecated Use `ts.ESMap<K, V>` instead.
+ */
+ interface Map<T> extends ESMap<string, T> {
+ }
+}
+declare namespace ts {
+ /**
+ * @deprecated Use `isMemberName` instead.
+ */
+ const isIdentifierOrPrivateIdentifier: (node: Node) => node is MemberName;
+}
+declare namespace ts {
+ interface NodeFactory {
+ /** @deprecated Use the overload that accepts 'modifiers' */
+ createConstructorTypeNode(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): ConstructorTypeNode;
+ /** @deprecated Use the overload that accepts 'modifiers' */
+ updateConstructorTypeNode(node: ConstructorTypeNode, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode): ConstructorTypeNode;
+ }
+}
+declare namespace ts {
+ interface NodeFactory {
+ createImportTypeNode(argument: TypeNode, assertions?: ImportTypeAssertionContainer, qualifier?: EntityName, typeArguments?: readonly TypeNode[], isTypeOf?: boolean): ImportTypeNode;
+ /** @deprecated Use the overload that accepts 'assertions' */
+ createImportTypeNode(argument: TypeNode, qualifier?: EntityName, typeArguments?: readonly TypeNode[], isTypeOf?: boolean): ImportTypeNode;
+ /** @deprecated Use the overload that accepts 'assertions' */
+ updateImportTypeNode(node: ImportTypeNode, argument: TypeNode, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean): ImportTypeNode;
+ }
+}
+declare namespace ts {
+ interface NodeFactory {
+ /** @deprecated Use the overload that accepts 'modifiers' */
+ createTypeParameterDeclaration(name: string | Identifier, constraint?: TypeNode, defaultType?: TypeNode): TypeParameterDeclaration;
+ /** @deprecated Use the overload that accepts 'modifiers' */
+ updateTypeParameterDeclaration(node: TypeParameterDeclaration, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration;
+ }
+}
+declare namespace ts {
+ interface Node {
+ /**
+ * @deprecated `decorators` has been removed from `Node` and merged with `modifiers` on the `Node` subtypes that support them.
+ * Use `ts.canHaveDecorators()` to test whether a `Node` can have decorators.
+ * Use `ts.getDecorators()` to get the decorators of a `Node`.
+ *
+ * For example:
+ * ```ts
+ * const decorators = ts.canHaveDecorators(node) ? ts.getDecorators(node) : undefined;
+ * ```
+ */
+ readonly decorators?: undefined;
+ /**
+ * @deprecated `modifiers` has been removed from `Node` and moved to the `Node` subtypes that support them.
+ * Use `ts.canHaveModifiers()` to test whether a `Node` can have modifiers.
+ * Use `ts.getModifiers()` to get the modifiers of a `Node`.
+ *
+ * For example:
+ * ```ts
+ * const modifiers = ts.canHaveModifiers(node) ? ts.getModifiers(node) : undefined;
+ * ```
+ */
+ readonly modifiers?: NodeArray<ModifierLike> | undefined;
+ }
+ interface PropertySignature {
+ /** @deprecated A property signature cannot have an initializer */
+ readonly initializer?: Expression | undefined;
+ }
+ interface PropertyAssignment {
+ /** @deprecated A property assignment cannot have a question token */
+ readonly questionToken?: QuestionToken | undefined;
+ /** @deprecated A property assignment cannot have an exclamation token */
+ readonly exclamationToken?: ExclamationToken | undefined;
+ }
+ interface ShorthandPropertyAssignment {
+ /** @deprecated A shorthand property assignment cannot have modifiers */
+ readonly modifiers?: NodeArray<Modifier> | undefined;
+ /** @deprecated A shorthand property assignment cannot have a question token */
+ readonly questionToken?: QuestionToken | undefined;
+ /** @deprecated A shorthand property assignment cannot have an exclamation token */
+ readonly exclamationToken?: ExclamationToken | undefined;
+ }
+ interface FunctionTypeNode {
+ /** @deprecated A function type cannot have modifiers */
+ readonly modifiers?: NodeArray<Modifier> | undefined;
+ }
+ interface NodeFactory {
+ /**
+ * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter.
+ */
+ createParameterDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken?: QuestionToken, type?: TypeNode, initializer?: Expression): ParameterDeclaration;
+ /**
+ * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter.
+ */
+ updateParameterDeclaration(node: ParameterDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): ParameterDeclaration;
+ /**
+ * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter.
+ */
+ createPropertyDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration;
+ /**
+ * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter.
+ */
+ updatePropertyDeclaration(node: PropertyDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration;
+ /**
+ * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter.
+ */
+ createMethodDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): MethodDeclaration;
+ /**
+ * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter.
+ */
+ updateMethodDeclaration(node: MethodDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): MethodDeclaration;
+ /**
+ * @deprecated This node does not support Decorators. Callers should use an overload that does not accept a `decorators` parameter.
+ */
+ createConstructorDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration;
+ /**
+ * @deprecated This node does not support Decorators. Callers should use an overload that does not accept a `decorators` parameter.
+ */
+ updateConstructorDeclaration(node: ConstructorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration;
+ /**
+ * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter.
+ */
+ createGetAccessorDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration;
+ /**
+ * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter.
+ */
+ updateGetAccessorDeclaration(node: GetAccessorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration;
+ /**
+ * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter.
+ */
+ createSetAccessorDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration;
+ /**
+ * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter.
+ */
+ updateSetAccessorDeclaration(node: SetAccessorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration;
+ /**
+ * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter.
+ */
+ createIndexSignature(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration;
+ /**
+ * @deprecated Decorators and modifiers are no longer supported for this function. Callers should use an overload that does not accept the `decorators` and `modifiers` parameters.
+ */
+ updateIndexSignature(node: IndexSignatureDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration;
+ /**
+ * @deprecated Decorators and modifiers are no longer supported for this function. Callers should use an overload that does not accept the `decorators` and `modifiers` parameters.
+ */
+ createClassStaticBlockDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, body: Block): ClassStaticBlockDeclaration;
+ /**
+ * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter.
+ */
+ updateClassStaticBlockDeclaration(node: ClassStaticBlockDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, body: Block): ClassStaticBlockDeclaration;
+ /**
+ * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter.
+ */
+ createClassExpression(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassExpression;
+ /**
+ * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter.
+ */
+ updateClassExpression(node: ClassExpression, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassExpression;
+ /**
+ * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter.
+ */
+ createFunctionDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): FunctionDeclaration;
+ /**
+ * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter.
+ */
+ updateFunctionDeclaration(node: FunctionDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): FunctionDeclaration;
+ /**
+ * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter.
+ */
+ createClassDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration;
+ /**
+ * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter.
+ */
+ updateClassDeclaration(node: ClassDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration;
+ /**
+ * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter.
+ */
+ createInterfaceDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration;
+ /**
+ * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter.
+ */
+ updateInterfaceDeclaration(node: InterfaceDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration;
+ /**
+ * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter.
+ */
+ createTypeAliasDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration;
+ /**
+ * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter.
+ */
+ updateTypeAliasDeclaration(node: TypeAliasDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration;
+ /**
+ * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter.
+ */
+ createEnumDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, members: readonly EnumMember[]): EnumDeclaration;
+ /**
+ * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter.
+ */
+ updateEnumDeclaration(node: EnumDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, members: readonly EnumMember[]): EnumDeclaration;
+ /**
+ * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter.
+ */
+ createModuleDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined, flags?: NodeFlags): ModuleDeclaration;
+ /**
+ * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter.
+ */
+ updateModuleDeclaration(node: ModuleDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined): ModuleDeclaration;
+ /**
+ * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter.
+ */
+ createImportEqualsDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, name: string | Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration;
+ /**
+ * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter.
+ */
+ updateImportEqualsDeclaration(node: ImportEqualsDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, name: Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration;
+ /**
+ * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter.
+ */
+ createImportDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause?: AssertClause): ImportDeclaration;
+ /**
+ * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter.
+ */
+ updateImportDeclaration(node: ImportDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause: AssertClause | undefined): ImportDeclaration;
+ /**
+ * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter.
+ */
+ createExportAssignment(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isExportEquals: boolean | undefined, expression: Expression): ExportAssignment;
+ /**
+ * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter.
+ */
+ updateExportAssignment(node: ExportAssignment, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, expression: Expression): ExportAssignment;
+ /**
+ * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter.
+ */
+ createExportDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier?: Expression, assertClause?: AssertClause): ExportDeclaration;
+ /**
+ * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter.
+ */
+ updateExportDeclaration(node: ExportDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier: Expression | undefined, assertClause: AssertClause | undefined): ExportDeclaration;
+ }
+}
+
+export = ts; \ No newline at end of file
diff --git a/cli/tsc/mod.rs b/cli/tsc/mod.rs
new file mode 100644
index 000000000..a8cb7bcab
--- /dev/null
+++ b/cli/tsc/mod.rs
@@ -0,0 +1,1226 @@
+// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
+
+use crate::args::TsConfig;
+use crate::graph_util::GraphData;
+use crate::graph_util::ModuleEntry;
+use crate::node;
+use crate::node::node_resolve_npm_reference;
+use crate::node::NodeResolution;
+use crate::node::NodeResolutionMode;
+use crate::npm::NpmPackageReference;
+use crate::npm::NpmPackageResolver;
+
+use deno_ast::MediaType;
+use deno_core::anyhow::anyhow;
+use deno_core::anyhow::Context;
+use deno_core::error::AnyError;
+use deno_core::located_script_name;
+use deno_core::op;
+use deno_core::parking_lot::RwLock;
+use deno_core::resolve_url_or_path;
+use deno_core::serde::Deserialize;
+use deno_core::serde::Deserializer;
+use deno_core::serde::Serialize;
+use deno_core::serde::Serializer;
+use deno_core::serde_json;
+use deno_core::serde_json::json;
+use deno_core::serde_json::Value;
+use deno_core::Extension;
+use deno_core::JsRuntime;
+use deno_core::ModuleSpecifier;
+use deno_core::OpState;
+use deno_core::RuntimeOptions;
+use deno_core::Snapshot;
+use deno_graph::Resolved;
+use once_cell::sync::Lazy;
+use std::borrow::Cow;
+use std::collections::HashMap;
+use std::fmt;
+use std::path::PathBuf;
+use std::sync::Arc;
+
+mod diagnostics;
+
+pub use self::diagnostics::Diagnostic;
+pub use self::diagnostics::DiagnosticCategory;
+pub use self::diagnostics::DiagnosticMessageChain;
+pub use self::diagnostics::Diagnostics;
+pub use self::diagnostics::Position;
+
+// Declaration files
+
+pub static DENO_NS_LIB: &str = include_str!("dts/lib.deno.ns.d.ts");
+pub static DENO_CONSOLE_LIB: &str = include_str!(env!("DENO_CONSOLE_LIB_PATH"));
+pub static DENO_URL_LIB: &str = include_str!(env!("DENO_URL_LIB_PATH"));
+pub static DENO_WEB_LIB: &str = include_str!(env!("DENO_WEB_LIB_PATH"));
+pub static DENO_FETCH_LIB: &str = include_str!(env!("DENO_FETCH_LIB_PATH"));
+pub static DENO_WEBGPU_LIB: &str = include_str!(env!("DENO_WEBGPU_LIB_PATH"));
+pub static DENO_WEBSOCKET_LIB: &str =
+ include_str!(env!("DENO_WEBSOCKET_LIB_PATH"));
+pub static DENO_WEBSTORAGE_LIB: &str =
+ include_str!(env!("DENO_WEBSTORAGE_LIB_PATH"));
+pub static DENO_CACHE_LIB: &str = include_str!(env!("DENO_CACHE_LIB_PATH"));
+pub static DENO_CRYPTO_LIB: &str = include_str!(env!("DENO_CRYPTO_LIB_PATH"));
+pub static DENO_BROADCAST_CHANNEL_LIB: &str =
+ include_str!(env!("DENO_BROADCAST_CHANNEL_LIB_PATH"));
+pub static DENO_NET_LIB: &str = include_str!(env!("DENO_NET_LIB_PATH"));
+pub static SHARED_GLOBALS_LIB: &str =
+ include_str!("dts/lib.deno.shared_globals.d.ts");
+pub static WINDOW_LIB: &str = include_str!("dts/lib.deno.window.d.ts");
+pub static UNSTABLE_NS_LIB: &str = include_str!("dts/lib.deno.unstable.d.ts");
+
+pub static COMPILER_SNAPSHOT: Lazy<Box<[u8]>> = Lazy::new(
+ #[cold]
+ #[inline(never)]
+ || {
+ static COMPRESSED_COMPILER_SNAPSHOT: &[u8] =
+ include_bytes!(concat!(env!("OUT_DIR"), "/COMPILER_SNAPSHOT.bin"));
+
+ zstd::bulk::decompress(
+ &COMPRESSED_COMPILER_SNAPSHOT[4..],
+ u32::from_le_bytes(COMPRESSED_COMPILER_SNAPSHOT[0..4].try_into().unwrap())
+ as usize,
+ )
+ .unwrap()
+ .into_boxed_slice()
+ },
+);
+
+pub fn compiler_snapshot() -> Snapshot {
+ Snapshot::Static(&COMPILER_SNAPSHOT)
+}
+
+macro_rules! inc {
+ ($e:expr) => {
+ include_str!(concat!("./dts/", $e))
+ };
+}
+
+/// Contains static assets that are not preloaded in the compiler snapshot.
+pub static STATIC_ASSETS: Lazy<HashMap<&'static str, &'static str>> =
+ Lazy::new(|| {
+ ([
+ (
+ "lib.dom.asynciterable.d.ts",
+ inc!("lib.dom.asynciterable.d.ts"),
+ ),
+ ("lib.dom.d.ts", inc!("lib.dom.d.ts")),
+ ("lib.dom.extras.d.ts", inc!("lib.dom.extras.d.ts")),
+ ("lib.dom.iterable.d.ts", inc!("lib.dom.iterable.d.ts")),
+ ("lib.es6.d.ts", inc!("lib.es6.d.ts")),
+ ("lib.es2016.full.d.ts", inc!("lib.es2016.full.d.ts")),
+ ("lib.es2017.full.d.ts", inc!("lib.es2017.full.d.ts")),
+ ("lib.es2018.full.d.ts", inc!("lib.es2018.full.d.ts")),
+ ("lib.es2019.full.d.ts", inc!("lib.es2019.full.d.ts")),
+ ("lib.es2020.full.d.ts", inc!("lib.es2020.full.d.ts")),
+ ("lib.es2021.full.d.ts", inc!("lib.es2021.full.d.ts")),
+ ("lib.es2022.full.d.ts", inc!("lib.es2022.full.d.ts")),
+ ("lib.esnext.full.d.ts", inc!("lib.esnext.full.d.ts")),
+ ("lib.scripthost.d.ts", inc!("lib.scripthost.d.ts")),
+ ("lib.webworker.d.ts", inc!("lib.webworker.d.ts")),
+ (
+ "lib.webworker.importscripts.d.ts",
+ inc!("lib.webworker.importscripts.d.ts"),
+ ),
+ (
+ "lib.webworker.iterable.d.ts",
+ inc!("lib.webworker.iterable.d.ts"),
+ ),
+ ])
+ .iter()
+ .cloned()
+ .collect()
+ });
+
+/// A structure representing stats from a type check operation for a graph.
+#[derive(Clone, Debug, Default, Eq, PartialEq)]
+pub struct Stats(pub Vec<(String, u32)>);
+
+impl<'de> Deserialize<'de> for Stats {
+ fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
+ where
+ D: Deserializer<'de>,
+ {
+ let items: Vec<(String, u32)> = Deserialize::deserialize(deserializer)?;
+ Ok(Stats(items))
+ }
+}
+
+impl Serialize for Stats {
+ fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+ where
+ S: Serializer,
+ {
+ Serialize::serialize(&self.0, serializer)
+ }
+}
+
+impl fmt::Display for Stats {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ writeln!(f, "Compilation statistics:")?;
+ for (key, value) in self.0.clone() {
+ writeln!(f, " {}: {}", key, value)?;
+ }
+
+ Ok(())
+ }
+}
+
+/// Retrieve a static asset that are included in the binary.
+pub fn get_asset(asset: &str) -> Option<&'static str> {
+ STATIC_ASSETS.get(asset).map(|s| s.to_owned())
+}
+
+fn get_maybe_hash(
+ maybe_source: Option<&str>,
+ hash_data: &[Vec<u8>],
+) -> Option<String> {
+ if let Some(source) = maybe_source {
+ let mut data = vec![source.as_bytes().to_owned()];
+ data.extend_from_slice(hash_data);
+ Some(crate::checksum::gen(&data))
+ } else {
+ None
+ }
+}
+
+/// Hash the URL so it can be sent to `tsc` in a supportable way
+fn hash_url(specifier: &ModuleSpecifier, media_type: MediaType) -> String {
+ let hash = crate::checksum::gen(&[specifier.path().as_bytes()]);
+ format!(
+ "{}:///{}{}",
+ specifier.scheme(),
+ hash,
+ media_type.as_ts_extension()
+ )
+}
+
+/// If the provided URLs derivable tsc media type doesn't match the media type,
+/// we will add an extension to the output. This is to avoid issues with
+/// specifiers that don't have extensions, that tsc refuses to emit because they
+/// think a `.js` version exists, when it doesn't.
+fn maybe_remap_specifier(
+ specifier: &ModuleSpecifier,
+ media_type: MediaType,
+) -> Option<String> {
+ let path = if specifier.scheme() == "file" {
+ if let Ok(path) = specifier.to_file_path() {
+ path
+ } else {
+ PathBuf::from(specifier.path())
+ }
+ } else {
+ PathBuf::from(specifier.path())
+ };
+ if path.extension().is_none() {
+ Some(format!("{}{}", specifier, media_type.as_ts_extension()))
+ } else {
+ None
+ }
+}
+
+/// tsc only supports `.ts`, `.tsx`, `.d.ts`, `.js`, or `.jsx` as root modules
+/// and so we have to detect the apparent media type based on extensions it
+/// supports.
+fn get_tsc_media_type(specifier: &ModuleSpecifier) -> MediaType {
+ let path = if specifier.scheme() == "file" {
+ if let Ok(path) = specifier.to_file_path() {
+ path
+ } else {
+ PathBuf::from(specifier.path())
+ }
+ } else {
+ PathBuf::from(specifier.path())
+ };
+ match path.extension() {
+ None => MediaType::Unknown,
+ Some(os_str) => match os_str.to_str() {
+ Some("ts") => {
+ if let Some(os_str) = path.file_stem() {
+ if let Some(file_name) = os_str.to_str() {
+ if file_name.ends_with(".d") {
+ return MediaType::Dts;
+ }
+ }
+ }
+ MediaType::TypeScript
+ }
+ Some("mts") => {
+ if let Some(os_str) = path.file_stem() {
+ if let Some(file_name) = os_str.to_str() {
+ if file_name.ends_with(".d") {
+ return MediaType::Dmts;
+ }
+ }
+ }
+ MediaType::Mts
+ }
+ Some("cts") => {
+ if let Some(os_str) = path.file_stem() {
+ if let Some(file_name) = os_str.to_str() {
+ if file_name.ends_with(".d") {
+ return MediaType::Dcts;
+ }
+ }
+ }
+ MediaType::Cts
+ }
+ Some("tsx") => MediaType::Tsx,
+ Some("js") => MediaType::JavaScript,
+ Some("mjs") => MediaType::Mjs,
+ Some("cjs") => MediaType::Cjs,
+ Some("jsx") => MediaType::Jsx,
+ _ => MediaType::Unknown,
+ },
+ }
+}
+
+#[derive(Debug, Clone, Default, Eq, PartialEq)]
+pub struct EmittedFile {
+ pub data: String,
+ pub maybe_specifiers: Option<Vec<ModuleSpecifier>>,
+ pub media_type: MediaType,
+}
+
+/// A structure representing a request to be sent to the tsc runtime.
+#[derive(Debug)]
+pub struct Request {
+ /// The TypeScript compiler options which will be serialized and sent to
+ /// tsc.
+ pub config: TsConfig,
+ /// Indicates to the tsc runtime if debug logging should occur.
+ pub debug: bool,
+ pub graph_data: Arc<RwLock<GraphData>>,
+ pub hash_data: Vec<Vec<u8>>,
+ pub maybe_config_specifier: Option<ModuleSpecifier>,
+ pub maybe_npm_resolver: Option<NpmPackageResolver>,
+ pub maybe_tsbuildinfo: Option<String>,
+ /// A vector of strings that represent the root/entry point modules for the
+ /// program.
+ pub root_names: Vec<(ModuleSpecifier, MediaType)>,
+}
+
+#[derive(Debug, Clone, Eq, PartialEq)]
+pub struct Response {
+ /// Any diagnostics that have been returned from the checker.
+ pub diagnostics: Diagnostics,
+ /// If there was any build info associated with the exec request.
+ pub maybe_tsbuildinfo: Option<String>,
+ /// Statistics from the check.
+ pub stats: Stats,
+}
+
+#[derive(Debug, Default)]
+struct State {
+ hash_data: Vec<Vec<u8>>,
+ graph_data: Arc<RwLock<GraphData>>,
+ maybe_config_specifier: Option<ModuleSpecifier>,
+ maybe_tsbuildinfo: Option<String>,
+ maybe_response: Option<RespondArgs>,
+ maybe_npm_resolver: Option<NpmPackageResolver>,
+ remapped_specifiers: HashMap<String, ModuleSpecifier>,
+ root_map: HashMap<String, ModuleSpecifier>,
+}
+
+impl State {
+ pub fn new(
+ graph_data: Arc<RwLock<GraphData>>,
+ hash_data: Vec<Vec<u8>>,
+ maybe_config_specifier: Option<ModuleSpecifier>,
+ maybe_npm_resolver: Option<NpmPackageResolver>,
+ maybe_tsbuildinfo: Option<String>,
+ root_map: HashMap<String, ModuleSpecifier>,
+ remapped_specifiers: HashMap<String, ModuleSpecifier>,
+ ) -> Self {
+ State {
+ hash_data,
+ graph_data,
+ maybe_config_specifier,
+ maybe_npm_resolver,
+ maybe_tsbuildinfo,
+ maybe_response: None,
+ remapped_specifiers,
+ root_map,
+ }
+ }
+}
+
+fn normalize_specifier(specifier: &str) -> Result<ModuleSpecifier, AnyError> {
+ resolve_url_or_path(&specifier.replace(".d.ts.d.ts", ".d.ts"))
+ .map_err(|err| err.into())
+}
+
+#[derive(Debug, Deserialize)]
+#[serde(rename_all = "camelCase")]
+struct CreateHashArgs {
+ /// The string data to be used to generate the hash. This will be mixed with
+ /// other state data in Deno to derive the final hash.
+ data: String,
+}
+
+#[op]
+fn op_create_hash(s: &mut OpState, args: Value) -> Result<Value, AnyError> {
+ let state = s.borrow_mut::<State>();
+ let v: CreateHashArgs = serde_json::from_value(args)
+ .context("Invalid request from JavaScript for \"op_create_hash\".")?;
+ let mut data = vec![v.data.as_bytes().to_owned()];
+ data.extend_from_slice(&state.hash_data);
+ let hash = crate::checksum::gen(&data);
+ Ok(json!({ "hash": hash }))
+}
+
+#[op]
+fn op_cwd(s: &mut OpState) -> Result<String, AnyError> {
+ let state = s.borrow_mut::<State>();
+ if let Some(config_specifier) = &state.maybe_config_specifier {
+ let cwd = config_specifier.join("./")?;
+ Ok(cwd.to_string())
+ } else {
+ Ok("cache:///".to_string())
+ }
+}
+
+#[derive(Debug, Deserialize)]
+#[serde(rename_all = "camelCase")]
+struct EmitArgs {
+ /// The text data/contents of the file.
+ data: String,
+ /// The _internal_ filename for the file. This will be used to determine how
+ /// the file is cached and stored.
+ file_name: String,
+}
+
+#[op]
+fn op_emit(state: &mut OpState, args: EmitArgs) -> bool {
+ let state = state.borrow_mut::<State>();
+ match args.file_name.as_ref() {
+ "deno:///.tsbuildinfo" => state.maybe_tsbuildinfo = Some(args.data),
+ _ => {
+ if cfg!(debug_assertions) {
+ panic!("Unhandled emit write: {}", args.file_name);
+ }
+ }
+ }
+
+ true
+}
+
+#[derive(Debug, Deserialize)]
+struct ExistsArgs {
+ /// The fully qualified specifier that should be loaded.
+ specifier: String,
+}
+
+#[op]
+fn op_exists(state: &mut OpState, args: ExistsArgs) -> bool {
+ let state = state.borrow_mut::<State>();
+ let graph_data = state.graph_data.read();
+ if let Ok(specifier) = normalize_specifier(&args.specifier) {
+ if specifier.scheme() == "asset" || specifier.scheme() == "data" {
+ true
+ } else {
+ matches!(
+ graph_data.get(&graph_data.follow_redirect(&specifier)),
+ Some(ModuleEntry::Module { .. })
+ )
+ }
+ } else {
+ false
+ }
+}
+
+#[derive(Debug, Deserialize)]
+struct LoadArgs {
+ /// The fully qualified specifier that should be loaded.
+ specifier: String,
+}
+
+pub fn as_ts_script_kind(media_type: MediaType) -> i32 {
+ match media_type {
+ MediaType::JavaScript => 1,
+ MediaType::Jsx => 2,
+ MediaType::Mjs => 1,
+ MediaType::Cjs => 1,
+ MediaType::TypeScript => 3,
+ MediaType::Mts => 3,
+ MediaType::Cts => 3,
+ MediaType::Dts => 3,
+ MediaType::Dmts => 3,
+ MediaType::Dcts => 3,
+ MediaType::Tsx => 4,
+ MediaType::Json => 6,
+ MediaType::SourceMap
+ | MediaType::TsBuildInfo
+ | MediaType::Wasm
+ | MediaType::Unknown => 0,
+ }
+}
+
+#[op]
+fn op_load(state: &mut OpState, args: Value) -> Result<Value, AnyError> {
+ let state = state.borrow_mut::<State>();
+ let v: LoadArgs = serde_json::from_value(args)
+ .context("Invalid request from JavaScript for \"op_load\".")?;
+ let specifier = normalize_specifier(&v.specifier)
+ .context("Error converting a string module specifier for \"op_load\".")?;
+ let mut hash: Option<String> = None;
+ let mut media_type = MediaType::Unknown;
+ let graph_data = state.graph_data.read();
+ let data = if &v.specifier == "deno:///.tsbuildinfo" {
+ state.maybe_tsbuildinfo.as_deref().map(Cow::Borrowed)
+ // in certain situations we return a "blank" module to tsc and we need to
+ // handle the request for that module here.
+ } else if &v.specifier == "deno:///missing_dependency.d.ts" {
+ hash = Some("1".to_string());
+ media_type = MediaType::Dts;
+ Some(Cow::Borrowed("declare const __: any;\nexport = __;\n"))
+ } else if v.specifier.starts_with("asset:///") {
+ let name = v.specifier.replace("asset:///", "");
+ let maybe_source = get_asset(&name);
+ hash = get_maybe_hash(maybe_source, &state.hash_data);
+ media_type = MediaType::from(&v.specifier);
+ maybe_source.map(Cow::Borrowed)
+ } else {
+ let specifier = if let Some(remapped_specifier) =
+ state.remapped_specifiers.get(&v.specifier)
+ {
+ remapped_specifier.clone()
+ } else if let Some(remapped_specifier) = state.root_map.get(&v.specifier) {
+ remapped_specifier.clone()
+ } else {
+ specifier
+ };
+ let maybe_source = if let Some(ModuleEntry::Module {
+ code,
+ media_type: mt,
+ ..
+ }) =
+ graph_data.get(&graph_data.follow_redirect(&specifier))
+ {
+ media_type = *mt;
+ Some(Cow::Borrowed(code as &str))
+ } else if state
+ .maybe_npm_resolver
+ .as_ref()
+ .map(|resolver| resolver.in_npm_package(&specifier))
+ .unwrap_or(false)
+ {
+ media_type = MediaType::from(&specifier);
+ let file_path = specifier.to_file_path().unwrap();
+ let code = std::fs::read_to_string(&file_path)
+ .with_context(|| format!("Unable to load {}", file_path.display()))?;
+ Some(Cow::Owned(code))
+ } else {
+ media_type = MediaType::Unknown;
+ None
+ };
+ hash = get_maybe_hash(maybe_source.as_deref(), &state.hash_data);
+ maybe_source
+ };
+
+ Ok(json!({
+ "data": data,
+ "version": hash,
+ "scriptKind": as_ts_script_kind(media_type),
+ }))
+}
+
+#[derive(Debug, Deserialize, Serialize)]
+#[serde(rename_all = "camelCase")]
+pub struct ResolveArgs {
+ /// The base specifier that the supplied specifier strings should be resolved
+ /// relative to.
+ pub base: String,
+ /// A list of specifiers that should be resolved.
+ pub specifiers: Vec<String>,
+}
+
+#[op]
+fn op_resolve(
+ state: &mut OpState,
+ args: ResolveArgs,
+) -> Result<Vec<(String, String)>, AnyError> {
+ let state = state.borrow_mut::<State>();
+ let mut resolved: Vec<(String, String)> = Vec::new();
+ let referrer = if let Some(remapped_specifier) =
+ state.remapped_specifiers.get(&args.base)
+ {
+ remapped_specifier.clone()
+ } else if let Some(remapped_base) = state.root_map.get(&args.base) {
+ remapped_base.clone()
+ } else {
+ normalize_specifier(&args.base).context(
+ "Error converting a string module specifier for \"op_resolve\".",
+ )?
+ };
+ for specifier in &args.specifiers {
+ if specifier.starts_with("asset:///") {
+ resolved.push((
+ specifier.clone(),
+ MediaType::from(specifier).as_ts_extension().to_string(),
+ ));
+ } else {
+ let graph_data = state.graph_data.read();
+ let resolved_dep = match graph_data.get_dependencies(&referrer) {
+ Some(dependencies) => dependencies.get(specifier).map(|d| {
+ if matches!(d.maybe_type, Resolved::Ok { .. }) {
+ &d.maybe_type
+ } else {
+ &d.maybe_code
+ }
+ }),
+ None => None,
+ };
+ let maybe_result = match resolved_dep {
+ Some(Resolved::Ok { specifier, .. }) => {
+ let specifier = graph_data.follow_redirect(specifier);
+ match graph_data.get(&specifier) {
+ Some(ModuleEntry::Module {
+ media_type,
+ maybe_types,
+ ..
+ }) => match maybe_types {
+ Some(Resolved::Ok { specifier, .. }) => {
+ let types = graph_data.follow_redirect(specifier);
+ match graph_data.get(&types) {
+ Some(ModuleEntry::Module { media_type, .. }) => {
+ Some((types, *media_type))
+ }
+ _ => None,
+ }
+ }
+ _ => Some((specifier, *media_type)),
+ },
+ _ => {
+ // handle npm:<package> urls
+ if let Ok(npm_ref) =
+ NpmPackageReference::from_specifier(&specifier)
+ {
+ if let Some(npm_resolver) = &state.maybe_npm_resolver {
+ Some(resolve_npm_package_reference_types(
+ &npm_ref,
+ npm_resolver,
+ )?)
+ } else {
+ None
+ }
+ } else {
+ None
+ }
+ }
+ }
+ }
+ _ => {
+ state.maybe_npm_resolver.as_ref().and_then(|npm_resolver| {
+ if npm_resolver.in_npm_package(&referrer) {
+ // we're in an npm package, so use node resolution
+ Some(NodeResolution::into_specifier_and_media_type(
+ node::node_resolve(
+ specifier,
+ &referrer,
+ node::NodeResolutionMode::Types,
+ npm_resolver,
+ )
+ .ok()
+ .flatten(),
+ ))
+ } else {
+ None
+ }
+ })
+ }
+ };
+ let result = match maybe_result {
+ Some((specifier, media_type)) => {
+ let specifier_str = match specifier.scheme() {
+ "data" | "blob" => {
+ let specifier_str = hash_url(&specifier, media_type);
+ state
+ .remapped_specifiers
+ .insert(specifier_str.clone(), specifier);
+ specifier_str
+ }
+ _ => {
+ if let Some(specifier_str) =
+ maybe_remap_specifier(&specifier, media_type)
+ {
+ state
+ .remapped_specifiers
+ .insert(specifier_str.clone(), specifier);
+ specifier_str
+ } else {
+ specifier.to_string()
+ }
+ }
+ };
+ (specifier_str, media_type.as_ts_extension().into())
+ }
+ None => (
+ "deno:///missing_dependency.d.ts".to_string(),
+ ".d.ts".to_string(),
+ ),
+ };
+ resolved.push(result);
+ }
+ }
+
+ Ok(resolved)
+}
+
+pub fn resolve_npm_package_reference_types(
+ npm_ref: &NpmPackageReference,
+ npm_resolver: &NpmPackageResolver,
+) -> Result<(ModuleSpecifier, MediaType), AnyError> {
+ let maybe_resolution = node_resolve_npm_reference(
+ npm_ref,
+ NodeResolutionMode::Types,
+ npm_resolver,
+ )?;
+ Ok(NodeResolution::into_specifier_and_media_type(
+ maybe_resolution,
+ ))
+}
+
+#[op]
+fn op_is_node_file(state: &mut OpState, path: String) -> bool {
+ let state = state.borrow::<State>();
+ match ModuleSpecifier::parse(&path) {
+ Ok(specifier) => state
+ .maybe_npm_resolver
+ .as_ref()
+ .map(|r| r.in_npm_package(&specifier))
+ .unwrap_or(false),
+ Err(_) => false,
+ }
+}
+
+#[derive(Debug, Deserialize, Eq, PartialEq)]
+struct RespondArgs {
+ pub diagnostics: Diagnostics,
+ pub stats: Stats,
+}
+
+#[op]
+fn op_respond(state: &mut OpState, args: Value) -> Result<Value, AnyError> {
+ let state = state.borrow_mut::<State>();
+ let v: RespondArgs = serde_json::from_value(args)
+ .context("Error converting the result for \"op_respond\".")?;
+ state.maybe_response = Some(v);
+ Ok(json!(true))
+}
+
+/// Execute a request on the supplied snapshot, returning a response which
+/// contains information, like any emitted files, diagnostics, statistics and
+/// optionally an updated TypeScript build info.
+pub fn exec(request: Request) -> Result<Response, AnyError> {
+ // tsc cannot handle root specifiers that don't have one of the "acceptable"
+ // extensions. Therefore, we have to check the root modules against their
+ // extensions and remap any that are unacceptable to tsc and add them to the
+ // op state so when requested, we can remap to the original specifier.
+ let mut root_map = HashMap::new();
+ let mut remapped_specifiers = HashMap::new();
+ let root_names: Vec<String> = request
+ .root_names
+ .iter()
+ .map(|(s, mt)| match s.scheme() {
+ "data" | "blob" => {
+ let specifier_str = hash_url(s, *mt);
+ remapped_specifiers.insert(specifier_str.clone(), s.clone());
+ specifier_str
+ }
+ _ => {
+ let ext_media_type = get_tsc_media_type(s);
+ if *mt != ext_media_type {
+ let new_specifier = format!("{}{}", s, mt.as_ts_extension());
+ root_map.insert(new_specifier.clone(), s.clone());
+ new_specifier
+ } else {
+ s.as_str().to_owned()
+ }
+ }
+ })
+ .collect();
+ let mut runtime = JsRuntime::new(RuntimeOptions {
+ startup_snapshot: Some(compiler_snapshot()),
+ extensions: vec![Extension::builder()
+ .ops(vec![
+ op_cwd::decl(),
+ op_create_hash::decl(),
+ op_emit::decl(),
+ op_exists::decl(),
+ op_is_node_file::decl(),
+ op_load::decl(),
+ op_resolve::decl(),
+ op_respond::decl(),
+ ])
+ .state(move |state| {
+ state.put(State::new(
+ request.graph_data.clone(),
+ request.hash_data.clone(),
+ request.maybe_config_specifier.clone(),
+ request.maybe_npm_resolver.clone(),
+ request.maybe_tsbuildinfo.clone(),
+ root_map.clone(),
+ remapped_specifiers.clone(),
+ ));
+ Ok(())
+ })
+ .build()],
+ ..Default::default()
+ });
+
+ let startup_source = "globalThis.startup({ legacyFlag: false })";
+ let request_value = json!({
+ "config": request.config,
+ "debug": request.debug,
+ "rootNames": root_names,
+ });
+ let request_str = request_value.to_string();
+ let exec_source = format!("globalThis.exec({})", request_str);
+
+ runtime
+ .execute_script(&located_script_name!(), startup_source)
+ .context("Could not properly start the compiler runtime.")?;
+ runtime.execute_script(&located_script_name!(), &exec_source)?;
+
+ let op_state = runtime.op_state();
+ let mut op_state = op_state.borrow_mut();
+ let state = op_state.take::<State>();
+
+ if let Some(response) = state.maybe_response {
+ let diagnostics = response.diagnostics;
+ let maybe_tsbuildinfo = state.maybe_tsbuildinfo;
+ let stats = response.stats;
+
+ Ok(Response {
+ diagnostics,
+ maybe_tsbuildinfo,
+ stats,
+ })
+ } else {
+ Err(anyhow!("The response for the exec request was not set."))
+ }
+}
+
+#[cfg(test)]
+mod tests {
+ use super::Diagnostic;
+ use super::DiagnosticCategory;
+ use super::*;
+ use crate::args::TsConfig;
+ use deno_core::futures::future;
+ use deno_core::OpState;
+ use deno_graph::ModuleKind;
+ use std::fs;
+
+ #[derive(Debug, Default)]
+ pub struct MockLoader {
+ pub fixtures: PathBuf,
+ }
+
+ impl deno_graph::source::Loader for MockLoader {
+ fn load(
+ &mut self,
+ specifier: &ModuleSpecifier,
+ _is_dynamic: bool,
+ ) -> deno_graph::source::LoadFuture {
+ let specifier_text = specifier
+ .to_string()
+ .replace(":///", "_")
+ .replace("://", "_")
+ .replace('/', "-");
+ let source_path = self.fixtures.join(specifier_text);
+ let response = fs::read_to_string(&source_path)
+ .map(|c| {
+ Some(deno_graph::source::LoadResponse::Module {
+ specifier: specifier.clone(),
+ maybe_headers: None,
+ content: c.into(),
+ })
+ })
+ .map_err(|err| err.into());
+ Box::pin(future::ready(response))
+ }
+ }
+
+ async fn setup(
+ maybe_specifier: Option<ModuleSpecifier>,
+ maybe_hash_data: Option<Vec<Vec<u8>>>,
+ maybe_tsbuildinfo: Option<String>,
+ ) -> OpState {
+ let specifier = maybe_specifier
+ .unwrap_or_else(|| resolve_url_or_path("file:///main.ts").unwrap());
+ let hash_data = maybe_hash_data.unwrap_or_else(|| vec![b"".to_vec()]);
+ let fixtures = test_util::testdata_path().join("tsc2");
+ let mut loader = MockLoader { fixtures };
+ let graph = deno_graph::create_graph(
+ vec![(specifier, ModuleKind::Esm)],
+ &mut loader,
+ deno_graph::GraphOptions {
+ is_dynamic: false,
+ imports: None,
+ resolver: None,
+ locker: None,
+ module_analyzer: None,
+ reporter: None,
+ },
+ )
+ .await;
+ let state = State::new(
+ Arc::new(RwLock::new((&graph).into())),
+ hash_data,
+ None,
+ None,
+ maybe_tsbuildinfo,
+ HashMap::new(),
+ HashMap::new(),
+ );
+ let mut op_state = OpState::new(1);
+ op_state.put(state);
+ op_state
+ }
+
+ async fn test_exec(
+ specifier: &ModuleSpecifier,
+ ) -> Result<Response, AnyError> {
+ let hash_data = vec![b"something".to_vec()];
+ let fixtures = test_util::testdata_path().join("tsc2");
+ let mut loader = MockLoader { fixtures };
+ let graph = deno_graph::create_graph(
+ vec![(specifier.clone(), ModuleKind::Esm)],
+ &mut loader,
+ deno_graph::GraphOptions {
+ is_dynamic: false,
+ imports: None,
+ resolver: None,
+ locker: None,
+ module_analyzer: None,
+ reporter: None,
+ },
+ )
+ .await;
+ let config = TsConfig::new(json!({
+ "allowJs": true,
+ "checkJs": false,
+ "esModuleInterop": true,
+ "emitDecoratorMetadata": false,
+ "incremental": true,
+ "jsx": "react",
+ "jsxFactory": "React.createElement",
+ "jsxFragmentFactory": "React.Fragment",
+ "lib": ["deno.window"],
+ "module": "esnext",
+ "noEmit": true,
+ "outDir": "deno:///",
+ "strict": true,
+ "target": "esnext",
+ "tsBuildInfoFile": "deno:///.tsbuildinfo",
+ }));
+ let request = Request {
+ config,
+ debug: false,
+ graph_data: Arc::new(RwLock::new((&graph).into())),
+ hash_data,
+ maybe_config_specifier: None,
+ maybe_npm_resolver: None,
+ maybe_tsbuildinfo: None,
+ root_names: vec![(specifier.clone(), MediaType::TypeScript)],
+ };
+ exec(request)
+ }
+
+ #[test]
+ fn test_compiler_snapshot() {
+ let mut js_runtime = JsRuntime::new(RuntimeOptions {
+ startup_snapshot: Some(compiler_snapshot()),
+ ..Default::default()
+ });
+ js_runtime
+ .execute_script(
+ "<anon>",
+ r#"
+ if (!(startup)) {
+ throw Error("bad");
+ }
+ console.log(`ts version: ${ts.version}`);
+ "#,
+ )
+ .unwrap();
+ }
+
+ #[tokio::test]
+ async fn test_create_hash() {
+ let mut state = setup(None, Some(vec![b"something".to_vec()]), None).await;
+ let actual = op_create_hash::call(
+ &mut state,
+ json!({ "data": "some sort of content" }),
+ )
+ .expect("could not invoke op");
+ assert_eq!(
+ actual,
+ json!({"hash": "ae92df8f104748768838916857a1623b6a3c593110131b0a00f81ad9dac16511"})
+ );
+ }
+
+ #[test]
+ fn test_hash_url() {
+ let specifier = deno_core::resolve_url(
+ "data:application/javascript,console.log(\"Hello%20Deno\");",
+ )
+ .unwrap();
+ assert_eq!(hash_url(&specifier, MediaType::JavaScript), "data:///d300ea0796bd72b08df10348e0b70514c021f2e45bfe59cec24e12e97cd79c58.js");
+ }
+
+ #[test]
+ fn test_get_tsc_media_type() {
+ let fixtures = vec![
+ ("file:///a.ts", MediaType::TypeScript),
+ ("file:///a.cts", MediaType::Cts),
+ ("file:///a.mts", MediaType::Mts),
+ ("file:///a.tsx", MediaType::Tsx),
+ ("file:///a.d.ts", MediaType::Dts),
+ ("file:///a.d.cts", MediaType::Dcts),
+ ("file:///a.d.mts", MediaType::Dmts),
+ ("file:///a.js", MediaType::JavaScript),
+ ("file:///a.jsx", MediaType::Jsx),
+ ("file:///a.cjs", MediaType::Cjs),
+ ("file:///a.mjs", MediaType::Mjs),
+ ("file:///a.json", MediaType::Unknown),
+ ("file:///a.wasm", MediaType::Unknown),
+ ("file:///a.js.map", MediaType::Unknown),
+ ("file:///.tsbuildinfo", MediaType::Unknown),
+ ];
+ for (specifier, media_type) in fixtures {
+ let specifier = resolve_url_or_path(specifier).unwrap();
+ assert_eq!(get_tsc_media_type(&specifier), media_type);
+ }
+ }
+
+ #[tokio::test]
+ async fn test_emit_tsbuildinfo() {
+ let mut state = setup(None, None, None).await;
+ let actual = op_emit::call(
+ &mut state,
+ EmitArgs {
+ data: "some file content".to_string(),
+ file_name: "deno:///.tsbuildinfo".to_string(),
+ },
+ );
+ assert!(actual);
+ let state = state.borrow::<State>();
+ assert_eq!(
+ state.maybe_tsbuildinfo,
+ Some("some file content".to_string())
+ );
+ }
+
+ #[tokio::test]
+ async fn test_load() {
+ let mut state = setup(
+ Some(resolve_url_or_path("https://deno.land/x/mod.ts").unwrap()),
+ None,
+ Some("some content".to_string()),
+ )
+ .await;
+ let actual = op_load::call(
+ &mut state,
+ json!({ "specifier": "https://deno.land/x/mod.ts"}),
+ )
+ .expect("should have invoked op");
+ assert_eq!(
+ actual,
+ json!({
+ "data": "console.log(\"hello deno\");\n",
+ "version": "149c777056afcc973d5fcbe11421b6d5ddc57b81786765302030d7fc893bf729",
+ "scriptKind": 3,
+ })
+ );
+ }
+
+ #[derive(Debug, Deserialize)]
+ #[serde(rename_all = "camelCase")]
+ struct LoadResponse {
+ data: String,
+ version: Option<String>,
+ script_kind: i64,
+ }
+
+ #[tokio::test]
+ async fn test_load_asset() {
+ let mut state = setup(
+ Some(resolve_url_or_path("https://deno.land/x/mod.ts").unwrap()),
+ None,
+ Some("some content".to_string()),
+ )
+ .await;
+ let value = op_load::call(
+ &mut state,
+ json!({ "specifier": "asset:///lib.dom.d.ts" }),
+ )
+ .expect("should have invoked op");
+ let actual: LoadResponse =
+ serde_json::from_value(value).expect("failed to deserialize");
+ let expected = get_asset("lib.dom.d.ts").unwrap();
+ assert_eq!(actual.data, expected);
+ assert!(actual.version.is_some());
+ assert_eq!(actual.script_kind, 3);
+ }
+
+ #[tokio::test]
+ async fn test_load_tsbuildinfo() {
+ let mut state = setup(
+ Some(resolve_url_or_path("https://deno.land/x/mod.ts").unwrap()),
+ None,
+ Some("some content".to_string()),
+ )
+ .await;
+ let actual =
+ op_load::call(&mut state, json!({ "specifier": "deno:///.tsbuildinfo"}))
+ .expect("should have invoked op");
+ assert_eq!(
+ actual,
+ json!({
+ "data": "some content",
+ "version": null,
+ "scriptKind": 0,
+ })
+ );
+ }
+
+ #[tokio::test]
+ async fn test_load_missing_specifier() {
+ let mut state = setup(None, None, None).await;
+ let actual = op_load::call(
+ &mut state,
+ json!({ "specifier": "https://deno.land/x/mod.ts"}),
+ )
+ .expect("should have invoked op");
+ assert_eq!(
+ actual,
+ json!({
+ "data": null,
+ "version": null,
+ "scriptKind": 0,
+ })
+ )
+ }
+
+ #[tokio::test]
+ async fn test_resolve() {
+ let mut state = setup(
+ Some(resolve_url_or_path("https://deno.land/x/a.ts").unwrap()),
+ None,
+ None,
+ )
+ .await;
+ let actual = op_resolve::call(
+ &mut state,
+ ResolveArgs {
+ base: "https://deno.land/x/a.ts".to_string(),
+ specifiers: vec!["./b.ts".to_string()],
+ },
+ )
+ .expect("should have invoked op");
+ assert_eq!(
+ actual,
+ vec![("https://deno.land/x/b.ts".into(), ".ts".into())]
+ );
+ }
+
+ #[tokio::test]
+ async fn test_resolve_empty() {
+ let mut state = setup(
+ Some(resolve_url_or_path("https://deno.land/x/a.ts").unwrap()),
+ None,
+ None,
+ )
+ .await;
+ let actual = op_resolve::call(
+ &mut state,
+ ResolveArgs {
+ base: "https://deno.land/x/a.ts".to_string(),
+ specifiers: vec!["./bad.ts".to_string()],
+ },
+ )
+ .expect("should have not errored");
+ assert_eq!(
+ actual,
+ vec![("deno:///missing_dependency.d.ts".into(), ".d.ts".into())]
+ );
+ }
+
+ #[tokio::test]
+ async fn test_respond() {
+ let mut state = setup(None, None, None).await;
+ let actual = op_respond::call(
+ &mut state,
+ json!({
+ "diagnostics": [
+ {
+ "messageText": "Unknown compiler option 'invalid'.",
+ "category": 1,
+ "code": 5023
+ }
+ ],
+ "stats": [["a", 12]]
+ }),
+ )
+ .expect("should have invoked op");
+ assert_eq!(actual, json!(true));
+ let state = state.borrow::<State>();
+ assert_eq!(
+ state.maybe_response,
+ Some(RespondArgs {
+ diagnostics: Diagnostics::new(vec![Diagnostic {
+ category: DiagnosticCategory::Error,
+ code: 5023,
+ start: None,
+ end: None,
+ message_text: Some(
+ "Unknown compiler option \'invalid\'.".to_string()
+ ),
+ message_chain: None,
+ source: None,
+ source_line: None,
+ file_name: None,
+ related_information: None,
+ }]),
+ stats: Stats(vec![("a".to_string(), 12)])
+ })
+ );
+ }
+
+ #[tokio::test]
+ async fn test_exec_basic() {
+ let specifier = resolve_url_or_path("https://deno.land/x/a.ts").unwrap();
+ let actual = test_exec(&specifier)
+ .await
+ .expect("exec should not have errored");
+ eprintln!("diagnostics {:#?}", actual.diagnostics);
+ assert!(actual.diagnostics.is_empty());
+ assert!(actual.maybe_tsbuildinfo.is_some());
+ assert_eq!(actual.stats.0.len(), 12);
+ }
+
+ #[tokio::test]
+ async fn test_exec_reexport_dts() {
+ let specifier = resolve_url_or_path("file:///reexports.ts").unwrap();
+ let actual = test_exec(&specifier)
+ .await
+ .expect("exec should not have errored");
+ eprintln!("diagnostics {:#?}", actual.diagnostics);
+ assert!(actual.diagnostics.is_empty());
+ assert!(actual.maybe_tsbuildinfo.is_some());
+ assert_eq!(actual.stats.0.len(), 12);
+ }
+
+ #[tokio::test]
+ async fn fix_lib_ref() {
+ let specifier = resolve_url_or_path("file:///libref.ts").unwrap();
+ let actual = test_exec(&specifier)
+ .await
+ .expect("exec should not have errored");
+ eprintln!("diagnostics {:#?}", actual.diagnostics);
+ assert!(actual.diagnostics.is_empty());
+ }
+}