@umbraco-cms/backoffice
    Preparing search index...

    Interface UmbConsumeOptions<BaseType, ResultType>

    interface UmbConsumeOptions<
        BaseType extends UmbContextMinimal = UmbContextMinimal,
        ResultType extends BaseType = BaseType,
    > {
        callback?: UmbContextCallback<ResultType>;
        context: string | UmbContextToken<BaseType, ResultType>;
        subscribe?: boolean;
    }

    Type Parameters

    Index

    Properties

    An optional callback that is invoked when the context value is set or changes. Note, the class instance is probably not fully constructed when this is first invoked. If you need to ensure the class is fully constructed, consider using a setter on the property instead.

    context: string | UmbContextToken<BaseType, ResultType>

    The context to consume, either as a string alias or an UmbContextToken.

    subscribe?: boolean

    If true, the context consumer will stay active and invoke the callback on context changes. If false, the context consumer will use asPromise() to get the value once and then clean up.

    true