Skip to content
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

fix(firestore, web): fix interop on TransactionOptions #9188

Merged
merged 1 commit into from
Jul 22, 2022
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
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