shift-interpreter
Version:
Shift-interpreter is an experimental JavaScript meta-interpreter useful for reverse engineering and analysis. One notable difference from other projects is that shift-interpreter retains state over an entire script but can be fed expressions and statement
15 lines (14 loc) • 500 B
TypeScript
import { Interpreter } from '../src/interpreter';
import { BasicContext } from '../src/context';
export interface Result {
actual: any;
actualError: Error;
expected: any;
expectedError: Error;
src: string;
success: boolean;
interpreter: Interpreter;
}
export declare function assertResult(result: Result): void;
export declare function assertError(src: string, error: string): void;
export declare function compare(src: string | Function, context?: BasicContext): Result;