Skip to content

Commit

Permalink
fix(firestore, web): fix interop on TransactionOptions (#9188)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyokone committed Jul 22, 2022
1 parent bf1d9be commit f020167
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ class Firestore extends JsObjectWrapper<firestore_interop.FirestoreJsImpl> {
return handleThenable(firestore_interop.runTransaction(
jsObject,
updateFunctionWrap,
firestore_interop.TransactionOptionsJsImpl(maxAttempts)))
firestore_interop.TransactionOptionsJsImpl(
maxAttempts: maxAttempts)))
.then((value) => dartify(null));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,12 @@ external PromiseJsImpl<void> runTransaction(
]);

@JS('TransactionOptions')
class TransactionOptionsJsImpl {
external factory TransactionOptionsJsImpl(num maxAttempts);
@anonymous
abstract class TransactionOptionsJsImpl {
external factory TransactionOptionsJsImpl({num maxAttempts});

/// Maximum number of attempts to commit, after which transaction fails. Default is 5.
external num get maxAttempts;
external static num get maxAttempts;
}

@JS()
Expand Down

0 comments on commit f020167

Please sign in to comment.