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:
stjet
2024-12-14 04:36:46 +00:00
parent 9dc83286f2
commit 295e180553
6 changed files with 33 additions and 17 deletions

3
rpc.ts
View File

@@ -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");
}
}
}