bitburner-src/src/ThirdParty/JSInterpreter.d.ts

16 lines
672 B
TypeScript
Raw Normal View History

2022-07-15 05:03:54 +02:00
export declare class Interpreter {
constructor(code: string, opt_initFunc: (int: Interpreter, scope: Object) => void, lineOffset?: number);
getProperty(obj: Value, name: Value): Value;
2022-07-15 07:51:30 +02:00
setProperty(obj: Object, name: Value, value: Value): void;
2022-07-15 05:03:54 +02:00
hasProperty(obj: Value, name: Value): boolean;
2022-07-15 07:51:30 +02:00
pseudoToNative(obj: Value): unknown;
nativeToPseudo(obj: Value): unknown;
createAsyncFunction(f: (...args: unknown[]) => unknown): Object;
createNativeFunction(f: (...args: unknown[]) => unknown): Object;
step(): boolean;
2022-07-15 05:03:54 +02:00
}
// Object and Value are 2 different things in the interpreter;
export declare type Object = unknown;
export declare type Value = unknown;