Skip to content

Commit f020167

Browse files
authored
fix(firestore, web): fix interop on TransactionOptions (#9188)
1 parent bf1d9be commit f020167

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

packages/cloud_firestore/cloud_firestore_web/lib/src/interop/firestore.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ class Firestore extends JsObjectWrapper<firestore_interop.FirestoreJsImpl> {
104104
return handleThenable(firestore_interop.runTransaction(
105105
jsObject,
106106
updateFunctionWrap,
107-
firestore_interop.TransactionOptionsJsImpl(maxAttempts)))
107+
firestore_interop.TransactionOptionsJsImpl(
108+
maxAttempts: maxAttempts)))
108109
.then((value) => dartify(null));
109110
}
110111

packages/cloud_firestore/cloud_firestore_web/lib/src/interop/firestore_interop.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,11 +193,12 @@ external PromiseJsImpl<void> runTransaction(
193193
]);
194194

195195
@JS('TransactionOptions')
196-
class TransactionOptionsJsImpl {
197-
external factory TransactionOptionsJsImpl(num maxAttempts);
196+
@anonymous
197+
abstract class TransactionOptionsJsImpl {
198+
external factory TransactionOptionsJsImpl({num maxAttempts});
198199

199200
/// Maximum number of attempts to commit, after which transaction fails. Default is 5.
200-
external num get maxAttempts;
201+
external static num get maxAttempts;
201202
}
202203

203204
@JS()

0 commit comments

Comments
 (0)