UNPKG

muban-convert-hbs

Version:

Convert muban hbs templates to htl, django, twig and others.

24 lines (23 loc) 877 B
import ITranspiler from './ITranspiler'; export interface ProgramOptions { isConditionalInInverse?: boolean; elseIfResultList?: Array<string>; indent?: string; } export declare class HtlTranspiler implements ITranspiler { private buffer; private parsed; private context; private depth; constructor(input?: any, context?: any, depth?: number); parseProgram(program: hbs.AST.Program, {isConditionalInInverse, elseIfResultList, indent}?: ProgramOptions): this; /** * Checks if this sub-program has only a condition statement. * If that's the case, and used in a inverse (else) section, the parent should render `else if` * instead of an `if` nested in an `else`. * @param {hbs.AST.Program} program * @return {boolean} */ static isOnlyCondition(program: hbs.AST.Program): boolean; toString(): string; }