mockbase
Version:
Firebase v7+ mock.
20 lines (19 loc) • 1.23 kB
TypeScript
import * as firebase from "firebase";
import { MockDocumentReference } from "./document-reference";
export declare class MockDocumentSnapshot<T = firebase.firestore.DocumentData> implements firebase.firestore.DocumentSnapshot<T> {
readonly ref: MockDocumentReference<T>;
readonly _data: firebase.firestore.DocumentData | undefined;
get metadata(): firebase.firestore.SnapshotMetadata;
get id(): string;
get exists(): boolean;
constructor(ref: MockDocumentReference<T>, _data: firebase.firestore.DocumentData | undefined);
data(options?: firebase.firestore.SnapshotOptions | undefined): T | undefined;
get(fieldPath: string | firebase.firestore.FieldPath, options?: firebase.firestore.SnapshotOptions | undefined): any;
isEqual(other: firebase.firestore.DocumentSnapshot<T>): boolean;
private static isDeepEqual;
}
export declare class MockQueryDocumentSnapshot<T = firebase.firestore.DocumentData> extends MockDocumentSnapshot<T> implements firebase.firestore.QueryDocumentSnapshot<T> {
readonly _data: firebase.firestore.DocumentData;
constructor(ref: MockDocumentReference<T>, _data: firebase.firestore.DocumentData);
data(options?: firebase.firestore.SnapshotOptions): T;
}