Cereal docs
TypeScript SDKTypeScript signatures

SubscribeOptions

Public TypeScript declaration from @trycereal/sdk/browser.

Import from @trycereal/sdk/browser. Generated from the repository SDK declarations (package version 0.0.0); not from HTTP request schemas.

export interface SubscribeOptions<F extends StreamFormat> {
    readonly format: F;
    readonly tokenSource: () => Promise<StreamToken>;
    readonly lastEventId?: string;
    readonly onChunk: (chunk: ChunkOf<F>) => void;
    readonly onError?: (error: unknown) => void;
    readonly onReconnect?: (lastEventId: string | undefined) => void;
    readonly signal?: AbortSignal;
    readonly fetch?: typeof globalThis.fetch;
    readonly coalesce?: boolean;
}

See SDK setup, authoring, client behavior, and the API/SDK map for usage. Domain types are described in schema reference.

Related SDK types: StreamToken, ChunkOf.