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

Re-exporting a type when the '--isolatedModules' flag is provided requires using 'export type'

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

      Cannot build a project with mongodb for production because of TypeScript restriction. Exporting variable itself instead of marking with "export type";

       

      NodeJs - 18.13.0

      npm - 8.19.3

      TypeScript - 4.9.4

      mongodb - 4.13.0

       

      ./node_modules/mongodb/src/bson.ts:32:3

      Type error: Re-exporting a type when the '--isolatedModules' flag is provided requires using 'export type'.

       

      30 |   DBRef,

      31 |   Decimal128,

      > 32 |   Document,

          |   ^

      33 |   Double,

      34 |   Int32,

      35 |   Long,

            Assignee:
            Unassigned Unassigned
            Reporter:
            georgecarpow@gmail.com George Carpow
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: