Function macro

  • Process a macro pattern with the given scope of variable name/value pairs. The pattern is a unicode string with embedded expressions:

    • '$tag': resolve tag name from scope, variable name ends with first non-tag character.
    • '${tag}': resolve tag name from scope.
    • '$pod::key localization key.

    Any variables which cannot be resolved in the scope are returned as-is (i.e. $name) in the result string.

    If a tag resolves to Ref, then we use Ref.dis for the string.

    Parameters

    • pattern: string

      The pattern to process.

    • getValue: ((key) => undefined | HVal)

      Gets a value based on a name (returns undefined if not found).

        • (key): undefined | HVal
        • Parameters

          • key: string

          Returns undefined | HVal

    • Optional i18n: LocalizedCallback

      Optional localization callback.

    Returns string

    The processed output string.

Generated using TypeDoc