js-slang
Version:
Javascript-based implementations of Source, written in Typescript
19 lines (18 loc) • 413 B
TypeScript
import type { SourceLocation } from 'estree';
export declare enum ErrorType {
IMPORT = "Import",
RUNTIME = "Runtime",
SYNTAX = "Syntax",
TYPE = "Type"
}
export declare enum ErrorSeverity {
WARNING = "Warning",
ERROR = "Error"
}
export interface SourceError {
type: ErrorType;
severity: ErrorSeverity;
location: SourceLocation;
explain(): string;
elaborate(): string;
}