Skip to content

Commit

Permalink
Merge pull request #170 from lowlighter/fix-typings
Browse files Browse the repository at this point in the history
fix: native typing and missing ref lib in worker context
  • Loading branch information
b-fuze authored Jul 2, 2024
2 parents e9ba6c1 + 2c89bbb commit ef0bbf3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
12 changes: 6 additions & 6 deletions deno-dom-native.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,14 @@ const returnBufSizeLen = new Uint8Array(returnBufSizeLenRaw);

type DocumentParser = (
srcBuf: Uint8Array,
srcLength: number,
srcLength: bigint,
returnBuf: Uint8Array,
) => void;
type FragmentParser = (
srcBuf: Uint8Array,
srcLength: number,
srcLength: bigint,
contextLocalNameBuf: Uint8Array,
contextLocalNameLength: number,
contextLocalNameLength: bigint,
returnBuf: Uint8Array,
) => void;

Expand All @@ -131,15 +131,15 @@ function genericParse(
const encodedContextLocalName = utf8Encoder.encode(contextLocalName);
(parser as FragmentParser)(
encodedHtml,
encodedHtml.length,
BigInt(encodedHtml.length),
encodedContextLocalName,
encodedContextLocalName.length,
BigInt(encodedContextLocalName.length),
returnBufSizeLen,
);
} else {
(parser as DocumentParser)(
encodedHtml,
encodedHtml.length,
BigInt(encodedHtml.length),
returnBufSizeLen,
);
}
Expand Down
1 change: 1 addition & 0 deletions test/wpt-runner-worker.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
///<reference lib="deno.worker" />
type TestSetupEvent = {
data: {
backend: "wasm" | "native";
Expand Down

0 comments on commit ef0bbf3

Please sign in to comment.