refactor(forms): relax [formField] input type from FieldTree to Field

`FieldTree` was an unnecessarily specific type for the `[formField]`
input. It forced the directive to care about what _kind_ of `FieldTree`
was bound–specifically whether it was Reactive Forms compatible or not.
This made it difficult to author forms system-agnostic components with
passthrough `[formField]` inputs.
This commit is contained in:
Leon Senft
2026-02-11 11:45:20 -08:00
committed by GitHub
parent 39cff9c235
commit 3606902b33
9 changed files with 45 additions and 30 deletions
@@ -48,7 +48,7 @@ runInEachFileSystem(() => {
const diags = env.driveDiagnostics();
expect(diags.length).toBe(1);
expect(extractMessage(diags[0])).toBe(
`Type 'null' is not assignable to type 'FieldTree<any, string | number>'.`,
`Type 'null' is not assignable to type 'Field<any, string | number>'.`,
);
});
@@ -70,7 +70,7 @@ runInEachFileSystem(() => {
const diags = env.driveDiagnostics();
expect(diags.length).toBe(1);
expect(extractMessage(diags[0])).toBe(
`Type 'string' is not assignable to type 'FieldTree<any, string | number>'.`,
`Type 'string' is not assignable to type 'Field<any, string | number>'.`,
);
});