Sanity Library Reference Docs
    Preparing search index...

    Type Alias ObserveForPreviewFnBeta

    ObserveForPreviewFn: (
        value: Previewable,
        type: PreviewableType,
        options?: {
            apiConfig?: ApiConfig;
            perspective?: StackablePerspective[];
            variant?: string;
            viewOptions?: PrepareViewOptions;
        },
    ) => Observable<PreparedSnapshot>

    Type declaration

      • (
            value: Previewable,
            type: PreviewableType,
            options?: {
                apiConfig?: ApiConfig;
                perspective?: StackablePerspective[];
                variant?: string;
                viewOptions?: PrepareViewOptions;
            },
        ): Observable<PreparedSnapshot>
      • Parameters

        • value: Previewable
        • type: PreviewableType
        • Optionaloptions: {
              apiConfig?: ApiConfig;
              perspective?: StackablePerspective[];
              variant?: string;
              viewOptions?: PrepareViewOptions;
          }
          • OptionalapiConfig?: ApiConfig
          • Optionalperspective?: StackablePerspective[]
          • Optionalvariant?: string

            The selected editing variant as a bare variant id. When set, preview values are resolved as seen through that variant, on top of the given perspective.

          • OptionalviewOptions?: PrepareViewOptions

        Returns Observable<PreparedSnapshot>