我在与AngularFire2文档上显示的集合查询非常相似的查询中收到此错误:
this.shops$ = this.afs.collection<IShop>('shops', ref => {
let query: firebase.firestore.CollectionReference | firebase.firestore.Query = ref;
错误(在ref =>
上):
Argument of type '(ref: CollectionReference) => CollectionReference | Query' is not assignable to parameter of type 'QueryFn'.
Type 'CollectionReference | Query' is not assignable to type 'Query'.
Type 'CollectionReference' is not assignable to type 'Query'.
Types of property 'firestore' are incompatible.
Type 'Firestore' is not assignable to type 'FirebaseFirestore'.
Property 'enableNetwork' is missing in type 'Firestore'.
这种情况发生在AngularFire2上:5.0.0-rc.6
和firebase:4.9.1
并且不会发生在AngularFire2上:5.0.0-rc.4
和firebase:4.9.1
设置。
是否有更改我不知道我必须为最新版本的应用设置做什么?