For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt, and this page is available as Markdown at /next/lynxtron/api/@lynx-js/lynxtron/Class.LynxTemplateBundle.md.
  • English
  • @lynx-js/lynxtron / LynxTemplateBundle

    LynxTemplateBundle

    Constructors

    new LynxTemplateBundle()

    new LynxTemplateBundle(buffer: any): LynxTemplateBundle

    A pre-decoded Lynx template bundle.

    This class corresponds to Lynx SDK's LynxTemplateBundle (TemplateBundle), which is the output of Lynx's pre-decode capability. You can parse a Lynx App Bundle ahead of time to obtain a TemplateBundle and then load it via LynxWindow.loadBundle(templateBundle) for faster startup.

    Notes:

    • A LynxTemplateBundle instance can be non-null but still invalid. Use isValid() to check and getErrorMessage() to inspect the parsing error.
    • The constructor accepts either a Node.js Buffer or any ArrayBufferView containing the bundle bytes.

    Parameters

    ParameterType
    bufferany

    Returns

    LynxTemplateBundle

    Defined in

    apis/api/lynx-template-bundle.d.ts:20

    Methods

    getErrorMessage()

    getErrorMessage(): string

    Returns an error message when the TemplateBundle is invalid, otherwise an empty string.

    Returns

    string

    Defined in

    apis/api/lynx-template-bundle.d.ts:29


    isValid()

    isValid(): boolean

    Returns whether this TemplateBundle is valid.

    Returns

    boolean

    Defined in

    apis/api/lynx-template-bundle.d.ts:24

    Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.