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

[ts] POC type expansion for withCell #2222

Closed

Conversation

Krisztiaan
Copy link
Contributor

This is not done, but a draft to show an early "typing only" change on the withCell HOC, reacting to the #2205 issue, demonstrating some of the not-yet utilized typing magic that could be done there. Also making typing resemble code better (as it is currently slightly misleading with the before-after-query-props)

@Krisztiaan Krisztiaan marked this pull request as draft April 6, 2021 15:20
@corbt
Copy link
Contributor

corbt commented Apr 6, 2021

This makes sense, and I think is complementary to #2205. That PR adds static typing for the props that a cell expects, and this PR adds static typing for the data from the cell's GraphQL query. Both seem important!

The only potential conflict will be in deciding the proper order of type parameters passed to the cell constructor.

@Krisztiaan
Copy link
Contributor Author

Krisztiaan commented Apr 6, 2021

Oh ok, @corbt your comment helped me realize what I was missing from your argument. This POC contains that too though, with only type change, if you look at the typing on the returned function on L120 and L123.

I don't think it'd work as it currently stands, but it could, with a little bit more work.

@dac09
Copy link
Collaborator

dac09 commented May 25, 2021

Solved in #2485

@dac09 dac09 closed this May 25, 2021
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.

3 participants