Files
bitburner-src/src/NetscriptFunctions/INetscriptHelper.ts
T
Olivier Gagnon 972abcbdc8 Wrap all the API
2022-05-24 20:16:39 -04:00

18 lines
850 B
TypeScript

import { CityName } from "src/Locations/data/CityNames";
import { NetscriptContext } from "src/Netscript/APIWrapper";
import { IPort } from "src/NetscriptPort";
import { BaseServer } from "../Server/BaseServer";
export interface INetscriptHelper {
updateDynamicRam(functionName: string, ram: number): void;
makeRuntimeErrorMsg(functionName: string, message: string): string;
string(funcName: string, argName: string, v: unknown): string;
number(funcName: string, argName: string, v: unknown): number;
city(funcName: string, argName: string, v: unknown): CityName;
boolean(v: unknown): boolean;
getServer(ip: any, ctx: NetscriptContext): BaseServer;
checkSingularityAccess(func: string): void;
hack(ctx: NetscriptContext, hostname: string, manual: boolean): Promise<number>;
getValidPort(funcName: string, port: number): IPort;
}