import type { DocumentSnapshot } from '@lemasc/firebase-wrapper/firestore'; declare type BaseFields = { id: string; hasPendingWrites?: boolean; __snapshot?: DocumentSnapshot; }; export declare type ValidatedDocument = Record> = BaseFields & T & { exists: true; validated: true; }; declare type UnvalidatedDocument = BaseFields & { exists: boolean; validated: false; }; export declare type Document = Record> = ValidatedDocument | UnvalidatedDocument; /** * Returns true if the given document is existed and validated against the schema. */ export declare const isDocumentValid: >(doc: Document) => doc is ValidatedDocument; export {};