Last active
May 16, 2019 20:23
-
-
Save chrmoritz/49ef50d3e1b54ca4a64375eafa6ff1e3 to your computer and use it in GitHub Desktop.
red = broken compiler.js (as build with the current homebrew formula) and green = compiler.js from a working build (outside homebrew)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/compiler.js b/compiler.js | |
index dcf7f4c..459fbd2 100644 | |
--- a/compiler.js | |
+++ b/compiler.js | |
@@ -227,11 +227,11 @@ var denoMain = (function () { | |
uptime: uptime | |
}; | |
- var __filename = '/private/tmp/deno-20190514-62684-1rifxrj/node_modules/typescript/lib/typescript.js'; | |
+ var __filename = '/private/tmp/deno/third_party/node_modules/typescript/lib/typescript.js'; | |
var browser$1 = true; | |
- var __dirname = '/private/tmp/deno-20190514-62684-1rifxrj/node_modules/typescript/lib'; | |
+ var __dirname = '/private/tmp/deno/third_party/node_modules/typescript/lib'; | |
var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; | |
@@ -129384,10 +129384,32 @@ var denoMain = (function () { | |
}); | |
var typescript$1 = unwrapExports(typescript); | |
+ var typescript_1 = typescript.convertCompilerOptionsFromJson; | |
+ var typescript_2 = typescript.createLanguageService; | |
+ var typescript_3 = typescript.formatDiagnostics; | |
+ var typescript_4 = typescript.formatDiagnosticsWithColorAndContext; | |
+ var typescript_5 = typescript.parseConfigFileTextToJson; | |
+ var typescript_6 = typescript.version; | |
+ var typescript_7 = typescript.Extension; | |
+ var typescript_8 = typescript.ModuleKind; | |
+ var typescript_9 = typescript.ScriptKind; | |
+ var typescript_10 = typescript.ScriptSnapshot; | |
+ var typescript_11 = typescript.ScriptTarget; | |
var ts = /*#__PURE__*/Object.freeze({ | |
default: typescript$1, | |
- __moduleExports: typescript | |
+ __moduleExports: typescript, | |
+ convertCompilerOptionsFromJson: typescript_1, | |
+ createLanguageService: typescript_2, | |
+ formatDiagnostics: typescript_3, | |
+ formatDiagnosticsWithColorAndContext: typescript_4, | |
+ parseConfigFileTextToJson: typescript_5, | |
+ version: typescript_6, | |
+ Extension: typescript_7, | |
+ ModuleKind: typescript_8, | |
+ ScriptKind: typescript_9, | |
+ ScriptSnapshot: typescript_10, | |
+ ScriptTarget: typescript_11 | |
}); | |
var Any; | |
@@ -131176,7 +131198,7 @@ var denoMain = (function () { | |
const window$1 = (0, eval)("this"); | |
- var libDts = "// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.\n\n/// <reference no-default-lib=\"true\" />\n/// <reference lib=\"esnext\" />\n\ndeclare namespace Deno {\n /** The current process id of the runtime. */\n export let pid: number;\n /** Reflects the NO_COLOR environment variable: https://no-color.org/ */\n export let noColor: boolean;\n /** Path to the current deno process's executable file. */\n export let execPath: string;\n /** Check if running in terminal.\n *\n * console.log(Deno.isTTY().stdout);\n */\n export function isTTY(): {\n stdin: boolean;\n stdout: boolean;\n stderr: boolean;\n };\n /** Exit the Deno process with optional exit code. */\n export function exit(exitCode?: number): never;\n /** Returns a snapshot of the environment variables at invocation. Mutating a\n * property in the object will set that variable in the environment for\n * the process. The environment object will only accept `string`s\n * as values.\n *\n * const myEnv = Deno.env();\n * console.log(myEnv.SHELL);\n * myEnv.TEST_VAR = \"HELLO\";\n * const newEnv = Deno.env();\n * console.log(myEnv.TEST_VAR == newEnv.TEST_VAR);\n */\n export function env(): {\n [index: string]: string;\n };\n /**\n * `cwd()` Return a string representing the current working directory.\n * If the current directory can be reached via multiple paths\n * (due to symbolic links), `cwd()` may return\n * any one of them.\n * throws `NotFound` exception if directory not available\n */\n export function cwd(): string;\n /**\n * `chdir()` Change the current working directory to path.\n * throws `NotFound` exception if directory not available\n */\n export function chdir(directory: string): void;\n export interface ReadResult {\n nread: number;\n eof: boolean;\n }\n export enum SeekMode {\n SEEK_START = 0,\n SEEK_CURRENT = 1,\n SEEK_END = 2\n }\n export interface Reader {\n /** Reads up to p.byteLength bytes into `p`. It resolves to the number\n * of bytes read (`0` <= `n` <= `p.byteLength`) and any error encountered.\n * Even if `read()` returns `n` < `p.byteLength`, it may use all of `p` as\n * scratch space during the call. If some data is available but not\n * `p.byteLength` bytes, `read()` conventionally returns what is available\n * instead of waiting for more.\n *\n * When `read()` encounters an error or end-of-file condition after\n * successfully reading `n` > `0` bytes, it returns the number of bytes read.\n * It may return the (non-nil) error from the same call or return the error\n * (and `n` == `0`) from a subsequent call. An instance of this general case\n * is that a `Reader` returning a non-zero number of bytes at the end of the\n * input stream may return either `err` == `EOF` or `err` == `null`. The next\n * `read()` should return `0`, `EOF`.\n *\n * Callers should always process the `n` > `0` bytes returned before\n * considering the `EOF`. Doing so correctly handles I/O errors that happen\n * after reading some bytes and also both of the allowed `EOF` behaviors.\n *\n * Implementations of `read()` are discouraged from returning a zero byte\n * count with a `null` error, except when `p.byteLength` == `0`. Callers\n * should treat a return of `0` and `null` as indicating that nothing\n * happened; in particular it does not indicate `EOF`.\n *\n * Implementations must not retain `p`.\n */\n read(p: Uint8Array): Promise<ReadResult>;\n }\n export interface SyncReader {\n readSync(p: Uint8Array): ReadResult;\n }\n export interface Writer {\n /** Writes `p.byteLength` bytes from `p` to the underlying data\n * stream. It resolves to the number of bytes written from `p` (`0` <= `n` <=\n * `p.byteLength`) and any error encountered that caused the write to stop\n * early. `write()` must return a non-null error if it returns `n` <\n * `p.byteLength`. write() must not modify the slice data, even temporarily.\n *\n * Implementations must not retain `p`.\n */\n write(p: Uint8Array): Promise<number>;\n }\n export interface SyncWriter {\n writeSync(p: Uint8Array): number;\n }\n export interface Closer {\n close(): void;\n }\n export interface Seeker {\n /** Seek sets the offset for the next `read()` or `write()` to offset,\n * interpreted according to `whence`: `SeekStart` means relative to the start\n * of the file, `SeekCurrent` means relative to the current offset, and\n * `SeekEnd` means relative to the end. Seek returns the new offset relative\n * to the start of the file and an error, if any.\n *\n * Seeking to an offset before the start of the file is an error. Seeking to\n * any positive offset is legal, but the behavior of subsequent I/O operations\n * on the underlying object is implementation-dependent.\n */\n seek(offset: number, whence: SeekMode): Promise<void>;\n }\n export interface SyncSeeker {\n seekSync(offset: number, whence: SeekMode): void;\n }\n export interface ReadCloser extends Reader, Closer {}\n export interface WriteCloser extends Writer, Closer {}\n export interface ReadSeeker extends Reader, Seeker {}\n export interface WriteSeeker extends Writer, Seeker {}\n export interface ReadWriteCloser extends Reader, Writer, Closer {}\n export interface ReadWriteSeeker extends Reader, Writer, Seeker {}\n /** Copies from `src` to `dst` until either `EOF` is reached on `src`\n * or an error occurs. It returns the number of bytes copied and the first\n * error encountered while copying, if any.\n *\n * Because `copy()` is defined to read from `src` until `EOF`, it does not\n * treat an `EOF` from `read()` as an error to be reported.\n */\n export function copy(dst: Writer, src: Reader): Promise<number>;\n /** Turns `r` into async iterator.\n *\n * for await (const chunk of toAsyncIterator(reader)) {\n * console.log(chunk)\n * }\n */\n export function toAsyncIterator(r: Reader): AsyncIterableIterator<Uint8Array>;\n /** Open a file and return an instance of the `File` object\n * synchronously.\n *\n * const file = Deno.openSync(\"/foo/bar.txt\");\n */\n export function openSync(filename: string, mode?: OpenMode): File;\n /** Open a file and return an instance of the `File` object.\n *\n * (async () => {\n * const file = await Deno.open(\"/foo/bar.txt\");\n * })();\n */\n export function open(filename: string, mode?: OpenMode): Promise<File>;\n /** Read synchronously from a file ID into an array buffer.\n *\n * Return `ReadResult` for the operation.\n *\n * const file = Deno.openSync(\"/foo/bar.txt\");\n * const buf = new Uint8Array(100);\n * const { nread, eof } = Deno.readSync(file.rid, buf);\n * const text = new TextDecoder().decode(buf);\n *\n */\n export function readSync(rid: number, p: Uint8Array): ReadResult;\n /** Read from a file ID into an array buffer.\n *\n * Resolves with the `ReadResult` for the operation.\n *\n * (async () => {\n * const file = await Deno.open(\"/foo/bar.txt\");\n * const buf = new Uint8Array(100);\n * const { nread, eof } = await Deno.read(file.rid, buf);\n * const text = new TextDecoder().decode(buf);\n * })();\n */\n export function read(rid: number, p: Uint8Array): Promise<ReadResult>;\n /** Write synchronously to the file ID the contents of the array buffer.\n *\n * Resolves with the number of bytes written.\n *\n * const encoder = new TextEncoder();\n * const data = encoder.encode(\"Hello world\\n\");\n * const file = Deno.openSync(\"/foo/bar.txt\");\n * Deno.writeSync(file.rid, data);\n */\n export function writeSync(rid: number, p: Uint8Array): number;\n /** Write to the file ID the contents of the array buffer.\n *\n * Resolves with the number of bytes written.\n *\n * (async () => {\n * const encoder = new TextEncoder();\n * const data = encoder.encode(\"Hello world\\n\");\n * const file = await Deno.open(\"/foo/bar.txt\");\n * await Deno.write(file.rid, data);\n * })();\n *\n */\n export function write(rid: number, p: Uint8Array): Promise<number>;\n /** Seek a file ID synchronously to the given offset under mode given by `whence`.\n *\n * const file = Deno.openSync(\"/foo/bar.txt\");\n * Deno.seekSync(file.rid, 0, 0);\n */\n export function seekSync(rid: number, offset: number, whence: SeekMode): void;\n /** Seek a file ID to the given offset under mode given by `whence`.\n *\n * (async () => {\n * const file = await Deno.open(\"/foo/bar.txt\");\n * await Deno.seek(file.rid, 0, 0);\n * })();\n */\n export function seek(\n rid: number,\n offset: number,\n whence: SeekMode\n ): Promise<void>;\n /** Close the file ID. */\n export function close(rid: number): void;\n /** The Deno abstraction for reading and writing files. */\n export class File\n implements\n Reader,\n SyncReader,\n Writer,\n SyncWriter,\n Seeker,\n SyncSeeker,\n Closer {\n readonly rid: number;\n constructor(rid: number);\n write(p: Uint8Array): Promise<number>;\n writeSync(p: Uint8Array): number;\n read(p: Uint8Array): Promise<ReadResult>;\n readSync(p: Uint8Array): ReadResult;\n seek(offset: number, whence: SeekMode): Promise<void>;\n seekSync(offset: number, whence: SeekMode): void;\n close(): void;\n }\n /** An instance of `File` for stdin. */\n export const stdin: File;\n /** An instance of `File` for stdout. */\n export const stdout: File;\n /** An instance of `File` for stderr. */\n export const stderr: File;\n export type OpenMode =\n | \"r\"\n /** Read-write. Start at beginning of file. */\n | \"r+\"\n /** Write-only. Opens and truncates existing file or creates new one for\n * writing only.\n */\n | \"w\"\n /** Read-write. Opens and truncates existing file or creates new one for\n * writing and reading.\n */\n | \"w+\"\n /** Write-only. Opens existing file or creates new one. Each write appends\n * content to the end of file.\n */\n | \"a\"\n /** Read-write. Behaves like \"a\" and allows to read from file. */\n | \"a+\"\n /** Write-only. Exclusive create - creates new file only if one doesn't exist\n * already.\n */\n | \"x\"\n /** Read-write. Behaves like `x` and allows to read from file. */\n | \"x+\";\n /** A Buffer is a variable-sized buffer of bytes with read() and write()\n * methods. Based on https://golang.org/pkg/bytes/#Buffer\n */\n export class Buffer implements Reader, SyncReader, Writer, SyncWriter {\n private buf;\n private off;\n constructor(ab?: ArrayBuffer);\n /** bytes() returns a slice holding the unread portion of the buffer.\n * The slice is valid for use only until the next buffer modification (that\n * is, only until the next call to a method like read(), write(), reset(), or\n * truncate()). The slice aliases the buffer content at least until the next\n * buffer modification, so immediate changes to the slice will affect the\n * result of future reads.\n */\n bytes(): Uint8Array;\n /** toString() returns the contents of the unread portion of the buffer\n * as a string. Warning - if multibyte characters are present when data is\n * flowing through the buffer, this method may result in incorrect strings\n * due to a character being split.\n */\n toString(): string;\n /** empty() returns whether the unread portion of the buffer is empty. */\n empty(): boolean;\n /** length is a getter that returns the number of bytes of the unread\n * portion of the buffer\n */\n readonly length: number;\n /** Returns the capacity of the buffer's underlying byte slice, that is,\n * the total space allocated for the buffer's data.\n */\n readonly capacity: number;\n /** truncate() discards all but the first n unread bytes from the buffer but\n * continues to use the same allocated storage. It throws if n is negative or\n * greater than the length of the buffer.\n */\n truncate(n: number): void;\n /** reset() resets the buffer to be empty, but it retains the underlying\n * storage for use by future writes. reset() is the same as truncate(0)\n */\n reset(): void;\n /** _tryGrowByReslice() is a version of grow for the fast-case\n * where the internal buffer only needs to be resliced. It returns the index\n * where bytes should be written and whether it succeeded.\n * It returns -1 if a reslice was not needed.\n */\n private _tryGrowByReslice;\n private _reslice;\n /** readSync() reads the next len(p) bytes from the buffer or until the buffer\n * is drained. The return value n is the number of bytes read. If the\n * buffer has no data to return, eof in the response will be true.\n */\n readSync(p: Uint8Array): ReadResult;\n read(p: Uint8Array): Promise<ReadResult>;\n writeSync(p: Uint8Array): number;\n write(p: Uint8Array): Promise<number>;\n /** _grow() grows the buffer to guarantee space for n more bytes.\n * It returns the index where bytes should be written.\n * If the buffer can't grow it will throw with ErrTooLarge.\n */\n private _grow;\n /** grow() grows the buffer's capacity, if necessary, to guarantee space for\n * another n bytes. After grow(n), at least n bytes can be written to the\n * buffer without another allocation. If n is negative, grow() will panic. If\n * the buffer can't grow it will throw ErrTooLarge.\n * Based on https://golang.org/pkg/bytes/#Buffer.Grow\n */\n grow(n: number): void;\n /** readFrom() reads data from r until EOF and appends it to the buffer,\n * growing the buffer as needed. It returns the number of bytes read. If the\n * buffer becomes too large, readFrom will panic with ErrTooLarge.\n * Based on https://golang.org/pkg/bytes/#Buffer.ReadFrom\n */\n readFrom(r: Reader): Promise<number>;\n /** Sync version of `readFrom`\n */\n readFromSync(r: SyncReader): number;\n }\n /** Read `r` until EOF and return the content as `Uint8Array`.\n */\n export function readAll(r: Reader): Promise<Uint8Array>;\n /** Read synchronously `r` until EOF and return the content as `Uint8Array`.\n */\n export function readAllSync(r: SyncReader): Uint8Array;\n /** Creates a new directory with the specified path synchronously.\n * If `recursive` is set to true, nested directories will be created (also known\n * as \"mkdir -p\").\n * `mode` sets permission bits (before umask) on UNIX and does nothing on\n * Windows.\n *\n * Deno.mkdirSync(\"new_dir\");\n * Deno.mkdirSync(\"nested/directories\", true);\n */\n export function mkdirSync(\n path: string,\n recursive?: boolean,\n mode?: number\n ): void;\n /** Creates a new directory with the specified path.\n * If `recursive` is set to true, nested directories will be created (also known\n * as \"mkdir -p\").\n * `mode` sets permission bits (before umask) on UNIX and does nothing on\n * Windows.\n *\n * await Deno.mkdir(\"new_dir\");\n * await Deno.mkdir(\"nested/directories\", true);\n */\n export function mkdir(\n path: string,\n recursive?: boolean,\n mode?: number\n ): Promise<void>;\n export interface MakeTempDirOptions {\n dir?: string;\n prefix?: string;\n suffix?: string;\n }\n /** makeTempDirSync is the synchronous version of `makeTempDir`.\n *\n * const tempDirName0 = Deno.makeTempDirSync();\n * const tempDirName1 = Deno.makeTempDirSync({ prefix: 'my_temp' });\n */\n export function makeTempDirSync(options?: MakeTempDirOptions): string;\n /** makeTempDir creates a new temporary directory in the directory `dir`, its\n * name beginning with `prefix` and ending with `suffix`.\n * It returns the full path to the newly created directory.\n * If `dir` is unspecified, tempDir uses the default directory for temporary\n * files. Multiple programs calling tempDir simultaneously will not choose the\n * same directory. It is the caller's responsibility to remove the directory\n * when no longer needed.\n *\n * const tempDirName0 = await Deno.makeTempDir();\n * const tempDirName1 = await Deno.makeTempDir({ prefix: 'my_temp' });\n */\n export function makeTempDir(options?: MakeTempDirOptions): Promise<string>;\n /** Changes the permission of a specific file/directory of specified path\n * synchronously.\n *\n * Deno.chmodSync(\"/path/to/file\", 0o666);\n */\n export function chmodSync(path: string, mode: number): void;\n /** Changes the permission of a specific file/directory of specified path.\n *\n * await Deno.chmod(\"/path/to/file\", 0o666);\n */\n export function chmod(path: string, mode: number): Promise<void>;\n /**\n * Change owner of a regular file or directory synchronously. Unix only at the moment.\n * @param path path to the file\n * @param uid user id of the new owner\n * @param gid group id of the new owner\n */\n export function chownSync(path: string, uid: number, gid: number): void;\n /**\n * Change owner of a regular file or directory asynchronously. Unix only at the moment.\n * @param path path to the file\n * @param uid user id of the new owner\n * @param gid group id of the new owner\n */\n export function chown(path: string, uid: number, gid: number): Promise<void>;\n /** Synchronously changes the access and modification times of a file system\n * object referenced by `filename`. Given times are either in seconds\n * (Unix epoch time) or as `Date` objects.\n *\n * Deno.utimeSync(\"myfile.txt\", 1556495550, new Date());\n */\n export function utimeSync(\n filename: string,\n atime: number | Date,\n mtime: number | Date\n ): void;\n /** Changes the access and modification times of a file system object\n * referenced by `filename`. Given times are either in seconds\n * (Unix epoch time) or as `Date` objects.\n *\n * await Deno.utime(\"myfile.txt\", 1556495550, new Date());\n */\n export function utime(\n filename: string,\n atime: number | Date,\n mtime: number | Date\n ): Promise<void>;\n export interface RemoveOption {\n recursive?: boolean;\n }\n /** Removes the named file or directory synchronously. Would throw\n * error if permission denied, not found, or directory not empty if `recursive`\n * set to false.\n * `recursive` is set to false by default.\n *\n * Deno.removeSync(\"/path/to/dir/or/file\", {recursive: false});\n */\n export function removeSync(path: string, options?: RemoveOption): void;\n /** Removes the named file or directory. Would throw error if\n * permission denied, not found, or directory not empty if `recursive` set\n * to false.\n * `recursive` is set to false by default.\n *\n * await Deno.remove(\"/path/to/dir/or/file\", {recursive: false});\n */\n export function remove(path: string, options?: RemoveOption): Promise<void>;\n /** Synchronously renames (moves) `oldpath` to `newpath`. If `newpath` already\n * exists and is not a directory, `renameSync()` replaces it. OS-specific\n * restrictions may apply when `oldpath` and `newpath` are in different\n * directories.\n *\n * Deno.renameSync(\"old/path\", \"new/path\");\n */\n export function renameSync(oldpath: string, newpath: string): void;\n /** Renames (moves) `oldpath` to `newpath`. If `newpath` already exists and is\n * not a directory, `rename()` replaces it. OS-specific restrictions may apply\n * when `oldpath` and `newpath` are in different directories.\n *\n * await Deno.rename(\"old/path\", \"new/path\");\n */\n export function rename(oldpath: string, newpath: string): Promise<void>;\n /** Read the entire contents of a file synchronously.\n *\n * const decoder = new TextDecoder(\"utf-8\");\n * const data = Deno.readFileSync(\"hello.txt\");\n * console.log(decoder.decode(data));\n */\n export function readFileSync(filename: string): Uint8Array;\n /** Read the entire contents of a file.\n *\n * const decoder = new TextDecoder(\"utf-8\");\n * const data = await Deno.readFile(\"hello.txt\");\n * console.log(decoder.decode(data));\n */\n export function readFile(filename: string): Promise<Uint8Array>;\n /** A FileInfo describes a file and is returned by `stat`, `lstat`,\n * `statSync`, `lstatSync`.\n */\n export interface FileInfo {\n /** The size of the file, in bytes. */\n len: number;\n /** The last modification time of the file. This corresponds to the `mtime`\n * field from `stat` on Unix and `ftLastWriteTime` on Windows. This may not\n * be available on all platforms.\n */\n modified: number | null;\n /** The last access time of the file. This corresponds to the `atime`\n * field from `stat` on Unix and `ftLastAccessTime` on Windows. This may not\n * be available on all platforms.\n */\n accessed: number | null;\n /** The last access time of the file. This corresponds to the `birthtime`\n * field from `stat` on Unix and `ftCreationTime` on Windows. This may not\n * be available on all platforms.\n */\n created: number | null;\n /** The underlying raw st_mode bits that contain the standard Unix permissions\n * for this file/directory. TODO Match behavior with Go on windows for mode.\n */\n mode: number | null;\n /** Returns the file or directory name. */\n name: string | null;\n /** Returns the file or directory path. */\n path: string | null;\n /** Returns whether this is info for a regular file. This result is mutually\n * exclusive to `FileInfo.isDirectory` and `FileInfo.isSymlink`.\n */\n isFile(): boolean;\n /** Returns whether this is info for a regular directory. This result is\n * mutually exclusive to `FileInfo.isFile` and `FileInfo.isSymlink`.\n */\n isDirectory(): boolean;\n /** Returns whether this is info for a symlink. This result is\n * mutually exclusive to `FileInfo.isFile` and `FileInfo.isDirectory`.\n */\n isSymlink(): boolean;\n }\n /** Reads the directory given by path and returns a list of file info\n * synchronously.\n *\n * const files = Deno.readDirSync(\"/\");\n */\n export function readDirSync(path: string): FileInfo[];\n /** Reads the directory given by path and returns a list of file info.\n *\n * const files = await Deno.readDir(\"/\");\n */\n export function readDir(path: string): Promise<FileInfo[]>;\n /** Copies the contents of a file to another by name synchronously.\n * Creates a new file if target does not exists, and if target exists,\n * overwrites original content of the target file.\n *\n * It would also copy the permission of the original file\n * to the destination.\n *\n * Deno.copyFileSync(\"from.txt\", \"to.txt\");\n */\n export function copyFileSync(from: string, to: string): void;\n /** Copies the contents of a file to another by name.\n *\n * Creates a new file if target does not exists, and if target exists,\n * overwrites original content of the target file.\n *\n * It would also copy the permission of the original file\n * to the destination.\n *\n * await Deno.copyFile(\"from.txt\", \"to.txt\");\n */\n export function copyFile(from: string, to: string): Promise<void>;\n /** Returns the destination of the named symbolic link synchronously.\n *\n * const targetPath = Deno.readlinkSync(\"symlink/path\");\n */\n export function readlinkSync(name: string): string;\n /** Returns the destination of the named symbolic link.\n *\n * const targetPath = await Deno.readlink(\"symlink/path\");\n */\n export function readlink(name: string): Promise<string>;\n /** Queries the file system for information on the path provided. If the given\n * path is a symlink information about the symlink will be returned.\n *\n * const fileInfo = await Deno.lstat(\"hello.txt\");\n * assert(fileInfo.isFile());\n */\n export function lstat(filename: string): Promise<FileInfo>;\n /** Queries the file system for information on the path provided synchronously.\n * If the given path is a symlink information about the symlink will be\n * returned.\n *\n * const fileInfo = Deno.lstatSync(\"hello.txt\");\n * assert(fileInfo.isFile());\n */\n export function lstatSync(filename: string): FileInfo;\n /** Queries the file system for information on the path provided. `stat` Will\n * always follow symlinks.\n *\n * const fileInfo = await Deno.stat(\"hello.txt\");\n * assert(fileInfo.isFile());\n */\n export function stat(filename: string): Promise<FileInfo>;\n /** Queries the file system for information on the path provided synchronously.\n * `statSync` Will always follow symlinks.\n *\n * const fileInfo = Deno.statSync(\"hello.txt\");\n * assert(fileInfo.isFile());\n */\n export function statSync(filename: string): FileInfo;\n /** Synchronously creates `newname` as a hard link to `oldname`.\n *\n * Deno.linkSync(\"old/name\", \"new/name\");\n */\n export function linkSync(oldname: string, newname: string): void;\n /** Creates `newname` as a hard link to `oldname`.\n *\n * await Deno.link(\"old/name\", \"new/name\");\n */\n export function link(oldname: string, newname: string): Promise<void>;\n /** Synchronously creates `newname` as a symbolic link to `oldname`. The type\n * argument can be set to `dir` or `file` and is only available on Windows\n * (ignored on other platforms).\n *\n * Deno.symlinkSync(\"old/name\", \"new/name\");\n */\n export function symlinkSync(\n oldname: string,\n newname: string,\n type?: string\n ): void;\n /** Creates `newname` as a symbolic link to `oldname`. The type argument can be\n * set to `dir` or `file` and is only available on Windows (ignored on other\n * platforms).\n *\n * await Deno.symlink(\"old/name\", \"new/name\");\n */\n export function symlink(\n oldname: string,\n newname: string,\n type?: string\n ): Promise<void>;\n /** Options for writing to a file.\n * `perm` would change the file's permission if set.\n * `create` decides if the file should be created if not exists (default: true)\n * `append` decides if the file should be appended (default: false)\n */\n export interface WriteFileOptions {\n perm?: number;\n create?: boolean;\n append?: boolean;\n }\n /** Write a new file, with given filename and data synchronously.\n *\n * const encoder = new TextEncoder();\n * const data = encoder.encode(\"Hello world\\n\");\n * Deno.writeFileSync(\"hello.txt\", data);\n */\n export function writeFileSync(\n filename: string,\n data: Uint8Array,\n options?: WriteFileOptions\n ): void;\n /** Write a new file, with given filename and data.\n *\n * const encoder = new TextEncoder();\n * const data = encoder.encode(\"Hello world\\n\");\n * await Deno.writeFile(\"hello.txt\", data);\n */\n export function writeFile(\n filename: string,\n data: Uint8Array,\n options?: WriteFileOptions\n ): Promise<void>;\n export enum ErrorKind {\n NoError = 0,\n NotFound = 1,\n PermissionDenied = 2,\n ConnectionRefused = 3,\n ConnectionReset = 4,\n ConnectionAborted = 5,\n NotConnected = 6,\n AddrInUse = 7,\n AddrNotAvailable = 8,\n BrokenPipe = 9,\n AlreadyExists = 10,\n WouldBlock = 11,\n InvalidInput = 12,\n InvalidData = 13,\n TimedOut = 14,\n Interrupted = 15,\n WriteZero = 16,\n Other = 17,\n UnexpectedEof = 18,\n BadResource = 19,\n CommandFailed = 20,\n EmptyHost = 21,\n IdnaError = 22,\n InvalidPort = 23,\n InvalidIpv4Address = 24,\n InvalidIpv6Address = 25,\n InvalidDomainCharacter = 26,\n RelativeUrlWithoutBase = 27,\n RelativeUrlWithCannotBeABaseBase = 28,\n SetHostOnCannotBeABaseUrl = 29,\n Overflow = 30,\n HttpUser = 31,\n HttpClosed = 32,\n HttpCanceled = 33,\n HttpParse = 34,\n HttpOther = 35,\n TooLarge = 36,\n InvalidUri = 37,\n InvalidSeekMode = 38,\n OpNotAvaiable = 39,\n WorkerInitFailed = 40,\n UnixError = 41\n }\n /** A Deno specific error. The `kind` property is set to a specific error code\n * which can be used to in application logic.\n *\n * try {\n * somethingThatMightThrow();\n * } catch (e) {\n * if (\n * e instanceof Deno.DenoError &&\n * e.kind === Deno.ErrorKind.Overflow\n * ) {\n * console.error(\"Overflow error!\");\n * }\n * }\n *\n */\n export class DenoError<T extends ErrorKind> extends Error {\n readonly kind: T;\n constructor(kind: T, msg: string);\n }\n /** Permissions as granted by the caller */\n export interface Permissions {\n read: boolean;\n write: boolean;\n net: boolean;\n env: boolean;\n run: boolean;\n highPrecision: boolean;\n }\n export type Permission = keyof Permissions;\n /** Inspect granted permissions for the current program.\n *\n * if (Deno.permissions().read) {\n * const file = await Deno.readFile(\"example.test\");\n * // ...\n * }\n */\n export function permissions(): Permissions;\n /** Revoke a permission. When the permission was already revoked nothing changes\n *\n * if (Deno.permissions().read) {\n * const file = await Deno.readFile(\"example.test\");\n * Deno.revokePermission('read');\n * }\n * Deno.readFile(\"example.test\"); // -> error or permission prompt\n */\n export function revokePermission(permission: Permission): void;\n /** Truncates or extends the specified file synchronously, updating the size of\n * this file to become size.\n *\n * Deno.truncateSync(\"hello.txt\", 10);\n */\n export function truncateSync(name: string, len?: number): void;\n /**\n * Truncates or extends the specified file, updating the size of this file to\n * become size.\n *\n * await Deno.truncate(\"hello.txt\", 10);\n */\n export function truncate(name: string, len?: number): Promise<void>;\n type Network = \"tcp\";\n type Addr = string;\n /** A Listener is a generic network listener for stream-oriented protocols. */\n export interface Listener extends AsyncIterator<Conn> {\n /** Waits for and resolves to the next connection to the `Listener`. */\n accept(): Promise<Conn>;\n /** Close closes the listener. Any pending accept promises will be rejected\n * with errors.\n */\n close(): void;\n /** Return the address of the `Listener`. */\n addr(): Addr;\n [Symbol.asyncIterator](): AsyncIterator<Conn>;\n }\n export interface Conn extends Reader, Writer, Closer {\n /** The local address of the connection. */\n localAddr: string;\n /** The remote address of the connection. */\n remoteAddr: string;\n /** The resource ID of the connection. */\n rid: number;\n /** Shuts down (`shutdown(2)`) the reading side of the TCP connection. Most\n * callers should just use `close()`.\n */\n closeRead(): void;\n /** Shuts down (`shutdown(2)`) the writing side of the TCP connection. Most\n * callers should just use `close()`.\n */\n closeWrite(): void;\n }\n /** Listen announces on the local network address.\n *\n * The network must be `tcp`, `tcp4`, `tcp6`, `unix` or `unixpacket`.\n *\n * For TCP networks, if the host in the address parameter is empty or a literal\n * unspecified IP address, `listen()` listens on all available unicast and\n * anycast IP addresses of the local system. To only use IPv4, use network\n * `tcp4`. The address can use a host name, but this is not recommended,\n * because it will create a listener for at most one of the host's IP\n * addresses. If the port in the address parameter is empty or `0`, as in\n * `127.0.0.1:` or `[::1]:0`, a port number is automatically chosen. The\n * `addr()` method of `Listener` can be used to discover the chosen port.\n *\n * See `dial()` for a description of the network and address parameters.\n */\n export function listen(network: Network, address: string): Listener;\n /** Dial connects to the address on the named network.\n *\n * Supported networks are only `tcp` currently.\n *\n * TODO: `tcp4` (IPv4-only), `tcp6` (IPv6-only), `udp`, `udp4` (IPv4-only),\n * `udp6` (IPv6-only), `ip`, `ip4` (IPv4-only), `ip6` (IPv6-only), `unix`,\n * `unixgram` and `unixpacket`.\n *\n * For TCP and UDP networks, the address has the form `host:port`. The host must\n * be a literal IP address, or a host name that can be resolved to IP addresses.\n * The port must be a literal port number or a service name. If the host is a\n * literal IPv6 address it must be enclosed in square brackets, as in\n * `[2001:db8::1]:80` or `[fe80::1%zone]:80`. The zone specifies the scope of\n * the literal IPv6 address as defined in RFC 4007. The functions JoinHostPort\n * and SplitHostPort manipulate a pair of host and port in this form. When using\n * TCP, and the host resolves to multiple IP addresses, Dial will try each IP\n * address in order until one succeeds.\n *\n * Examples:\n *\n * dial(\"tcp\", \"golang.org:http\")\n * dial(\"tcp\", \"192.0.2.1:http\")\n * dial(\"tcp\", \"198.51.100.1:80\")\n * dial(\"udp\", \"[2001:db8::1]:domain\")\n * dial(\"udp\", \"[fe80::1%lo0]:53\")\n * dial(\"tcp\", \":80\")\n */\n export function dial(network: Network, address: string): Promise<Conn>;\n /** **RESERVED** */\n export function connect(_network: Network, _address: string): Promise<Conn>;\n export interface Metrics {\n opsDispatched: number;\n opsCompleted: number;\n bytesSentControl: number;\n bytesSentData: number;\n bytesReceived: number;\n }\n /** Receive metrics from the privileged side of Deno.\n *\n * > console.table(Deno.metrics())\n * ┌──────────────────┬────────┐\n * │ (index) │ Values │\n * ├──────────────────┼────────┤\n * │ opsDispatched │ 9 │\n * │ opsCompleted │ 9 │\n * │ bytesSentControl │ 504 │\n * │ bytesSentData │ 0 │\n * │ bytesReceived │ 856 │\n * └──────────────────┴────────┘\n */\n export function metrics(): Metrics;\n interface ResourceMap {\n [rid: number]: string;\n }\n /** Returns a map of open _file like_ resource ids along with their string\n * representation.\n */\n export function resources(): ResourceMap;\n /** How to handle subprocess stdio.\n *\n * \"inherit\" The default if unspecified. The child inherits from the\n * corresponding parent descriptor.\n *\n * \"piped\" A new pipe should be arranged to connect the parent and child\n * subprocesses.\n *\n * \"null\" This stream will be ignored. This is the equivalent of attaching the\n * stream to /dev/null.\n */\n type ProcessStdio = \"inherit\" | \"piped\" | \"null\";\n export interface RunOptions {\n args: string[];\n cwd?: string;\n env?: {\n [key: string]: string;\n };\n stdout?: ProcessStdio;\n stderr?: ProcessStdio;\n stdin?: ProcessStdio;\n }\n /** Send a signal to process under given PID. Unix only at this moment.\n * If pid is negative, the signal will be sent to the process group identified\n * by -pid.\n */\n export function kill(pid: number, signo: number): void;\n export class Process {\n readonly rid: number;\n readonly pid: number;\n readonly stdin?: WriteCloser;\n readonly stdout?: ReadCloser;\n readonly stderr?: ReadCloser;\n status(): Promise<ProcessStatus>;\n /** Buffer the stdout and return it as Uint8Array after EOF.\n * You must set stdout to \"piped\" when creating the process.\n * This calls close() on stdout after its done.\n */\n output(): Promise<Uint8Array>;\n /** Buffer the stderr and return it as Uint8Array after EOF.\n * You must set stderr to \"piped\" when creating the process.\n * This calls close() on stderr after its done.\n */\n stderrOutput(): Promise<Uint8Array>;\n close(): void;\n kill(signo: number): void;\n }\n export interface ProcessStatus {\n success: boolean;\n code?: number;\n signal?: number;\n }\n /**\n * Spawns new subprocess.\n *\n * Subprocess uses same working directory as parent process unless `opt.cwd`\n * is specified.\n *\n * Environmental variables for subprocess can be specified using `opt.env`\n * mapping.\n *\n * By default subprocess inherits stdio of parent process. To change that\n * `opt.stdout`, `opt.stderr` and `opt.stdin` can be specified independently.\n */\n export function run(opt: RunOptions): Process;\n enum LinuxSignal {\n SIGHUP = 1,\n SIGINT = 2,\n SIGQUIT = 3,\n SIGILL = 4,\n SIGTRAP = 5,\n SIGABRT = 6,\n SIGBUS = 7,\n SIGFPE = 8,\n SIGKILL = 9,\n SIGUSR1 = 10,\n SIGSEGV = 11,\n SIGUSR2 = 12,\n SIGPIPE = 13,\n SIGALRM = 14,\n SIGTERM = 15,\n SIGSTKFLT = 16,\n SIGCHLD = 17,\n SIGCONT = 18,\n SIGSTOP = 19,\n SIGTSTP = 20,\n SIGTTIN = 21,\n SIGTTOU = 22,\n SIGURG = 23,\n SIGXCPU = 24,\n SIGXFSZ = 25,\n SIGVTALRM = 26,\n SIGPROF = 27,\n SIGWINCH = 28,\n SIGIO = 29,\n SIGPWR = 30,\n SIGSYS = 31\n }\n enum MacOSSignal {\n SIGHUP = 1,\n SIGINT = 2,\n SIGQUIT = 3,\n SIGILL = 4,\n SIGTRAP = 5,\n SIGABRT = 6,\n SIGEMT = 7,\n SIGFPE = 8,\n SIGKILL = 9,\n SIGBUS = 10,\n SIGSEGV = 11,\n SIGSYS = 12,\n SIGPIPE = 13,\n SIGALRM = 14,\n SIGTERM = 15,\n SIGURG = 16,\n SIGSTOP = 17,\n SIGTSTP = 18,\n SIGCONT = 19,\n SIGCHLD = 20,\n SIGTTIN = 21,\n SIGTTOU = 22,\n SIGIO = 23,\n SIGXCPU = 24,\n SIGXFSZ = 25,\n SIGVTALRM = 26,\n SIGPROF = 27,\n SIGWINCH = 28,\n SIGINFO = 29,\n SIGUSR1 = 30,\n SIGUSR2 = 31\n }\n /** Signals numbers. This is platform dependent.\n */\n export const Signal: typeof MacOSSignal | typeof LinuxSignal;\n export {};\n type ConsoleOptions = Partial<{\n showHidden: boolean;\n depth: number;\n colors: boolean;\n indentLevel: number;\n collapsedAt: number | null;\n }>;\n class CSI {\n static kClear: string;\n static kClearScreenDown: string;\n }\n export const isConsoleInstance: unique symbol;\n class Console {\n private printFunc;\n indentLevel: number;\n collapsedAt: number | null;\n [isConsoleInstance]: boolean;\n /** Writes the arguments to stdout */\n log: (...args: unknown[]) => void;\n /** Writes the arguments to stdout */\n debug: (...args: unknown[]) => void;\n /** Writes the arguments to stdout */\n info: (...args: unknown[]) => void;\n /** Writes the properties of the supplied `obj` to stdout */\n dir: (\n obj: unknown,\n options?: Partial<{\n showHidden: boolean;\n depth: number;\n colors: boolean;\n indentLevel: number;\n collapsedAt: number | null;\n }>\n ) => void;\n /** Writes the arguments to stdout */\n warn: (...args: unknown[]) => void;\n /** Writes the arguments to stdout */\n error: (...args: unknown[]) => void;\n /** Writes an error message to stdout if the assertion is `false`. If the\n * assertion is `true`, nothing happens.\n *\n * ref: https://console.spec.whatwg.org/#assert\n */\n assert: (condition?: boolean, ...args: unknown[]) => void;\n count: (label?: string) => void;\n countReset: (label?: string) => void;\n table: (data: unknown, properties?: string[] | undefined) => void;\n time: (label?: string) => void;\n timeLog: (label?: string, ...args: unknown[]) => void;\n timeEnd: (label?: string) => void;\n group: (...label: unknown[]) => void;\n groupCollapsed: (...label: unknown[]) => void;\n groupEnd: () => void;\n clear: () => void;\n static [Symbol.hasInstance](instance: Console): boolean;\n }\n /**\n * `inspect()` converts input into string that has the same format\n * as printed by `console.log(...)`;\n */\n export function inspect(value: unknown, options?: ConsoleOptions): string;\n export type OperatingSystem = \"mac\" | \"win\" | \"linux\";\n export type Arch = \"x64\" | \"arm64\";\n /** Build related information */\n interface BuildInfo {\n /** The CPU architecture. */\n arch: Arch;\n /** The operating system. */\n os: OperatingSystem;\n /** The arguments passed to GN during build. See `gn help buildargs`. */\n args: string;\n }\n export const build: BuildInfo;\n export const platform: BuildInfo;\n interface Version {\n deno: string;\n v8: string;\n typescript: string;\n }\n export const version: Version;\n export {};\n export const args: string[];\n}\n\ndeclare interface Window {\n window: Window;\n atob: typeof textEncoding.atob;\n btoa: typeof textEncoding.btoa;\n fetch: typeof fetchTypes.fetch;\n clearTimeout: typeof timers.clearTimer;\n clearInterval: typeof timers.clearTimer;\n console: consoleTypes.Console;\n setTimeout: typeof timers.setTimeout;\n setInterval: typeof timers.setInterval;\n location: domTypes.Location;\n Blob: typeof blob.DenoBlob;\n File: domTypes.DomFileConstructor;\n CustomEventInit: typeof customEvent.CustomEventInit;\n CustomEvent: typeof customEvent.CustomEvent;\n EventInit: typeof event.EventInit;\n Event: typeof event.Event;\n EventTarget: typeof eventTarget.EventTarget;\n URL: typeof url.URL;\n URLSearchParams: typeof urlSearchParams.URLSearchParams;\n Headers: domTypes.HeadersConstructor;\n FormData: domTypes.FormDataConstructor;\n TextEncoder: typeof textEncoding.TextEncoder;\n TextDecoder: typeof textEncoding.TextDecoder;\n Request: typeof request.Request;\n performance: performanceUtil.Performance;\n onmessage: (e: { data: any }) => void;\n workerMain: typeof workers.workerMain;\n workerClose: typeof workers.workerClose;\n postMessage: typeof workers.postMessage;\n Worker: typeof workers.WorkerImpl;\n Deno: typeof Deno;\n}\n\ndeclare const window: Window;\ndeclare const globalThis: Window;\ndeclare const atob: typeof textEncoding.atob;\ndeclare const btoa: typeof textEncoding.btoa;\ndeclare const fetch: typeof fetchTypes.fetch;\ndeclare const clearTimeout: typeof timers.clearTimer;\ndeclare const clearInterval: typeof timers.clearTimer;\ndeclare const console: consoleTypes.Console;\ndeclare const setTimeout: typeof timers.setTimeout;\ndeclare const setInterval: typeof timers.setInterval;\ndeclare const location: domTypes.Location;\ndeclare const Blob: typeof blob.DenoBlob;\ndeclare const File: domTypes.DomFileConstructor;\ndeclare const CustomEventInit: typeof customEvent.CustomEventInit;\ndeclare const CustomEvent: typeof customEvent.CustomEvent;\ndeclare const EventInit: typeof event.EventInit;\ndeclare const Event: typeof event.Event;\ndeclare const EventTarget: typeof eventTarget.EventTarget;\ndeclare const URL: typeof url.URL;\ndeclare const URLSearchParams: typeof urlSearchParams.URLSearchParams;\ndeclare const Headers: domTypes.HeadersConstructor;\ndeclare const FormData: domTypes.FormDataConstructor;\ndeclare const TextEncoder: typeof textEncoding.TextEncoder;\ndeclare const TextDecoder: typeof textEncoding.TextDecoder;\ndeclare const Request: typeof request.Request;\ndeclare const performance: performanceUtil.Performance;\ndeclare let onmessage: (e: { data: any }) => void;\ndeclare const workerMain: typeof workers.workerMain;\ndeclare const workerClose: typeof workers.workerClose;\ndeclare const postMessage: typeof workers.postMessage;\ndeclare const Worker: typeof workers.WorkerImpl;\n\ndeclare type Blob = blob.DenoBlob;\ndeclare type File = domTypes.DomFile;\ndeclare type CustomEventInit = customEvent.CustomEventInit;\ndeclare type CustomEvent = customEvent.CustomEvent;\ndeclare type EventInit = event.EventInit;\ndeclare type Event = event.Event;\ndeclare type EventTarget = eventTarget.EventTarget;\ndeclare type URL = url.URL;\ndeclare type URLSearchParams = urlSearchParams.URLSearchParams;\ndeclare type Headers = domTypes.Headers;\ndeclare type FormData = domTypes.FormData;\ndeclare type TextEncoder = textEncoding.TextEncoder;\ndeclare type TextDecoder = textEncoding.TextDecoder;\ndeclare type Request = request.Request;\ndeclare type Worker = workers.Worker;\n\ndeclare interface ImportMeta {\n url: string;\n main: boolean;\n}\n\ndeclare namespace domTypes {\n export type BufferSource = ArrayBufferView | ArrayBuffer;\n export type HeadersInit =\n | Headers\n | Array<[string, string]>\n | Record<string, string>;\n export type URLSearchParamsInit =\n | string\n | string[][]\n | Record<string, string>;\n type BodyInit =\n | Blob\n | BufferSource\n | FormData\n | URLSearchParams\n | ReadableStream\n | string;\n export type RequestInfo = Request | string;\n type ReferrerPolicy =\n | \"\"\n | \"no-referrer\"\n | \"no-referrer-when-downgrade\"\n | \"origin-only\"\n | \"origin-when-cross-origin\"\n | \"unsafe-url\";\n export type BlobPart = BufferSource | Blob | string;\n export type FormDataEntryValue = DomFile | string;\n export type EventListenerOrEventListenerObject =\n | EventListener\n | EventListenerObject;\n export interface DomIterable<K, V> {\n keys(): IterableIterator<K>;\n values(): IterableIterator<V>;\n entries(): IterableIterator<[K, V]>;\n [Symbol.iterator](): IterableIterator<[K, V]>;\n forEach(\n callback: (value: V, key: K, parent: this) => void,\n thisArg?: any\n ): void;\n }\n type EndingType = \"transparent\" | \"native\";\n export interface BlobPropertyBag {\n type?: string;\n ending?: EndingType;\n }\n interface AbortSignalEventMap {\n abort: ProgressEvent;\n }\n export interface EventTarget {\n addEventListener(\n type: string,\n listener: EventListenerOrEventListenerObject | null,\n options?: boolean | AddEventListenerOptions\n ): void;\n dispatchEvent(evt: Event): boolean;\n removeEventListener(\n type: string,\n listener?: EventListenerOrEventListenerObject | null,\n options?: EventListenerOptions | boolean\n ): void;\n }\n export interface ProgressEventInit extends EventInit {\n lengthComputable?: boolean;\n loaded?: number;\n total?: number;\n }\n export interface URLSearchParams {\n /**\n * Appends a specified key/value pair as a new search parameter.\n */\n append(name: string, value: string): void;\n /**\n * Deletes the given search parameter, and its associated value,\n * from the list of all search parameters.\n */\n delete(name: string): void;\n /**\n * Returns the first value associated to the given search parameter.\n */\n get(name: string): string | null;\n /**\n * Returns all the values association with a given search parameter.\n */\n getAll(name: string): string[];\n /**\n * Returns a Boolean indicating if such a search parameter exists.\n */\n has(name: string): boolean;\n /**\n * Sets the value associated to a given search parameter to the given value.\n * If there were several values, delete the others.\n */\n set(name: string, value: string): void;\n /**\n * Sort all key/value pairs contained in this object in place\n * and return undefined. The sort order is according to Unicode\n * code points of the keys.\n */\n sort(): void;\n /**\n * Returns a query string suitable for use in a URL.\n */\n toString(): string;\n /**\n * Iterates over each name-value pair in the query\n * and invokes the given function.\n */\n forEach(\n callbackfn: (value: string, key: string, parent: URLSearchParams) => void,\n thisArg?: any\n ): void;\n }\n export interface EventListener {\n (evt: Event): void;\n }\n export interface EventInit {\n bubbles?: boolean;\n cancelable?: boolean;\n composed?: boolean;\n }\n export interface CustomEventInit extends EventInit {\n detail?: any;\n }\n export enum EventPhase {\n NONE = 0,\n CAPTURING_PHASE = 1,\n AT_TARGET = 2,\n BUBBLING_PHASE = 3\n }\n export interface EventPath {\n item: EventTarget;\n itemInShadowTree: boolean;\n relatedTarget: EventTarget | null;\n rootOfClosedTree: boolean;\n slotInClosedTree: boolean;\n target: EventTarget | null;\n touchTargetList: EventTarget[];\n }\n export interface Event {\n readonly type: string;\n readonly target: EventTarget | null;\n readonly currentTarget: EventTarget | null;\n composedPath(): EventPath[];\n readonly eventPhase: number;\n stopPropagation(): void;\n stopImmediatePropagation(): void;\n readonly bubbles: boolean;\n readonly cancelable: boolean;\n preventDefault(): void;\n readonly defaultPrevented: boolean;\n readonly composed: boolean;\n readonly isTrusted: boolean;\n readonly timeStamp: Date;\n }\n export interface CustomEvent extends Event {\n readonly detail: any;\n initCustomEvent(\n type: string,\n bubbles?: boolean,\n cancelable?: boolean,\n detail?: any | null\n ): void;\n }\n export interface DomFile extends Blob {\n readonly lastModified: number;\n readonly name: string;\n }\n export interface DomFileConstructor {\n new (\n bits: BlobPart[],\n filename: string,\n options?: FilePropertyBag\n ): DomFile;\n prototype: DomFile;\n }\n export interface FilePropertyBag extends BlobPropertyBag {\n lastModified?: number;\n }\n interface ProgressEvent extends Event {\n readonly lengthComputable: boolean;\n readonly loaded: number;\n readonly total: number;\n }\n export interface EventListenerOptions {\n capture?: boolean;\n }\n export interface AddEventListenerOptions extends EventListenerOptions {\n once?: boolean;\n passive?: boolean;\n }\n interface AbortSignal extends EventTarget {\n readonly aborted: boolean;\n onabort: ((this: AbortSignal, ev: ProgressEvent) => any) | null;\n addEventListener<K extends keyof AbortSignalEventMap>(\n type: K,\n listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any,\n options?: boolean | AddEventListenerOptions\n ): void;\n addEventListener(\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions\n ): void;\n removeEventListener<K extends keyof AbortSignalEventMap>(\n type: K,\n listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any,\n options?: boolean | EventListenerOptions\n ): void;\n removeEventListener(\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | EventListenerOptions\n ): void;\n }\n export interface ReadableStream {\n readonly locked: boolean;\n cancel(): Promise<void>;\n getReader(): ReadableStreamReader;\n tee(): [ReadableStream, ReadableStream];\n }\n export interface EventListenerObject {\n handleEvent(evt: Event): void;\n }\n export interface ReadableStreamReader {\n cancel(): Promise<void>;\n read(): Promise<any>;\n releaseLock(): void;\n }\n export interface FormData extends DomIterable<string, FormDataEntryValue> {\n append(name: string, value: string | Blob, fileName?: string): void;\n delete(name: string): void;\n get(name: string): FormDataEntryValue | null;\n getAll(name: string): FormDataEntryValue[];\n has(name: string): boolean;\n set(name: string, value: string | Blob, fileName?: string): void;\n }\n export interface FormDataConstructor {\n new (): FormData;\n prototype: FormData;\n }\n /** A blob object represents a file-like object of immutable, raw data. */\n export interface Blob {\n /** The size, in bytes, of the data contained in the `Blob` object. */\n readonly size: number;\n /** A string indicating the media type of the data contained in the `Blob`.\n * If the type is unknown, this string is empty.\n */\n readonly type: string;\n /** Returns a new `Blob` object containing the data in the specified range of\n * bytes of the source `Blob`.\n */\n slice(start?: number, end?: number, contentType?: string): Blob;\n }\n export interface Body {\n /** A simple getter used to expose a `ReadableStream` of the body contents. */\n readonly body: ReadableStream | null;\n /** Stores a `Boolean` that declares whether the body has been used in a\n * response yet.\n */\n readonly bodyUsed: boolean;\n /** Takes a `Response` stream and reads it to completion. It returns a promise\n * that resolves with an `ArrayBuffer`.\n */\n arrayBuffer(): Promise<ArrayBuffer>;\n /** Takes a `Response` stream and reads it to completion. It returns a promise\n * that resolves with a `Blob`.\n */\n blob(): Promise<Blob>;\n /** Takes a `Response` stream and reads it to completion. It returns a promise\n * that resolves with a `FormData` object.\n */\n formData(): Promise<FormData>;\n /** Takes a `Response` stream and reads it to completion. It returns a promise\n * that resolves with the result of parsing the body text as JSON.\n */\n json(): Promise<any>;\n /** Takes a `Response` stream and reads it to completion. It returns a promise\n * that resolves with a `USVString` (text).\n */\n text(): Promise<string>;\n }\n export interface Headers extends DomIterable<string, string> {\n /** Appends a new value onto an existing header inside a `Headers` object, or\n * adds the header if it does not already exist.\n */\n append(name: string, value: string): void;\n /** Deletes a header from a `Headers` object. */\n delete(name: string): void;\n /** Returns an iterator allowing to go through all key/value pairs\n * contained in this Headers object. The both the key and value of each pairs\n * are ByteString objects.\n */\n entries(): IterableIterator<[string, string]>;\n /** Returns a `ByteString` sequence of all the values of a header within a\n * `Headers` object with a given name.\n */\n get(name: string): string | null;\n /** Returns a boolean stating whether a `Headers` object contains a certain\n * header.\n */\n has(name: string): boolean;\n /** Returns an iterator allowing to go through all keys contained in\n * this Headers object. The keys are ByteString objects.\n */\n keys(): IterableIterator<string>;\n /** Sets a new value for an existing header inside a Headers object, or adds\n * the header if it does not already exist.\n */\n set(name: string, value: string): void;\n /** Returns an iterator allowing to go through all values contained in\n * this Headers object. The values are ByteString objects.\n */\n values(): IterableIterator<string>;\n forEach(\n callbackfn: (value: string, key: string, parent: this) => void,\n thisArg?: any\n ): void;\n /** The Symbol.iterator well-known symbol specifies the default\n * iterator for this Headers object\n */\n [Symbol.iterator](): IterableIterator<[string, string]>;\n }\n export interface HeadersConstructor {\n new (init?: HeadersInit): Headers;\n prototype: Headers;\n }\n type RequestCache =\n | \"default\"\n | \"no-store\"\n | \"reload\"\n | \"no-cache\"\n | \"force-cache\"\n | \"only-if-cached\";\n type RequestCredentials = \"omit\" | \"same-origin\" | \"include\";\n type RequestDestination =\n | \"\"\n | \"audio\"\n | \"audioworklet\"\n | \"document\"\n | \"embed\"\n | \"font\"\n | \"image\"\n | \"manifest\"\n | \"object\"\n | \"paintworklet\"\n | \"report\"\n | \"script\"\n | \"sharedworker\"\n | \"style\"\n | \"track\"\n | \"video\"\n | \"worker\"\n | \"xslt\";\n type RequestMode = \"navigate\" | \"same-origin\" | \"no-cors\" | \"cors\";\n type RequestRedirect = \"follow\" | \"error\" | \"manual\";\n type ResponseType =\n | \"basic\"\n | \"cors\"\n | \"default\"\n | \"error\"\n | \"opaque\"\n | \"opaqueredirect\";\n export interface RequestInit {\n body?: BodyInit | null;\n cache?: RequestCache;\n credentials?: RequestCredentials;\n headers?: HeadersInit;\n integrity?: string;\n keepalive?: boolean;\n method?: string;\n mode?: RequestMode;\n redirect?: RequestRedirect;\n referrer?: string;\n referrerPolicy?: ReferrerPolicy;\n signal?: AbortSignal | null;\n window?: any;\n }\n export interface ResponseInit {\n headers?: HeadersInit;\n status?: number;\n statusText?: string;\n }\n export interface Request extends Body {\n /** Returns the cache mode associated with request, which is a string\n * indicating how the the request will interact with the browser's cache when\n * fetching.\n */\n readonly cache?: RequestCache;\n /** Returns the credentials mode associated with request, which is a string\n * indicating whether credentials will be sent with the request always, never,\n * or only when sent to a same-origin URL.\n */\n readonly credentials?: RequestCredentials;\n /** Returns the kind of resource requested by request, (e.g., `document` or\n * `script`).\n */\n readonly destination?: RequestDestination;\n /** Returns a Headers object consisting of the headers associated with\n * request.\n *\n * Note that headers added in the network layer by the user agent\n * will not be accounted for in this object, (e.g., the `Host` header).\n */\n readonly headers: Headers;\n /** Returns request's subresource integrity metadata, which is a cryptographic\n * hash of the resource being fetched. Its value consists of multiple hashes\n * separated by whitespace. [SRI]\n */\n readonly integrity?: string;\n /** Returns a boolean indicating whether or not request is for a history\n * navigation (a.k.a. back-forward navigation).\n */\n readonly isHistoryNavigation?: boolean;\n /** Returns a boolean indicating whether or not request is for a reload\n * navigation.\n */\n readonly isReloadNavigation?: boolean;\n /** Returns a boolean indicating whether or not request can outlive the global\n * in which it was created.\n */\n readonly keepalive?: boolean;\n /** Returns request's HTTP method, which is `GET` by default. */\n readonly method: string;\n /** Returns the mode associated with request, which is a string indicating\n * whether the request will use CORS, or will be restricted to same-origin\n * URLs.\n */\n readonly mode?: RequestMode;\n /** Returns the redirect mode associated with request, which is a string\n * indicating how redirects for the request will be handled during fetching.\n *\n * A request will follow redirects by default.\n */\n readonly redirect?: RequestRedirect;\n /** Returns the referrer of request. Its value can be a same-origin URL if\n * explicitly set in init, the empty string to indicate no referrer, and\n * `about:client` when defaulting to the global's default.\n *\n * This is used during fetching to determine the value of the `Referer`\n * header of the request being made.\n */\n readonly referrer?: string;\n /** Returns the referrer policy associated with request. This is used during\n * fetching to compute the value of the request's referrer.\n */\n readonly referrerPolicy?: ReferrerPolicy;\n /** Returns the signal associated with request, which is an AbortSignal object\n * indicating whether or not request has been aborted, and its abort event\n * handler.\n */\n readonly signal?: AbortSignal;\n /** Returns the URL of request as a string. */\n readonly url: string;\n clone(): Request;\n }\n export interface Response extends Body {\n /** Contains the `Headers` object associated with the response. */\n readonly headers: Headers;\n /** Contains a boolean stating whether the response was successful (status in\n * the range 200-299) or not.\n */\n readonly ok: boolean;\n /** Indicates whether or not the response is the result of a redirect; that\n * is, its URL list has more than one entry.\n */\n readonly redirected: boolean;\n /** Contains the status code of the response (e.g., `200` for a success). */\n readonly status: number;\n /** Contains the status message corresponding to the status code (e.g., `OK`\n * for `200`).\n */\n readonly statusText: string;\n readonly trailer: Promise<Headers>;\n /** Contains the type of the response (e.g., `basic`, `cors`). */\n readonly type: ResponseType;\n /** Contains the URL of the response. */\n readonly url: string;\n /** Creates a clone of a `Response` object. */\n clone(): Response;\n }\n export interface Location {\n /**\n * Returns a DOMStringList object listing the origins of the ancestor browsing\n * contexts, from the parent browsing context to the top-level browsing\n * context.\n */\n readonly ancestorOrigins: string[];\n /**\n * Returns the Location object's URL's fragment (includes leading \"#\" if\n * non-empty).\n * Can be set, to navigate to the same URL with a changed fragment (ignores\n * leading \"#\").\n */\n hash: string;\n /**\n * Returns the Location object's URL's host and port (if different from the\n * default port for the scheme). Can be set, to navigate to the same URL with\n * a changed host and port.\n */\n host: string;\n /**\n * Returns the Location object's URL's host. Can be set, to navigate to the\n * same URL with a changed host.\n */\n hostname: string;\n /**\n * Returns the Location object's URL. Can be set, to navigate to the given\n * URL.\n */\n href: string;\n /** Returns the Location object's URL's origin. */\n readonly origin: string;\n /**\n * Returns the Location object's URL's path.\n * Can be set, to navigate to the same URL with a changed path.\n */\n pathname: string;\n /**\n * Returns the Location object's URL's port.\n * Can be set, to navigate to the same URL with a changed port.\n */\n port: string;\n /**\n * Returns the Location object's URL's scheme.\n * Can be set, to navigate to the same URL with a changed scheme.\n */\n protocol: string;\n /**\n * Returns the Location object's URL's query (includes leading \"?\" if\n * non-empty). Can be set, to navigate to the same URL with a changed query\n * (ignores leading \"?\").\n */\n search: string;\n /**\n * Navigates to the given URL.\n */\n assign(url: string): void;\n /**\n * Reloads the current page.\n */\n reload(): void;\n /** @deprecated */\n reload(forcedReload: boolean): void;\n /**\n * Removes the current page from the session history and navigates to the\n * given URL.\n */\n replace(url: string): void;\n }\n}\n\ndeclare namespace blob {\n export const bytesSymbol: unique symbol;\n export class DenoBlob implements domTypes.Blob {\n private readonly [bytesSymbol];\n readonly size: number;\n readonly type: string;\n /** A blob object represents a file-like object of immutable, raw data. */\n constructor(\n blobParts?: domTypes.BlobPart[],\n options?: domTypes.BlobPropertyBag\n );\n slice(start?: number, end?: number, contentType?: string): DenoBlob;\n }\n}\n\ndeclare namespace consoleTypes {\n type ConsoleOptions = Partial<{\n showHidden: boolean;\n depth: number;\n colors: boolean;\n indentLevel: number;\n collapsedAt: number | null;\n }>;\n export class CSI {\n static kClear: string;\n static kClearScreenDown: string;\n }\n export const isConsoleInstance: unique symbol;\n export class Console {\n private printFunc;\n indentLevel: number;\n collapsedAt: number | null;\n [isConsoleInstance]: boolean;\n /** Writes the arguments to stdout */\n log: (...args: unknown[]) => void;\n /** Writes the arguments to stdout */\n debug: (...args: unknown[]) => void;\n /** Writes the arguments to stdout */\n info: (...args: unknown[]) => void;\n /** Writes the properties of the supplied `obj` to stdout */\n dir: (\n obj: unknown,\n options?: Partial<{\n showHidden: boolean;\n depth: number;\n colors: boolean;\n indentLevel: number;\n collapsedAt: number | null;\n }>\n ) => void;\n /** Writes the arguments to stdout */\n warn: (...args: unknown[]) => void;\n /** Writes the arguments to stdout */\n error: (...args: unknown[]) => void;\n /** Writes an error message to stdout if the assertion is `false`. If the\n * assertion is `true`, nothing happens.\n *\n * ref: https://console.spec.whatwg.org/#assert\n */\n assert: (condition?: boolean, ...args: unknown[]) => void;\n count: (label?: string) => void;\n countReset: (label?: string) => void;\n table: (data: unknown, properties?: string[] | undefined) => void;\n time: (label?: string) => void;\n timeLog: (label?: string, ...args: unknown[]) => void;\n timeEnd: (label?: string) => void;\n group: (...label: unknown[]) => void;\n groupCollapsed: (...label: unknown[]) => void;\n groupEnd: () => void;\n clear: () => void;\n static [Symbol.hasInstance](instance: Console): boolean;\n }\n /**\n * `inspect()` converts input into string that has the same format\n * as printed by `console.log(...)`;\n */\n export function inspect(value: unknown, options?: ConsoleOptions): string;\n}\n\ndeclare namespace event {\n export const eventAttributes: WeakMap<object, any>;\n export class EventInit implements domTypes.EventInit {\n bubbles: boolean;\n cancelable: boolean;\n composed: boolean;\n constructor({\n bubbles,\n cancelable,\n composed\n }?: {\n bubbles?: boolean | undefined;\n cancelable?: boolean | undefined;\n composed?: boolean | undefined;\n });\n }\n export class Event implements domTypes.Event {\n private _canceledFlag;\n private dispatchedFlag;\n private _initializedFlag;\n private _inPassiveListenerFlag;\n private _stopImmediatePropagationFlag;\n private _stopPropagationFlag;\n private _path;\n constructor(type: string, eventInitDict?: domTypes.EventInit);\n readonly bubbles: boolean;\n readonly cancelBubble: boolean;\n readonly cancelBubbleImmediately: boolean;\n readonly cancelable: boolean;\n readonly composed: boolean;\n readonly currentTarget: domTypes.EventTarget;\n readonly defaultPrevented: boolean;\n readonly dispatched: boolean;\n readonly eventPhase: number;\n readonly initialized: boolean;\n readonly isTrusted: boolean;\n readonly target: domTypes.EventTarget;\n readonly timeStamp: Date;\n readonly type: string;\n /** Returns the event’s path (objects on which listeners will be\n * invoked). This does not include nodes in shadow trees if the\n * shadow root was created with its ShadowRoot.mode closed.\n *\n * event.composedPath();\n */\n composedPath(): domTypes.EventPath[];\n /** Cancels the event (if it is cancelable).\n * See https://dom.spec.whatwg.org/#set-the-canceled-flag\n *\n * event.preventDefault();\n */\n preventDefault(): void;\n /** Stops the propagation of events further along in the DOM.\n *\n * event.stopPropagation();\n */\n stopPropagation(): void;\n /** For this particular event, no other listener will be called.\n * Neither those attached on the same element, nor those attached\n * on elements which will be traversed later (in capture phase,\n * for instance).\n *\n * event.stopImmediatePropagation();\n */\n stopImmediatePropagation(): void;\n }\n}\n\ndeclare namespace customEvent {\n export const customEventAttributes: WeakMap<object, any>;\n export class CustomEventInit extends event.EventInit\n implements domTypes.CustomEventInit {\n detail: any;\n constructor({\n bubbles,\n cancelable,\n composed,\n detail\n }: domTypes.CustomEventInit);\n }\n export class CustomEvent extends event.Event implements domTypes.CustomEvent {\n constructor(type: string, customEventInitDict?: domTypes.CustomEventInit);\n readonly detail: any;\n initCustomEvent(\n type: string,\n bubbles?: boolean,\n cancelable?: boolean,\n detail?: any\n ): void;\n readonly [Symbol.toStringTag]: string;\n }\n}\n\ndeclare namespace eventTarget {\n export class EventTarget implements domTypes.EventTarget {\n listeners: {\n [type in string]: domTypes.EventListenerOrEventListenerObject[]\n };\n addEventListener(\n type: string,\n listener: domTypes.EventListenerOrEventListenerObject | null,\n _options?: boolean | domTypes.AddEventListenerOptions\n ): void;\n removeEventListener(\n type: string,\n callback: domTypes.EventListenerOrEventListenerObject | null,\n _options?: domTypes.EventListenerOptions | boolean\n ): void;\n dispatchEvent(event: domTypes.Event): boolean;\n readonly [Symbol.toStringTag]: string;\n }\n}\n\ndeclare namespace io {\n export interface ReadResult {\n nread: number;\n eof: boolean;\n }\n export enum SeekMode {\n SEEK_START = 0,\n SEEK_CURRENT = 1,\n SEEK_END = 2\n }\n export interface Reader {\n /** Reads up to p.byteLength bytes into `p`. It resolves to the number\n * of bytes read (`0` <= `n` <= `p.byteLength`) and any error encountered.\n * Even if `read()` returns `n` < `p.byteLength`, it may use all of `p` as\n * scratch space during the call. If some data is available but not\n * `p.byteLength` bytes, `read()` conventionally returns what is available\n * instead of waiting for more.\n *\n * When `read()` encounters an error or end-of-file condition after\n * successfully reading `n` > `0` bytes, it returns the number of bytes read.\n * It may return the (non-nil) error from the same call or return the error\n * (and `n` == `0`) from a subsequent call. An instance of this general case\n * is that a `Reader` returning a non-zero number of bytes at the end of the\n * input stream may return either `err` == `EOF` or `err` == `null`. The next\n * `read()` should return `0`, `EOF`.\n *\n * Callers should always process the `n` > `0` bytes returned before\n * considering the `EOF`. Doing so correctly handles I/O errors that happen\n * after reading some bytes and also both of the allowed `EOF` behaviors.\n *\n * Implementations of `read()` are discouraged from returning a zero byte\n * count with a `null` error, except when `p.byteLength` == `0`. Callers\n * should treat a return of `0` and `null` as indicating that nothing\n * happened; in particular it does not indicate `EOF`.\n *\n * Implementations must not retain `p`.\n */\n read(p: Uint8Array): Promise<ReadResult>;\n }\n export interface SyncReader {\n readSync(p: Uint8Array): ReadResult;\n }\n export interface Writer {\n /** Writes `p.byteLength` bytes from `p` to the underlying data\n * stream. It resolves to the number of bytes written from `p` (`0` <= `n` <=\n * `p.byteLength`) and any error encountered that caused the write to stop\n * early. `write()` must return a non-null error if it returns `n` <\n * `p.byteLength`. write() must not modify the slice data, even temporarily.\n *\n * Implementations must not retain `p`.\n */\n write(p: Uint8Array): Promise<number>;\n }\n export interface SyncWriter {\n writeSync(p: Uint8Array): number;\n }\n export interface Closer {\n close(): void;\n }\n export interface Seeker {\n /** Seek sets the offset for the next `read()` or `write()` to offset,\n * interpreted according to `whence`: `SeekStart` means relative to the start\n * of the file, `SeekCurrent` means relative to the current offset, and\n * `SeekEnd` means relative to the end. Seek returns the new offset relative\n * to the start of the file and an error, if any.\n *\n * Seeking to an offset before the start of the file is an error. Seeking to\n * any positive offset is legal, but the behavior of subsequent I/O operations\n * on the underlying object is implementation-dependent.\n */\n seek(offset: number, whence: SeekMode): Promise<void>;\n }\n export interface SyncSeeker {\n seekSync(offset: number, whence: SeekMode): void;\n }\n export interface ReadCloser extends Reader, Closer {}\n export interface WriteCloser extends Writer, Closer {}\n export interface ReadSeeker extends Reader, Seeker {}\n export interface WriteSeeker extends Writer, Seeker {}\n export interface ReadWriteCloser extends Reader, Writer, Closer {}\n export interface ReadWriteSeeker extends Reader, Writer, Seeker {}\n /** Copies from `src` to `dst` until either `EOF` is reached on `src`\n * or an error occurs. It returns the number of bytes copied and the first\n * error encountered while copying, if any.\n *\n * Because `copy()` is defined to read from `src` until `EOF`, it does not\n * treat an `EOF` from `read()` as an error to be reported.\n */\n export function copy(dst: Writer, src: Reader): Promise<number>;\n /** Turns `r` into async iterator.\n *\n * for await (const chunk of toAsyncIterator(reader)) {\n * console.log(chunk)\n * }\n */\n export function toAsyncIterator(r: Reader): AsyncIterableIterator<Uint8Array>;\n}\n\ndeclare namespace fetchTypes {\n class Body implements domTypes.Body, domTypes.ReadableStream, io.ReadCloser {\n private rid;\n readonly contentType: string;\n bodyUsed: boolean;\n private _bodyPromise;\n private _data;\n readonly locked: boolean;\n readonly body: null | Body;\n constructor(rid: number, contentType: string);\n private _bodyBuffer;\n arrayBuffer(): Promise<ArrayBuffer>;\n blob(): Promise<domTypes.Blob>;\n formData(): Promise<domTypes.FormData>;\n json(): Promise<any>;\n text(): Promise<string>;\n read(p: Uint8Array): Promise<io.ReadResult>;\n close(): void;\n cancel(): Promise<void>;\n getReader(): domTypes.ReadableStreamReader;\n tee(): [domTypes.ReadableStream, domTypes.ReadableStream];\n }\n class Response implements domTypes.Response {\n readonly status: number;\n readonly url: string;\n statusText: string;\n readonly type = \"basic\";\n redirected: boolean;\n headers: domTypes.Headers;\n readonly trailer: Promise<domTypes.Headers>;\n bodyUsed: boolean;\n readonly body: Body;\n constructor(\n status: number,\n headersList: Array<[string, string]>,\n rid: number,\n body_?: null | Body\n );\n arrayBuffer(): Promise<ArrayBuffer>;\n blob(): Promise<domTypes.Blob>;\n formData(): Promise<domTypes.FormData>;\n json(): Promise<any>;\n text(): Promise<string>;\n readonly ok: boolean;\n clone(): domTypes.Response;\n }\n /** Fetch a resource from the network. */\n export function fetch(\n input: domTypes.Request | string,\n init?: domTypes.RequestInit\n ): Promise<Response>;\n}\n\ndeclare namespace textEncoding {\n export function atob(s: string): string;\n /** Creates a base-64 ASCII string from the input string. */\n export function btoa(s: string): string;\n export interface TextDecodeOptions {\n stream?: false;\n }\n export interface TextDecoderOptions {\n fatal?: boolean;\n ignoreBOM?: false;\n }\n export class TextDecoder {\n private _encoding;\n /** Returns encoding's name, lowercased. */\n readonly encoding: string;\n /** Returns `true` if error mode is \"fatal\", and `false` otherwise. */\n readonly fatal: boolean;\n /** Returns `true` if ignore BOM flag is set, and `false` otherwise. */\n readonly ignoreBOM = false;\n constructor(label?: string, options?: TextDecoderOptions);\n /** Returns the result of running encoding's decoder. */\n decode(input?: domTypes.BufferSource, options?: TextDecodeOptions): string;\n readonly [Symbol.toStringTag]: string;\n }\n export class TextEncoder {\n /** Returns \"utf-8\". */\n readonly encoding = \"utf-8\";\n /** Returns the result of running UTF-8's encoder. */\n encode(input?: string): Uint8Array;\n readonly [Symbol.toStringTag]: string;\n }\n}\n\ndeclare namespace timers {\n export type Args = unknown[];\n /** Sets a timer which executes a function once after the timer expires. */\n export function setTimeout(\n cb: (...args: Args) => void,\n delay: number,\n ...args: Args\n ): number;\n /** Repeatedly calls a function , with a fixed time delay between each call. */\n export function setInterval(\n cb: (...args: Args) => void,\n delay: number,\n ...args: Args\n ): number;\n /** Clears a previously set timer by id. AKA clearTimeout and clearInterval. */\n export function clearTimer(id: number): void;\n}\n\ndeclare namespace urlSearchParams {\n export class URLSearchParams {\n private params;\n private url;\n constructor(init?: string | string[][] | Record<string, string>);\n private updateSteps;\n /** Appends a specified key/value pair as a new search parameter.\n *\n * searchParams.append('name', 'first');\n * searchParams.append('name', 'second');\n */\n append(name: string, value: string): void;\n /** Deletes the given search parameter and its associated value,\n * from the list of all search parameters.\n *\n * searchParams.delete('name');\n */\n delete(name: string): void;\n /** Returns all the values associated with a given search parameter\n * as an array.\n *\n * searchParams.getAll('name');\n */\n getAll(name: string): string[];\n /** Returns the first value associated to the given search parameter.\n *\n * searchParams.get('name');\n */\n get(name: string): string | null;\n /** Returns a Boolean that indicates whether a parameter with the\n * specified name exists.\n *\n * searchParams.has('name');\n */\n has(name: string): boolean;\n /** Sets the value associated with a given search parameter to the\n * given value. If there were several matching values, this method\n * deletes the others. If the search parameter doesn't exist, this\n * method creates it.\n *\n * searchParams.set('name', 'value');\n */\n set(name: string, value: string): void;\n /** Sort all key/value pairs contained in this object in place and\n * return undefined. The sort order is according to Unicode code\n * points of the keys.\n *\n * searchParams.sort();\n */\n sort(): void;\n /** Calls a function for each element contained in this object in\n * place and return undefined. Optionally accepts an object to use\n * as this when executing callback as second argument.\n *\n * searchParams.forEach((value, key, parent) => {\n * console.log(value, key, parent);\n * });\n *\n */\n forEach(\n callbackfn: (value: string, key: string, parent: URLSearchParams) => void,\n thisArg?: any\n ): void;\n /** Returns an iterator allowing to go through all keys contained\n * in this object.\n *\n * for (const key of searchParams.keys()) {\n * console.log(key);\n * }\n */\n keys(): Iterable<string>;\n /** Returns an iterator allowing to go through all values contained\n * in this object.\n *\n * for (const value of searchParams.values()) {\n * console.log(value);\n * }\n */\n values(): Iterable<string>;\n /** Returns an iterator allowing to go through all key/value\n * pairs contained in this object.\n *\n * for (const [key, value] of searchParams.entries()) {\n * console.log(key, value);\n * }\n */\n entries(): Iterable<[string, string]>;\n /** Returns an iterator allowing to go through all key/value\n * pairs contained in this object.\n *\n * for (const [key, value] of searchParams[Symbol.iterator]()) {\n * console.log(key, value);\n * }\n */\n [Symbol.iterator](): Iterable<[string, string]>;\n /** Returns a query string suitable for use in a URL.\n *\n * searchParams.toString();\n */\n toString(): string;\n private _handleStringInitialization;\n private _handleArrayInitialization;\n }\n}\n\ndeclare namespace url {\n export class URL {\n private _parts;\n private _searchParams;\n private _updateSearchParams;\n hash: string;\n host: string;\n hostname: string;\n href: string;\n readonly origin: string;\n password: string;\n pathname: string;\n port: string;\n protocol: string;\n search: string;\n username: string;\n readonly searchParams: urlSearchParams.URLSearchParams;\n constructor(url: string, base?: string | URL);\n toString(): string;\n toJSON(): string;\n }\n}\n\ndeclare namespace workers {\n export function encodeMessage(data: any): Uint8Array;\n export function decodeMessage(dataIntArray: Uint8Array): any;\n export let onmessage: (e: { data: any }) => void;\n export function postMessage(data: any): void;\n export function getMessage(): Promise<any>;\n export let isClosing: boolean;\n export function workerClose(): void;\n export function workerMain(): Promise<void>;\n export interface Worker {\n onerror?: () => void;\n onmessage?: (e: { data: any }) => void;\n onmessageerror?: () => void;\n postMessage(data: any): void;\n closed: Promise<void>;\n }\n export class WorkerImpl implements Worker {\n private readonly rid;\n private isClosing;\n private readonly isClosedPromise;\n onerror?: () => void;\n onmessage?: (data: any) => void;\n onmessageerror?: () => void;\n constructor(specifier: string);\n readonly closed: Promise<void>;\n postMessage(data: any): void;\n private run;\n }\n}\n\ndeclare namespace performanceUtil {\n export class Performance {\n /** Returns a current time from Deno's start.\n * In milliseconds. Flag --allow-high-precision give\n * a precise measure.\n *\n * const t = performance.now();\n * console.log(`${t} ms since start!`);\n */\n now(): number;\n }\n}\n\ndeclare namespace body {\n export type BodySource =\n | domTypes.Blob\n | domTypes.BufferSource\n | domTypes.FormData\n | domTypes.URLSearchParams\n | domTypes.ReadableStream\n | string;\n export const BodyUsedError =\n \"Failed to execute 'clone' on 'Body': body is already used\";\n export class Body implements domTypes.Body {\n protected _bodySource: BodySource;\n readonly contentType: string;\n protected _stream: domTypes.ReadableStream | null;\n constructor(_bodySource: BodySource, contentType: string);\n readonly body: domTypes.ReadableStream | null;\n readonly bodyUsed: boolean;\n blob(): Promise<domTypes.Blob>;\n formData(): Promise<domTypes.FormData>;\n text(): Promise<string>;\n json(): Promise<any>;\n arrayBuffer(): Promise<ArrayBuffer>;\n }\n}\n\ndeclare namespace request {\n export class Request extends body.Body implements domTypes.Request {\n method: string;\n url: string;\n credentials?: \"omit\" | \"same-origin\" | \"include\";\n headers: domTypes.Headers;\n constructor(input: domTypes.RequestInfo, init?: domTypes.RequestInit);\n clone(): domTypes.Request;\n }\n}\n\n// This follows the WebIDL at: https://webassembly.github.io/spec/js-api/\n// And follow on WebIDL at: https://webassembly.github.io/spec/web-api/\n\n/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any */\n\ndeclare namespace WebAssembly {\n interface WebAssemblyInstantiatedSource {\n module: Module;\n instance: Instance;\n }\n\n /** Compiles a `WebAssembly.Module` from WebAssembly binary code. This\n * function is useful if it is necessary to a compile a module before it can\n * be instantiated (otherwise, the `WebAssembly.instantiate()` function\n * should be used). */\n function compile(bufferSource: domTypes.BufferSource): Promise<Module>;\n\n /** Compiles a `WebAssembly.Module` directly from a streamed underlying\n * source. This function is useful if it is necessary to a compile a module\n * before it can be instantiated (otherwise, the\n * `WebAssembly.instantiateStreaming()` function should be used). */\n function compileStreaming(\n source: Promise<domTypes.Response>\n ): Promise<Module>;\n\n /** Takes the WebAssembly binary code, in the form of a typed array or\n * `ArrayBuffer`, and performs both compilation and instantiation in one step.\n * The returned `Promise` resolves to both a compiled `WebAssembly.Module` and\n * its first `WebAssembly.Instance`. */\n function instantiate(\n bufferSource: domTypes.BufferSource,\n importObject?: object\n ): Promise<WebAssemblyInstantiatedSource>;\n\n /** Takes an already-compiled `WebAssembly.Module` and returns a `Promise`\n * that resolves to an `Instance` of that `Module`. This overload is useful if\n * the `Module` has already been compiled. */\n function instantiate(\n module: Module,\n importObject?: object\n ): Promise<Instance>;\n\n /** Compiles and instantiates a WebAssembly module directly from a streamed\n * underlying source. This is the most efficient, optimized way to load wasm\n * code. */\n function instantiateStreaming(\n source: Promise<domTypes.Response>,\n importObject?: object\n ): Promise<WebAssemblyInstantiatedSource>;\n\n /** Validates a given typed array of WebAssembly binary code, returning\n * whether the bytes form a valid wasm module (`true`) or not (`false`). */\n function validate(bufferSource: domTypes.BufferSource): boolean;\n\n type ImportExportKind = \"function\" | \"table\" | \"memory\" | \"global\";\n\n interface ModuleExportDescriptor {\n name: string;\n kind: ImportExportKind;\n }\n interface ModuleImportDescriptor {\n module: string;\n name: string;\n kind: ImportExportKind;\n }\n\n class Module {\n constructor(bufferSource: domTypes.BufferSource);\n\n /** Given a `Module` and string, returns a copy of the contents of all\n * custom sections in the module with the given string name. */\n static customSections(\n moduleObject: Module,\n sectionName: string\n ): ArrayBuffer;\n\n /** Given a `Module`, returns an array containing descriptions of all the\n * declared exports. */\n static exports(moduleObject: Module): ModuleExportDescriptor[];\n\n /** Given a `Module`, returns an array containing descriptions of all the\n * declared imports. */\n static imports(moduleObject: Module): ModuleImportDescriptor[];\n }\n\n class Instance<T extends object = { [key: string]: any }> {\n constructor(module: Module, importObject?: object);\n\n /** An object containing as its members all the functions exported from the\n * WebAssembly module instance, to allow them to be accessed and used by\n * JavaScript. */\n readonly exports: T;\n }\n\n interface MemoryDescriptor {\n initial: number;\n maximum?: number;\n }\n\n class Memory {\n constructor(descriptor: MemoryDescriptor);\n\n /** An accessor property that returns the buffer contained in the memory. */\n readonly buffer: ArrayBuffer;\n\n /** Increases the size of the memory instance by a specified number of\n * WebAssembly pages (each one is 64KB in size). */\n grow(delta: number): number;\n }\n\n type TableKind = \"anyfunc\";\n\n interface TableDescriptor {\n element: TableKind;\n initial: number;\n maximum?: number;\n }\n\n class Table {\n constructor(descriptor: TableDescriptor);\n\n /** Returns the length of the table, i.e. the number of elements. */\n readonly length: number;\n\n /** Accessor function — gets the element stored at a given index. */\n get(index: number): (...args: any[]) => any;\n\n /** Increases the size of the Table instance by a specified number of\n * elements. */\n grow(delta: number): number;\n\n /** Sets an element stored at a given index to a given value. */\n set(index: number, value: (...args: any[]) => any): void;\n }\n\n interface GlobalDescriptor {\n value: string;\n mutable?: boolean;\n }\n\n /** Represents a global variable instance, accessible from both JavaScript and\n * importable/exportable across one or more `WebAssembly.Module` instances.\n * This allows dynamic linking of multiple modules. */\n class Global {\n constructor(descriptor: GlobalDescriptor, value?: any);\n\n /** Old-style method that returns the value contained inside the global\n * variable. */\n valueOf(): any;\n\n /** The value contained inside the global variable — this can be used to\n * directly set and get the global's value. */\n value: any;\n }\n\n /** Indicates an error during WebAssembly decoding or validation */\n class CompileError extends Error {\n constructor(message: string, fileName?: string, lineNumber?: string);\n }\n\n /** Indicates an error during module instantiation (besides traps from the\n * start function). */\n class LinkError extends Error {\n constructor(message: string, fileName?: string, lineNumber?: string);\n }\n\n /** Is thrown whenever WebAssembly specifies a trap. */\n class RuntimeError extends Error {\n constructor(message: string, fileName?: string, lineNumber?: string);\n }\n}\n\n/* eslint-enable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any */\n"; | |
+ var libDts = "// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.\n\n/// <reference no-default-lib=\"true\" />\n/// <reference lib=\"esnext\" />\n\ndeclare namespace Deno {\n /** The current process id of the runtime. */\n export let pid: number;\n /** Reflects the NO_COLOR environment variable: https://no-color.org/ */\n export let noColor: boolean;\n /** Path to the current deno process's executable file. */\n export let execPath: string;\n /** Check if running in terminal.\n *\n * console.log(Deno.isTTY().stdout);\n */\n export function isTTY(): {\n stdin: boolean;\n stdout: boolean;\n stderr: boolean;\n };\n /** Exit the Deno process with optional exit code. */\n export function exit(exitCode?: number): never;\n /** Returns a snapshot of the environment variables at invocation. Mutating a\n * property in the object will set that variable in the environment for\n * the process. The environment object will only accept `string`s\n * as values.\n *\n * const myEnv = Deno.env();\n * console.log(myEnv.SHELL);\n * myEnv.TEST_VAR = \"HELLO\";\n * const newEnv = Deno.env();\n * console.log(myEnv.TEST_VAR == newEnv.TEST_VAR);\n */\n export function env(): {\n [index: string]: string;\n };\n /**\n * `cwd()` Return a string representing the current working directory.\n * If the current directory can be reached via multiple paths\n * (due to symbolic links), `cwd()` may return\n * any one of them.\n * throws `NotFound` exception if directory not available\n */\n export function cwd(): string;\n /**\n * `chdir()` Change the current working directory to path.\n * throws `NotFound` exception if directory not available\n */\n export function chdir(directory: string): void;\n export interface ReadResult {\n nread: number;\n eof: boolean;\n }\n export enum SeekMode {\n SEEK_START = 0,\n SEEK_CURRENT = 1,\n SEEK_END = 2\n }\n export interface Reader {\n /** Reads up to p.byteLength bytes into `p`. It resolves to the number\n * of bytes read (`0` <= `n` <= `p.byteLength`) and any error encountered.\n * Even if `read()` returns `n` < `p.byteLength`, it may use all of `p` as\n * scratch space during the call. If some data is available but not\n * `p.byteLength` bytes, `read()` conventionally returns what is available\n * instead of waiting for more.\n *\n * When `read()` encounters an error or end-of-file condition after\n * successfully reading `n` > `0` bytes, it returns the number of bytes read.\n * It may return the (non-nil) error from the same call or return the error\n * (and `n` == `0`) from a subsequent call. An instance of this general case\n * is that a `Reader` returning a non-zero number of bytes at the end of the\n * input stream may return either `err` == `EOF` or `err` == `null`. The next\n * `read()` should return `0`, `EOF`.\n *\n * Callers should always process the `n` > `0` bytes returned before\n * considering the `EOF`. Doing so correctly handles I/O errors that happen\n * after reading some bytes and also both of the allowed `EOF` behaviors.\n *\n * Implementations of `read()` are discouraged from returning a zero byte\n * count with a `null` error, except when `p.byteLength` == `0`. Callers\n * should treat a return of `0` and `null` as indicating that nothing\n * happened; in particular it does not indicate `EOF`.\n *\n * Implementations must not retain `p`.\n */\n read(p: Uint8Array): Promise<ReadResult>;\n }\n export interface SyncReader {\n readSync(p: Uint8Array): ReadResult;\n }\n export interface Writer {\n /** Writes `p.byteLength` bytes from `p` to the underlying data\n * stream. It resolves to the number of bytes written from `p` (`0` <= `n` <=\n * `p.byteLength`) and any error encountered that caused the write to stop\n * early. `write()` must return a non-null error if it returns `n` <\n * `p.byteLength`. write() must not modify the slice data, even temporarily.\n *\n * Implementations must not retain `p`.\n */\n write(p: Uint8Array): Promise<number>;\n }\n export interface SyncWriter {\n writeSync(p: Uint8Array): number;\n }\n export interface Closer {\n close(): void;\n }\n export interface Seeker {\n /** Seek sets the offset for the next `read()` or `write()` to offset,\n * interpreted according to `whence`: `SeekStart` means relative to the start\n * of the file, `SeekCurrent` means relative to the current offset, and\n * `SeekEnd` means relative to the end. Seek returns the new offset relative\n * to the start of the file and an error, if any.\n *\n * Seeking to an offset before the start of the file is an error. Seeking to\n * any positive offset is legal, but the behavior of subsequent I/O operations\n * on the underlying object is implementation-dependent.\n */\n seek(offset: number, whence: SeekMode): Promise<void>;\n }\n export interface SyncSeeker {\n seekSync(offset: number, whence: SeekMode): void;\n }\n export interface ReadCloser extends Reader, Closer {}\n export interface WriteCloser extends Writer, Closer {}\n export interface ReadSeeker extends Reader, Seeker {}\n export interface WriteSeeker extends Writer, Seeker {}\n export interface ReadWriteCloser extends Reader, Writer, Closer {}\n export interface ReadWriteSeeker extends Reader, Writer, Seeker {}\n /** Copies from `src` to `dst` until either `EOF` is reached on `src`\n * or an error occurs. It returns the number of bytes copied and the first\n * error encountered while copying, if any.\n *\n * Because `copy()` is defined to read from `src` until `EOF`, it does not\n * treat an `EOF` from `read()` as an error to be reported.\n */\n export function copy(dst: Writer, src: Reader): Promise<number>;\n /** Turns `r` into async iterator.\n *\n * for await (const chunk of toAsyncIterator(reader)) {\n * console.log(chunk)\n * }\n */\n export function toAsyncIterator(r: Reader): AsyncIterableIterator<Uint8Array>;\n /** Open a file and return an instance of the `File` object\n * synchronously.\n *\n * const file = Deno.openSync(\"/foo/bar.txt\");\n */\n export function openSync(filename: string, mode?: OpenMode): File;\n /** Open a file and return an instance of the `File` object.\n *\n * (async () => {\n * const file = await Deno.open(\"/foo/bar.txt\");\n * })();\n */\n export function open(filename: string, mode?: OpenMode): Promise<File>;\n /** Read synchronously from a file ID into an array buffer.\n *\n * Return `ReadResult` for the operation.\n *\n * const file = Deno.openSync(\"/foo/bar.txt\");\n * const buf = new Uint8Array(100);\n * const { nread, eof } = Deno.readSync(file.rid, buf);\n * const text = new TextDecoder().decode(buf);\n *\n */\n export function readSync(rid: number, p: Uint8Array): ReadResult;\n /** Read from a file ID into an array buffer.\n *\n * Resolves with the `ReadResult` for the operation.\n *\n * (async () => {\n * const file = await Deno.open(\"/foo/bar.txt\");\n * const buf = new Uint8Array(100);\n * const { nread, eof } = await Deno.read(file.rid, buf);\n * const text = new TextDecoder().decode(buf);\n * })();\n */\n export function read(rid: number, p: Uint8Array): Promise<ReadResult>;\n /** Write synchronously to the file ID the contents of the array buffer.\n *\n * Resolves with the number of bytes written.\n *\n * const encoder = new TextEncoder();\n * const data = encoder.encode(\"Hello world\\n\");\n * const file = Deno.openSync(\"/foo/bar.txt\");\n * Deno.writeSync(file.rid, data);\n */\n export function writeSync(rid: number, p: Uint8Array): number;\n /** Write to the file ID the contents of the array buffer.\n *\n * Resolves with the number of bytes written.\n *\n * (async () => {\n * const encoder = new TextEncoder();\n * const data = encoder.encode(\"Hello world\\n\");\n * const file = await Deno.open(\"/foo/bar.txt\");\n * await Deno.write(file.rid, data);\n * })();\n *\n */\n export function write(rid: number, p: Uint8Array): Promise<number>;\n /** Seek a file ID synchronously to the given offset under mode given by `whence`.\n *\n * const file = Deno.openSync(\"/foo/bar.txt\");\n * Deno.seekSync(file.rid, 0, 0);\n */\n export function seekSync(rid: number, offset: number, whence: SeekMode): void;\n /** Seek a file ID to the given offset under mode given by `whence`.\n *\n * (async () => {\n * const file = await Deno.open(\"/foo/bar.txt\");\n * await Deno.seek(file.rid, 0, 0);\n * })();\n */\n export function seek(\n rid: number,\n offset: number,\n whence: SeekMode\n ): Promise<void>;\n /** Close the file ID. */\n export function close(rid: number): void;\n /** The Deno abstraction for reading and writing files. */\n export class File\n implements\n Reader,\n SyncReader,\n Writer,\n SyncWriter,\n Seeker,\n SyncSeeker,\n Closer {\n readonly rid: number;\n constructor(rid: number);\n write(p: Uint8Array): Promise<number>;\n writeSync(p: Uint8Array): number;\n read(p: Uint8Array): Promise<ReadResult>;\n readSync(p: Uint8Array): ReadResult;\n seek(offset: number, whence: SeekMode): Promise<void>;\n seekSync(offset: number, whence: SeekMode): void;\n close(): void;\n }\n /** An instance of `File` for stdin. */\n export const stdin: File;\n /** An instance of `File` for stdout. */\n export const stdout: File;\n /** An instance of `File` for stderr. */\n export const stderr: File;\n export type OpenMode =\n | \"r\"\n /** Read-write. Start at beginning of file. */\n | \"r+\"\n /** Write-only. Opens and truncates existing file or creates new one for\n * writing only.\n */\n | \"w\"\n /** Read-write. Opens and truncates existing file or creates new one for\n * writing and reading.\n */\n | \"w+\"\n /** Write-only. Opens existing file or creates new one. Each write appends\n * content to the end of file.\n */\n | \"a\"\n /** Read-write. Behaves like \"a\" and allows to read from file. */\n | \"a+\"\n /** Write-only. Exclusive create - creates new file only if one doesn't exist\n * already.\n */\n | \"x\"\n /** Read-write. Behaves like `x` and allows to read from file. */\n | \"x+\";\n /** A Buffer is a variable-sized buffer of bytes with read() and write()\n * methods. Based on https://golang.org/pkg/bytes/#Buffer\n */\n export class Buffer implements Reader, SyncReader, Writer, SyncWriter {\n private buf;\n private off;\n constructor(ab?: ArrayBuffer);\n /** bytes() returns a slice holding the unread portion of the buffer.\n * The slice is valid for use only until the next buffer modification (that\n * is, only until the next call to a method like read(), write(), reset(), or\n * truncate()). The slice aliases the buffer content at least until the next\n * buffer modification, so immediate changes to the slice will affect the\n * result of future reads.\n */\n bytes(): Uint8Array;\n /** toString() returns the contents of the unread portion of the buffer\n * as a string. Warning - if multibyte characters are present when data is\n * flowing through the buffer, this method may result in incorrect strings\n * due to a character being split.\n */\n toString(): string;\n /** empty() returns whether the unread portion of the buffer is empty. */\n empty(): boolean;\n /** length is a getter that returns the number of bytes of the unread\n * portion of the buffer\n */\n readonly length: number;\n /** Returns the capacity of the buffer's underlying byte slice, that is,\n * the total space allocated for the buffer's data.\n */\n readonly capacity: number;\n /** truncate() discards all but the first n unread bytes from the buffer but\n * continues to use the same allocated storage. It throws if n is negative or\n * greater than the length of the buffer.\n */\n truncate(n: number): void;\n /** reset() resets the buffer to be empty, but it retains the underlying\n * storage for use by future writes. reset() is the same as truncate(0)\n */\n reset(): void;\n /** _tryGrowByReslice() is a version of grow for the fast-case\n * where the internal buffer only needs to be resliced. It returns the index\n * where bytes should be written and whether it succeeded.\n * It returns -1 if a reslice was not needed.\n */\n private _tryGrowByReslice;\n private _reslice;\n /** readSync() reads the next len(p) bytes from the buffer or until the buffer\n * is drained. The return value n is the number of bytes read. If the\n * buffer has no data to return, eof in the response will be true.\n */\n readSync(p: Uint8Array): ReadResult;\n read(p: Uint8Array): Promise<ReadResult>;\n writeSync(p: Uint8Array): number;\n write(p: Uint8Array): Promise<number>;\n /** _grow() grows the buffer to guarantee space for n more bytes.\n * It returns the index where bytes should be written.\n * If the buffer can't grow it will throw with ErrTooLarge.\n */\n private _grow;\n /** grow() grows the buffer's capacity, if necessary, to guarantee space for\n * another n bytes. After grow(n), at least n bytes can be written to the\n * buffer without another allocation. If n is negative, grow() will panic. If\n * the buffer can't grow it will throw ErrTooLarge.\n * Based on https://golang.org/pkg/bytes/#Buffer.Grow\n */\n grow(n: number): void;\n /** readFrom() reads data from r until EOF and appends it to the buffer,\n * growing the buffer as needed. It returns the number of bytes read. If the\n * buffer becomes too large, readFrom will panic with ErrTooLarge.\n * Based on https://golang.org/pkg/bytes/#Buffer.ReadFrom\n */\n readFrom(r: Reader): Promise<number>;\n /** Sync version of `readFrom`\n */\n readFromSync(r: SyncReader): number;\n }\n /** Read `r` until EOF and return the content as `Uint8Array`.\n */\n export function readAll(r: Reader): Promise<Uint8Array>;\n /** Read synchronously `r` until EOF and return the content as `Uint8Array`.\n */\n export function readAllSync(r: SyncReader): Uint8Array;\n /** Creates a new directory with the specified path synchronously.\n * If `recursive` is set to true, nested directories will be created (also known\n * as \"mkdir -p\").\n * `mode` sets permission bits (before umask) on UNIX and does nothing on\n * Windows.\n *\n * Deno.mkdirSync(\"new_dir\");\n * Deno.mkdirSync(\"nested/directories\", true);\n */\n export function mkdirSync(\n path: string,\n recursive?: boolean,\n mode?: number\n ): void;\n /** Creates a new directory with the specified path.\n * If `recursive` is set to true, nested directories will be created (also known\n * as \"mkdir -p\").\n * `mode` sets permission bits (before umask) on UNIX and does nothing on\n * Windows.\n *\n * await Deno.mkdir(\"new_dir\");\n * await Deno.mkdir(\"nested/directories\", true);\n */\n export function mkdir(\n path: string,\n recursive?: boolean,\n mode?: number\n ): Promise<void>;\n export interface MakeTempDirOptions {\n dir?: string;\n prefix?: string;\n suffix?: string;\n }\n /** makeTempDirSync is the synchronous version of `makeTempDir`.\n *\n * const tempDirName0 = Deno.makeTempDirSync();\n * const tempDirName1 = Deno.makeTempDirSync({ prefix: 'my_temp' });\n */\n export function makeTempDirSync(options?: MakeTempDirOptions): string;\n /** makeTempDir creates a new temporary directory in the directory `dir`, its\n * name beginning with `prefix` and ending with `suffix`.\n * It returns the full path to the newly created directory.\n * If `dir` is unspecified, tempDir uses the default directory for temporary\n * files. Multiple programs calling tempDir simultaneously will not choose the\n * same directory. It is the caller's responsibility to remove the directory\n * when no longer needed.\n *\n * const tempDirName0 = await Deno.makeTempDir();\n * const tempDirName1 = await Deno.makeTempDir({ prefix: 'my_temp' });\n */\n export function makeTempDir(options?: MakeTempDirOptions): Promise<string>;\n /** Changes the permission of a specific file/directory of specified path\n * synchronously.\n *\n * Deno.chmodSync(\"/path/to/file\", 0o666);\n */\n export function chmodSync(path: string, mode: number): void;\n /** Changes the permission of a specific file/directory of specified path.\n *\n * await Deno.chmod(\"/path/to/file\", 0o666);\n */\n export function chmod(path: string, mode: number): Promise<void>;\n /**\n * Change owner of a regular file or directory synchronously. Unix only at the moment.\n * @param path path to the file\n * @param uid user id of the new owner\n * @param gid group id of the new owner\n */\n export function chownSync(path: string, uid: number, gid: number): void;\n /**\n * Change owner of a regular file or directory asynchronously. Unix only at the moment.\n * @param path path to the file\n * @param uid user id of the new owner\n * @param gid group id of the new owner\n */\n export function chown(path: string, uid: number, gid: number): Promise<void>;\n /** Synchronously changes the access and modification times of a file system\n * object referenced by `filename`. Given times are either in seconds\n * (Unix epoch time) or as `Date` objects.\n *\n * Deno.utimeSync(\"myfile.txt\", 1556495550, new Date());\n */\n export function utimeSync(\n filename: string,\n atime: number | Date,\n mtime: number | Date\n ): void;\n /** Changes the access and modification times of a file system object\n * referenced by `filename`. Given times are either in seconds\n * (Unix epoch time) or as `Date` objects.\n *\n * await Deno.utime(\"myfile.txt\", 1556495550, new Date());\n */\n export function utime(\n filename: string,\n atime: number | Date,\n mtime: number | Date\n ): Promise<void>;\n export interface RemoveOption {\n recursive?: boolean;\n }\n /** Removes the named file or directory synchronously. Would throw\n * error if permission denied, not found, or directory not empty if `recursive`\n * set to false.\n * `recursive` is set to false by default.\n *\n * Deno.removeSync(\"/path/to/dir/or/file\", {recursive: false});\n */\n export function removeSync(path: string, options?: RemoveOption): void;\n /** Removes the named file or directory. Would throw error if\n * permission denied, not found, or directory not empty if `recursive` set\n * to false.\n * `recursive` is set to false by default.\n *\n * await Deno.remove(\"/path/to/dir/or/file\", {recursive: false});\n */\n export function remove(path: string, options?: RemoveOption): Promise<void>;\n /** Synchronously renames (moves) `oldpath` to `newpath`. If `newpath` already\n * exists and is not a directory, `renameSync()` replaces it. OS-specific\n * restrictions may apply when `oldpath` and `newpath` are in different\n * directories.\n *\n * Deno.renameSync(\"old/path\", \"new/path\");\n */\n export function renameSync(oldpath: string, newpath: string): void;\n /** Renames (moves) `oldpath` to `newpath`. If `newpath` already exists and is\n * not a directory, `rename()` replaces it. OS-specific restrictions may apply\n * when `oldpath` and `newpath` are in different directories.\n *\n * await Deno.rename(\"old/path\", \"new/path\");\n */\n export function rename(oldpath: string, newpath: string): Promise<void>;\n /** Read the entire contents of a file synchronously.\n *\n * const decoder = new TextDecoder(\"utf-8\");\n * const data = Deno.readFileSync(\"hello.txt\");\n * console.log(decoder.decode(data));\n */\n export function readFileSync(filename: string): Uint8Array;\n /** Read the entire contents of a file.\n *\n * const decoder = new TextDecoder(\"utf-8\");\n * const data = await Deno.readFile(\"hello.txt\");\n * console.log(decoder.decode(data));\n */\n export function readFile(filename: string): Promise<Uint8Array>;\n /** A FileInfo describes a file and is returned by `stat`, `lstat`,\n * `statSync`, `lstatSync`.\n */\n export interface FileInfo {\n /** The size of the file, in bytes. */\n len: number;\n /** The last modification time of the file. This corresponds to the `mtime`\n * field from `stat` on Unix and `ftLastWriteTime` on Windows. This may not\n * be available on all platforms.\n */\n modified: number | null;\n /** The last access time of the file. This corresponds to the `atime`\n * field from `stat` on Unix and `ftLastAccessTime` on Windows. This may not\n * be available on all platforms.\n */\n accessed: number | null;\n /** The last access time of the file. This corresponds to the `birthtime`\n * field from `stat` on Unix and `ftCreationTime` on Windows. This may not\n * be available on all platforms.\n */\n created: number | null;\n /** The underlying raw st_mode bits that contain the standard Unix permissions\n * for this file/directory. TODO Match behavior with Go on windows for mode.\n */\n mode: number | null;\n /** The file or directory name. */\n name: string | null;\n /** Returns whether this is info for a regular file. This result is mutually\n * exclusive to `FileInfo.isDirectory` and `FileInfo.isSymlink`.\n */\n isFile(): boolean;\n /** Returns whether this is info for a regular directory. This result is\n * mutually exclusive to `FileInfo.isFile` and `FileInfo.isSymlink`.\n */\n isDirectory(): boolean;\n /** Returns whether this is info for a symlink. This result is\n * mutually exclusive to `FileInfo.isFile` and `FileInfo.isDirectory`.\n */\n isSymlink(): boolean;\n }\n /** Reads the directory given by path and returns a list of file info\n * synchronously.\n *\n * const files = Deno.readDirSync(\"/\");\n */\n export function readDirSync(path: string): FileInfo[];\n /** Reads the directory given by path and returns a list of file info.\n *\n * const files = await Deno.readDir(\"/\");\n */\n export function readDir(path: string): Promise<FileInfo[]>;\n /** Copies the contents of a file to another by name synchronously.\n * Creates a new file if target does not exists, and if target exists,\n * overwrites original content of the target file.\n *\n * It would also copy the permission of the original file\n * to the destination.\n *\n * Deno.copyFileSync(\"from.txt\", \"to.txt\");\n */\n export function copyFileSync(from: string, to: string): void;\n /** Copies the contents of a file to another by name.\n *\n * Creates a new file if target does not exists, and if target exists,\n * overwrites original content of the target file.\n *\n * It would also copy the permission of the original file\n * to the destination.\n *\n * await Deno.copyFile(\"from.txt\", \"to.txt\");\n */\n export function copyFile(from: string, to: string): Promise<void>;\n /** Returns the destination of the named symbolic link synchronously.\n *\n * const targetPath = Deno.readlinkSync(\"symlink/path\");\n */\n export function readlinkSync(name: string): string;\n /** Returns the destination of the named symbolic link.\n *\n * const targetPath = await Deno.readlink(\"symlink/path\");\n */\n export function readlink(name: string): Promise<string>;\n /** Queries the file system for information on the path provided. If the given\n * path is a symlink information about the symlink will be returned.\n *\n * const fileInfo = await Deno.lstat(\"hello.txt\");\n * assert(fileInfo.isFile());\n */\n export function lstat(filename: string): Promise<FileInfo>;\n /** Queries the file system for information on the path provided synchronously.\n * If the given path is a symlink information about the symlink will be\n * returned.\n *\n * const fileInfo = Deno.lstatSync(\"hello.txt\");\n * assert(fileInfo.isFile());\n */\n export function lstatSync(filename: string): FileInfo;\n /** Queries the file system for information on the path provided. `stat` Will\n * always follow symlinks.\n *\n * const fileInfo = await Deno.stat(\"hello.txt\");\n * assert(fileInfo.isFile());\n */\n export function stat(filename: string): Promise<FileInfo>;\n /** Queries the file system for information on the path provided synchronously.\n * `statSync` Will always follow symlinks.\n *\n * const fileInfo = Deno.statSync(\"hello.txt\");\n * assert(fileInfo.isFile());\n */\n export function statSync(filename: string): FileInfo;\n /** Synchronously creates `newname` as a hard link to `oldname`.\n *\n * Deno.linkSync(\"old/name\", \"new/name\");\n */\n export function linkSync(oldname: string, newname: string): void;\n /** Creates `newname` as a hard link to `oldname`.\n *\n * await Deno.link(\"old/name\", \"new/name\");\n */\n export function link(oldname: string, newname: string): Promise<void>;\n /** Synchronously creates `newname` as a symbolic link to `oldname`. The type\n * argument can be set to `dir` or `file` and is only available on Windows\n * (ignored on other platforms).\n *\n * Deno.symlinkSync(\"old/name\", \"new/name\");\n */\n export function symlinkSync(\n oldname: string,\n newname: string,\n type?: string\n ): void;\n /** Creates `newname` as a symbolic link to `oldname`. The type argument can be\n * set to `dir` or `file` and is only available on Windows (ignored on other\n * platforms).\n *\n * await Deno.symlink(\"old/name\", \"new/name\");\n */\n export function symlink(\n oldname: string,\n newname: string,\n type?: string\n ): Promise<void>;\n /** Options for writing to a file.\n * `perm` would change the file's permission if set.\n * `create` decides if the file should be created if not exists (default: true)\n * `append` decides if the file should be appended (default: false)\n */\n export interface WriteFileOptions {\n perm?: number;\n create?: boolean;\n append?: boolean;\n }\n /** Write a new file, with given filename and data synchronously.\n *\n * const encoder = new TextEncoder();\n * const data = encoder.encode(\"Hello world\\n\");\n * Deno.writeFileSync(\"hello.txt\", data);\n */\n export function writeFileSync(\n filename: string,\n data: Uint8Array,\n options?: WriteFileOptions\n ): void;\n /** Write a new file, with given filename and data.\n *\n * const encoder = new TextEncoder();\n * const data = encoder.encode(\"Hello world\\n\");\n * await Deno.writeFile(\"hello.txt\", data);\n */\n export function writeFile(\n filename: string,\n data: Uint8Array,\n options?: WriteFileOptions\n ): Promise<void>;\n export enum ErrorKind {\n NoError = 0,\n NotFound = 1,\n PermissionDenied = 2,\n ConnectionRefused = 3,\n ConnectionReset = 4,\n ConnectionAborted = 5,\n NotConnected = 6,\n AddrInUse = 7,\n AddrNotAvailable = 8,\n BrokenPipe = 9,\n AlreadyExists = 10,\n WouldBlock = 11,\n InvalidInput = 12,\n InvalidData = 13,\n TimedOut = 14,\n Interrupted = 15,\n WriteZero = 16,\n Other = 17,\n UnexpectedEof = 18,\n BadResource = 19,\n CommandFailed = 20,\n EmptyHost = 21,\n IdnaError = 22,\n InvalidPort = 23,\n InvalidIpv4Address = 24,\n InvalidIpv6Address = 25,\n InvalidDomainCharacter = 26,\n RelativeUrlWithoutBase = 27,\n RelativeUrlWithCannotBeABaseBase = 28,\n SetHostOnCannotBeABaseUrl = 29,\n Overflow = 30,\n HttpUser = 31,\n HttpClosed = 32,\n HttpCanceled = 33,\n HttpParse = 34,\n HttpOther = 35,\n TooLarge = 36,\n InvalidUri = 37,\n InvalidSeekMode = 38,\n OpNotAvaiable = 39,\n WorkerInitFailed = 40,\n UnixError = 41\n }\n /** A Deno specific error. The `kind` property is set to a specific error code\n * which can be used to in application logic.\n *\n * try {\n * somethingThatMightThrow();\n * } catch (e) {\n * if (\n * e instanceof Deno.DenoError &&\n * e.kind === Deno.ErrorKind.Overflow\n * ) {\n * console.error(\"Overflow error!\");\n * }\n * }\n *\n */\n export class DenoError<T extends ErrorKind> extends Error {\n readonly kind: T;\n constructor(kind: T, msg: string);\n }\n /** Permissions as granted by the caller */\n export interface Permissions {\n read: boolean;\n write: boolean;\n net: boolean;\n env: boolean;\n run: boolean;\n highPrecision: boolean;\n }\n export type Permission = keyof Permissions;\n /** Inspect granted permissions for the current program.\n *\n * if (Deno.permissions().read) {\n * const file = await Deno.readFile(\"example.test\");\n * // ...\n * }\n */\n export function permissions(): Permissions;\n /** Revoke a permission. When the permission was already revoked nothing changes\n *\n * if (Deno.permissions().read) {\n * const file = await Deno.readFile(\"example.test\");\n * Deno.revokePermission('read');\n * }\n * Deno.readFile(\"example.test\"); // -> error or permission prompt\n */\n export function revokePermission(permission: Permission): void;\n /** Truncates or extends the specified file synchronously, updating the size of\n * this file to become size.\n *\n * Deno.truncateSync(\"hello.txt\", 10);\n */\n export function truncateSync(name: string, len?: number): void;\n /**\n * Truncates or extends the specified file, updating the size of this file to\n * become size.\n *\n * await Deno.truncate(\"hello.txt\", 10);\n */\n export function truncate(name: string, len?: number): Promise<void>;\n type Network = \"tcp\";\n type Addr = string;\n /** A Listener is a generic network listener for stream-oriented protocols. */\n export interface Listener extends AsyncIterator<Conn> {\n /** Waits for and resolves to the next connection to the `Listener`. */\n accept(): Promise<Conn>;\n /** Close closes the listener. Any pending accept promises will be rejected\n * with errors.\n */\n close(): void;\n /** Return the address of the `Listener`. */\n addr(): Addr;\n [Symbol.asyncIterator](): AsyncIterator<Conn>;\n }\n export interface Conn extends Reader, Writer, Closer {\n /** The local address of the connection. */\n localAddr: string;\n /** The remote address of the connection. */\n remoteAddr: string;\n /** The resource ID of the connection. */\n rid: number;\n /** Shuts down (`shutdown(2)`) the reading side of the TCP connection. Most\n * callers should just use `close()`.\n */\n closeRead(): void;\n /** Shuts down (`shutdown(2)`) the writing side of the TCP connection. Most\n * callers should just use `close()`.\n */\n closeWrite(): void;\n }\n /** Listen announces on the local network address.\n *\n * The network must be `tcp`, `tcp4`, `tcp6`, `unix` or `unixpacket`.\n *\n * For TCP networks, if the host in the address parameter is empty or a literal\n * unspecified IP address, `listen()` listens on all available unicast and\n * anycast IP addresses of the local system. To only use IPv4, use network\n * `tcp4`. The address can use a host name, but this is not recommended,\n * because it will create a listener for at most one of the host's IP\n * addresses. If the port in the address parameter is empty or `0`, as in\n * `127.0.0.1:` or `[::1]:0`, a port number is automatically chosen. The\n * `addr()` method of `Listener` can be used to discover the chosen port.\n *\n * See `dial()` for a description of the network and address parameters.\n */\n export function listen(network: Network, address: string): Listener;\n /** Dial connects to the address on the named network.\n *\n * Supported networks are only `tcp` currently.\n *\n * TODO: `tcp4` (IPv4-only), `tcp6` (IPv6-only), `udp`, `udp4` (IPv4-only),\n * `udp6` (IPv6-only), `ip`, `ip4` (IPv4-only), `ip6` (IPv6-only), `unix`,\n * `unixgram` and `unixpacket`.\n *\n * For TCP and UDP networks, the address has the form `host:port`. The host must\n * be a literal IP address, or a host name that can be resolved to IP addresses.\n * The port must be a literal port number or a service name. If the host is a\n * literal IPv6 address it must be enclosed in square brackets, as in\n * `[2001:db8::1]:80` or `[fe80::1%zone]:80`. The zone specifies the scope of\n * the literal IPv6 address as defined in RFC 4007. The functions JoinHostPort\n * and SplitHostPort manipulate a pair of host and port in this form. When using\n * TCP, and the host resolves to multiple IP addresses, Dial will try each IP\n * address in order until one succeeds.\n *\n * Examples:\n *\n * dial(\"tcp\", \"golang.org:http\")\n * dial(\"tcp\", \"192.0.2.1:http\")\n * dial(\"tcp\", \"198.51.100.1:80\")\n * dial(\"udp\", \"[2001:db8::1]:domain\")\n * dial(\"udp\", \"[fe80::1%lo0]:53\")\n * dial(\"tcp\", \":80\")\n */\n export function dial(network: Network, address: string): Promise<Conn>;\n /** **RESERVED** */\n export function connect(_network: Network, _address: string): Promise<Conn>;\n export interface Metrics {\n opsDispatched: number;\n opsCompleted: number;\n bytesSentControl: number;\n bytesSentData: number;\n bytesReceived: number;\n }\n /** Receive metrics from the privileged side of Deno.\n *\n * > console.table(Deno.metrics())\n * ┌──────────────────┬────────┐\n * │ (index) │ Values │\n * ├──────────────────┼────────┤\n * │ opsDispatched │ 9 │\n * │ opsCompleted │ 9 │\n * │ bytesSentControl │ 504 │\n * │ bytesSentData │ 0 │\n * │ bytesReceived │ 856 │\n * └──────────────────┴────────┘\n */\n export function metrics(): Metrics;\n interface ResourceMap {\n [rid: number]: string;\n }\n /** Returns a map of open _file like_ resource ids along with their string\n * representation.\n */\n export function resources(): ResourceMap;\n /** How to handle subprocess stdio.\n *\n * \"inherit\" The default if unspecified. The child inherits from the\n * corresponding parent descriptor.\n *\n * \"piped\" A new pipe should be arranged to connect the parent and child\n * subprocesses.\n *\n * \"null\" This stream will be ignored. This is the equivalent of attaching the\n * stream to /dev/null.\n */\n type ProcessStdio = \"inherit\" | \"piped\" | \"null\";\n export interface RunOptions {\n args: string[];\n cwd?: string;\n env?: {\n [key: string]: string;\n };\n stdout?: ProcessStdio;\n stderr?: ProcessStdio;\n stdin?: ProcessStdio;\n }\n /** Send a signal to process under given PID. Unix only at this moment.\n * If pid is negative, the signal will be sent to the process group identified\n * by -pid.\n */\n export function kill(pid: number, signo: number): void;\n export class Process {\n readonly rid: number;\n readonly pid: number;\n readonly stdin?: WriteCloser;\n readonly stdout?: ReadCloser;\n readonly stderr?: ReadCloser;\n status(): Promise<ProcessStatus>;\n /** Buffer the stdout and return it as Uint8Array after EOF.\n * You must set stdout to \"piped\" when creating the process.\n * This calls close() on stdout after its done.\n */\n output(): Promise<Uint8Array>;\n /** Buffer the stderr and return it as Uint8Array after EOF.\n * You must set stderr to \"piped\" when creating the process.\n * This calls close() on stderr after its done.\n */\n stderrOutput(): Promise<Uint8Array>;\n close(): void;\n kill(signo: number): void;\n }\n export interface ProcessStatus {\n success: boolean;\n code?: number;\n signal?: number;\n }\n /**\n * Spawns new subprocess.\n *\n * Subprocess uses same working directory as parent process unless `opt.cwd`\n * is specified.\n *\n * Environmental variables for subprocess can be specified using `opt.env`\n * mapping.\n *\n * By default subprocess inherits stdio of parent process. To change that\n * `opt.stdout`, `opt.stderr` and `opt.stdin` can be specified independently.\n */\n export function run(opt: RunOptions): Process;\n enum LinuxSignal {\n SIGHUP = 1,\n SIGINT = 2,\n SIGQUIT = 3,\n SIGILL = 4,\n SIGTRAP = 5,\n SIGABRT = 6,\n SIGBUS = 7,\n SIGFPE = 8,\n SIGKILL = 9,\n SIGUSR1 = 10,\n SIGSEGV = 11,\n SIGUSR2 = 12,\n SIGPIPE = 13,\n SIGALRM = 14,\n SIGTERM = 15,\n SIGSTKFLT = 16,\n SIGCHLD = 17,\n SIGCONT = 18,\n SIGSTOP = 19,\n SIGTSTP = 20,\n SIGTTIN = 21,\n SIGTTOU = 22,\n SIGURG = 23,\n SIGXCPU = 24,\n SIGXFSZ = 25,\n SIGVTALRM = 26,\n SIGPROF = 27,\n SIGWINCH = 28,\n SIGIO = 29,\n SIGPWR = 30,\n SIGSYS = 31\n }\n enum MacOSSignal {\n SIGHUP = 1,\n SIGINT = 2,\n SIGQUIT = 3,\n SIGILL = 4,\n SIGTRAP = 5,\n SIGABRT = 6,\n SIGEMT = 7,\n SIGFPE = 8,\n SIGKILL = 9,\n SIGBUS = 10,\n SIGSEGV = 11,\n SIGSYS = 12,\n SIGPIPE = 13,\n SIGALRM = 14,\n SIGTERM = 15,\n SIGURG = 16,\n SIGSTOP = 17,\n SIGTSTP = 18,\n SIGCONT = 19,\n SIGCHLD = 20,\n SIGTTIN = 21,\n SIGTTOU = 22,\n SIGIO = 23,\n SIGXCPU = 24,\n SIGXFSZ = 25,\n SIGVTALRM = 26,\n SIGPROF = 27,\n SIGWINCH = 28,\n SIGINFO = 29,\n SIGUSR1 = 30,\n SIGUSR2 = 31\n }\n /** Signals numbers. This is platform dependent.\n */\n export const Signal: typeof MacOSSignal | typeof LinuxSignal;\n export {};\n type ConsoleOptions = Partial<{\n showHidden: boolean;\n depth: number;\n colors: boolean;\n indentLevel: number;\n collapsedAt: number | null;\n }>;\n class CSI {\n static kClear: string;\n static kClearScreenDown: string;\n }\n export const isConsoleInstance: unique symbol;\n class Console {\n private printFunc;\n indentLevel: number;\n collapsedAt: number | null;\n [isConsoleInstance]: boolean;\n /** Writes the arguments to stdout */\n log: (...args: unknown[]) => void;\n /** Writes the arguments to stdout */\n debug: (...args: unknown[]) => void;\n /** Writes the arguments to stdout */\n info: (...args: unknown[]) => void;\n /** Writes the properties of the supplied `obj` to stdout */\n dir: (\n obj: unknown,\n options?: Partial<{\n showHidden: boolean;\n depth: number;\n colors: boolean;\n indentLevel: number;\n collapsedAt: number | null;\n }>\n ) => void;\n /** Writes the arguments to stdout */\n warn: (...args: unknown[]) => void;\n /** Writes the arguments to stdout */\n error: (...args: unknown[]) => void;\n /** Writes an error message to stdout if the assertion is `false`. If the\n * assertion is `true`, nothing happens.\n *\n * ref: https://console.spec.whatwg.org/#assert\n */\n assert: (condition?: boolean, ...args: unknown[]) => void;\n count: (label?: string) => void;\n countReset: (label?: string) => void;\n table: (data: unknown, properties?: string[] | undefined) => void;\n time: (label?: string) => void;\n timeLog: (label?: string, ...args: unknown[]) => void;\n timeEnd: (label?: string) => void;\n group: (...label: unknown[]) => void;\n groupCollapsed: (...label: unknown[]) => void;\n groupEnd: () => void;\n clear: () => void;\n static [Symbol.hasInstance](instance: Console): boolean;\n }\n /**\n * `inspect()` converts input into string that has the same format\n * as printed by `console.log(...)`;\n */\n export function inspect(value: unknown, options?: ConsoleOptions): string;\n export type OperatingSystem = \"mac\" | \"win\" | \"linux\";\n export type Arch = \"x64\" | \"arm64\";\n /** Build related information */\n interface BuildInfo {\n /** The CPU architecture. */\n arch: Arch;\n /** The operating system. */\n os: OperatingSystem;\n /** The arguments passed to GN during build. See `gn help buildargs`. */\n args: string;\n }\n export const build: BuildInfo;\n export const platform: BuildInfo;\n interface Version {\n deno: string;\n v8: string;\n typescript: string;\n }\n export const version: Version;\n export {};\n export const args: string[];\n}\n\ndeclare interface Window {\n window: Window;\n atob: typeof textEncoding.atob;\n btoa: typeof textEncoding.btoa;\n fetch: typeof fetchTypes.fetch;\n clearTimeout: typeof timers.clearTimer;\n clearInterval: typeof timers.clearTimer;\n console: consoleTypes.Console;\n setTimeout: typeof timers.setTimeout;\n setInterval: typeof timers.setInterval;\n location: domTypes.Location;\n Blob: typeof blob.DenoBlob;\n File: domTypes.DomFileConstructor;\n CustomEventInit: typeof customEvent.CustomEventInit;\n CustomEvent: typeof customEvent.CustomEvent;\n EventInit: typeof event.EventInit;\n Event: typeof event.Event;\n EventTarget: typeof eventTarget.EventTarget;\n URL: typeof url.URL;\n URLSearchParams: typeof urlSearchParams.URLSearchParams;\n Headers: domTypes.HeadersConstructor;\n FormData: domTypes.FormDataConstructor;\n TextEncoder: typeof textEncoding.TextEncoder;\n TextDecoder: typeof textEncoding.TextDecoder;\n Request: typeof request.Request;\n performance: performanceUtil.Performance;\n onmessage: (e: { data: any }) => void;\n workerMain: typeof workers.workerMain;\n workerClose: typeof workers.workerClose;\n postMessage: typeof workers.postMessage;\n Worker: typeof workers.WorkerImpl;\n Deno: typeof Deno;\n}\n\ndeclare const window: Window;\ndeclare const globalThis: Window;\ndeclare const atob: typeof textEncoding.atob;\ndeclare const btoa: typeof textEncoding.btoa;\ndeclare const fetch: typeof fetchTypes.fetch;\ndeclare const clearTimeout: typeof timers.clearTimer;\ndeclare const clearInterval: typeof timers.clearTimer;\ndeclare const console: consoleTypes.Console;\ndeclare const setTimeout: typeof timers.setTimeout;\ndeclare const setInterval: typeof timers.setInterval;\ndeclare const location: domTypes.Location;\ndeclare const Blob: typeof blob.DenoBlob;\ndeclare const File: domTypes.DomFileConstructor;\ndeclare const CustomEventInit: typeof customEvent.CustomEventInit;\ndeclare const CustomEvent: typeof customEvent.CustomEvent;\ndeclare const EventInit: typeof event.EventInit;\ndeclare const Event: typeof event.Event;\ndeclare const EventTarget: typeof eventTarget.EventTarget;\ndeclare const URL: typeof url.URL;\ndeclare const URLSearchParams: typeof urlSearchParams.URLSearchParams;\ndeclare const Headers: domTypes.HeadersConstructor;\ndeclare const FormData: domTypes.FormDataConstructor;\ndeclare const TextEncoder: typeof textEncoding.TextEncoder;\ndeclare const TextDecoder: typeof textEncoding.TextDecoder;\ndeclare const Request: typeof request.Request;\ndeclare const performance: performanceUtil.Performance;\ndeclare let onmessage: (e: { data: any }) => void;\ndeclare const workerMain: typeof workers.workerMain;\ndeclare const workerClose: typeof workers.workerClose;\ndeclare const postMessage: typeof workers.postMessage;\ndeclare const Worker: typeof workers.WorkerImpl;\n\ndeclare type Blob = blob.DenoBlob;\ndeclare type File = domTypes.DomFile;\ndeclare type CustomEventInit = customEvent.CustomEventInit;\ndeclare type CustomEvent = customEvent.CustomEvent;\ndeclare type EventInit = event.EventInit;\ndeclare type Event = event.Event;\ndeclare type EventTarget = eventTarget.EventTarget;\ndeclare type URL = url.URL;\ndeclare type URLSearchParams = urlSearchParams.URLSearchParams;\ndeclare type Headers = domTypes.Headers;\ndeclare type FormData = domTypes.FormData;\ndeclare type TextEncoder = textEncoding.TextEncoder;\ndeclare type TextDecoder = textEncoding.TextDecoder;\ndeclare type Request = request.Request;\ndeclare type Worker = workers.Worker;\n\ndeclare interface ImportMeta {\n url: string;\n main: boolean;\n}\n\ndeclare namespace domTypes {\n export type BufferSource = ArrayBufferView | ArrayBuffer;\n export type HeadersInit =\n | Headers\n | Array<[string, string]>\n | Record<string, string>;\n export type URLSearchParamsInit =\n | string\n | string[][]\n | Record<string, string>;\n type BodyInit =\n | Blob\n | BufferSource\n | FormData\n | URLSearchParams\n | ReadableStream\n | string;\n export type RequestInfo = Request | string;\n type ReferrerPolicy =\n | \"\"\n | \"no-referrer\"\n | \"no-referrer-when-downgrade\"\n | \"origin-only\"\n | \"origin-when-cross-origin\"\n | \"unsafe-url\";\n export type BlobPart = BufferSource | Blob | string;\n export type FormDataEntryValue = DomFile | string;\n export type EventListenerOrEventListenerObject =\n | EventListener\n | EventListenerObject;\n export interface DomIterable<K, V> {\n keys(): IterableIterator<K>;\n values(): IterableIterator<V>;\n entries(): IterableIterator<[K, V]>;\n [Symbol.iterator](): IterableIterator<[K, V]>;\n forEach(\n callback: (value: V, key: K, parent: this) => void,\n thisArg?: any\n ): void;\n }\n type EndingType = \"transparent\" | \"native\";\n export interface BlobPropertyBag {\n type?: string;\n ending?: EndingType;\n }\n interface AbortSignalEventMap {\n abort: ProgressEvent;\n }\n export interface EventTarget {\n addEventListener(\n type: string,\n listener: EventListenerOrEventListenerObject | null,\n options?: boolean | AddEventListenerOptions\n ): void;\n dispatchEvent(evt: Event): boolean;\n removeEventListener(\n type: string,\n listener?: EventListenerOrEventListenerObject | null,\n options?: EventListenerOptions | boolean\n ): void;\n }\n export interface ProgressEventInit extends EventInit {\n lengthComputable?: boolean;\n loaded?: number;\n total?: number;\n }\n export interface URLSearchParams {\n /**\n * Appends a specified key/value pair as a new search parameter.\n */\n append(name: string, value: string): void;\n /**\n * Deletes the given search parameter, and its associated value,\n * from the list of all search parameters.\n */\n delete(name: string): void;\n /**\n * Returns the first value associated to the given search parameter.\n */\n get(name: string): string | null;\n /**\n * Returns all the values association with a given search parameter.\n */\n getAll(name: string): string[];\n /**\n * Returns a Boolean indicating if such a search parameter exists.\n */\n has(name: string): boolean;\n /**\n * Sets the value associated to a given search parameter to the given value.\n * If there were several values, delete the others.\n */\n set(name: string, value: string): void;\n /**\n * Sort all key/value pairs contained in this object in place\n * and return undefined. The sort order is according to Unicode\n * code points of the keys.\n */\n sort(): void;\n /**\n * Returns a query string suitable for use in a URL.\n */\n toString(): string;\n /**\n * Iterates over each name-value pair in the query\n * and invokes the given function.\n */\n forEach(\n callbackfn: (value: string, key: string, parent: URLSearchParams) => void,\n thisArg?: any\n ): void;\n }\n export interface EventListener {\n (evt: Event): void;\n }\n export interface EventInit {\n bubbles?: boolean;\n cancelable?: boolean;\n composed?: boolean;\n }\n export interface CustomEventInit extends EventInit {\n detail?: any;\n }\n export enum EventPhase {\n NONE = 0,\n CAPTURING_PHASE = 1,\n AT_TARGET = 2,\n BUBBLING_PHASE = 3\n }\n export interface EventPath {\n item: EventTarget;\n itemInShadowTree: boolean;\n relatedTarget: EventTarget | null;\n rootOfClosedTree: boolean;\n slotInClosedTree: boolean;\n target: EventTarget | null;\n touchTargetList: EventTarget[];\n }\n export interface Event {\n readonly type: string;\n readonly target: EventTarget | null;\n readonly currentTarget: EventTarget | null;\n composedPath(): EventPath[];\n readonly eventPhase: number;\n stopPropagation(): void;\n stopImmediatePropagation(): void;\n readonly bubbles: boolean;\n readonly cancelable: boolean;\n preventDefault(): void;\n readonly defaultPrevented: boolean;\n readonly composed: boolean;\n readonly isTrusted: boolean;\n readonly timeStamp: Date;\n }\n export interface CustomEvent extends Event {\n readonly detail: any;\n initCustomEvent(\n type: string,\n bubbles?: boolean,\n cancelable?: boolean,\n detail?: any | null\n ): void;\n }\n export interface DomFile extends Blob {\n readonly lastModified: number;\n readonly name: string;\n }\n export interface DomFileConstructor {\n new (\n bits: BlobPart[],\n filename: string,\n options?: FilePropertyBag\n ): DomFile;\n prototype: DomFile;\n }\n export interface FilePropertyBag extends BlobPropertyBag {\n lastModified?: number;\n }\n interface ProgressEvent extends Event {\n readonly lengthComputable: boolean;\n readonly loaded: number;\n readonly total: number;\n }\n export interface EventListenerOptions {\n capture?: boolean;\n }\n export interface AddEventListenerOptions extends EventListenerOptions {\n once?: boolean;\n passive?: boolean;\n }\n interface AbortSignal extends EventTarget {\n readonly aborted: boolean;\n onabort: ((this: AbortSignal, ev: ProgressEvent) => any) | null;\n addEventListener<K extends keyof AbortSignalEventMap>(\n type: K,\n listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any,\n options?: boolean | AddEventListenerOptions\n ): void;\n addEventListener(\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions\n ): void;\n removeEventListener<K extends keyof AbortSignalEventMap>(\n type: K,\n listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any,\n options?: boolean | EventListenerOptions\n ): void;\n removeEventListener(\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | EventListenerOptions\n ): void;\n }\n export interface ReadableStream {\n readonly locked: boolean;\n cancel(): Promise<void>;\n getReader(): ReadableStreamReader;\n tee(): [ReadableStream, ReadableStream];\n }\n export interface EventListenerObject {\n handleEvent(evt: Event): void;\n }\n export interface ReadableStreamReader {\n cancel(): Promise<void>;\n read(): Promise<any>;\n releaseLock(): void;\n }\n export interface FormData extends DomIterable<string, FormDataEntryValue> {\n append(name: string, value: string | Blob, fileName?: string): void;\n delete(name: string): void;\n get(name: string): FormDataEntryValue | null;\n getAll(name: string): FormDataEntryValue[];\n has(name: string): boolean;\n set(name: string, value: string | Blob, fileName?: string): void;\n }\n export interface FormDataConstructor {\n new (): FormData;\n prototype: FormData;\n }\n /** A blob object represents a file-like object of immutable, raw data. */\n export interface Blob {\n /** The size, in bytes, of the data contained in the `Blob` object. */\n readonly size: number;\n /** A string indicating the media type of the data contained in the `Blob`.\n * If the type is unknown, this string is empty.\n */\n readonly type: string;\n /** Returns a new `Blob` object containing the data in the specified range of\n * bytes of the source `Blob`.\n */\n slice(start?: number, end?: number, contentType?: string): Blob;\n }\n export interface Body {\n /** A simple getter used to expose a `ReadableStream` of the body contents. */\n readonly body: ReadableStream | null;\n /** Stores a `Boolean` that declares whether the body has been used in a\n * response yet.\n */\n readonly bodyUsed: boolean;\n /** Takes a `Response` stream and reads it to completion. It returns a promise\n * that resolves with an `ArrayBuffer`.\n */\n arrayBuffer(): Promise<ArrayBuffer>;\n /** Takes a `Response` stream and reads it to completion. It returns a promise\n * that resolves with a `Blob`.\n */\n blob(): Promise<Blob>;\n /** Takes a `Response` stream and reads it to completion. It returns a promise\n * that resolves with a `FormData` object.\n */\n formData(): Promise<FormData>;\n /** Takes a `Response` stream and reads it to completion. It returns a promise\n * that resolves with the result of parsing the body text as JSON.\n */\n json(): Promise<any>;\n /** Takes a `Response` stream and reads it to completion. It returns a promise\n * that resolves with a `USVString` (text).\n */\n text(): Promise<string>;\n }\n export interface Headers extends DomIterable<string, string> {\n /** Appends a new value onto an existing header inside a `Headers` object, or\n * adds the header if it does not already exist.\n */\n append(name: string, value: string): void;\n /** Deletes a header from a `Headers` object. */\n delete(name: string): void;\n /** Returns an iterator allowing to go through all key/value pairs\n * contained in this Headers object. The both the key and value of each pairs\n * are ByteString objects.\n */\n entries(): IterableIterator<[string, string]>;\n /** Returns a `ByteString` sequence of all the values of a header within a\n * `Headers` object with a given name.\n */\n get(name: string): string | null;\n /** Returns a boolean stating whether a `Headers` object contains a certain\n * header.\n */\n has(name: string): boolean;\n /** Returns an iterator allowing to go through all keys contained in\n * this Headers object. The keys are ByteString objects.\n */\n keys(): IterableIterator<string>;\n /** Sets a new value for an existing header inside a Headers object, or adds\n * the header if it does not already exist.\n */\n set(name: string, value: string): void;\n /** Returns an iterator allowing to go through all values contained in\n * this Headers object. The values are ByteString objects.\n */\n values(): IterableIterator<string>;\n forEach(\n callbackfn: (value: string, key: string, parent: this) => void,\n thisArg?: any\n ): void;\n /** The Symbol.iterator well-known symbol specifies the default\n * iterator for this Headers object\n */\n [Symbol.iterator](): IterableIterator<[string, string]>;\n }\n export interface HeadersConstructor {\n new (init?: HeadersInit): Headers;\n prototype: Headers;\n }\n type RequestCache =\n | \"default\"\n | \"no-store\"\n | \"reload\"\n | \"no-cache\"\n | \"force-cache\"\n | \"only-if-cached\";\n type RequestCredentials = \"omit\" | \"same-origin\" | \"include\";\n type RequestDestination =\n | \"\"\n | \"audio\"\n | \"audioworklet\"\n | \"document\"\n | \"embed\"\n | \"font\"\n | \"image\"\n | \"manifest\"\n | \"object\"\n | \"paintworklet\"\n | \"report\"\n | \"script\"\n | \"sharedworker\"\n | \"style\"\n | \"track\"\n | \"video\"\n | \"worker\"\n | \"xslt\";\n type RequestMode = \"navigate\" | \"same-origin\" | \"no-cors\" | \"cors\";\n type RequestRedirect = \"follow\" | \"error\" | \"manual\";\n type ResponseType =\n | \"basic\"\n | \"cors\"\n | \"default\"\n | \"error\"\n | \"opaque\"\n | \"opaqueredirect\";\n export interface RequestInit {\n body?: BodyInit | null;\n cache?: RequestCache;\n credentials?: RequestCredentials;\n headers?: HeadersInit;\n integrity?: string;\n keepalive?: boolean;\n method?: string;\n mode?: RequestMode;\n redirect?: RequestRedirect;\n referrer?: string;\n referrerPolicy?: ReferrerPolicy;\n signal?: AbortSignal | null;\n window?: any;\n }\n export interface ResponseInit {\n headers?: HeadersInit;\n status?: number;\n statusText?: string;\n }\n export interface Request extends Body {\n /** Returns the cache mode associated with request, which is a string\n * indicating how the the request will interact with the browser's cache when\n * fetching.\n */\n readonly cache?: RequestCache;\n /** Returns the credentials mode associated with request, which is a string\n * indicating whether credentials will be sent with the request always, never,\n * or only when sent to a same-origin URL.\n */\n readonly credentials?: RequestCredentials;\n /** Returns the kind of resource requested by request, (e.g., `document` or\n * `script`).\n */\n readonly destination?: RequestDestination;\n /** Returns a Headers object consisting of the headers associated with\n * request.\n *\n * Note that headers added in the network layer by the user agent\n * will not be accounted for in this object, (e.g., the `Host` header).\n */\n readonly headers: Headers;\n /** Returns request's subresource integrity metadata, which is a cryptographic\n * hash of the resource being fetched. Its value consists of multiple hashes\n * separated by whitespace. [SRI]\n */\n readonly integrity?: string;\n /** Returns a boolean indicating whether or not request is for a history\n * navigation (a.k.a. back-forward navigation).\n */\n readonly isHistoryNavigation?: boolean;\n /** Returns a boolean indicating whether or not request is for a reload\n * navigation.\n */\n readonly isReloadNavigation?: boolean;\n /** Returns a boolean indicating whether or not request can outlive the global\n * in which it was created.\n */\n readonly keepalive?: boolean;\n /** Returns request's HTTP method, which is `GET` by default. */\n readonly method: string;\n /** Returns the mode associated with request, which is a string indicating\n * whether the request will use CORS, or will be restricted to same-origin\n * URLs.\n */\n readonly mode?: RequestMode;\n /** Returns the redirect mode associated with request, which is a string\n * indicating how redirects for the request will be handled during fetching.\n *\n * A request will follow redirects by default.\n */\n readonly redirect?: RequestRedirect;\n /** Returns the referrer of request. Its value can be a same-origin URL if\n * explicitly set in init, the empty string to indicate no referrer, and\n * `about:client` when defaulting to the global's default.\n *\n * This is used during fetching to determine the value of the `Referer`\n * header of the request being made.\n */\n readonly referrer?: string;\n /** Returns the referrer policy associated with request. This is used during\n * fetching to compute the value of the request's referrer.\n */\n readonly referrerPolicy?: ReferrerPolicy;\n /** Returns the signal associated with request, which is an AbortSignal object\n * indicating whether or not request has been aborted, and its abort event\n * handler.\n */\n readonly signal?: AbortSignal;\n /** Returns the URL of request as a string. */\n readonly url: string;\n clone(): Request;\n }\n export interface Response extends Body {\n /** Contains the `Headers` object associated with the response. */\n readonly headers: Headers;\n /** Contains a boolean stating whether the response was successful (status in\n * the range 200-299) or not.\n */\n readonly ok: boolean;\n /** Indicates whether or not the response is the result of a redirect; that\n * is, its URL list has more than one entry.\n */\n readonly redirected: boolean;\n /** Contains the status code of the response (e.g., `200` for a success). */\n readonly status: number;\n /** Contains the status message corresponding to the status code (e.g., `OK`\n * for `200`).\n */\n readonly statusText: string;\n readonly trailer: Promise<Headers>;\n /** Contains the type of the response (e.g., `basic`, `cors`). */\n readonly type: ResponseType;\n /** Contains the URL of the response. */\n readonly url: string;\n /** Creates a clone of a `Response` object. */\n clone(): Response;\n }\n export interface Location {\n /**\n * Returns a DOMStringList object listing the origins of the ancestor browsing\n * contexts, from the parent browsing context to the top-level browsing\n * context.\n */\n readonly ancestorOrigins: string[];\n /**\n * Returns the Location object's URL's fragment (includes leading \"#\" if\n * non-empty).\n * Can be set, to navigate to the same URL with a changed fragment (ignores\n * leading \"#\").\n */\n hash: string;\n /**\n * Returns the Location object's URL's host and port (if different from the\n * default port for the scheme). Can be set, to navigate to the same URL with\n * a changed host and port.\n */\n host: string;\n /**\n * Returns the Location object's URL's host. Can be set, to navigate to the\n * same URL with a changed host.\n */\n hostname: string;\n /**\n * Returns the Location object's URL. Can be set, to navigate to the given\n * URL.\n */\n href: string;\n /** Returns the Location object's URL's origin. */\n readonly origin: string;\n /**\n * Returns the Location object's URL's path.\n * Can be set, to navigate to the same URL with a changed path.\n */\n pathname: string;\n /**\n * Returns the Location object's URL's port.\n * Can be set, to navigate to the same URL with a changed port.\n */\n port: string;\n /**\n * Returns the Location object's URL's scheme.\n * Can be set, to navigate to the same URL with a changed scheme.\n */\n protocol: string;\n /**\n * Returns the Location object's URL's query (includes leading \"?\" if\n * non-empty). Can be set, to navigate to the same URL with a changed query\n * (ignores leading \"?\").\n */\n search: string;\n /**\n * Navigates to the given URL.\n */\n assign(url: string): void;\n /**\n * Reloads the current page.\n */\n reload(): void;\n /** @deprecated */\n reload(forcedReload: boolean): void;\n /**\n * Removes the current page from the session history and navigates to the\n * given URL.\n */\n replace(url: string): void;\n }\n}\n\ndeclare namespace blob {\n export const bytesSymbol: unique symbol;\n export class DenoBlob implements domTypes.Blob {\n private readonly [bytesSymbol];\n readonly size: number;\n readonly type: string;\n /** A blob object represents a file-like object of immutable, raw data. */\n constructor(\n blobParts?: domTypes.BlobPart[],\n options?: domTypes.BlobPropertyBag\n );\n slice(start?: number, end?: number, contentType?: string): DenoBlob;\n }\n}\n\ndeclare namespace consoleTypes {\n type ConsoleOptions = Partial<{\n showHidden: boolean;\n depth: number;\n colors: boolean;\n indentLevel: number;\n collapsedAt: number | null;\n }>;\n export class CSI {\n static kClear: string;\n static kClearScreenDown: string;\n }\n export const isConsoleInstance: unique symbol;\n export class Console {\n private printFunc;\n indentLevel: number;\n collapsedAt: number | null;\n [isConsoleInstance]: boolean;\n /** Writes the arguments to stdout */\n log: (...args: unknown[]) => void;\n /** Writes the arguments to stdout */\n debug: (...args: unknown[]) => void;\n /** Writes the arguments to stdout */\n info: (...args: unknown[]) => void;\n /** Writes the properties of the supplied `obj` to stdout */\n dir: (\n obj: unknown,\n options?: Partial<{\n showHidden: boolean;\n depth: number;\n colors: boolean;\n indentLevel: number;\n collapsedAt: number | null;\n }>\n ) => void;\n /** Writes the arguments to stdout */\n warn: (...args: unknown[]) => void;\n /** Writes the arguments to stdout */\n error: (...args: unknown[]) => void;\n /** Writes an error message to stdout if the assertion is `false`. If the\n * assertion is `true`, nothing happens.\n *\n * ref: https://console.spec.whatwg.org/#assert\n */\n assert: (condition?: boolean, ...args: unknown[]) => void;\n count: (label?: string) => void;\n countReset: (label?: string) => void;\n table: (data: unknown, properties?: string[] | undefined) => void;\n time: (label?: string) => void;\n timeLog: (label?: string, ...args: unknown[]) => void;\n timeEnd: (label?: string) => void;\n group: (...label: unknown[]) => void;\n groupCollapsed: (...label: unknown[]) => void;\n groupEnd: () => void;\n clear: () => void;\n static [Symbol.hasInstance](instance: Console): boolean;\n }\n /**\n * `inspect()` converts input into string that has the same format\n * as printed by `console.log(...)`;\n */\n export function inspect(value: unknown, options?: ConsoleOptions): string;\n}\n\ndeclare namespace event {\n export const eventAttributes: WeakMap<object, any>;\n export class EventInit implements domTypes.EventInit {\n bubbles: boolean;\n cancelable: boolean;\n composed: boolean;\n constructor({\n bubbles,\n cancelable,\n composed\n }?: {\n bubbles?: boolean | undefined;\n cancelable?: boolean | undefined;\n composed?: boolean | undefined;\n });\n }\n export class Event implements domTypes.Event {\n private _canceledFlag;\n private dispatchedFlag;\n private _initializedFlag;\n private _inPassiveListenerFlag;\n private _stopImmediatePropagationFlag;\n private _stopPropagationFlag;\n private _path;\n constructor(type: string, eventInitDict?: domTypes.EventInit);\n readonly bubbles: boolean;\n readonly cancelBubble: boolean;\n readonly cancelBubbleImmediately: boolean;\n readonly cancelable: boolean;\n readonly composed: boolean;\n readonly currentTarget: domTypes.EventTarget;\n readonly defaultPrevented: boolean;\n readonly dispatched: boolean;\n readonly eventPhase: number;\n readonly initialized: boolean;\n readonly isTrusted: boolean;\n readonly target: domTypes.EventTarget;\n readonly timeStamp: Date;\n readonly type: string;\n /** Returns the event’s path (objects on which listeners will be\n * invoked). This does not include nodes in shadow trees if the\n * shadow root was created with its ShadowRoot.mode closed.\n *\n * event.composedPath();\n */\n composedPath(): domTypes.EventPath[];\n /** Cancels the event (if it is cancelable).\n * See https://dom.spec.whatwg.org/#set-the-canceled-flag\n *\n * event.preventDefault();\n */\n preventDefault(): void;\n /** Stops the propagation of events further along in the DOM.\n *\n * event.stopPropagation();\n */\n stopPropagation(): void;\n /** For this particular event, no other listener will be called.\n * Neither those attached on the same element, nor those attached\n * on elements which will be traversed later (in capture phase,\n * for instance).\n *\n * event.stopImmediatePropagation();\n */\n stopImmediatePropagation(): void;\n }\n}\n\ndeclare namespace customEvent {\n export const customEventAttributes: WeakMap<object, any>;\n export class CustomEventInit extends event.EventInit\n implements domTypes.CustomEventInit {\n detail: any;\n constructor({\n bubbles,\n cancelable,\n composed,\n detail\n }: domTypes.CustomEventInit);\n }\n export class CustomEvent extends event.Event implements domTypes.CustomEvent {\n constructor(type: string, customEventInitDict?: domTypes.CustomEventInit);\n readonly detail: any;\n initCustomEvent(\n type: string,\n bubbles?: boolean,\n cancelable?: boolean,\n detail?: any\n ): void;\n readonly [Symbol.toStringTag]: string;\n }\n}\n\ndeclare namespace eventTarget {\n export class EventTarget implements domTypes.EventTarget {\n listeners: {\n [type in string]: domTypes.EventListenerOrEventListenerObject[]\n };\n addEventListener(\n type: string,\n listener: domTypes.EventListenerOrEventListenerObject | null,\n _options?: boolean | domTypes.AddEventListenerOptions\n ): void;\n removeEventListener(\n type: string,\n callback: domTypes.EventListenerOrEventListenerObject | null,\n _options?: domTypes.EventListenerOptions | boolean\n ): void;\n dispatchEvent(event: domTypes.Event): boolean;\n readonly [Symbol.toStringTag]: string;\n }\n}\n\ndeclare namespace io {\n export interface ReadResult {\n nread: number;\n eof: boolean;\n }\n export enum SeekMode {\n SEEK_START = 0,\n SEEK_CURRENT = 1,\n SEEK_END = 2\n }\n export interface Reader {\n /** Reads up to p.byteLength bytes into `p`. It resolves to the number\n * of bytes read (`0` <= `n` <= `p.byteLength`) and any error encountered.\n * Even if `read()` returns `n` < `p.byteLength`, it may use all of `p` as\n * scratch space during the call. If some data is available but not\n * `p.byteLength` bytes, `read()` conventionally returns what is available\n * instead of waiting for more.\n *\n * When `read()` encounters an error or end-of-file condition after\n * successfully reading `n` > `0` bytes, it returns the number of bytes read.\n * It may return the (non-nil) error from the same call or return the error\n * (and `n` == `0`) from a subsequent call. An instance of this general case\n * is that a `Reader` returning a non-zero number of bytes at the end of the\n * input stream may return either `err` == `EOF` or `err` == `null`. The next\n * `read()` should return `0`, `EOF`.\n *\n * Callers should always process the `n` > `0` bytes returned before\n * considering the `EOF`. Doing so correctly handles I/O errors that happen\n * after reading some bytes and also both of the allowed `EOF` behaviors.\n *\n * Implementations of `read()` are discouraged from returning a zero byte\n * count with a `null` error, except when `p.byteLength` == `0`. Callers\n * should treat a return of `0` and `null` as indicating that nothing\n * happened; in particular it does not indicate `EOF`.\n *\n * Implementations must not retain `p`.\n */\n read(p: Uint8Array): Promise<ReadResult>;\n }\n export interface SyncReader {\n readSync(p: Uint8Array): ReadResult;\n }\n export interface Writer {\n /** Writes `p.byteLength` bytes from `p` to the underlying data\n * stream. It resolves to the number of bytes written from `p` (`0` <= `n` <=\n * `p.byteLength`) and any error encountered that caused the write to stop\n * early. `write()` must return a non-null error if it returns `n` <\n * `p.byteLength`. write() must not modify the slice data, even temporarily.\n *\n * Implementations must not retain `p`.\n */\n write(p: Uint8Array): Promise<number>;\n }\n export interface SyncWriter {\n writeSync(p: Uint8Array): number;\n }\n export interface Closer {\n close(): void;\n }\n export interface Seeker {\n /** Seek sets the offset for the next `read()` or `write()` to offset,\n * interpreted according to `whence`: `SeekStart` means relative to the start\n * of the file, `SeekCurrent` means relative to the current offset, and\n * `SeekEnd` means relative to the end. Seek returns the new offset relative\n * to the start of the file and an error, if any.\n *\n * Seeking to an offset before the start of the file is an error. Seeking to\n * any positive offset is legal, but the behavior of subsequent I/O operations\n * on the underlying object is implementation-dependent.\n */\n seek(offset: number, whence: SeekMode): Promise<void>;\n }\n export interface SyncSeeker {\n seekSync(offset: number, whence: SeekMode): void;\n }\n export interface ReadCloser extends Reader, Closer {}\n export interface WriteCloser extends Writer, Closer {}\n export interface ReadSeeker extends Reader, Seeker {}\n export interface WriteSeeker extends Writer, Seeker {}\n export interface ReadWriteCloser extends Reader, Writer, Closer {}\n export interface ReadWriteSeeker extends Reader, Writer, Seeker {}\n /** Copies from `src` to `dst` until either `EOF` is reached on `src`\n * or an error occurs. It returns the number of bytes copied and the first\n * error encountered while copying, if any.\n *\n * Because `copy()` is defined to read from `src` until `EOF`, it does not\n * treat an `EOF` from `read()` as an error to be reported.\n */\n export function copy(dst: Writer, src: Reader): Promise<number>;\n /** Turns `r` into async iterator.\n *\n * for await (const chunk of toAsyncIterator(reader)) {\n * console.log(chunk)\n * }\n */\n export function toAsyncIterator(r: Reader): AsyncIterableIterator<Uint8Array>;\n}\n\ndeclare namespace fetchTypes {\n class Body implements domTypes.Body, domTypes.ReadableStream, io.ReadCloser {\n private rid;\n readonly contentType: string;\n bodyUsed: boolean;\n private _bodyPromise;\n private _data;\n readonly locked: boolean;\n readonly body: null | Body;\n constructor(rid: number, contentType: string);\n private _bodyBuffer;\n arrayBuffer(): Promise<ArrayBuffer>;\n blob(): Promise<domTypes.Blob>;\n formData(): Promise<domTypes.FormData>;\n json(): Promise<any>;\n text(): Promise<string>;\n read(p: Uint8Array): Promise<io.ReadResult>;\n close(): void;\n cancel(): Promise<void>;\n getReader(): domTypes.ReadableStreamReader;\n tee(): [domTypes.ReadableStream, domTypes.ReadableStream];\n }\n class Response implements domTypes.Response {\n readonly status: number;\n readonly url: string;\n statusText: string;\n readonly type = \"basic\";\n redirected: boolean;\n headers: domTypes.Headers;\n readonly trailer: Promise<domTypes.Headers>;\n bodyUsed: boolean;\n readonly body: Body;\n constructor(\n status: number,\n headersList: Array<[string, string]>,\n rid: number,\n body_?: null | Body\n );\n arrayBuffer(): Promise<ArrayBuffer>;\n blob(): Promise<domTypes.Blob>;\n formData(): Promise<domTypes.FormData>;\n json(): Promise<any>;\n text(): Promise<string>;\n readonly ok: boolean;\n clone(): domTypes.Response;\n }\n /** Fetch a resource from the network. */\n export function fetch(\n input: domTypes.Request | string,\n init?: domTypes.RequestInit\n ): Promise<Response>;\n}\n\ndeclare namespace textEncoding {\n export function atob(s: string): string;\n /** Creates a base-64 ASCII string from the input string. */\n export function btoa(s: string): string;\n export interface TextDecodeOptions {\n stream?: false;\n }\n export interface TextDecoderOptions {\n fatal?: boolean;\n ignoreBOM?: false;\n }\n export class TextDecoder {\n private _encoding;\n /** Returns encoding's name, lowercased. */\n readonly encoding: string;\n /** Returns `true` if error mode is \"fatal\", and `false` otherwise. */\n readonly fatal: boolean;\n /** Returns `true` if ignore BOM flag is set, and `false` otherwise. */\n readonly ignoreBOM = false;\n constructor(label?: string, options?: TextDecoderOptions);\n /** Returns the result of running encoding's decoder. */\n decode(input?: domTypes.BufferSource, options?: TextDecodeOptions): string;\n readonly [Symbol.toStringTag]: string;\n }\n export class TextEncoder {\n /** Returns \"utf-8\". */\n readonly encoding = \"utf-8\";\n /** Returns the result of running UTF-8's encoder. */\n encode(input?: string): Uint8Array;\n readonly [Symbol.toStringTag]: string;\n }\n}\n\ndeclare namespace timers {\n export type Args = unknown[];\n /** Sets a timer which executes a function once after the timer expires. */\n export function setTimeout(\n cb: (...args: Args) => void,\n delay: number,\n ...args: Args\n ): number;\n /** Repeatedly calls a function , with a fixed time delay between each call. */\n export function setInterval(\n cb: (...args: Args) => void,\n delay: number,\n ...args: Args\n ): number;\n /** Clears a previously set timer by id. AKA clearTimeout and clearInterval. */\n export function clearTimer(id: number): void;\n}\n\ndeclare namespace urlSearchParams {\n export class URLSearchParams {\n private params;\n private url;\n constructor(init?: string | string[][] | Record<string, string>);\n private updateSteps;\n /** Appends a specified key/value pair as a new search parameter.\n *\n * searchParams.append('name', 'first');\n * searchParams.append('name', 'second');\n */\n append(name: string, value: string): void;\n /** Deletes the given search parameter and its associated value,\n * from the list of all search parameters.\n *\n * searchParams.delete('name');\n */\n delete(name: string): void;\n /** Returns all the values associated with a given search parameter\n * as an array.\n *\n * searchParams.getAll('name');\n */\n getAll(name: string): string[];\n /** Returns the first value associated to the given search parameter.\n *\n * searchParams.get('name');\n */\n get(name: string): string | null;\n /** Returns a Boolean that indicates whether a parameter with the\n * specified name exists.\n *\n * searchParams.has('name');\n */\n has(name: string): boolean;\n /** Sets the value associated with a given search parameter to the\n * given value. If there were several matching values, this method\n * deletes the others. If the search parameter doesn't exist, this\n * method creates it.\n *\n * searchParams.set('name', 'value');\n */\n set(name: string, value: string): void;\n /** Sort all key/value pairs contained in this object in place and\n * return undefined. The sort order is according to Unicode code\n * points of the keys.\n *\n * searchParams.sort();\n */\n sort(): void;\n /** Calls a function for each element contained in this object in\n * place and return undefined. Optionally accepts an object to use\n * as this when executing callback as second argument.\n *\n * searchParams.forEach((value, key, parent) => {\n * console.log(value, key, parent);\n * });\n *\n */\n forEach(\n callbackfn: (value: string, key: string, parent: URLSearchParams) => void,\n thisArg?: any\n ): void;\n /** Returns an iterator allowing to go through all keys contained\n * in this object.\n *\n * for (const key of searchParams.keys()) {\n * console.log(key);\n * }\n */\n keys(): Iterable<string>;\n /** Returns an iterator allowing to go through all values contained\n * in this object.\n *\n * for (const value of searchParams.values()) {\n * console.log(value);\n * }\n */\n values(): Iterable<string>;\n /** Returns an iterator allowing to go through all key/value\n * pairs contained in this object.\n *\n * for (const [key, value] of searchParams.entries()) {\n * console.log(key, value);\n * }\n */\n entries(): Iterable<[string, string]>;\n /** Returns an iterator allowing to go through all key/value\n * pairs contained in this object.\n *\n * for (const [key, value] of searchParams[Symbol.iterator]()) {\n * console.log(key, value);\n * }\n */\n [Symbol.iterator](): Iterable<[string, string]>;\n /** Returns a query string suitable for use in a URL.\n *\n * searchParams.toString();\n */\n toString(): string;\n private _handleStringInitialization;\n private _handleArrayInitialization;\n }\n}\n\ndeclare namespace url {\n export class URL {\n private _parts;\n private _searchParams;\n private _updateSearchParams;\n hash: string;\n host: string;\n hostname: string;\n href: string;\n readonly origin: string;\n password: string;\n pathname: string;\n port: string;\n protocol: string;\n search: string;\n username: string;\n readonly searchParams: urlSearchParams.URLSearchParams;\n constructor(url: string, base?: string | URL);\n toString(): string;\n toJSON(): string;\n }\n}\n\ndeclare namespace workers {\n export function encodeMessage(data: any): Uint8Array;\n export function decodeMessage(dataIntArray: Uint8Array): any;\n export let onmessage: (e: { data: any }) => void;\n export function postMessage(data: any): void;\n export function getMessage(): Promise<any>;\n export let isClosing: boolean;\n export function workerClose(): void;\n export function workerMain(): Promise<void>;\n export interface Worker {\n onerror?: () => void;\n onmessage?: (e: { data: any }) => void;\n onmessageerror?: () => void;\n postMessage(data: any): void;\n closed: Promise<void>;\n }\n export class WorkerImpl implements Worker {\n private readonly rid;\n private isClosing;\n private readonly isClosedPromise;\n onerror?: () => void;\n onmessage?: (data: any) => void;\n onmessageerror?: () => void;\n constructor(specifier: string);\n readonly closed: Promise<void>;\n postMessage(data: any): void;\n private run;\n }\n}\n\ndeclare namespace performanceUtil {\n export class Performance {\n /** Returns a current time from Deno's start.\n * In milliseconds. Flag --allow-high-precision give\n * a precise measure.\n *\n * const t = performance.now();\n * console.log(`${t} ms since start!`);\n */\n now(): number;\n }\n}\n\ndeclare namespace body {\n export type BodySource =\n | domTypes.Blob\n | domTypes.BufferSource\n | domTypes.FormData\n | domTypes.URLSearchParams\n | domTypes.ReadableStream\n | string;\n export const BodyUsedError =\n \"Failed to execute 'clone' on 'Body': body is already used\";\n export class Body implements domTypes.Body {\n protected _bodySource: BodySource;\n readonly contentType: string;\n protected _stream: domTypes.ReadableStream | null;\n constructor(_bodySource: BodySource, contentType: string);\n readonly body: domTypes.ReadableStream | null;\n readonly bodyUsed: boolean;\n blob(): Promise<domTypes.Blob>;\n formData(): Promise<domTypes.FormData>;\n text(): Promise<string>;\n json(): Promise<any>;\n arrayBuffer(): Promise<ArrayBuffer>;\n }\n}\n\ndeclare namespace request {\n export class Request extends body.Body implements domTypes.Request {\n method: string;\n url: string;\n credentials?: \"omit\" | \"same-origin\" | \"include\";\n headers: domTypes.Headers;\n constructor(input: domTypes.RequestInfo, init?: domTypes.RequestInit);\n clone(): domTypes.Request;\n }\n}\n\n// This follows the WebIDL at: https://webassembly.github.io/spec/js-api/\n// And follow on WebIDL at: https://webassembly.github.io/spec/web-api/\n\n/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any */\n\ndeclare namespace WebAssembly {\n interface WebAssemblyInstantiatedSource {\n module: Module;\n instance: Instance;\n }\n\n /** Compiles a `WebAssembly.Module` from WebAssembly binary code. This\n * function is useful if it is necessary to a compile a module before it can\n * be instantiated (otherwise, the `WebAssembly.instantiate()` function\n * should be used). */\n function compile(bufferSource: domTypes.BufferSource): Promise<Module>;\n\n /** Compiles a `WebAssembly.Module` directly from a streamed underlying\n * source. This function is useful if it is necessary to a compile a module\n * before it can be instantiated (otherwise, the\n * `WebAssembly.instantiateStreaming()` function should be used). */\n function compileStreaming(\n source: Promise<domTypes.Response>\n ): Promise<Module>;\n\n /** Takes the WebAssembly binary code, in the form of a typed array or\n * `ArrayBuffer`, and performs both compilation and instantiation in one step.\n * The returned `Promise` resolves to both a compiled `WebAssembly.Module` and\n * its first `WebAssembly.Instance`. */\n function instantiate(\n bufferSource: domTypes.BufferSource,\n importObject?: object\n ): Promise<WebAssemblyInstantiatedSource>;\n\n /** Takes an already-compiled `WebAssembly.Module` and returns a `Promise`\n * that resolves to an `Instance` of that `Module`. This overload is useful if\n * the `Module` has already been compiled. */\n function instantiate(\n module: Module,\n importObject?: object\n ): Promise<Instance>;\n\n /** Compiles and instantiates a WebAssembly module directly from a streamed\n * underlying source. This is the most efficient, optimized way to load wasm\n * code. */\n function instantiateStreaming(\n source: Promise<domTypes.Response>,\n importObject?: object\n ): Promise<WebAssemblyInstantiatedSource>;\n\n /** Validates a given typed array of WebAssembly binary code, returning\n * whether the bytes form a valid wasm module (`true`) or not (`false`). */\n function validate(bufferSource: domTypes.BufferSource): boolean;\n\n type ImportExportKind = \"function\" | \"table\" | \"memory\" | \"global\";\n\n interface ModuleExportDescriptor {\n name: string;\n kind: ImportExportKind;\n }\n interface ModuleImportDescriptor {\n module: string;\n name: string;\n kind: ImportExportKind;\n }\n\n class Module {\n constructor(bufferSource: domTypes.BufferSource);\n\n /** Given a `Module` and string, returns a copy of the contents of all\n * custom sections in the module with the given string name. */\n static customSections(\n moduleObject: Module,\n sectionName: string\n ): ArrayBuffer;\n\n /** Given a `Module`, returns an array containing descriptions of all the\n * declared exports. */\n static exports(moduleObject: Module): ModuleExportDescriptor[];\n\n /** Given a `Module`, returns an array containing descriptions of all the\n * declared imports. */\n static imports(moduleObject: Module): ModuleImportDescriptor[];\n }\n\n class Instance<T extends object = { [key: string]: any }> {\n constructor(module: Module, importObject?: object);\n\n /** An object containing as its members all the functions exported from the\n * WebAssembly module instance, to allow them to be accessed and used by\n * JavaScript. */\n readonly exports: T;\n }\n\n interface MemoryDescriptor {\n initial: number;\n maximum?: number;\n }\n\n class Memory {\n constructor(descriptor: MemoryDescriptor);\n\n /** An accessor property that returns the buffer contained in the memory. */\n readonly buffer: ArrayBuffer;\n\n /** Increases the size of the memory instance by a specified number of\n * WebAssembly pages (each one is 64KB in size). */\n grow(delta: number): number;\n }\n\n type TableKind = \"anyfunc\";\n\n interface TableDescriptor {\n element: TableKind;\n initial: number;\n maximum?: number;\n }\n\n class Table {\n constructor(descriptor: TableDescriptor);\n\n /** Returns the length of the table, i.e. the number of elements. */\n readonly length: number;\n\n /** Accessor function — gets the element stored at a given index. */\n get(index: number): (...args: any[]) => any;\n\n /** Increases the size of the Table instance by a specified number of\n * elements. */\n grow(delta: number): number;\n\n /** Sets an element stored at a given index to a given value. */\n set(index: number, value: (...args: any[]) => any): void;\n }\n\n interface GlobalDescriptor {\n value: string;\n mutable?: boolean;\n }\n\n /** Represents a global variable instance, accessible from both JavaScript and\n * importable/exportable across one or more `WebAssembly.Module` instances.\n * This allows dynamic linking of multiple modules. */\n class Global {\n constructor(descriptor: GlobalDescriptor, value?: any);\n\n /** Old-style method that returns the value contained inside the global\n * variable. */\n valueOf(): any;\n\n /** The value contained inside the global variable — this can be used to\n * directly set and get the global's value. */\n value: any;\n }\n\n /** Indicates an error during WebAssembly decoding or validation */\n class CompileError extends Error {\n constructor(message: string, fileName?: string, lineNumber?: string);\n }\n\n /** Indicates an error during module instantiation (besides traps from the\n * start function). */\n class LinkError extends Error {\n constructor(message: string, fileName?: string, lineNumber?: string);\n }\n\n /** Is thrown whenever WebAssembly specifies a trap. */\n class RuntimeError extends Error {\n constructor(message: string, fileName?: string, lineNumber?: string);\n }\n}\n\n/* eslint-enable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any */\n"; | |
var libEs2015Dts = "/*! *****************************************************************************\nCopyright (c) Microsoft Corporation. All rights reserved. \nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\nthis file except in compliance with the License. You may obtain a copy of the\nLicense at http://www.apache.org/licenses/LICENSE-2.0 \n \nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, \nMERCHANTABLITY OR NON-INFRINGEMENT. \n \nSee the Apache Version 2.0 License for specific language governing permissions\nand limitations under the License.\n***************************************************************************** */\n\n\n\n/// <reference no-default-lib=\"true\"/>\n\n\n/// <reference lib=\"es5\" />\n/// <reference lib=\"es2015.core\" />\n/// <reference lib=\"es2015.collection\" />\n/// <reference lib=\"es2015.generator\" />\n/// <reference lib=\"es2015.promise\" />\n/// <reference lib=\"es2015.iterable\" />\n/// <reference lib=\"es2015.proxy\" />\n/// <reference lib=\"es2015.reflect\" />\n/// <reference lib=\"es2015.symbol\" />\n/// <reference lib=\"es2015.symbol.wellknown\" />\n"; | |
@@ -134124,11 +134146,11 @@ var denoMain = (function () { | |
function getExtension(fileName, mediaType) { | |
switch (mediaType) { | |
case MediaType.JavaScript: | |
- return undefined; | |
+ return typescript_7.Js; | |
case MediaType.TypeScript: | |
- return fileName.endsWith(".d.ts") ? undefined : undefined; | |
+ return fileName.endsWith(".d.ts") ? typescript_7.Dts : typescript_7.Ts; | |
case MediaType.Json: | |
- return undefined; | |
+ return typescript_7.Json; | |
case MediaType.Unknown: | |
default: | |
throw TypeError("Cannot resolve extension."); | |
@@ -134149,12 +134171,12 @@ var denoMain = (function () { | |
allowNonTsExtensions: true, | |
checkJs: true, | |
esModuleInterop: true, | |
- module: undefined, | |
+ module: typescript_8.ESNext, | |
outDir: "$deno$", | |
resolveJsonModule: true, | |
sourceMap: true, | |
stripComments: true, | |
- target: undefined | |
+ target: typescript_11.ESNext | |
}; | |
this._os = os; | |
this._scriptFileNames = []; | |
@@ -134308,17 +134330,17 @@ var denoMain = (function () { | |
if (moduleMetaData) { | |
switch (moduleMetaData.mediaType) { | |
case MediaType.TypeScript: | |
- return undefined; | |
+ return typescript_9.TS; | |
case MediaType.JavaScript: | |
- return undefined; | |
+ return typescript_9.JS; | |
case MediaType.Json: | |
- return undefined; | |
+ return typescript_9.JSON; | |
default: | |
- return this._options.allowJs ? undefined : undefined; | |
+ return this._options.allowJs ? typescript_9.JS : typescript_9.TS; | |
} | |
} | |
else { | |
- return this._options.allowJs ? undefined : undefined; | |
+ return this._options.allowJs ? typescript_9.JS : typescript_9.TS; | |
} | |
} | |
getScriptVersion(fileName) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment