JsIterator.hx 277 B

1234567891011121314151617
  1. package js;
  2. /**
  3. JsIterator is prefixed with Js to avoid name clashes with standard
  4. Iterator structure.
  5. **/
  6. typedef JsIterator<T> = {
  7. function next():JsIteratorStep<T>;
  8. }
  9. /**
  10. Object returned by `JsIterator.next`.
  11. **/
  12. typedef JsIteratorStep<T> = {
  13. done:Bool,
  14. ?value:T
  15. }