Automatic type narrowing for projections [Community Request]

XMLWordPrintableJSON

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

      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
            Reporter:
            Matthew Roknich (Inactive)
            None
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: