diff --git a/src/NetscriptFunctions.ts b/src/NetscriptFunctions.ts index edbdd89e3..bc108d71e 100644 --- a/src/NetscriptFunctions.ts +++ b/src/NetscriptFunctions.ts @@ -63,7 +63,7 @@ import { NetscriptGang } from "./NetscriptFunctions/Gang"; import { NetscriptSleeve } from "./NetscriptFunctions/Sleeve"; import { NetscriptExtra } from "./NetscriptFunctions/Extra"; import { NetscriptHacknet } from "./NetscriptFunctions/Hacknet"; -import { NS as INS, Player as INetscriptPlayer } from "./ScriptEditor/NetscriptDefinitions"; +import { NS as INS, Player as INetscriptPlayer, SourceFileLvl } from "./ScriptEditor/NetscriptDefinitions"; import { NetscriptBladeburner } from "./NetscriptFunctions/Bladeburner"; import { NetscriptCodingContract } from "./NetscriptFunctions/CodingContract"; import { NetscriptCorporation } from "./NetscriptFunctions/Corporation"; @@ -2150,14 +2150,14 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS { updateDynamicRam("getFavorToDonate", getRamCost("getFavorToDonate")); return Math.floor(CONSTANTS.BaseFavorToDonate * BitNodeMultipliers.RepToDonateToFaction); }, - getOwnedSourceFiles: function (): any { + getOwnedSourceFiles: function (): SourceFileLvl[] { helper.updateDynamicRam("getOwnedSourceFiles", getRamCost("getOwnedSourceFiles")); - const res = []; + const res: SourceFileLvl[] = []; for (let i = 0; i < Player.sourceFiles.length; ++i) { res.push({ n: Player.sourceFiles[i].n, lvl: Player.sourceFiles[i].lvl, - }); + } as SourceFileLvl); } return res; },