-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(GeoTransaction): stub GeoTransaction class
- Loading branch information
1 parent
ca387c0
commit 0b68729
Showing
3 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { GeoFirestoreTypes } from './GeoFirestoreTypes'; | ||
|
||
/** | ||
* A reference to a transaction. The `GeoTransaction` object passed to a transaction's updateFunction provides the methods to read and | ||
* write data within the transaction context. See `GeoFirestore.runTransaction()`. | ||
*/ | ||
export class GeoTransaction { | ||
constructor(private _transaction: GeoFirestoreTypes.cloud.Transaction | GeoFirestoreTypes.web.Transaction) { | ||
if (Object.prototype.toString.call(_transaction) !== '[object Object]') { | ||
throw new Error('Transaction must be an instance of a Firestore Transaction'); | ||
} | ||
} | ||
} |