devsite/node_modules/liquidjs/dist/parser/parse-stream.d.ts

16 lines
591 B
TypeScript
Raw Permalink Normal View History

2024-07-08 01:49:38 +00:00
import { Token, TopLevelToken } from '../tokens';
import { Template } from '../template';
type ParseToken<T extends Token> = ((token: T, remainTokens: T[]) => Template);
export declare class ParseStream<T extends Token = TopLevelToken> {
private tokens;
private handlers;
private stopRequested;
private parseToken;
constructor(tokens: T[], parseToken: ParseToken<T>);
on<T2 extends Template | T | undefined>(name: string, cb: (this: ParseStream, arg: T2) => void): ParseStream<T>;
private trigger;
start(): this;
stop(): this;
}
export {};