import Entity from "./Entity"; import { _ICollection, _IDocumentSnapshot } from "./types/collection.types"; import { IDocumentRef } from "./types"; import { DocumentSnapshot as DocumentSnapshotOrig, SnapshotMetadata } from "firebase/firestore"; export default class _DocumentSnapshot// eslint-disable-next-line @typescript-eslint/indent implements _IDocumentSnapshot { /** * @hidden */ private _nativeSnapshot; /** * @hidden */ private _doc; /** * Creates a document snapshot. * @param nativeSnapshot The firestore DocumentSnapshot. * @param Entity The entity to represent. * @param collection The parent collection for the entity. */ constructor(nativeSnapshot: DocumentSnapshotOrig, Entity: new () => T, collection: _ICollection); /** * The document in the snapshot. */ get doc(): T; /** * Whether or not the document exists. */ get exists(): boolean; /** * The document reference. */ get ref(): IDocumentRef; /** * The metadata for the reference. */ get metadata(): SnapshotMetadata; }