From 9e6cd91014ac4a0d34556b0d09cbe25e4e0930c6 Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Tue, 20 Apr 2021 14:47:22 +0200 Subject: chore: align fetch to spec (#10203) This commit aligns the `fetch` API and the `Request` / `Response` classes belonging to it to the spec. This commit enables all the relevant `fetch` WPT tests. Spec compliance is now at around 90%. Performance is essentially identical now (within 1% of 1.9.0). --- op_crates/web/internal.d.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'op_crates/web/internal.d.ts') diff --git a/op_crates/web/internal.d.ts b/op_crates/web/internal.d.ts index a5b653218..bfce3e1e1 100644 --- a/op_crates/web/internal.d.ts +++ b/op_crates/web/internal.d.ts @@ -28,11 +28,21 @@ declare namespace globalThis { HTTP_TOKEN_CODE_POINT_RE: RegExp; HTTP_QUOTED_STRING_TOKEN_POINT: string[]; HTTP_QUOTED_STRING_TOKEN_POINT_RE: RegExp; + HTTP_TAB_OR_SPACE_PREFIX_RE: RegExp; + HTTP_TAB_OR_SPACE_SUFFIX_RE: RegExp; HTTP_WHITESPACE_PREFIX_RE: RegExp; HTTP_WHITESPACE_SUFFIX_RE: RegExp; regexMatcher(chars: string[]): string; byteUpperCase(s: string): string; byteLowerCase(s: string): string; + collectHttpQuotedString( + input: string, + position: number, + extractValue: boolean, + ): { + result: string; + position: number; + }; }; declare namespace mimesniff { @@ -42,6 +52,8 @@ declare namespace globalThis { parameters: Map; } declare function parseMimeType(input: string): MimeType | null; + declare function essence(mimeType: MimeType): string; + declare function serializeMimeType(mimeType: MimeType): string; } declare var eventTarget: { -- cgit v1.2.3