Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[expo-calendar] Use typescript enums instead of objects for enumerable types #27777

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

behenate
Copy link
Member

@behenate behenate commented Mar 20, 2024

Why

Currently expo-calendar allows usage of any string for many enum values. This causes issues like this one: #27513.

How

Updated the object based enum values into TS enum types. Ideally we would use an Union, but this would introduce some issues with correctly deprecating the old types and backwards compatibility.

Test Plan

IDEs don't allow putting a random string into the fields now :)

@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label Mar 20, 2024
@behenate behenate force-pushed the @behenate/calendar-use-enums branch from 05c52e3 to 24fee47 Compare March 20, 2024 18:11
@expo-bot expo-bot added bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels Mar 20, 2024
@behenate behenate force-pushed the @behenate/calendar-use-enums branch from 24fee47 to 75fc819 Compare March 20, 2024 18:25
@behenate behenate marked this pull request as ready for review March 20, 2024 19:03
@behenate behenate force-pushed the @behenate/calendar-use-enums branch from 75fc819 to 96212ab Compare April 23, 2024 14:12
@behenate behenate merged commit 0a9ada2 into main Apr 23, 2024
11 checks passed
@behenate behenate deleted the @behenate/calendar-use-enums branch April 23, 2024 14:14
@brentvatne brentvatne added the published Changes from the PR have been published to npm label Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: fingerprint compatible bot: passed checks ExpoBot has nothing to complain about published Changes from the PR have been published to npm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants