This commit is contained in:
Olivier Gagnon
2022-07-15 01:51:30 -04:00
parent 86c0913bd3
commit 4bee746576
33 changed files with 178 additions and 154 deletions
+5 -3
View File
@@ -15,12 +15,14 @@ import { GetServer } from "../Server/AllServers";
import { BaseServer } from "../Server/BaseServer";
import { IMap } from "../types";
import { NS } from "../ScriptEditor/NetscriptDefinitions";
import { ScriptDeath } from "./ScriptDeath";
import { ScriptArg } from "./ScriptArg";
export class WorkerScript {
/**
* Script's arguments
*/
args: any[];
args: ScriptArg[];
/**
* Copy of the script's code
@@ -36,7 +38,7 @@ export class WorkerScript {
/**
* Holds the Promise reject() function while the script is "blocked" by an async op
*/
delayReject?: (reason?: any) => void;
delayReject?: (reason?: ScriptDeath) => void;
/**
* Stores names of all functions that have logging disabled
@@ -110,7 +112,7 @@ export class WorkerScript {
/**
* Function called when the script ends.
*/
atExit: any;
atExit?: () => void;
constructor(runningScriptObj: RunningScript, pid: number, nsFuncsGenerator?: (ws: WorkerScript) => NS) {
this.name = runningScriptObj.filename;