all the lints

This commit is contained in:
Olivier Gagnon
2021-05-01 03:17:31 -04:00
parent abe0330dc3
commit d745150c45
231 changed files with 1458 additions and 1439 deletions
+5 -3
View File
@@ -106,7 +106,7 @@ export class WorkerScript {
*/
serverIp: string;
constructor(runningScriptObj: RunningScript, pid: number, nsFuncsGenerator?: (ws: WorkerScript) => object) {
constructor(runningScriptObj: RunningScript, pid: number, nsFuncsGenerator?: (ws: WorkerScript) => any) {
this.name = runningScriptObj.filename;
this.serverIp = runningScriptObj.server;
@@ -146,8 +146,10 @@ export class WorkerScript {
/**
* Returns the Server on which this script is running
*/
getServer() {
return AllServers[this.serverIp];
getServer(): BaseServer {
const server = AllServers[this.serverIp];
if(server == null) throw new Error(`Script ${this.name} pid ${this.pid} is running on non-existent server?`);
return server;
}
/**