Closed starhoshi closed 6 years ago
DeltaDocumentSnapshot is used on Cloud Functions.
functions.firestore.document(`${DocumentPath.Order}/{orderID}`).onUpdate(async event => { // event.data is DeltaDocumentSnapshot })
export interface DeltaDocumentSnapshot { exists: Boolean; ref: any; id: string; createTime: string; updateTime: string; readTime: string; previous: any; data: () => any; get: (key: string) => any; }
export class DocumentSnapshot { readonly exists: boolean; readonly ref: DocumentReference; readonly id: string; readonly createTime?: string; readonly updateTime?: string; readonly readTime: string; data(): DocumentData | undefined; get(fieldPath: string|FieldPath): any; }
Diff is the only previous. init method is compatible.
previous
init
DeltaDocumentSnapshot is used on Cloud Functions.
DeltaDocumentSnapshot
DocumentSnapshot
Diff is the only
previous
.init
method is compatible.