dyna-record
    Preparing search index...

    Type Alias ObjectSchema

    ObjectSchema: Record<string, FieldDef>

    Declarative schema for describing the shape of an object attribute.

    Used with @ObjectAttribute to provide both runtime validation (via Zod) and compile-time TypeScript type inference (via InferObjectSchema).

    Each key maps to a FieldDef describing the field's type, nesting, and nullability.

    Important: Always declare schemas with as const satisfies ObjectSchema to preserve literal types for accurate type inference.

    const mySchema = {
    name: { type: "string" },
    score: { type: "number" },
    status: { type: "enum", values: ["active", "inactive"] }
    } as const satisfies ObjectSchema;