Skip to content

Stop using const enums in the public API #5012

@Feiyang1

Description

@Feiyang1

Some build tools (e.g. esbuild, vite) don't work with const enums because they compile Typescript in the isolatedModules mode. They compile files individually without type information, so they can't inline const enums, which eventually cause runtime errors.

Plus Javascript users can't use const enums.

Auth exports some const enums, e.g. ProviderId, SignInMethod. We should probably replace them with just plain object maps.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions