@botmesh/core - v2.0.0-alpha.2
    Preparing search index...

    Interface SchemaLike<T>

    Structural, zod-compatible schema: anything with safeParse(input). When safeParseAsync exists it is preferred (zod schemas with async refinements throw from safeParse). T is the parsed (output) type stored in c.state / returned by c.ask.

    interface SchemaLike<T = unknown> {
        safeParse(
            input: unknown,
        ): SchemaParseResult<T> | Promise<SchemaParseResult<T>>;
        safeParseAsync?(input: unknown): Promise<SchemaParseResult<T>>;
    }

    Type Parameters

    • T = unknown
    Index