Class Context

Hierarchy

  • Context

Constructors

  • Parameters

    • env: object = {}
    • opts: NormalizedFullOptions = defaultOptions
    • renderOptions: RenderOptions = {}

    Returns Context

Properties

environments: Scope

user passed in scope {% increment %}, {% decrement %} changes this scope, whereas {% capture %}, {% assign %} only hide this scope

globals: Scope

global scope used as fallback for missing variables

opts: NormalizedFullOptions

The normalized liquid options object

ownPropertyOnly: boolean
registers: {} = {}

Type declaration

    scopes: Scope[] = ...

    insert a Context-level empty scope, for tags like {% capture %} {% assign %} to operate

    strictVariables: boolean

    Throw when accessing undefined variable?

    sync: boolean

    Methods

    • Parameters

      • paths: PropertyKey[]

      Returns IterableIterator<unknown>

    • Parameters

      • scope: unknown
      • paths: string | PropertyKey[]
      • strictVariables: boolean = ...

      Returns IterableIterator<unknown>

    • Deprecated

      use _get() or getSync() instead

      Parameters

      • paths: PropertyKey[]

      Returns unknown

    • Deprecated

      use _get() instead

      Parameters

      • scope: unknown
      • paths: string | PropertyKey[]

      Returns IterableIterator<unknown>

    • Parameters

      • keyValues: [string, any][]

      Returns void

    • Parameters

      • Rest ...keys: string[]

      Returns [string, any][]

    • Parameters

      • key: string
      • value: any

      Returns any

    Generated using TypeDoc