mirror of
https://github.com/stjet/banani.git
synced 2025-12-29 09:39:23 +00:00
ts strict: true and noUnusedLocals: true - v1.0.5
had to do one @ts-ignore because .d.ts file for tweetnacl_mod.js are not going to happen
This commit is contained in:
3
rpc.ts
3
rpc.ts
@@ -212,7 +212,8 @@ export class RPCWithBackup extends RPC {
|
||||
return resp_json;
|
||||
} catch (e) {
|
||||
//increment (so try next RPC in provided list), if all RPCs exhausted (all failed), throw error
|
||||
if (!this.rpc_urls[++i]) throw Error(e);
|
||||
//typescript says e might not inherit from Error which is technically true, but in this case it always will be
|
||||
if (!this.rpc_urls[++i]) throw Error(e instanceof Error ? e.toString() : "RPC call error");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user