collection() missing type arguments
- Vorherrschende Sprache
- TypeScript
- Sterne
- 7.8k
- Forks
- 2.2k
- Ø Merge
- 22 Std. 28 Min.
- Gemergte PRs (30 T.)
- 6
Beschreibung
There are no exported functions for the collection function that allow a type to be specified. I see reference to collection() in the docs and in the upgrade information (screenshot below) but it isn't working in my project. If I try to add a type to get a typed collection reference, I get the error: Expected 0 type arguments, but got 1.
### Version info
**Angular:** 13.0.3
**Firebase:** 9.0.0
**AngularFire:** 7.2
**Other (e.g. Ionic/Cordova, Node, browser, operating system):** MacOs Montery
### How to reproduce these conditions
**Steps to set up and reproduce**
Attempt to create a collection reference with a custom type
**Sample data and security rules**
The data isn't important.
### Debug output
Error in VS Code:

AngularFire Upgrade Docs:

### Expected behavior
There should be a version of the collection function that takes a type. There are version of other functions that take a type and even expect a typed CollectionReference.
### Actual behavior
No function exists that takes a type.
Beitragsleitfaden
Rechercherichtung
Beginne damit, den exportierten Einstiegspunkt collection() zu finden, und vergleiche ihn mit den anderen typisierten Funktionen, auf die in der Upgrade-Dokumentation verwiesen wird. Reproduziere den TypeScript-Fehler mit collection() unter Verwendung der im Issue aufgeführten Versionen und überprüfe anschließend, dass ein benutzerdefinierter Typ akzeptiert wird und die resultierende Collection-Referenz typisiert ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- angular, firebase, typescript
- Bereich
- databases
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100