@@ -9,6 +9,7 @@ let raw_xserver: any;
9
9
10
10
async function waitRunDependency ( ) {
11
11
const promise = new Promise ( ( r : any ) => {
12
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
12
13
// @ts -ignore
13
14
globalThis . Module . monitorRunDependencies = ( n : number ) => {
14
15
if ( n === 0 ) {
@@ -20,8 +21,10 @@ async function waitRunDependency() {
20
21
// If there are no pending dependencies left, monitorRunDependencies will
21
22
// never be called. Since we can't check the number of dependencies,
22
23
// manually trigger a call.
24
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
23
25
// @ts -ignore
24
26
globalThis . Module . addRunDependency ( 'dummy' ) ;
27
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
25
28
// @ts -ignore
26
29
globalThis . Module . removeRunDependency ( 'dummy' ) ;
27
30
return promise ;
@@ -44,24 +47,32 @@ let resolveInputReply: any;
44
47
45
48
async function loadCppModule ( moduleFactory : any ) : Promise < any > {
46
49
const options : any = { } ;
50
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
47
51
// @ts -ignore
48
52
globalThis . Module = await moduleFactory ( options ) ;
49
53
50
54
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
51
55
// @ts -ignore
52
- importScripts ( require ( './python_data' ) ) ;
56
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
57
+ importScripts ( require ( './xpython_wasm.js' ) ) ;
53
58
54
59
await waitRunDependency ( ) ;
60
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
55
61
// @ts -ignore
56
62
raw_xkernel = new globalThis . Module . xkernel ( ) ;
57
63
raw_xserver = raw_xkernel . get_server ( ) ;
58
64
raw_xkernel ! . start ( ) ;
59
65
}
60
66
61
67
async function load ( ) {
68
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
62
69
// @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' ) ;
64
74
75
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
65
76
// @ts -ignore
66
77
return loadCppModule ( createXeusModule ) ;
67
78
}
0 commit comments