@companion-module/base
    Preparing search index...

    Interface CompanionActionContext

    Utility functions available in the context of the current action

    interface CompanionActionContext {
        parseVariablesInString(text: string): Promise<string>;
        setCustomVariableValue(
            variableName: string,
            value: CompanionVariableValue,
        ): void;
    }

    Hierarchy (View Summary)

    Index

    Methods

    • Parameters

      • text: string

        The text to parse

      Returns Promise<string>

      The string with variables replaced with their values

      Companion now handles this for you, you should no longer need to use this Parse and replace all the variables in a string Note: it is important to use this version when in a feedback, so that the feedback will react properly when the variables parsed change

    • Parameters

      Returns void

      Promise which resolves upon success, or rejects if the variable no longer exists

      Experimental: This method may change without notice. Do not use! Set the value of a custom variable