Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No overload matches this call- error #23

Open
candaceflyn opened this issue Nov 29, 2023 · 0 comments
Open

No overload matches this call- error #23

candaceflyn opened this issue Nov 29, 2023 · 0 comments

Comments

@candaceflyn
Copy link

the code i'm using --
password = new FormControl('', [
Validators.required,
hasExclamationMark
]);
but i'm not able to resolve the errors
ang-noMatch error
TS2769: No overload matches this call.
Overload 1 of 5, '(value: string | FormControlState, opts: FormControlOptions, asyncValidator: AsyncValidatorFn | AsyncValidatorFn[]): FormControl<...>', gave the following error.
Type '((control: AbstractControl<any, any>) => ValidationErrors | null)[]' has no properties in common with type 'FormControlOptions'.
Overload 2 of 5, '(value: string | FormControlState, validatorOrOpts?: FormControlOptions | ValidatorFn | ValidatorFn[] | null | undefined, asyncValidator?: AsyncValidatorFn | ... 2 more ... | undefined): FormControl<...>', gave the following error.
Type '(input: FormControl) => { needsExclamation: boolean; } | null' is not assignable to type 'AsyncValidatorFn'.
Types of parameters 'input' and 'control' are incompatible.
Type 'AbstractControl<any, any>' is missing the following properties from type 'FormControl': defaultValue, registerOnChange, registerOnDisabledChange
src/app/app.component.ts:19:13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant