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

Improve schema type helpers to use native Typescript utility types

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

      InferIdType and OptionalId are logically complex types it would be ideal to break these types down into more readable components and attempt to make use of Typescript's utility types as much as possible.

      Potentially some combination of union types, and the Extract and/or Pick utility types: Extract<Pick<TSchema, '_id'> | ObjectId, NonNullable>

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

              Created:
              Updated: