firebase / firebase/firebase-admin-node

onDocumentUpdate event is typed as having data potentially undefined

Aperta
#2,202 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
1.7k
Fork
419
Merge medio
3g 10h
PR unite (30g)
16

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.