Skip to content

Commit 242de6a

Browse files
fix(signal-forms-part3): Remove unused imports and simplify types (#87)
- Remove unused `WithOptionalField` import from `@angular/forms/signals` - Simplify `errors` input type from `readonly WithOptionalField<ValidationError>[]` to `readonly ValidationError[]` - Improve code clarity by removing unnecessary type wrapper
1 parent eee1a22 commit 242de6a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

blog/2025-10-signal-forms-part3/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ mail: mail@d-koppenhagen.de
55
author2: Ferdinand Malcher
66
mail2: mail@fmalcher.de
77
published: 2025-10-20
8-
lastModified: 2026-02-21
8+
lastModified: 2026-04-01
99
keywords:
1010
- Angular
1111
- Signals
@@ -283,12 +283,12 @@ The inputs `label` and `selectOptions` receive the label for the form control an
283283

284284
```typescript
285285
import { Component, effect, input, model } from '@angular/core';
286-
import { FormValueControl, ValidationError, WithOptionalField } from '@angular/forms/signals';
286+
import { FormValueControl, ValidationError } from '@angular/forms/signals';
287287

288288
@Component({ /* ... */ })
289289
export class Multiselect implements FormValueControl<string[]> {
290290
readonly value = model<string[]>([]);
291-
readonly errors = input<readonly WithOptionalField<ValidationError>[]>([]);
291+
readonly errors = input<readonly ValidationError[]>([]);
292292
readonly disabled = input<boolean>(false);
293293

294294
readonly selectOptions = input.required<string[]>();

0 commit comments

Comments
 (0)