throwError property
See throw().
This is a nullable getter because not all iterators support this method.
If the error is null or omitted, the callback is called with no value.
It's not possible to call the callback with a null error.
Implementation
JSIteratorResult<T> Function([JSAny? error])? get throwError =>
// Make sure to pass along whether an argument was passed or not, because
// that's observable from JavaScript.
_nullableThrowError == null
? null
: ([error]) => error == null ? _throwError() : _throwError(error);