Skip to content
This repository was archived by the owner on Feb 14, 2024. It is now read-only.

Commit 68427dc

Browse files
committed
Ease linters
1 parent 673dc77 commit 68427dc

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/worker.ts

+13-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ let raw_xserver: any;
99

1010
async function waitRunDependency() {
1111
const promise = new Promise((r: any) => {
12+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
1213
// @ts-ignore
1314
globalThis.Module.monitorRunDependencies = (n: number) => {
1415
if (n === 0) {
@@ -20,8 +21,10 @@ async function waitRunDependency() {
2021
// If there are no pending dependencies left, monitorRunDependencies will
2122
// never be called. Since we can't check the number of dependencies,
2223
// manually trigger a call.
24+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
2325
// @ts-ignore
2426
globalThis.Module.addRunDependency('dummy');
27+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
2528
// @ts-ignore
2629
globalThis.Module.removeRunDependency('dummy');
2730
return promise;
@@ -44,24 +47,32 @@ let resolveInputReply: any;
4447

4548
async function loadCppModule(moduleFactory: any): Promise<any> {
4649
const options: any = {};
50+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
4751
// @ts-ignore
4852
globalThis.Module = await moduleFactory(options);
4953

5054
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
5155
// @ts-ignore
52-
importScripts(require('./python_data'));
56+
// eslint-disable-next-line @typescript-eslint/no-var-requires
57+
importScripts(require('./xpython_wasm.js'));
5358

5459
await waitRunDependency();
60+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
5561
// @ts-ignore
5662
raw_xkernel = new globalThis.Module.xkernel();
5763
raw_xserver = raw_xkernel.get_server();
5864
raw_xkernel!.start();
5965
}
6066

6167
async function load() {
68+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
6269
// @ts-ignore
63-
let xpython = importScripts(require('./xpython_wasm.js'));
70+
// eslint-disable-next-line @typescript-eslint/no-var-requires
71+
importScripts(require('./python_data.js'));
72+
73+
console.log('hey');
6474

75+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
6576
// @ts-ignore
6677
return loadCppModule(createXeusModule);
6778
}

0 commit comments

Comments
 (0)