Allow readonly arrays

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor - P4
    • 4.1.0
    • Affects Version/s: None
    • Component/s: None
    • 2
    • None
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None

      What problem are you facing?

      Can't pass Typescript readonly arrays to driver functions (filters, updates, ...).
      But I don't think that the drive will change the arrays so the requested type for arrays should be readonly.

      What driver and relevant dependency versions are you using?

      mongodb@4.0.0

      Steps to reproduce?

      col.findOne({ color:

      { $in: ['blue', 'red'] as readonly string[] }

      })

              Assignee:
              Neal Beeken
              Reporter:
              Jérôme Senot
              Daria Pardue
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: