Skip to content

Commit 163f954

Browse files
Add comments
1 parent a67e4ce commit 163f954

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/firestore/src/api/database.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,6 +1138,9 @@ export class Query<T = PublicDocumentData>
11381138
value: unknown
11391139
): Query<T> {
11401140
try {
1141+
// The "as string" cast is a little bit of a hack. `where` accepts the
1142+
// FieldPath Compat type as input, but is not typed as such in order to
1143+
// not expose this via our public typings file.
11411144
return new Query<T>(
11421145
this.firestore,
11431146
query(this._delegate, where(fieldPath as string, opStr, value))
@@ -1152,6 +1155,9 @@ export class Query<T = PublicDocumentData>
11521155
directionStr?: PublicOrderByDirection
11531156
): Query<T> {
11541157
try {
1158+
// The "as string" cast is a little bit of a hack. `orderBy` accepts the
1159+
// FieldPath Compat type as input, but is not typed as such in order to
1160+
// not expose this via our public typings file.
11551161
return new Query<T>(
11561162
this.firestore,
11571163
query(this._delegate, orderBy(fieldPath as string, directionStr))

0 commit comments

Comments
 (0)