Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Aych

The Aych class exposes all of the libraries features in an encapsulated package.

Hierarchy

  • Aych

Indexable

[dynamicProperty: string]: function

The Aych class exposes all of the libraries features in an encapsulated package.

Properties

Static Piper

Piper: Piper = Piper

Exported Piper

Methods

$

  • Scopes Aych

    Parameters

    Returns void | string | Renderable

$case

  • A case for the switch statements.

    Parameters

    • value: Switchable

      The value determines which cases is chosen and rendered.

    • renderable: Renderable | string

      The renderable associated with this case.

    Returns Case<Switchable>

$each

  • Renders a renderable for each item in a list.

    Parameters

    • items: Iterable<any>

      The items used to iterate through.

    • renderable: EachRenderFunction | Renderable | string
    • Optional indexName: undefined | string

      The index name used for the template string for each renderable.

    • Optional itemName: undefined | string

      The item name used for the template string for each renderable.

    Returns Each

$eachIn

  • Renders a renderable for each key/value pair in an object.

    Parameters

    Returns Each

$group

  • Renders a set of Renderable one after another.

    Parameters

    • Rest ...members: (string | Renderable)[]

      A set of one or more members to add to the group.

    Returns Group

$if

  • Renders a Renderable based on a condition.

    Parameters

    • condition: boolean

      The condition that determines if the renderable gets rendered.

    • ifRenderable: Renderable | string
    • Optional elseRenderable: Renderable | string

    Returns If

$repeat

  • Renders a renderable x number of times.

    Parameters

    Returns Each

$switch

  • Renders one out of one or more renderable based on the value of the switch.

    Parameters

    • value: Switchable

      The value determines which cases is chosen and rendered.

    • Rest ...cases: Case<Switchable>[]

      A set of cases with a value associated to it.

    Returns Switch<Switchable>

string

  • Converts a javascript string literal into an Aych StringLiteral.

    Parameters

    • str: any

      The string literal to convert.

    Returns StringLiteral

unescaped

  • Converts a javascript string literal into an unescaped StringLiteral.

    Parameters

    • str: any

      The string literal to convert.

    Returns StringLiteral

Static compose

  • compose(name: string, composition: function): void
  • Defines a method on Aych that when called returns back a Renderable. These are known as composables.

    Parameters

    • name: string

      Name of the composable.

    • composition: function

      The method that the defines what arguments the composable takes and which renderable it returns.

    Returns void

Static create

  • Factory for creating element factories.

    Parameters

    • tagName: string

      The name of the tag that is used.

    • elType: ElementType

      The type of element to create.

    Returns string

Static destroy

  • destroy(name: string): void
  • Remove a created tag or composition.

    Parameters

    • name: string

      Name of the tag or composition.

    Returns void

Generated using TypeDoc