Export enum types with the same name as the enum object

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Unknown
    • 4.0.0
    • Affects Version/s: 4.0.0
    • Component/s: None
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None

      The following enums are currently exported from src/index.ts as objects with corresponding types defined via a separate name. This is not necessary - typescript allows exporting both a real js entity and a type aliased to the same name, so wherever possible we should try to use the same name to represent the object and the type, (e.g., batchType instead of batchType AND batchTypeId).

      export { ProfilingLevel } from './operations/set_profiling_level';
      export { ServerType, TopologyType } from './sdam/common';
      export { LoggerLevel } from './logger';
      export { AutoEncryptionLoggerLevel } from './deps';
      export { BatchType } from './bulk/common';
      export { AuthMechanism } from './cmap/auth/defaultAuthProviders';
      export { CURSOR_FLAGS } from './cursor/abstract_cursor';
      export { Compressor } from './cmap/wire_protocol/compression';
      export { ExplainVerbosity } from './explain';
      export { ReadConcernLevel } from './read_concern';
      export { ReadPreferenceMode } from './read_preference';
      export { ServerApiVersion } from './mongo_client';
      

       

              Assignee:
              Daria Pardue
              Reporter:
              Daria Pardue
              None
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: