Template is the runtime interpreter for ParseTrees.

It exposes a single Template.render method which, when called, will call the provided createElement method for the each tag it sees as it traverses the parse-tree (which is initially set in its root property).

Type parameters

  • U

    A generic type for the returned values from options.createElement.

Hierarchy

  • Template

Implements

index

Constructors

Properties

Methods

Constructors

constructor

Properties

options

options: TemplateOptions<U>

root

root: ParseTree

Methods

render

  • Parameters

    Returns U[]

traverse

  • traverse(children: (string | U)[], node: string | ParseTree, top?: any[]): any
  • Parameters

    • children: (string | U)[]
    • node: string | ParseTree
    • Optional top: any[]

    Returns any

legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated with typedoc.