Hierarchy (view full)

Constructors

Properties

entries: Entry[] = ...
indent: string = ""
parentBlock: undefined | Block
prefix: string = ""
shouldGroup: boolean = false
suffix: string = ""

Accessors

Methods

  • Add a statement or expression that will be automatically delimited

    Parameters

    • labelOrText: any
    • Optionaltext: any

    Returns Atom

  • Add a builder-style block

    Parameters

    • OptionalinitialAtom: string

    Returns BuilderBlock

  • Add a comma-delimited block

    Parameters

    • prefix: string
    • suffix: string

    Returns ExpressionBlock

  • Execute logic with block configured for specific insertion point

    Type Parameters

    • T

    Parameters

    • before: Entry
    • fn: (() => T)
        • (): T
        • Returns T

    Returns T

  • Parameters

    • linePrefix: string
    • serializedEntries: string[]
    • rawEntries: Entry[]

    Returns string

  • This is just a helper for guarding against duplicate definitions

    Parameters

    • name: string

    Returns void

  • Add a block with separate statements terminated by ";"

    Parameters

    • prefix: string = ""
    • suffix: string = ""

    Returns StatementBlock

  • Remove a name from the defined pool. This is necessary when e.g. defining a type and object with the same name.

    Parameters

    • name: string

    Returns void

  • Add an atom or block that recreates the input value

    Parameters

    • value: any
    • prefix: string = ""
    • suffix: string = ""

    Returns undefined | ExpressionBlock | Atom