Skip to content

Commit

Permalink
fix(firestore): fix types for the where api in modular queries
Browse files Browse the repository at this point in the history
  • Loading branch information
dhenneke authored and mikehardy committed May 8, 2024
1 parent ad40ea2 commit d874e15
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/firestore/lib/modular/query.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export interface AppliableConstraint {
* can then be passed to {@link (query:1)} to create a new query instance that
* also contains this `QueryConstraint`.
*/
export interface IQueryConstraint extends AppliableConstraint {
export interface QueryConstraint extends AppliableConstraint {
/** The type of this query constraint */
readonly type: QueryConstraintType;

Expand Down
3 changes: 3 additions & 0 deletions packages/firestore/type-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import firebase, {
query,
startAfter,
updateDoc,
where,
} from '.';

console.log(firebase().collection);
Expand Down Expand Up @@ -50,6 +51,7 @@ firebase.firestore.setLogLevel('debug');
firebase.firestore().collection('foo');
firebase.firestore().collection('foo').doc('foo').collection('foo');
firebase.firestore().collection('foo').doc('foo');
firebase.firestore().collection('foo').where('foo', '==', 'bar');
firebase.firestore().collection('foo').doc('foo').collection('foo').add({ foo: 'bar' }).then();
firebase.firestore().collection('foo').doc('foo').update({ foo: 'bar' }).then();
firebase
Expand Down Expand Up @@ -130,6 +132,7 @@ collection(firebase.firestore(), 'foo', 'foo', 'foo');
collection(doc(collection(firebase.firestore(), 'foo'), 'foo'), 'foo');
doc(firebase.firestore(), 'foo', 'foo');
doc(collection(firebase.firestore(), 'foo'), 'foo');
query(collection(firebase.firestore(), 'foo'), where('foo', '==', 'bar'));
addDoc(collection(firebase.firestore(), 'foo'), { foo: 'bar' }).then();
updateDoc(doc(firebase.firestore(), 'foo', 'foo'), { foo: 'bar' }).then();
getDoc(doc(firebase.firestore(), 'foo', 'foo')).then();
Expand Down

0 comments on commit d874e15

Please sign in to comment.