langchain.js
    Preparing search index...

    Type Alias ReducedValueInit<Value, Input>

    ReducedValueInit:
        | ReducedValueInitWithSchema<Value, Input>
        | ReducedValueInitBase<Value>

    Initialization options for ReducedValue.

    Two forms are supported:

    1. Provide only a reducer (and optionally jsonSchemaExtra)—in this case, the reducer's inputs are validated using the output value schema.
    2. Provide an explicit inputSchema field to distinguish the reducer's input type from the stored/output type.

    Type Parameters

    • Value = unknown

      The type of value stored and produced after reduction.

    • Input = Value

      The type of inputs accepted by the reducer.