Skip to content

Conversation

tobias-tengler
Copy link
Contributor

@tobias-tengler tobias-tengler commented Aug 20, 2024

Previously conditional selections were always generated as required properties on the raw response type.
This is inconvenient if your component code checks for the presence of a field and you can't model the skipped state in a test using @raw_response_type without partially disabling type checking.

This PR makes all conditional selections optional in the raw response type.

@tobias-tengler tobias-tengler force-pushed the fix-raw-response-type-conditional-sub-selections branch 2 times, most recently from 3424c75 to a2f2295 Compare August 20, 2024 16:03
@tobias-tengler
Copy link
Contributor Author

tobias-tengler commented Aug 20, 2024

The test failure in the ubuntu job seems to be unrelated / transient, but I can't trigger another run.

EDIT: This also happens on main, so it's not the fault of my changes.

@tobias-tengler tobias-tengler force-pushed the fix-raw-response-type-conditional-sub-selections branch from a2f2295 to cde4f43 Compare August 20, 2024 16:39
@facebook-github-bot
Copy link
Contributor

@captbaritone has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@tobias-tengler tobias-tengler force-pushed the fix-raw-response-type-conditional-sub-selections branch from cde4f43 to dcd36ad Compare September 17, 2024 19:13
@tobias-tengler
Copy link
Contributor Author

@captbaritone Fixed the merge conflicts on this one.

@tobias-tengler tobias-tengler force-pushed the fix-raw-response-type-conditional-sub-selections branch 2 times, most recently from ef5d660 to 7f56dfe Compare September 20, 2024 19:06
@tobias-tengler tobias-tengler force-pushed the fix-raw-response-type-conditional-sub-selections branch from 7f56dfe to eb6bc69 Compare October 15, 2024 18:14
@tobias-tengler
Copy link
Contributor Author

tobias-tengler commented Oct 15, 2024

@captbaritone could this be merged? Same goes for #4775

@tobias-tengler tobias-tengler force-pushed the fix-raw-response-type-conditional-sub-selections branch from eb6bc69 to 11a6820 Compare October 20, 2024 15:24
@tobias-tengler tobias-tengler force-pushed the fix-raw-response-type-conditional-sub-selections branch from 11a6820 to 7e86478 Compare January 21, 2025 17:56
@tobias-tengler
Copy link
Contributor Author

@captbaritone Could we land this?

@facebook-github-bot
Copy link
Contributor

@captbaritone merged this pull request in 38ae469.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants