firebase / firebase/firebase-admin-node
onDocumentUpdate event is typed as having data potentially undefined
- Lenguaje dominante
- TypeScript
- Estrellas
- 1.7k
- Forks
- 419
- Merge medio
- 3 d 10 h
- PR fusionados (30 d)
- 16
Descripción
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.
Guía de contribución
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- firebase, typescript
- Área
- api, backend
- Tipo de issue
- Error
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Estado de actividad
- Estancado
- Claridad
- Bien especificado
- Aptitud para principiantes
- 45/100