Type alias PropertySchemaStrict

PropertySchemaStrict: PropertySchemaCommon & ({
    optional?: boolean;
    type: Exclude<PrimitivePropertyTypeName, "mixed">;
} | {
    optional?: true;
    type: "mixed";
} | {
    objectType: Exclude<PrimitivePropertyTypeName, "mixed">;
    optional?: boolean;
    type: CollectionPropertyTypeName;
} | {
    objectType: "mixed";
    optional?: true;
    type: CollectionPropertyTypeName;
} | {
    objectType: UserTypeName;
    optional?: false;
    type: "list" | "set";
} | {
    objectType: UserTypeName;
    optional?: true;
    type: "dictionary";
} | {
    objectType: UserTypeName;
    optional?: true;
    type: "object";
} | {
    objectType: UserTypeName;
    optional?: false;
    property: string;
    type: "linkingObjects";
})

The strict schema for specifying the type of a specific Realm object property.

Unlike the less strict PropertySchema, this type precisely defines the type requirements and their allowed combinations; however, TypeScript error messages tend to be more misleading. PropertySchema is recommended for that reason, but the strict type is provided as guidance.

See

PropertySchema for a textual explanation of the requirements defined here, as well as documentation for each property.

Generated using TypeDoc