description

# JSIterator<T extends JSAny?> extension type

A proper JS iterator.

In JS, a "proper iterator" implements the JS iterator protocol and is an instance of the JS `Iterator` class.

This library provides no type for the JS `Iterator` type without the JS iterator protocol members. Such an object is not useful.

on
  - JSObject
Implemented types
  - JSIteratorProtocol<T>
  - JSIterable<T>
Available extensions
  - JSAnyOperatorExtension
  - JSAnyUtilityExtension
  - JSIterableToIterable
  - JSIteratorToIterator
  - NullableUndefineableJSAnyExtension

Annotations
  - @JS('Iterator')
  - @Since.new('3.12')

## Properties

hashCode → int
  The hash code for this object.
  no setter inherited
isDefinedAndNotNull → bool

  Available on JSAny?, provided by the NullableUndefineableJSAnyExtension extension

  no setter
isNull → bool

  Available on JSAny?, provided by the NullableUndefineableJSAnyExtension extension

  Whether this value corresponds to JavaScript `null`.
  no setter
isTruthy → JSBoolean

  Available on JSAny?, provided by the JSAnyOperatorExtension extension

  The result of `!!`this`` in JavaScript.
  no setter
isUndefined → bool

  Available on JSAny?, provided by the NullableUndefineableJSAnyExtension extension

  Whether this value corresponds to JavaScript `undefined`.
  no setter
isUndefinedOrNull → bool

  Available on JSAny?, provided by the NullableUndefineableJSAnyExtension extension

  no setter
iterator → JSIterator<T>
  See `[Symbol.iterator]()`.
  no setter inherited
not → JSBoolean

  Available on JSAny?, provided by the JSAnyOperatorExtension extension

  The result of `!`this`` in JavaScript.
  no setter
returnValue → JSIteratorResult<T> Function([T? value])?
  See `return()`.
  no setter inherited
runtimeType → Type
  A representation of the runtime type of the object.
  no setter inherited
throwError → JSIteratorResult<T> Function([JSAny? error])?
  See `throw()`.
  no setter inherited
toDartIterable → Iterable<T>

  Available on JSIterable<T>, provided by the JSIterableToIterable extension

  A Dart Iterable that iterates over the values in this.
  no setter
toDartIterator → Iterator<T>

  Available on JSIterator<T>, provided by the JSIteratorToIterator extension

  A` Dart Iterator that iterates over the values in this.
  no setter

## Methods

add(JSAny? any) → JSAny

  Available on JSAny?, provided by the JSAnyOperatorExtension extension

  The result of ``this` + `any`` in JavaScript.
and(JSAny? any) → JSAny?

  Available on JSAny?, provided by the JSAnyOperatorExtension extension

  The result of ``this` && `any`` in JavaScript.
dartify() → Object?

  Available on JSAny?, provided by the JSAnyUtilityExtension extension

  Converts a JavaScript JSON-like value to the Dart equivalent if possible.
divide(JSAny? any) → JSAny

  Available on JSAny?, provided by the JSAnyOperatorExtension extension

  The result of ``this` / `any`` in JavaScript.
drop(int limit) → JSIterator<T>
  See `Iterator.drop()`.
equals(JSAny? any) → JSBoolean

  Available on JSAny?, provided by the JSAnyOperatorExtension extension

  The result of ``this` == `any`` in JavaScript.
exponentiate(JSAny? any) → JSAny

  Available on JSAny?, provided by the JSAnyOperatorExtension extension

  The result of ``this` ** `any`` in JavaScript.
greaterThan(JSAny? any) → JSBoolean

  Available on JSAny?, provided by the JSAnyOperatorExtension extension

  The result of ``this` > `any`` in JavaScript.
greaterThanOrEqualTo(JSAny? any) → JSBoolean

  Available on JSAny?, provided by the JSAnyOperatorExtension extension

  The result of ``this` >= `any`` in JavaScript.
instanceof(JSFunction<Function> constructor) → bool

  Available on JSAny?, provided by the JSAnyUtilityExtension extension

  Whether this `JSAny?` is an `instanceof` `constructor`.
instanceOfString(String constructorName) → bool

  Available on JSAny?, provided by the JSAnyUtilityExtension extension

  Whether this `JSAny?` is an `instanceof` the constructor that is defined by `constructorName`, which is looked up in the globalContext.
lessThan(JSAny? any) → JSBoolean

  Available on JSAny?, provided by the JSAnyOperatorExtension extension

  The result of ``this` < `any`` in JavaScript.
lessThanOrEqualTo(JSAny? any) → JSBoolean

  Available on JSAny?, provided by the JSAnyOperatorExtension extension

  The result of ``this` <= `any`` in JavaScript.
modulo(JSAny? any) → JSAny

  Available on JSAny?, provided by the JSAnyOperatorExtension extension

  The result of ``this` % `any`` in JavaScript.
multiply(JSAny? any) → JSAny

  Available on JSAny?, provided by the JSAnyOperatorExtension extension

  The result of ``this` * `any`` in JavaScript.
next([JSAny? yieldValue]) → JSIteratorResult<T>
  See `next()`.
  inherited
noSuchMethod(Invocation invocation) → dynamic
  Invoked when a nonexistent method or property is accessed.
  inherited
notEquals(JSAny? any) → JSBoolean

  Available on JSAny?, provided by the JSAnyOperatorExtension extension

  The result of ``this` != `any`` in JavaScript.
or(JSAny? any) → JSAny?

  Available on JSAny?, provided by the JSAnyOperatorExtension extension

  The result of ``this` || `any`` in JavaScript.
strictEquals(JSAny? any) → JSBoolean

  Available on JSAny?, provided by the JSAnyOperatorExtension extension

  The result of ``this` === `any`` in JavaScript.
strictNotEquals(JSAny? any) → JSBoolean

  Available on JSAny?, provided by the JSAnyOperatorExtension extension

  The result of ``this` !== `any`` in JavaScript.
subtract(JSAny? any) → JSAny

  Available on JSAny?, provided by the JSAnyOperatorExtension extension

  The result of ``this` - `any`` in JavaScript.
take(int limit) → JSIterator<T>
  See `Iterator.take()`.
toString() → String
  A string representation of this object.
  inherited
typeofEquals(String typeString) → bool

  Available on JSAny?, provided by the JSAnyUtilityExtension extension

  Whether the result of `typeof` on this `JSAny?` is `typeString`.
unsignedRightShift(JSAny? any) → JSNumber

  Available on JSAny?, provided by the JSAnyOperatorExtension extension

  The result of ``this` >>> `any`` in JavaScript.

## Operators

operator ==(Object other) → bool
  The equality operator.
  inherited

## Static Methods

from<T extends JSAny?>(JSIteratorProtocol<T> object) → JSIterator<T>
  Converts an object that just implements the Iterator protocol into a proper iterator.
fromFunctions<T extends JSAny?>(JSIteratorResult<T> next(), {JSIteratorResult<T> returnValue()?}) → JSIterator<T>
  Creates a proper JSIterator from the methods defined by the Iterator protocol.
fromIterable<T extends JSAny?>(JSIterableProtocol<T> object) → JSIterator<T>
  Creates a proper iterator from an object that just implements the Iterable protocol.