UNPKG

@readable-js/core

Version:

ReadableJS is a toolkit for teachers to craft small demos that can be explored interactively.

30 lines (29 loc) 786 B
/** * EXECUTE THE CODE. */ import { DefaultSpyParams, Options } from './run-code-with-spy/insert-spies/insert-spies'; /** * The constructor is Error, but the type might be incorrect. */ interface _ReadableError extends Error { column: number; columnNumber: number; description: string; fileName: string; index: number; lineNumber: number; message: string; stack: string; } export declare type ReadableError = _ReadableError | ReferenceError; /** * Run the code, return the callstack with information from esprima about * position of the code. * @param code * @param options */ export declare function generateCallStack(code: string, options?: Options): { calls: DefaultSpyParams[]; error: any; }; export {};