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

XMLWordPrintableJSON

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

      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
              Reporter:
              George Carpow
              None
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: