Skip to content

Commit

Permalink
fix: typescript 4.0 breaking changes (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisguttandin committed Dec 10, 2020
1 parent f3d7b92 commit ecc1d6f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions projects/ngneat/reactive-forms/src/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ import { FormGroup } from './formGroup';
import { PersistManager } from './persistManager';

export type ValidationErrors<T = NgValidationErrors> = T;
export type ValidatorFn<T = any, E = any> = (control: AbstractControl<T>) => ValidationErrors<E> | null;
export type ValidatorFn<T = any, E = any> = (
control: AbstractControl<T> | NgAbstractControl
) => ValidationErrors<E> | null;
export type AsyncValidatorFn<T = any, E = any> = (
control: AbstractControl<T>
control: AbstractControl<T> | NgAbstractControl
) => Promise<ValidationErrors<E> | null> | Observable<ValidationErrors<E> | null>;

export interface AbstractControlOptions<T = any, E = any> extends NgAbstractControlOptions {
Expand Down

0 comments on commit ecc1d6f

Please sign in to comment.