mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-12 18:53:55 +01:00
Remove unused types
This commit is contained in:
parent
b433c366d7
commit
f1f7be6adc
@ -7,8 +7,9 @@ import { NSEnums } from "src/ScriptEditor/NetscriptDefinitions";
|
|||||||
import { NSFull } from "src/NetscriptFunctions";
|
import { NSFull } from "src/NetscriptFunctions";
|
||||||
|
|
||||||
type ExternalFunction = (...args: unknown[]) => unknown;
|
type ExternalFunction = (...args: unknown[]) => unknown;
|
||||||
export type ExternalAPI = {
|
|
||||||
[string: string]: ExternalAPI | ExternalFunction | ScriptArg[];
|
export type ExternalAPILayer = {
|
||||||
|
[key: string]: ExternalAPILayer | ExternalFunction | ScriptArg[];
|
||||||
};
|
};
|
||||||
|
|
||||||
type InternalFunction<F extends (...args: unknown[]) => unknown> = (ctx: NetscriptContext) => F;
|
type InternalFunction<F extends (...args: unknown[]) => unknown> = (ctx: NetscriptContext) => F;
|
||||||
@ -25,11 +26,6 @@ export type InternalAPI<API> = {
|
|||||||
: never;
|
: never;
|
||||||
};
|
};
|
||||||
|
|
||||||
type WrappedNetscriptFunction = (...args: unknown[]) => unknown;
|
|
||||||
type WrappedNetscriptAPI = {
|
|
||||||
readonly [string: string]: WrappedNetscriptAPI | WrappedNetscriptFunction;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type NetscriptContext = {
|
export type NetscriptContext = {
|
||||||
workerScript: WorkerScript;
|
workerScript: WorkerScript;
|
||||||
function: string;
|
function: string;
|
||||||
@ -37,7 +33,7 @@ export type NetscriptContext = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function wrapFunction(
|
function wrapFunction(
|
||||||
wrappedAPI: ExternalAPI,
|
wrappedAPI: ExternalAPILayer,
|
||||||
workerScript: WorkerScript,
|
workerScript: WorkerScript,
|
||||||
func: (_ctx: NetscriptContext) => (...args: unknown[]) => unknown,
|
func: (_ctx: NetscriptContext) => (...args: unknown[]) => unknown,
|
||||||
...tree: string[]
|
...tree: string[]
|
||||||
@ -72,7 +68,7 @@ export function wrapAPI(workerScript: WorkerScript, namespace: object, args: Scr
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function wrapAPILayer(
|
export function wrapAPILayer(
|
||||||
wrappedAPI: ExternalAPI,
|
wrappedAPI: ExternalAPILayer,
|
||||||
workerScript: WorkerScript,
|
workerScript: WorkerScript,
|
||||||
namespace: object,
|
namespace: object,
|
||||||
...tree: string[]
|
...tree: string[]
|
||||||
|
Loading…
Reference in New Issue
Block a user