Skip to content

Converted enums to template literals #2501

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

mfbz
Copy link
Contributor

@mfbz mfbz commented Jun 9, 2025

Close #2263

As suggested by @jribbink in #2263 comment, I removed enums and substituted them with their type compatible version like this:

const SomeEnum = {
  FOO: "foo"
} as const

type SomeEnum = (typeof SomeEnum)[keyof typeof SomeEnum]

Furthermore, I adjusted some files to support the new type usage instead of enums

@mfbz mfbz requested a review from a team as a code owner June 9, 2025 17:00
Copy link

changeset-bot bot commented Jun 9, 2025

🦋 Changeset detected

Latest commit: 2a21989

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 16 packages
Name Type
@onflow/fcl-ethereum-provider Major
@onflow/transport-http Minor
@onflow/util-logger Minor
@onflow/fcl-core Minor
@onflow/typedefs Minor
@onflow/util-rpc Minor
@onflow/fcl-wc Major
@onflow/fcl Minor
@onflow/sdk Minor
@onflow/fcl-rainbowkit-adapter Major
@onflow/fcl-wagmi-adapter Major
@onflow/config Patch
@onflow/fcl-react-native Patch
@onflow/types Patch
@onflow/util-template Patch
@onflow/kit Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Remove all enums and namespaces
1 participant