build fix, lint, remove some instanceof checks

This commit is contained in:
Snarling
2022-09-27 15:14:34 -04:00
parent 81412db02e
commit 38063f62a7
38 changed files with 131 additions and 282 deletions
+2 -9
View File
@@ -164,15 +164,8 @@ export class BaseServer {
}
removeContract(contract: CodingContract | string): void {
if (contract instanceof CodingContract) {
this.contracts = this.contracts.filter((c) => {
return c.fn !== contract.fn;
});
} else {
this.contracts = this.contracts.filter((c) => {
return c.fn !== contract;
});
}
const index = this.contracts.findIndex((c) => c.fn === (typeof contract === "string" ? contract : contract.fn));
if (index > -1) this.contracts.splice(index, 1);
}
/**