MCP Apps Kit - v0.5.0
    Preparing search index...

    Type Alias InferFromSchemaInput<T>

    InferFromSchemaInput: T extends z.ZodType
        ? z.infer<T>
        : T extends ZodRawShapeRecord ? { [K in keyof T]: z.infer<T[K]> } : never

    Infers the TypeScript type from a SchemaInput.

    • If it's already a ZodType, uses z.infer
    • If it's a plain object, infers as if wrapped in z.object()

    Type Parameters

    type A = InferFromSchemaInput<z.ZodString>; // string
    type B = InferFromSchemaInput<{ name: z.ZodString }>; // { name: string }