-
Notifications
You must be signed in to change notification settings - Fork 31
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
HOTFIX: fix subscription narrowing problem #306
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m missing an example of what the resolver implementation would look like. Is this requiring folks to include the kind property in their implementation?
78dac2f
to
5842456
Compare
Yes, you will need to add kind for "SubscribeAndResolve" |
That doesn’t seem helpful. At that point it’s more intuitive to export two different type definitions. |
That was my initial idea, but @freiksenet said that we would need to refactor everything then. |
Can you elaborate on the difference in effort needed to add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed offline, I consider this solution a no-go. We provide framework solutions and we need to consider our customers [the product engineers], and this workaround is not intuitive. We should:
- Figure out if it's simply not possible to provide a single type and have TypeScript correctly narrow the union;
- and otherwise provide 2 types and have the product engineer choose the right one—which is something that they can intuitively understand.
No description provided.