Skip to content

Commit

Permalink
fix(types): include .cjs
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed May 15, 2024
1 parent 6221dfe commit afe6bd7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/xsnap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,6 @@
"workerThreads": false
},
"typeCoverage": {
"atLeast": 94.45
"atLeast": 94.04
}
}
3 changes: 0 additions & 3 deletions packages/xsnap/src/avaHandler.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ HandledPromise is defined by eventual send shim.
/// <reference types="ses" />
/// <reference types="@endo/eventual-send" />

// @ts-expect-error cannot redeclare encoder
const encoder = new TextEncoder();
const decoder = new TextDecoder();

Expand All @@ -33,7 +32,6 @@ function send(item) {
*/
const bundleSource = async (startFilename, ...args) => {
const msg = await send({ bundleSource: [startFilename, ...args] });
// @ts-expect-error send() returns void
return JSON.parse(decoder.decode(msg));
};

Expand Down Expand Up @@ -87,7 +85,6 @@ function handler(rawMessage) {
__filename,
console,
assert,
// @ts-expect-error
HandledPromise,
URL: class URLStub {
constructor(url, base) {
Expand Down
9 changes: 4 additions & 5 deletions packages/xsnap/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
},
"include": [
"*.js",
"lib/**/*.js",
"src/**/*.d.ts",
"src/**/*.js",
"test/**/*.js",
"tools/**/*.js",
"lib",
"src",
"test",
"tools",
],
}

0 comments on commit afe6bd7

Please sign in to comment.