Skip to content

Commit

Permalink
fix: cast due to typedef incompatibilities
Browse files Browse the repository at this point in the history
  • Loading branch information
mizdra committed Dec 27, 2021
1 parent 0e24602 commit d20f879
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/core-worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,5 @@ export class SerializableCore {
}
}

expose(SerializableCore, nodeEndpoint.default(parentPort));
// eslint-disable-next-line @typescript-eslint/no-explicit-any
expose(SerializableCore, (nodeEndpoint as any)(parentPort));
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export async function run(options: Options) {
// So we wrap it with comlink and run it on the Worker.
const worker = new Worker(join(dirname(fileURLToPath(import.meta.url)), 'core-worker.js'));
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const ProxiedCore = wrap<typeof SerializableCore>(nodeEndpoint.default(worker));
const ProxiedCore = wrap<typeof SerializableCore>((nodeEndpoint as any)(worker));
const core = await new ProxiedCore(config);

let nextScene: NextScene = { name: 'lint' };
Expand Down

0 comments on commit d20f879

Please sign in to comment.