Back to Firebase Js Sdk

TransactionResult class

docs-devsite/database.transactionresult.md

12.12.11.6 KB
Original Source

Project: /docs/reference/js/_project.yaml Book: /docs/reference/_book.yaml page_type: reference

{% comment %} DO NOT EDIT THIS FILE! This is generated by the JS SDK team, and any local changes will be overwritten. Changes should be made in the source code at https://github.com/firebase/firebase-js-sdk {% endcomment %}

TransactionResult class

A type for the resolve value of runTransaction()<!-- -->.

<b>Signature:</b>

typescript
export declare class TransactionResult 

Properties

PropertyModifiersTypeDescription
committedbooleanWhether the transaction was successfully committed.
snapshotDataSnapshotThe resulting data snapshot.

Methods

MethodModifiersDescription
toJSON()Returns a JSON-serializable representation of this object.

TransactionResult.committed

Whether the transaction was successfully committed.

<b>Signature:</b>

typescript
readonly committed: boolean;

TransactionResult.snapshot

The resulting data snapshot.

<b>Signature:</b>

typescript
readonly snapshot: DataSnapshot;

TransactionResult.toJSON()

Returns a JSON-serializable representation of this object.

<b>Signature:</b>

typescript
toJSON(): object;

<b>Returns:</b>

object