Skip to content

Commit bf26e1e

Browse files
committed
fix: types
1 parent 42d3d1f commit bf26e1e

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

rclone.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,25 @@ import "https://raw.githubusercontent.com/rclone/rclone/master/fs/rc/js/wasm_exe
22

33
// A Rclone instance from a compiled WebAssemble module.
44
export class Rclone extends WebAssembly.Instance {
5-
constructor(module: WebAssemble.Module) {
5+
constructor(module: WebAssembly.Module) {
66
// Patches for rclone.
7-
globalThis.document = {};
8-
globalThis.rcValidResolve = function() {
7+
// @ts-ignore
8+
globalThis.document ??= {};
9+
// @ts-ignore
10+
globalThis.rcValidResolve ??= function() {
911
// Invoked by rclone at the end of initialization.
1012
}
1113
// Instantiates WASM module.
14+
// @ts-ignore
1215
const go = new globalThis.Go(); // From `wasm_exec.js`
16+
1317
super(module, go.importObject);
18+
1419
go.run(this);
1520
}
1621

1722
rc(command: string, args: object): object {
23+
// @ts-ignore
1824
return globalThis.rc(command, args);
1925
}
2026
}

0 commit comments

Comments
 (0)