Skip to content

refactor(forms): replace any with unknown in interop control value types#68356

Open
splincode wants to merge 1 commit intoangular:mainfrom
splincode:splincode/refactor-any-formts
Open

refactor(forms): replace any with unknown in interop control value types#68356
splincode wants to merge 1 commit intoangular:mainfrom
splincode:splincode/refactor-any-formts

Conversation

@splincode
Copy link
Copy Markdown
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.dev application / infrastructure changes
  • Other... Please describe:

What is the new behavior?

CombinedControl.value and InteropNgControl.value getter now return unknown instead of any, matching the actual ReadonlyFieldState<unknown> return type of controlValue()

@pullapprove pullapprove Bot requested a review from kirjs April 23, 2026 19:50
@angular-robot angular-robot Bot added detected: feature PR contains a feature commit area: forms labels Apr 23, 2026
@ngbot ngbot Bot added this to the Backlog milestone Apr 23, 2026
@kirjs kirjs added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews and removed action: merge The PR is ready for merge by the caretaker labels Apr 28, 2026
@kirjs
Copy link
Copy Markdown
Contributor

kirjs commented Apr 28, 2026

Please update feat->refactor in the commit, so that we can merge it in the patch branch

…e types

- `CombinedControl.value` and `InteropNgControl.value` getter now return
  `unknown` instead of `any`, matching the actual `ReadonlyFieldState<unknown>`
  return type of `controlValue()`.
- Remove redundant `as any` cast in `cvaControlCreate`: `parent` is typed as
  `FormField<unknown>`, so `state().controlValue` is `WritableSignal<unknown>`
  and accepts `unknown` directly.
@splincode splincode force-pushed the splincode/refactor-any-formts branch from f7fe404 to ee852a7 Compare April 28, 2026 06:28
@splincode splincode changed the title feat(forms): replace any with unknown in interop control value types refactor(forms): replace any with unknown in interop control value types Apr 28, 2026
@splincode
Copy link
Copy Markdown
Contributor Author

@kirjs Thank you, fixed

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

Labels

action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews area: forms detected: feature PR contains a feature commit target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants