Typescript should emit an error when filtering on columns not in schema

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Won't Fix
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • 3
    • None
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None

      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:
            Bailey Pearson
            Reporter:
            Noah Silas
            None
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: