Sanity Library Reference Docs
    Preparing search index...

    Interface MessageBusStateSource<T>

    An observable state topic with access to its current and first values.

    interface MessageBusStateSource<T> {
        firstValue: Promise<T>;
        getCurrent(): T | undefined;
    }

    Type Parameters

    • T

    Hierarchy

    • Observable<T>
      • MessageBusStateSource
    Index

    Properties

    Methods

    Properties

    firstValue: Promise<T>

    Resolves with the first published value.

    Methods

    • Returns the current value, or undefined before the first value is published.

      Returns T | undefined