-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Disjoint unions not working with imported constants #4173
Comments
You're right. I changed that because without Ineligible value used in/as type annotation (did you forget 'typeof'?) So, the real question is? Can I use the disjoint types with constants like I said, or it must be using literals? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I'm trying to use disjoint unions to check a redux reducer. I have a
constants
file where I export all my constants, like this:The problem is, if I import this constants and define my
type Action
like this:And use it un my code like this:
I get the error in
USERS_LOADED
case: Property not found in actionHowever, if I define the constants directly in the file instead of importing them, the error goes away and works like expected
The text was updated successfully, but these errors were encountered: