ADK for TypeScript: API Reference
    Preparing search index...

    Type Alias FunctionNodeHandler<TInput, TOutput>

    FunctionNodeHandler: (
        ctx: NodeContext,
        input: TInput,
    ) =>
        | FunctionNodeResult<TOutput>
        | Promise<FunctionNodeResult<TOutput>>
        | Generator<FunctionNodeResult<TOutput>, void, unknown>
        | AsyncGenerator<FunctionNodeResult<TOutput>, void, unknown>

    The handler wrapped by a FunctionNode.

    Unlike Python's FunctionNode (which binds named parameters from ctx.state or node_input via runtime signature introspection), the TypeScript form uses the idiomatic explicit (ctx, input) signature. Read ctx.state directly for state-bound values. It may return a value/Event, a Promise, or a (sync/async) generator of those.

    Type Parameters

    • TInput = unknown
    • TOutput = unknown

    Type Declaration