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

Remove useUnknownInCatchVariables

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: TypeScript

      Use Case

      Typescript 4.4 (beta) forces you to narrow the type of an error in a catch block. We should locally upgrade to the beta and fix the errors it reveals. It would make error handling more accurate.

      Dependencies

      • none

      Unknowns

      We're doing a lot of catching sync errors and turning them into async errors by passing them into callbacks. It's not clear if this is correct behavior and/or expands the scope of this ticket.

      Acceptance Criteria

      Implementation Requirements
      • Fix TS errors revealed by ts 4.4
      Testing Requirements
      • none, unless narrowing logic is complex? But we shouldn't get there.
      Documentation Requirements
      • none
      Follow Up Requirements
      • If other significant TS errors crop up, file a ticket for them.

            Assignee:
            Unassigned Unassigned
            Reporter:
            neal.beeken@mongodb.com Neal Beeken
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: