Conversation
Member
Author
|
Oops sorry @CrystalPea, was trying to click @quis for review (this is a strawman for something we were already discussing).. but take a look if you like anyway. |
quis
reviewed
Sep 7, 2026
quis
reviewed
Sep 7, 2026
quis
reviewed
Sep 7, 2026
risicle
force-pushed
the
ris-type-fixes-service-settings
branch
from
September 7, 2026 15:29
e02afe9 to
88d9cba
Compare
and some ignore markers where we're reaching in to add extra errors to form fields, which we should probably find better ways to do
risicle
force-pushed
the
ris-type-fixes-service-settings
branch
from
September 19, 2026 16:17
88d9cba to
97552dc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
And some ignore markers where we're reaching in to add extra errors to form fields, which we should probably find better ways to do.
This PR makes one important decision - allowing
assertstatements in production code, but only for the purposes of type-narrowing. In these cases it's to tell the type checker something it can't figure out itself - that a valid form won't haveNonevalues for certain fields. These are all cases where aNonebeing present would have thrown an exception anyway because of what the following code was trying to do with it.This seems preferable to me than wrapping each use of these
.dataattributes incast(...)calls, which would also have not given certainty about correctness in the wayassertstatements do.