Skip to content

Commit

Permalink
refactor(firestore): remove the QueryDocumentSnapshot interface (#570)
Browse files Browse the repository at this point in the history
  • Loading branch information
robingenz committed Feb 28, 2024
1 parent 3cd502a commit eb15c5e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 26 deletions.
5 changes: 5 additions & 0 deletions .changeset/purple-jobs-roll.md
@@ -0,0 +1,5 @@
---
'@capacitor-firebase/firestore': major
---

refactor: remove the `QueryDocumentSnapshot` interface
10 changes: 10 additions & 0 deletions packages/firestore/BREAKING.md
@@ -1,3 +1,13 @@
# Breaking Changes

This is a comprehensive list of the breaking changes introduced in the major version releases of Capacitor Firebase Firestore plugin.

## Versions

- [Version 6.x.x](#version-6xx)

## Version 6.x.x

### `QueryDocumentSnapshot` interface

The `QueryDocumentSnapshot` interface has been replaced with the `DocumentSnapshot` interface.
28 changes: 2 additions & 26 deletions packages/firestore/src/definitions.ts
Expand Up @@ -246,7 +246,7 @@ export interface GetCollectionResult<T> {
*
* @since 5.2.0
*/
snapshots: QueryDocumentSnapshot<T>[];
snapshots: DocumentSnapshot<T>[];
}

/**
Expand Down Expand Up @@ -282,7 +282,7 @@ export interface GetCollectionGroupResult<T> {
*
* @since 5.2.0
*/
snapshots: QueryDocumentSnapshot<T>[];
snapshots: DocumentSnapshot<T>[];
}

/**
Expand Down Expand Up @@ -409,30 +409,6 @@ export interface DocumentSnapshot<T> {
data: T | null;
}

/**
* @since 5.2.0
*/
export interface QueryDocumentSnapshot<T> {
/**
* The document's identifier within its collection.
*
* @since 5.2.0
*/
id: string;
/**
* The path of the document.
*
* @since 5.2.0
*/
path: string;
/**
* An object containing the data for the document.
*
* @since 5.2.0
*/
data: T;
}

/**
* @since 5.2.0
*/
Expand Down

0 comments on commit eb15c5e

Please sign in to comment.