@illavv/run_typer - v3.2.3
    Preparing search index...

    Type Alias Infer<S>

    Infer: Prettify<
        { [K in RequiredKeys<S>]: ResolveSchemaValue<S[K]> } & {
            [K in OptionalKeys<S>]?: ResolveSchemaValue<S[K]>
        },
    >

    Derives the TypeScript type of an object that satisfies the given schema. Use directly on a schema literal — no as const required when calling parse/safeParse, thanks to the <const S> parameter.

    Type Parameters

    • S
    const userSchema = { id: 'number', name: 'string', email: 'string?' };
    type User = Infer<typeof userSchema>;
    // → { id: number; name: string; email?: string | null }