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 {
|
2021-04-14 16:49:16 -04:00
|
|
|
declare var TextEncoder: typeof TextEncoder;
|
|
|
|
declare var TextDecoder: typeof TextDecoder;
|
|
|
|
|
2021-01-28 15:37:21 -05:00
|
|
|
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-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-01-28 15:37:21 -05:00
|
|
|
}
|
|
|
|
}
|