Updater: (
    value: CollectorValueType<T>,
    index?: number,
) => InternalErrorResponse | null

Generic updater function that accepts values appropriate for the collector type. When used with type narrowing, the value parameter will be constrained to the correct type.

Type Parameters

  • T = unknown

    The collector type (inferred from the collector passed to update())

Type declaration