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

The `createIndexes` typings are not allowing for `expireAfterSeconds` per index

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

      What problem are you facing?

      Typings are not entirely correct for `createIndexes` API or there's another breaking change missing

      What driver and relevant dependency versions are you using?

      Version 4

      Steps to reproduce?

      This reveals a typing error in `expireAfterSeconds` but that used to be fine:

          return subscriptionCollection.createIndexes([
            {
              key: {
                event: 1,
              },
              name: 'event',
            },
            {
              expireAfterSeconds: 2 * 3600, // Delete the subscription after 2 hours have passed since creation.
              key: {
                createdAt: 1,
              },
            },
          ]);
      

       

            Assignee:
            neal.beeken@mongodb.com Neal Beeken
            Reporter:
            joao.dias@themill.io Joao Dias
            Neal Beeken
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: