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

TypeScript Filter number condition ignores ObjectId values

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 4.1.4
    • Component/s: TypeScript

      What problem are you facing?

      If you define a `Filter<TSchema>` object, properties of `TSchema` which are of type `number` are not throwing an error when the value assigned is a `ObjectId`.

      What driver and relevant dependency versions are you using?

      mongodb v4.1.4

      typescript v4.4.4

      Steps to reproduce?

      See TS Playground:

      https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAbzgMWAGxgUygGjgeQCMArTAYxgEkATOAXzgDMoIQ4ByECAOwHMJqhdgG4AUKODcsURgEMymOJSxsEouHAD6wagC4CJclWpiNZCAGcY+7gFcQhbGLrjz3K03TT8AaX2oMbAAeZUwQAD44AF5EdS0dG0wAdwNSChoACgBKHDjzK30ARgAmAGZROjFRAHpquAAVAAtgCzgLRohbNFoYRpYU2W44bBYoUTcPRi9sAFEoUcL-aagQlUiYtTNLazhuZNSjTKyKqtqG5tbe-tbB4fnoOFlWzAAPMCNManGeSeW50eKS0CK1CEWisS2BQ4jAgEHYJ1EQA

            Assignee:
            Unassigned Unassigned
            Reporter:
            avaly@plexapp.com Valentin Agachi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: