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

Investigate NODE-3895 - Typescript should emit an error when filtering on columns not in schema

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • 0
    • Not Needed

      NODE-3895 Description
      As a developer, I'd like the type system to catch errors I make, like trying to query on a field that doesn't exist, or when I have made a typo in an existing field name.

       

      For example:

      ```

      interface Person =

      {   name: string;   age: number; }

       

      db.collection<Person>('people').find(

        { nam: 'Alice' } // should be a type error; `nam` is not an attribute of the schema

      );

      ```

       

            Assignee:
            Unassigned Unassigned
            Reporter:
            dbeng-pm-bot PM Bot
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: