collection() missing type arguments
- 主要言語
- TypeScript
- スター
- 7.8k
- フォーク
- 2.2k
- 平均マージ
- 22時間 28分
- マージ済み PR(30日)
- 6
説明
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.
コントリビューションガイド
調査の方向性
まず、エクスポートされている collection() エントリーポイントを見つけ、アップグレードドキュメントで参照されている他の型付き関数と比較します。Issue に記載されているバージョンを使用して collection() で TypeScript エラーを再現し、その後、カスタム型が受け入れられ、結果として得られる collection 参照に型が付いていることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, firebase, typescript
- 領域
- databases
- issue の種類
- 機能追加
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100