UNPKG

1.24 kBTypeScriptView Raw
1import { Token } from '../tokens/token';
2import { Template } from '../template/template';
3export declare abstract class LiquidError extends Error {
4 token: Token;
5 context: string;
6 private originalError?;
7 constructor(err: Error | string, token: Token);
8 protected update(): void;
9 static is(obj: unknown): obj is LiquidError;
10}
11export declare class TokenizationError extends LiquidError {
12 constructor(message: string, token: Token);
13}
14export declare class ParseError extends LiquidError {
15 constructor(err: Error, token: Token);
16}
17export declare class RenderError extends LiquidError {
18 constructor(err: Error, tpl: Template);
19 static is(obj: any): obj is RenderError;
20}
21export declare class LiquidErrors extends LiquidError {
22 errors: RenderError[];
23 constructor(errors: RenderError[]);
24 static is(obj: any): obj is LiquidErrors;
25}
26export declare class UndefinedVariableError extends LiquidError {
27 constructor(err: Error, token: Token);
28}
29export declare class InternalUndefinedVariableError extends Error {
30 variableName: string;
31 constructor(variableName: string);
32}
33export declare class AssertionError extends Error {
34 constructor(message: string);
35}