firebase / firebase/firebase-admin-node
onDocumentUpdate event is typed as having data potentially undefined
- Langage dominant
- TypeScript
- Étoiles
- 1.7k
- Forks
- 419
- Merge moyen
- 3 j 10 h
- PR mergées (30 j)
- 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.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Start with the firestore.d.ts declaration shown in the issue and inspect the onDocumentUpdated event type. Confirm the intended non-optional event type and verify that the generated declaration no longer requires an unnecessary undefined check.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- firebase, typescript
- Domaine
- api, backend
- Type d'issue
- Bug
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Activité
- À l'abandon
- Clarté
- Clairement spécifiée
- Accessibilité débutants
- 45/100