Skip to content

Update Lite tests with Query API v2 #3446

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Jul 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions packages/firestore/exp-types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export interface FirestoreDataConverter<T> {
toFirestore(modelObject: Partial<T>, options: SetOptions): DocumentData;
fromFirestore(
snapshot: QueryDocumentSnapshot<DocumentData>,
options: SnapshotOptions
options?: SnapshotOptions
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needed to make this interface compatible with the FirestoreDataConverter in lite.

): T;
}

Expand Down Expand Up @@ -242,9 +242,11 @@ export type SetOptions =
export class DocumentReference<T = DocumentData> {
private constructor();
readonly type: 'document';
readonly id: string;
readonly firestore: FirebaseFirestore;
readonly converter: FirestoreDataConverter<T> | null;
readonly path: string;
readonly id: string;

withConverter<U>(converter: FirestoreDataConverter<U>): DocumentReference<U>;
}

Expand Down Expand Up @@ -284,6 +286,7 @@ export class Query<T = DocumentData> {
protected constructor();
readonly type: 'query' | 'collection';
readonly firestore: FirebaseFirestore;
readonly converter: FirestoreDataConverter<T> | null;

withConverter<U>(converter: FirestoreDataConverter<U>): Query<U>;
}
Expand Down
Loading