Use union type for fieldPath
option to query orderBy
and where
functions.
Constructing and passing a FieldPath object to the `orderBy` or `where` functions of a Firestore query currently raises a type error since those functions are only typed to expect a `string` value. This fixes that since those functions do accept FieldPath object types as well as astrings.
This commit is contained in:
parent
7614f5b7e4
commit
ea8e106129
4
lib/index.d.ts
vendored
4
lib/index.d.ts
vendored
@ -1502,7 +1502,7 @@ declare module "react-native-firebase" {
|
||||
startAfter(...varargs: any[]): Query;
|
||||
startAt(snapshot: DocumentSnapshot): Query;
|
||||
startAt(...varargs: any[]): Query;
|
||||
where(fieldPath: string, op: Types.QueryOperator, value: any): Query;
|
||||
where(fieldPath: string | FieldPath, op: Types.QueryOperator, value: any): Query;
|
||||
}
|
||||
|
||||
interface DocumentChange {
|
||||
@ -1598,7 +1598,7 @@ declare module "react-native-firebase" {
|
||||
startAfter(...varargs: any[]): Query;
|
||||
startAt(snapshot: DocumentSnapshot): Query;
|
||||
startAt(...varargs: any[]): Query;
|
||||
where(fieldPath: string, op: Types.QueryOperator, value: any): Query;
|
||||
where(fieldPath: string | FieldPath, op: Types.QueryOperator, value: any): Query;
|
||||
}
|
||||
namespace Query {
|
||||
interface NativeFieldPath {
|
||||
|
Loading…
x
Reference in New Issue
Block a user