tarlatan
    Preparing search index...

    Variable decodeClaudeEventConst

    decodeClaudeEvent: (
        input: unknown,
        options?: ParseOptions,
    ) => Result<
        | {
            is_error?: boolean;
            result?: string;
            session_id?: string;
            subtype?: string;
            type: "result";
        }
        | {
            rate_limit_info?: {
                unifiedWindows?: { readonly [key: string]: unknown };
                readonly [key: string]: unknown;
            };
            session_id?: string;
            type: "rate_limit_event";
        }
        | { session_id?: string; subtype: "api_retry"; type: "system" },
        SchemaError,
    > = ...

    Decodes an unknown value as any ClaudeEvent; other event types fail.

    Type Declaration

      • (
            input: unknown,
            options?: ParseOptions,
        ): Result<
            | {
                is_error?: boolean;
                result?: string;
                session_id?: string;
                subtype?: string;
                type: "result";
            }
            | {
                rate_limit_info?: {
                    unifiedWindows?: { readonly [key: string]: unknown };
                    readonly [key: string]: unknown;
                };
                session_id?: string;
                type: "rate_limit_event";
            }
            | { session_id?: string; subtype: "api_retry"; type: "system" },
            SchemaError,
        >
      • Parameters

        Returns Result<
            | {
                is_error?: boolean;
                result?: string;
                session_id?: string;
                subtype?: string;
                type: "result";
            }
            | {
                rate_limit_info?: {
                    unifiedWindows?: { readonly [key: string]: unknown };
                    readonly [key: string]: unknown;
                };
                session_id?: string;
                type: "rate_limit_event";
            }
            | { session_id?: string; subtype: "api_retry"; type: "system" },
            SchemaError,
        >