UNPKG

@nativescript/firebase-firestore

Version:
20 lines (19 loc) 962 B
import { SnapshotListenOptions } from '.'; export declare enum GetOptions { Default = "default", Server = "server", Cache = "cache" } export declare enum DocumentChangeType { Added = "added", Removed = "removed", Modified = "modified" } type Observer<SnapshotType> = { complete?: () => void; error?: (error: Error) => void; next?: (snapshot: SnapshotType) => void; }; export type OnSnapshotParameters<SnapshotType> = [observer: Observer<SnapshotType>] | [options: SnapshotListenOptions, observer: Observer<SnapshotType>] | [onNext: (snapshot: SnapshotType) => void, onError?: (error: Error) => void, onCompletion?: () => void] | [options: SnapshotListenOptions, onNext: (snapshot: SnapshotType) => void, onError?: (error: Error) => void, onCompletion?: () => void]; export declare function parseOnSnapshotArgs<SnapshotType>(args: OnSnapshotParameters<SnapshotType>): SnapshotListenOptions & Observer<SnapshotType>; export {};