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

    Interface CompanionFeedbackDefinitionBase<TOptions>

    The common definition of a feedback

    interface CompanionFeedbackDefinitionBase<
        TOptions extends CompanionOptionValues = CompanionOptionValues,
    > {
        description?: string;
        learn?: (
            feedback: CompanionFeedbackInfo<TOptions>,
            context: CompanionCommonCallbackContext,
        ) => Partial<TOptions> | Promise<Partial<TOptions> | undefined> | undefined;
        learnTimeout?: number;
        name: string;
        options: SomeCompanionFeedbackInputField<Extract<keyof TOptions, string>>[];
        sortName?: string;
        type: "boolean" | "value" | "advanced";
        unsubscribe?: (
            feedback: CompanionFeedbackInfo<TOptions>,
            context: CompanionCommonCallbackContext,
        ) => void | Promise<void>;
    }

    Type Parameters

    Hierarchy (View Summary)

    Index

    Properties

    description?: string

    Additional description of the feedback

    learn?: (
        feedback: CompanionFeedbackInfo<TOptions>,
        context: CompanionCommonCallbackContext,
    ) => Partial<TOptions> | Promise<Partial<TOptions> | undefined> | undefined

    The user requested to 'learn' the values for this feedback. Note: As of 2.0, you should only return the values that have been learned, so that expressions in any id fields will be preserved

    learnTimeout?: number

    Timeout for the 'learn' function (in milliseconds) Companion sets a default value of 5s, to ensure that the learn does not get stuck never completing You can change this if this number does not work for you, but you should keep it to a sensible value

    name: string

    Name to show in the feedbacks list

    options: SomeCompanionFeedbackInputField<Extract<keyof TOptions, string>>[]

    The input fields for the feedback

    sortName?: string

    Alternate value to use when sorting the list of feedbacks By default, the feedbacks are ordered by the name field, but you can override this without altering the visible name by setting this value

    type: "boolean" | "value" | "advanced"
    unsubscribe?: (
        feedback: CompanionFeedbackInfo<TOptions>,
        context: CompanionCommonCallbackContext,
    ) => void | Promise<void>

    Called to report a feedback has been removed or disabled. Useful to cleanup subscriptions setup in the callback