mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-20 00:04:22 +02:00
Wrap all the API
This commit is contained in:
@@ -43,9 +43,14 @@ type NetscriptHelpers = {
|
||||
number: (funcName: string, argName: string, v: unknown) => number;
|
||||
city: (funcName: string, argName: string, v: unknown) => CityName;
|
||||
boolean: (v: unknown) => boolean;
|
||||
getServer: (hostname: string, callingFnName: string) => BaseServer;
|
||||
getServer: (hostname: string, ctx: NetscriptContext) => BaseServer;
|
||||
checkSingularityAccess: (func: string) => void;
|
||||
hack: (hostname: any, manual: any, { threads: requestedThreads, stock }?: any) => Promise<number>;
|
||||
hack: (
|
||||
ctx: NetscriptContext,
|
||||
hostname: any,
|
||||
manual: any,
|
||||
{ threads: requestedThreads, stock }?: any,
|
||||
) => Promise<number>;
|
||||
getValidPort: (funcName: string, port: any) => IPort;
|
||||
};
|
||||
|
||||
@@ -88,7 +93,7 @@ function wrapFunction(
|
||||
number: (argName: string, v: unknown) => helpers.number(functionPath, argName, v),
|
||||
city: (argName: string, v: unknown) => helpers.city(functionPath, argName, v),
|
||||
boolean: helpers.boolean,
|
||||
getServer: (hostname: string) => helpers.getServer(hostname, functionPath),
|
||||
getServer: (hostname: string) => helpers.getServer(hostname, ctx),
|
||||
checkSingularityAccess: () => helpers.checkSingularityAccess(functionName),
|
||||
hack: helpers.hack,
|
||||
getValidPort: (port: any) => helpers.getValidPort(functionPath, port),
|
||||
|
||||
Reference in New Issue
Block a user