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

Add types for ListCollections cursor

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.0.0
    • Affects Version/s: None
    • Component/s: None
    • Not Needed

      Use Case

      As a node driver user
      I want better type hinting on ListCollections cursor response
      So that it's easier for me to use the driver API correctly

      The return type of the list collections method is pretty well defined, per the spec, so there is no reason for us not to provide a better type than just Document.

      Dependencies

      • None

      Unknowns

      • If added post 4.0 release, adding typings could result in compile time errors, so need to ensure it's done flexibly enough not to be a breaking change

      Acceptance Criteria

      • Provide a typescript type or interface for the ListCollections cursor return result
      Implementation Requirements
      • Cross reference the definition in the drivers spec for the list collections return type and add corresponding typescript hinting
      Testing Requirements
      • Add typescript tests for the new typing
      Documentation Requirements
      • None
      Follow Up Requirements
      • None

            Assignee:
            neal.beeken@mongodb.com Neal Beeken
            Reporter:
            daria.pardue@mongodb.com Daria Pardue
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: