Skip to main content

Type Alias: InferChainOutput<Bots>

InferChainOutput<Bots> = LastElement<Bots> extends Processable<unknown, infer O> ? O : unknown

Defined in: packages/core/src/type-utils.ts:69

Extract the Processable output type from the last bot in a chain

Type Parameters

Bots

Bots extends readonly Processable[]

Example

type Chain = [Processable<string>, Processable<number>];
type Output = InferChainOutput<Chain>; // number