• Register a handler to provide token IDs that can be used in the template

    Example:

    import { RegisterTokenIds, createTemplateTags } from "@xarc/tag-renderer";

    const templateTags = createTemplateTags`
    ${RegisterTokenIds(() => {
    return {
    ID1: context => { }
    }
    })}

    Parameters

    • handler: Function

      handler function

    • Optional name: string

      name to identify this handler

    Returns {
        [TAG_TYPE]: string;
        (context): void;
    }

    a register function

      • (context): void
      • Parameters

        • context: any

        Returns void

    • [TAG_TYPE]: string