Contentful Personalization & Analytics
    Preparing search index...
    Interceptor: (value: Readonly<T>) => MaybePromise<T>

    A function that receives a value of type T and returns a (possibly async) value of the same type T. The input is marked as readonly to discourage mutation of the original object.

    Type Parameters

    • T

      The value type intercepted and returned.

    Type declaration

      • (value: Readonly<T>): MaybePromise<T>
      • Parameters

        • value: Readonly<T>

          The current (readonly) value in the interception chain.

        Returns MaybePromise<T>

        The next value for the chain, either directly or via a promise.

    Implementations SHOULD avoid mutating value and instead return a new or safely-updated instance.