You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
microsoft/TypeScript#28465 makes it so that there's no error when const enum is merely present in any declaration file. Instead you simply cannot use it.
It still makes sense to avoid const enum in the public API. The inlining of const enum makes it impossible to change its values in a minor or patch release.
const enum
in declaration files will cause errors in downstream projects that build with--isolatedModules
.There are two possible solutions:
export const enum
entirelypreserveConstEnums
However this is fixed, it needs to be done in upstream dependencies as well (
tsutils
).Related discussion: microsoft/TypeScript#20703
The text was updated successfully, but these errors were encountered: