angular / angular/angularfire

collection function has no generic type

未關閉
#3,073 2 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
TypeScript
星號
7.8k
分支
2.2k
平均合併
22 小時 28 分鐘
30 天內合併 PR
6

描述

### 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)

.

貢獻指南

開啟貢獻指南

研究方向

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.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
firebase, typescript
領域
backend, databases
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
42/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。