mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-18 23:38:35 +02:00
format
This commit is contained in:
@@ -11,7 +11,7 @@ type ExternalAPI = {
|
||||
};
|
||||
|
||||
type InternalFunction<F extends (...args: unknown[]) => unknown> = (
|
||||
ctx: NetscriptContext
|
||||
ctx: NetscriptContext,
|
||||
) => (...args: unknown[]) => ReturnType<F>;
|
||||
export type InternalAPI<API> = {
|
||||
[Property in keyof API]: API[Property] extends ExternalFunction
|
||||
@@ -65,7 +65,7 @@ function wrapFunction(
|
||||
func: (_ctx: NetscriptContext) => (...args: unknown[]) => unknown,
|
||||
...tree: string[]
|
||||
): void {
|
||||
const functionPath = tree.join('.');
|
||||
const functionPath = tree.join(".");
|
||||
const functionName = tree.pop();
|
||||
if (typeof functionName !== "string") {
|
||||
throw makeRuntimeRejectMsg(workerScript, "Failure occured while wrapping netscript api");
|
||||
@@ -99,7 +99,7 @@ function wrapFunction(
|
||||
Object.defineProperty(parent, functionName, {
|
||||
value: wrappedFunction,
|
||||
writable: true,
|
||||
enumerable: true
|
||||
enumerable: true,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user