JavaScript API
CompileError
The error rejected by every JavaScript entry point.
Every entry point rejects with a CompileError.
import { ErrorSource, CompileError } from "telarel";CompileError
class CompileError extends Error {
constructor(message: string, options?: { source?: ErrorSource });
static from(error: unknown): CompileError;
name: "CompileError";
message: string;
get source(): ErrorSource | undefined;
render(): string;
}| Member | Description |
|---|---|
from | Coerces any thrown value into a CompileError. |
name | Always "CompileError". |
message | The bare message. |
source | The attached ErrorSource, if any. |
render | Renders the message with a code frame when a source is attached. |
The file, code, and span of the error live on source. render returns the bare message when no source is attached.
Only malformed plugin values fail before the pipeline runs. Those validation errors remain TypeErrors rather than becoming CompileErrors.
Last updated on
PluginError
The error thrown by plugin hooks to fail a compilation.
Ast
An owned AST with its source text, language metadata, input source map, and mutable program access.
Copyright © 2026, Alpheus