UNPKG

894 BTypeScriptView Raw
1import { TemplateImpl } from './template-impl';
2import type { Emitter } from '../emitters/emitter';
3import type { Parser, Tokenizer } from '../parser';
4import type { Context } from '../context/context';
5import type { TopLevelToken, TagToken } from '../tokens';
6import type { Template } from './template';
7import type { Liquid } from '../liquid';
8export type TagRenderReturn = Generator<unknown, unknown, unknown> | Promise<unknown> | unknown;
9export declare abstract class Tag extends TemplateImpl<TagToken> implements Template {
10 name: string;
11 liquid: Liquid;
12 protected tokenizer: Tokenizer;
13 constructor(token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid);
14 abstract render(ctx: Context, emitter: Emitter): TagRenderReturn;
15}
16export interface TagClass {
17 new (token: TagToken, tokens: TopLevelToken[], liquid: Liquid, parser: Parser): Tag;
18}