fcl-js
fcl-js copied to clipboard
[FEATURE] Remove all enums and namespaces
Issue to be solved
Enums in typescript create overhead in the code as they aren't a native javascript feature. When running ts natively in node 23 - they don't work.
Suggest A Solution
Typescript template literals work better.
What are you currently working on that this is blocking?
Flow Wallet.
Good suggestion — we'll be looking into improving the types shortly and will address this then.
A non-breaking solution may be to declare the enums as both a value and a type. We can effectively leverage the same properties of enums without using the syntax in this case.
e.g.
const SomeEnum = {
FOO: "foo"
} as const
type SomeEnum = (typeof SomeEnum)[keyof typeof SomeEnum]