[firestore][typings] Add better type for DocumentChange.type #1180
This commit is contained in:
parent
a32cb27c43
commit
9e549d60b1
4
lib/index.d.ts
vendored
4
lib/index.d.ts
vendored
@ -807,7 +807,7 @@ declare module 'react-native-firebase' {
|
||||
event: string,
|
||||
observer: (snapshot: PhoneAuthSnapshot) => void,
|
||||
errorCb?: (error: PhoneAuthError) => void,
|
||||
successCb?: (snapshot: PhoneAuthSnapshot) => void
|
||||
successCb?: (snapshot: PhoneAuthSnapshot) => void
|
||||
): PhoneAuthListener;
|
||||
|
||||
then(fn: (snapshot: PhoneAuthSnapshot) => void): Promise<any>;
|
||||
@ -1808,7 +1808,7 @@ declare module 'react-native-firebase' {
|
||||
readonly doc: DocumentSnapshot;
|
||||
readonly newIndex: number;
|
||||
readonly oldIndex: number;
|
||||
readonly type: string;
|
||||
readonly type: 'added' | 'modified' | 'removed';
|
||||
}
|
||||
|
||||
interface DocumentReference {
|
||||
|
@ -14,7 +14,7 @@ export default class DocumentChange {
|
||||
_document: DocumentSnapshot;
|
||||
_newIndex: number;
|
||||
_oldIndex: number;
|
||||
_type: string;
|
||||
_type: 'added' | 'modified' | 'removed';
|
||||
|
||||
constructor(firestore: Firestore, nativeData: NativeDocumentChange) {
|
||||
this._document = new DocumentSnapshot(firestore, nativeData.document);
|
||||
|
Loading…
x
Reference in New Issue
Block a user