File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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.
44export 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}
You can’t perform that action at this time.
0 commit comments