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

Automatic type narrowing for projections [Community Request]

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: TypeScript

      Community Request

      Automatic type narrowing when using projections would be amazing!

      Ex. When you add a projection to get only the name field in a user object then similar to a TypeScript Pick the resulting document would have type of Pick<User, “name”>

      Full reddit thread

      Impact

      • popular comment in recent reddit thread soliciting community feedback

            Assignee:
            Unassigned Unassigned
            Reporter:
            matthew.roknich@mongodb.com Matthew Roknich (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: