mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-19 06:03:50 +01:00
format&lint
This commit is contained in:
parent
c6cb4ca033
commit
28d9c70796
@ -65,17 +65,18 @@ function wrapFunction(
|
||||
});
|
||||
}
|
||||
|
||||
export function wrapAPI(
|
||||
workerScript: WorkerScript,
|
||||
namespace: object,
|
||||
args: ScriptArg[]
|
||||
): NSFull {
|
||||
const wrappedAPI = wrapAPILayer({},workerScript,namespace);
|
||||
wrappedAPI.args=args;
|
||||
export function wrapAPI(workerScript: WorkerScript, namespace: object, args: ScriptArg[]): NSFull {
|
||||
const wrappedAPI = wrapAPILayer({}, workerScript, namespace);
|
||||
wrappedAPI.args = args;
|
||||
return wrappedAPI as unknown as NSFull;
|
||||
}
|
||||
|
||||
export function wrapAPILayer(wrappedAPI:ExternalAPI,workerScript:WorkerScript,namespace:object,...tree:string[]){
|
||||
export function wrapAPILayer(
|
||||
wrappedAPI: ExternalAPI,
|
||||
workerScript: WorkerScript,
|
||||
namespace: object,
|
||||
...tree: string[]
|
||||
) {
|
||||
for (const [key, value] of Object.entries(namespace)) {
|
||||
if (typeof value === "function") {
|
||||
wrapFunction(wrappedAPI, workerScript, value, ...tree, key);
|
||||
|
Loading…
Reference in New Issue
Block a user