Skip to content

Stop using const enums, as it breaks environments with babel and isolatedModules #2481

@bart-opplane

Description

@bart-opplane

Const enums (like the ones in https://github.com/brianc/node-postgres/blob/master/packages/pg-protocol/src/messages.ts) are a feature specific to Typescript projects built with tsc compiler. Builds that do not use tsc and only compile explicitly imported files need the --isolatedModules flag enabled, which does not suppport const enums

Please replace const enums with normal enums.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions