mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-21 16:52:55 +02:00
fix few as any
This commit is contained in:
@@ -1661,15 +1661,15 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS {
|
||||
(_hostname: unknown = workerScript.hostname): IServerDef => {
|
||||
const hostname = ctx.helper.string("hostname", _hostname);
|
||||
const server = safeGetServer(hostname, ctx);
|
||||
const copy = Object.assign({}, server) as any;
|
||||
const copy = Object.assign({}, server) as Server;
|
||||
// These fields should be hidden.
|
||||
copy.contracts = undefined;
|
||||
copy.messages = undefined;
|
||||
copy.runningScripts = undefined;
|
||||
copy.scripts = undefined;
|
||||
copy.textFiles = undefined;
|
||||
copy.programs = undefined;
|
||||
copy.serversOnNetwork = undefined;
|
||||
copy.contracts = [];
|
||||
copy.messages = [];
|
||||
copy.runningScripts = [];
|
||||
copy.scripts = [];
|
||||
copy.textFiles = [];
|
||||
copy.programs = [];
|
||||
copy.serversOnNetwork = [];
|
||||
if (!copy.baseDifficulty) copy.baseDifficulty = 0;
|
||||
if (!copy.hackDifficulty) copy.hackDifficulty = 0;
|
||||
if (!copy.minDifficulty) copy.minDifficulty = 0;
|
||||
|
||||
Reference in New Issue
Block a user