UNPKG

js-slang

Version:

Javascript-based implementations of Source, written in Typescript

98 lines (97 loc) 3.06 kB
import * as es from 'estree'; import { ErrorSeverity, ErrorType, Node, SourceError, Value } from '../types'; import { RuntimeSourceError } from './runtimeSourceError'; export declare class BuiltInFunctionError extends RuntimeSourceError { private explanation; constructor(node: Node, explanation: String); explain(): string; elaborate(): string; } export declare class InterruptedError extends RuntimeSourceError { constructor(node: Node); explain(): string; elaborate(): string; } export declare class ExceptionError implements SourceError { error: Error; type: ErrorType; severity: ErrorSeverity; location: es.SourceLocation; constructor(error: Error, location?: es.SourceLocation | null); explain(): string; elaborate(): string; } export declare class MaximumStackLimitExceeded extends RuntimeSourceError { private calls; static MAX_CALLS_TO_SHOW: number; private customGenerator; constructor(node: Node, calls: es.CallExpression[]); explain(): string; elaborate(): string; } export declare class CallingNonFunctionValue extends RuntimeSourceError { private callee; private node; constructor(callee: Value, node: Node); explain(): string; elaborate(): string; } export declare class UndefinedVariable extends RuntimeSourceError { name: string; constructor(name: string, node: Node); explain(): string; elaborate(): string; } export declare class UnassignedVariable extends RuntimeSourceError { name: string; constructor(name: string, node: Node); explain(): string; elaborate(): string; } export declare class InvalidNumberOfArguments extends RuntimeSourceError { private expected; private got; private hasVarArgs; private calleeStr; constructor(node: Node, expected: number, got: number, hasVarArgs?: boolean); explain(): string; elaborate(): string; } export declare class VariableRedeclaration extends RuntimeSourceError { private node; private name; private writable?; constructor(node: Node, name: string, writable?: boolean | undefined); explain(): string; elaborate(): string; } export declare class ConstAssignment extends RuntimeSourceError { private name; constructor(node: Node, name: string); explain(): string; elaborate(): string; } export declare class GetPropertyError extends RuntimeSourceError { private obj; private prop; constructor(node: Node, obj: Value, prop: string); explain(): string; elaborate(): string; } export declare class GetInheritedPropertyError extends RuntimeSourceError { private obj; private prop; type: ErrorType; severity: ErrorSeverity; location: es.SourceLocation; constructor(node: Node, obj: Value, prop: string); explain(): string; elaborate(): string; } export declare class SetPropertyError extends RuntimeSourceError { private obj; private prop; constructor(node: Node, obj: Value, prop: string); explain(): string; elaborate(): string; }