firebase / firebase/firebase-admin-node
onDocumentUpdate event is typed as having data potentially undefined
Open
- Dominant language
- TypeScript
- Stars
- 1.7k
- Forks
- 419
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 16
Description
It seems weird that an update event could contain nothing, if that's the case an update event did not occur, did it ?
```ts
// firestore.d.ts
export declare function onDocumentUpdated(document: Document, handler: (event: FirestoreEvent | undefined, ParamsOf>) => any | Promise): CloudFunction | undefined, ParamsOf>>;
```
It is annoying because it forces an additional, seemingly unnecessary, check.
Contributor guide
Assessment
This issue has not been assessed yet.