Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-4767

Change return type of AbstractCursor's async iterator to AsyncGenerator

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 5.0.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Not Needed

      Currently, the async iterator in abstract cursor can return an AsyncGenerator when using native promises or an AsyncIterator when using 3rd-party promises. For the sake of consistency, we should change the return type to always be AsyncGenerator since it's a stricter type than AsyncIterator.

      When we remove the custom promise version of the async generator we can update the return type to be AsyncGenerator.

      Acceptance Criteria

      • change the return type of the asyncIterator symbol in abstract cursor to be AsyncGenerator

            Assignee:
            warren.james@mongodb.com Warren James
            Reporter:
            andy.mina@mongodb.com Andy Mina
            Daria Pardue
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: