langchain.js
    Preparing search index...

    Type Alias InferMiddlewareInputState<T>

    InferMiddlewareInputState: T extends AgentMiddleware<
        infer TSchema,
        any,
        any,
        any,
    >
        ? TSchema extends BaseMessage
            ? FilterPrivateProps<BaseMessage<TSchema>>
            : TSchema extends StateDefinitionInit
                ? FilterPrivateProps<InferSchemaInput<TSchema>>
                : {}
        : {}

    Helper type to infer the input state schema type from a middleware (all properties optional) This filters out private properties (those starting with underscore) Supports both Zod schemas (InteropZodObject) and StateSchema from LangGraph

    Type Parameters