summaryrefslogtreecommitdiff
path: root/op_crates/web/internal.d.ts
diff options
context:
space:
mode:
authorLuca Casonato <lucacasonato@yahoo.com>2021-04-19 01:00:13 +0200
committerGitHub <noreply@github.com>2021-04-19 01:00:13 +0200
commit0552eaf569ef910b0d132b6e60758f17a4519d91 (patch)
tree6fe6ff3755487475bcef60f3ddb7c8d42432494b /op_crates/web/internal.d.ts
parent0c5ecec8f60d4f1586e56b4e6e36ca973c555830 (diff)
chore: align `Headers` to spec (#10199)
This commit aligns `Headers` to spec. It also removes the now unused 03_dom_iterable.js file. We now pass all relevant `Headers` WPT. We do not implement any sort of header filtering, as we are a server side runtime. This is likely not the most efficient implementation of `Headers` yet. It is however spec compliant. Once all the APIs in the `HTTP` hot loop are correct we can start optimizing them. It is likely that this commit reduces bench throughput temporarily.
Diffstat (limited to 'op_crates/web/internal.d.ts')
-rw-r--r--op_crates/web/internal.d.ts25
1 files changed, 21 insertions, 4 deletions
diff --git a/op_crates/web/internal.d.ts b/op_crates/web/internal.d.ts
index 5681edc7b..a5b653218 100644
--- a/op_crates/web/internal.d.ts
+++ b/op_crates/web/internal.d.ts
@@ -17,15 +17,32 @@ declare namespace globalThis {
result: string;
position: number;
};
+ 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;
+ HTTP_WHITESPACE_PREFIX_RE: RegExp;
+ HTTP_WHITESPACE_SUFFIX_RE: RegExp;
+ regexMatcher(chars: string[]): string;
+ byteUpperCase(s: string): string;
+ byteLowerCase(s: string): string;
};
- declare var mimesniff: {
- parseMimeType(input: string): {
+ declare namespace mimesniff {
+ declare interface MimeType {
type: string;
subtype: string;
parameters: Map<string, string>;
- } | null;
- };
+ }
+ declare function parseMimeType(input: string): MimeType | null;
+ }
declare var eventTarget: {
EventTarget: typeof EventTarget;