2021-01-28 15:37:21 -05:00
|
|
|
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
|
|
|
|
|
|
|
|
/// <reference no-default-lib="true" />
|
|
|
|
/// <reference lib="esnext" />
|
|
|
|
|
|
|
|
declare namespace globalThis {
|
|
|
|
declare namespace __bootstrap {
|
2021-04-08 09:05:08 -04:00
|
|
|
declare var infra: {
|
|
|
|
collectSequenceOfCodepoints(
|
|
|
|
input: string,
|
|
|
|
position: number,
|
|
|
|
condition: (char: string) => boolean,
|
|
|
|
): {
|
|
|
|
result: string;
|
|
|
|
position: number;
|
|
|
|
};
|
2021-04-18 19:00:13 -04:00
|
|
|
ASCII_DIGIT: string[];
|
|
|
|
ASCII_UPPER_ALPHA: string[];
|
|
|
|
ASCII_LOWER_ALPHA: string[];
|
|
|
|
ASCII_ALPHA: string[];
|
|
|
|
ASCII_ALPHANUMERIC: string[];
|
|
|
|
HTTP_TAB_OR_SPACE: string[];
|
|
|
|
HTTP_WHITESPACE: string[];
|
|
|
|
HTTP_TOKEN_CODE_POINT: string[];
|
|
|
|
HTTP_TOKEN_CODE_POINT_RE: RegExp;
|
|
|
|
HTTP_QUOTED_STRING_TOKEN_POINT: string[];
|
|
|
|
HTTP_QUOTED_STRING_TOKEN_POINT_RE: RegExp;
|
2021-04-20 08:47:22 -04:00
|
|
|
HTTP_TAB_OR_SPACE_PREFIX_RE: RegExp;
|
|
|
|
HTTP_TAB_OR_SPACE_SUFFIX_RE: RegExp;
|
2021-04-18 19:00:13 -04:00
|
|
|
HTTP_WHITESPACE_PREFIX_RE: RegExp;
|
|
|
|
HTTP_WHITESPACE_SUFFIX_RE: RegExp;
|
|
|
|
regexMatcher(chars: string[]): string;
|
|
|
|
byteUpperCase(s: string): string;
|
|
|
|
byteLowerCase(s: string): string;
|
2021-04-20 08:47:22 -04:00
|
|
|
collectHttpQuotedString(
|
|
|
|
input: string,
|
|
|
|
position: number,
|
|
|
|
extractValue: boolean,
|
|
|
|
): {
|
|
|
|
result: string;
|
|
|
|
position: number;
|
|
|
|
};
|
2021-06-05 17:10:07 -04:00
|
|
|
forgivingBase64Encode(data: Uint8Array): string;
|
|
|
|
forgivingBase64Decode(data: string): Uint8Array;
|
2021-04-08 09:05:08 -04:00
|
|
|
};
|
|
|
|
|
2021-07-03 15:32:28 -04:00
|
|
|
declare var domException: {
|
|
|
|
DOMException: typeof DOMException;
|
|
|
|
};
|
|
|
|
|
2021-04-18 19:00:13 -04:00
|
|
|
declare namespace mimesniff {
|
|
|
|
declare interface MimeType {
|
2021-04-08 09:05:08 -04:00
|
|
|
type: string;
|
|
|
|
subtype: string;
|
|
|
|
parameters: Map<string, string>;
|
2021-04-18 19:00:13 -04:00
|
|
|
}
|
|
|
|
declare function parseMimeType(input: string): MimeType | null;
|
2021-04-20 08:47:22 -04:00
|
|
|
declare function essence(mimeType: MimeType): string;
|
|
|
|
declare function serializeMimeType(mimeType: MimeType): string;
|
2021-04-18 19:00:13 -04:00
|
|
|
}
|
2021-04-08 09:05:08 -04:00
|
|
|
|
2021-03-01 05:31:13 -05:00
|
|
|
declare var eventTarget: {
|
|
|
|
EventTarget: typeof EventTarget;
|
|
|
|
};
|
|
|
|
|
2021-01-28 15:37:21 -05:00
|
|
|
declare var location: {
|
|
|
|
getLocationHref(): string | undefined;
|
|
|
|
};
|
2021-04-06 06:55:05 -04:00
|
|
|
|
|
|
|
declare var base64: {
|
2021-06-05 17:10:07 -04:00
|
|
|
atob(data: string): string;
|
|
|
|
btoa(data: string): string;
|
2021-04-06 06:55:05 -04:00
|
|
|
};
|
2021-06-10 09:26:10 -04:00
|
|
|
|
|
|
|
declare var file: {
|
2021-07-05 09:34:37 -04:00
|
|
|
getParts(blob: Blob): string[];
|
|
|
|
Blob: typeof Blob;
|
|
|
|
File: typeof File;
|
2021-06-10 09:26:10 -04:00
|
|
|
};
|
2021-06-14 07:51:02 -04:00
|
|
|
|
|
|
|
declare var streams: {
|
|
|
|
ReadableStream: typeof ReadableStream;
|
|
|
|
isReadableStreamDisturbed(stream: ReadableStream): boolean;
|
2021-06-23 10:00:23 -04:00
|
|
|
createProxy<T>(stream: ReadableStream<T>): ReadableStream<T>;
|
2021-06-14 07:51:02 -04:00
|
|
|
};
|
2021-06-21 13:53:52 -04:00
|
|
|
|
|
|
|
declare namespace messagePort {
|
|
|
|
declare type Transferable = {
|
|
|
|
kind: "messagePort";
|
|
|
|
data: number;
|
|
|
|
};
|
|
|
|
declare interface MessageData {
|
|
|
|
data: Uint8Array;
|
|
|
|
transferables: Transferable[];
|
|
|
|
}
|
|
|
|
}
|
2021-01-28 15:37:21 -05:00
|
|
|
}
|
|
|
|
}
|