angular / angular/angularfire

collection function has no generic type

Ouverte
#3,073 2 commentaires 1 réaction 0 personnes assignées Voir sur GitHub
Langage dominant
TypeScript
Étoiles
7.8k
Forks
2.2k
Merge moyen
22 h 28 min
PR mergées (30 j)
6

Description

### Version info

**Angular:**
12.2.0
**Firebase:**
9.4.0
**AngularFire:**
7.2.0

### How to reproduce these conditions
import {
collection,
} from '@angular/fire/firestore';

### Expected behavior

collection suppose to receive generic type of collection documents interface. as stated in docs

import { collection } from '@angular/fire/firestore';
collection(firestore, 'foo') // CollectionReference

### Actual behavior
generic type is not configured, hence causing a problem on passing to update and doc functions with the generic type of the interface set
![Code_Y7nW5tuIqt](https://user-images.githubusercontent.com/1358030/142910550-ba3c36c6-e8b3-4b3b-b9b3-b0a068e9aca9.png)
![chrome_9x67l0gpG5](https://user-images.githubusercontent.com/1358030/142910580-b4d0d876-9132-49ab-a3e3-80b033f47b65.png)

.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Start at the @angular/fire/firestore collection entry point and inspect how its return type is declared. Compare it with the documented collection(firestore, 'foo') usage, then check how the resulting type is passed to update and doc. Done means collection accepts the generic type and preserves it for those calls.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
firebase, typescript
Domaine
backend, databases
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
42/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.