yArrayGet method
Implementation
Result<YValue, Error> yArrayGet({
required YArray ref,
required int /*U32*/ index_,
YTransaction? txn,
}) {
final results = _yArrayGet([
ref.toWasm(),
index_,
(txn == null
? const None().toWasm()
: Option.fromValue(txn).toWasm(YTransaction.toWasm))
]);
final result = results[0];
return Result.fromJson(result, (ok) => YValue.fromJson(ok),
(error) => error is String ? error : (error! as ParsedString).value);
}