UNPKG

realm

Version:

Realm by MongoDB is an offline-first mobile database: an alternative to SQLite and key-value stores

15 lines (14 loc) 790 B
import { Configuration, ObjectSchema, PropertySchema, RealmObjectConstructor } from "../internal"; /** * Validate the data types of the fields of a user-provided realm schema. */ export declare function validateRealmSchema(realmSchema: unknown): asserts realmSchema is Configuration["schema"][]; /** * Validate the data types of the fields of a user-provided object schema. */ export declare function validateObjectSchema(objectSchema: unknown): asserts objectSchema is RealmObjectConstructor | ObjectSchema; /** * Validate the data types of a user-provided property schema that ought to use the * relaxed object notation. */ export declare function validatePropertySchema(objectName: string, propertyName: string, propertySchema: unknown): asserts propertySchema is PropertySchema;