JSIteratorResult<T extends JSAny?>.done constructor
- T? returnValue
Creates a result that indicates the end of iteration.
The value is the "return value" of the iterator. For example, generator functions use this to represent the return value of the generator function.
If the value is null or omitted, the result has no value. It's not
possible to create a result with a null value.
Implementation
factory JSIteratorResult.done([T? returnValue]) {
final result = JSIteratorResult<T>._(JSObject());
result._done = true;
if (returnValue != null) result._value = returnValue;
return result;
}