Skip to content

fix(forms): Fix typing on FormRecord.#59993

Closed
JeanMeche wants to merge 1 commit intoangular:mainfrom
JeanMeche:fix/record-rawvalue
Closed

fix(forms): Fix typing on FormRecord.#59993
JeanMeche wants to merge 1 commit intoangular:mainfrom
JeanMeche:fix/record-rawvalue

Conversation

@JeanMeche
Copy link
Copy Markdown
Member

Priori to this change, ɵRawValue of a FormRecord returned a Partial. This commit fixes it.

fixes #59985

@pullapprove pullapprove bot requested a review from kirjs February 18, 2025 11:43
@ngbot ngbot bot added this to the Backlog milestone Feb 18, 2025
Priori to this change, `ɵRawValue` of a `FormRecord` returned a `Partial`. This commit fixes it.

fixes angular#59985
Copy link
Copy Markdown
Contributor

@kirjs kirjs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will this


type ValueParam = Parameters<typeof fr.setValue>[0];

// This should error if the typing allows partial values
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if I understand if the typing allows partial values part (or see it in the test?)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without the fix, tsc reports an error on the @ts-expect-error because partial values were allowed.
This makes sure we don't regress to a point were partial values are valid.

Copy link
Copy Markdown
Contributor

@thePunderWoman thePunderWoman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewed-for: public-api

@pullapprove pullapprove bot requested a review from atscott February 18, 2025 15:24
Copy link
Copy Markdown
Contributor

@kirjs kirjs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewed-for: public-api

@JeanMeche JeanMeche added target: patch This PR is targeted for the next patch release action: merge The PR is ready for merge by the caretaker labels Feb 18, 2025
thePunderWoman pushed a commit that referenced this pull request Feb 18, 2025
Priori to this change, `ɵRawValue` of a `FormRecord` returned a `Partial`. This commit fixes it.

fixes #59985

PR Close #59993
@thePunderWoman
Copy link
Copy Markdown
Contributor

This PR was merged into the repository by commit cf36951.

The changes were merged into the following branches: main, 19.1.x

@angular-automatic-lock-bot
Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: forms target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FormRecord wraps value in Partial

3 participants