MISC: Fix typos in NetscriptDefinitions.d.ts (#1546)

This commit is contained in:
catloversg
2024-08-05 03:09:50 +07:00
committed by GitHub
parent 986ac0b627
commit e5a63b4116
24 changed files with 65 additions and 61 deletions
+3 -3
View File
@@ -819,16 +819,16 @@ export const ns: InternalAPI<NSFull> = {
},
killall:
(ctx) =>
(_hostname = ctx.workerScript.hostname, _safetyguard = true) => {
(_hostname = ctx.workerScript.hostname, _safetyGuard = true) => {
const hostname = helpers.string(ctx, "hostname", _hostname);
const safetyguard = !!_safetyguard;
const safetyGuard = !!_safetyGuard;
const server = helpers.getServer(ctx, hostname);
let scriptsKilled = 0;
for (const byPid of server.runningScriptMap.values()) {
for (const pid of byPid.keys()) {
if (safetyguard && pid == ctx.workerScript.pid) continue;
if (safetyGuard && pid == ctx.workerScript.pid) continue;
killWorkerScriptByPid(pid);
++scriptsKilled;
}