Skip to content

Comments

refactor(forms): hide adapter in public options#67249

Open
kirjs wants to merge 1 commit intoangular:mainfrom
kirjs:drop-adapter
Open

refactor(forms): hide adapter in public options#67249
kirjs wants to merge 1 commit intoangular:mainfrom
kirjs:drop-adapter

Conversation

@kirjs
Copy link
Contributor

@kirjs kirjs commented Feb 24, 2026

Moves adapter to internal options to prevent exposure but keep compatibility.

@ngbot ngbot bot added this to the Backlog milestone Feb 24, 2026
Moves adapter to internal options to prevent exposure but keep compatibility.
Copy link
Contributor

@leonsenft leonsenft left a comment

Choose a reason for hiding this comment

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

You'll want to update the public API.

Oh interesting, adapter currently isn't listed on FormOptions in the API: https://angular.dev/api/forms/signals/FormOptions

Is that because it's type wasn't exported?

Edit again: I linked the wrong thing. angular.dev does include the adapter, but our goldens do not: https://github.com/angular/angular/blob/main/goldens/public-api/forms/signals/index.api.md.

Edit^3: I forgot because we've been targeting minor instead of patch, that the live API docs are out of date: https://next.angular.dev/api/forms/signals/FormOptions#


export function form<TModel>(...args: any[]): FieldTree<TModel> {
const [model, schema, options] = normalizeFormArgs<TModel>(args);
const [model, schema, options] = normalizeFormArgs<
Copy link
Contributor

Choose a reason for hiding this comment

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

normalizeFormArgs isn't a public API, so rather than generalizing it, can we just bake the FormAdapter into it's return type?

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.

2 participants