UNPKG

918 BTypeScriptView Raw
1import { TopLevelToken, Liquid, Token, Template, Tokenizer, Emitter, TagToken, Context, Tag } from '..';
2import { Parser } from '../parser';
3export type ParsedFileName = Template[] | Token | string | undefined;
4export default class extends Tag {
5 private file;
6 private currentFile?;
7 private hash;
8 constructor(token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid, parser: Parser);
9 render(ctx: Context, emitter: Emitter): Generator<unknown, void, unknown>;
10}
11/**
12 * @return null for "none",
13 * @return Template[] for quoted with tags and/or filters
14 * @return Token for expression (not quoted)
15 * @throws TypeError if cannot read next token
16 */
17export declare function parseFilePath(tokenizer: Tokenizer, liquid: Liquid, parser: Parser): ParsedFileName;
18export declare function renderFilePath(file: ParsedFileName, ctx: Context, liquid: Liquid): IterableIterator<unknown>;