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

Export enum as const #36

Open
aleksander-lurie-codete opened this issue Jul 13, 2023 · 1 comment · May be fixed by #40
Open

Export enum as const #36

aleksander-lurie-codete opened this issue Jul 13, 2023 · 1 comment · May be fixed by #40

Comments

@aleksander-lurie-codete
Copy link

aleksander-lurie-codete commented Jul 13, 2023

There is a interface for customList to provide key, and this key is defined as CustomProperty enum. This enum is defined without const what means is not accessible in runtime. if i want to us customList function and define key as you did in documentation i we got ts error

Zrzut ekranu 2023-07-13 o 16 41 51

I could use correct value like this:

Zrzut ekranu 2023-07-13 o 16 42 04

but const in declaration is required to be able to use it in runtime

@dzikoysk
Copy link

For now, the // @ts-ignore above the affected line looks like the only solution to this issue 😢

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 a pull request may close this issue.

2 participants