Options
All
  • Public
  • Public/Protected
  • All
Menu

Type parameters

  • T

Hierarchy

  • Builder

Index

Constructors

constructor

  • new Builder(code: string, schemaResolver?: T | SchemaResolver<T>, strictOverride?: undefined | false | true): Builder

Properties

Private Optional builtBlocks

builtBlocks: Block[]

code

code: string

Optional schema

schema: T

Private Optional schemaResolver

schemaResolver: T | SchemaResolver<T>

Private Optional strictOverride

strictOverride: undefined | false | true

template

template: string

Accessors

blocks

strict

  • get strict(): boolean

type

  • get type(): "strict" | "dynamic"

Methods

Private advanceOffset

build

  • build(): Promise<Block[]>

Private findFirstBlock

  • findFirstBlock(tpl: string, schema: any): Block | undefined

Private findNextBlock

  • findNextBlock(tpl: string, schema: any, block: Block): undefined | Block

Private findOuterBlocks

  • findOuterBlocks(tpl: string, schema: any): Block[]

Private findOuterBlocksRecursively

  • findOuterBlocksRecursively(tpl: string, schema: any): Block[]

Private getBlock

  • getBlock(tpl: string, schema: any, idx: number, blockType: BlockType, expression: string, end: string, key?: undefined | string, subkey?: undefined | string, operator?: undefined | string): undefined | Block
  • Parameters

    • tpl: string
    • schema: any
    • idx: number
    • blockType: BlockType
    • expression: string
    • end: string
    • Optional key: undefined | string
    • Optional subkey: undefined | string
    • Optional operator: undefined | string

    Returns undefined | Block

getBlockAt

  • getBlockAt(index: number): Block | undefined

Private getBlockAtIndex

  • getBlockAtIndex(blocks: Block[], index: number): Block | undefined

Protected getBlockPrefix

  • getBlockPrefix(blockType: BlockType): string

Private getCommentBlock

  • getCommentBlock(tpl: string, idx: number): undefined | Block

getDynamicBlockDefinition

getIdentifiers

  • getIdentifiers(schema: any): { key: string; subkey: string }[]
  • Parameters

    • schema: any

    Returns { key: string; subkey: string }[]

Private getIfBlock

  • getIfBlock(tpl: string, schema: any, operator: string, key: string, subkey: string, idx: number): undefined | Block
  • Parameters

    • tpl: string
    • schema: any
    • operator: string
    • key: string
    • subkey: string
    • idx: number

    Returns undefined | Block

Private getLiteralBlock

  • getLiteralBlock(tpl: string, schema: any, prevBlock?: Block, nextBlock?: Block): Block

Private getParamsMergedForBlock

  • getParamsMergedForBlock(block: Block, params: any, childParams?: any): any
  • Parameters

    • block: Block
    • params: any
    • Optional childParams: any

    Returns any

Private getRepeatBlock

  • getRepeatBlock(tpl: string, schema: any, key: string, idx: number): undefined | Block
  • Parameters

    • tpl: string
    • schema: any
    • key: string
    • idx: number

    Returns undefined | Block

Private getSchemaFromString

  • getSchemaFromString(str: string): undefined | false | { endIndex: number; offset: number; schema: any; startIndex: number }
  • Parameters

    • str: string

    Returns undefined | false | { endIndex: number; offset: number; schema: any; startIndex: number }

Private getStrictBlockDefinition

getValidBlockDefinition

getVariables

  • getVariables(schema: any): { key: string; subkey: string; type: "identifier" | "boolean" | "array" }[]
  • Parameters

    • schema: any

    Returns { key: string; subkey: string; type: "identifier" | "boolean" | "array" }[]

isValidIdentifier

  • isValidIdentifier(identifiers: { key: string; subkey: string }[], identifier: string): boolean
  • Parameters

    • identifiers: { key: string; subkey: string }[]
    • identifier: string

    Returns boolean

Private repairOffsets

  • repairOffsets(blocks: Block[], outerOffset: number): number

Legend

  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Function
  • Type alias
  • Type alias with type parameter
  • Private property
  • Private method
  • Interface
  • Protected method

Generated using TypeDoc