mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
Using explicit single generic arguments with transforms (for example, input<boolean>(false, {transform: booleanAttribute})) previously failed overload resolution.
Before this fix, type-checking produced:
````
✘ [ERROR] TS2769: No overload matches this call.
Overload 1 of 5, '(initialValue: boolean, opts?: InputOptionsWithoutTransform<boolean> | undefined): InputSignal<boolean>', gave the following error.
Type '(value: unknown) => boolean' is not assignable to type 'undefined'.
Overload 2 of 5, '(initialValue: undefined, opts: InputOptionsWithoutTransform<boolean>): InputSignal<boolean | undefined>', gave the following error.
Argument of type 'true' is not assignable to parameter of type 'undefined'. [plugin angular-compiler]
```
This change adds specialized overloads for explicit read generics.
|
||
|---|---|---|
| .. | ||
| BUILD.bazel | ||
| input_signal_spec.ts | ||
| linked_signal_signature_test.ts | ||
| model_input_spec.ts | ||
| signal_input_signature_test.ts | ||
| signal_model_signature_test.ts | ||
| signal_queries_signature_test.ts | ||
| simple_changes_signature_test.ts | ||
| type_tester.ts | ||
| unwrap_writable_signal_signature_test.ts | ||