fix(forms): match getError and hasError to get method signature (#20211)
Internally getError and hasError call the AbstractControl#get method which takes `path: Array<string | number> | string` as input, since there are different ways to traverse the AbstractControl tree. This change matches the method signitures of all methods that use this. PR Close #20211
This commit is contained in:
8
tools/public_api_guard/forms/forms.d.ts
vendored
8
tools/public_api_guard/forms/forms.d.ts
vendored
@ -30,8 +30,8 @@ export declare abstract class AbstractControl {
|
||||
emitEvent?: boolean;
|
||||
}): void;
|
||||
get(path: Array<string | number> | string): AbstractControl | null;
|
||||
getError(errorCode: string, path?: string[]): any;
|
||||
hasError(errorCode: string, path?: string[]): boolean;
|
||||
getError(errorCode: string, path?: Array<string | number> | string): any;
|
||||
hasError(errorCode: string, path?: Array<string | number> | string): boolean;
|
||||
markAsDirty(opts?: {
|
||||
onlySelf?: boolean;
|
||||
}): void;
|
||||
@ -80,8 +80,8 @@ export declare abstract class AbstractControlDirective {
|
||||
readonly valid: boolean | null;
|
||||
readonly value: any;
|
||||
readonly valueChanges: Observable<any> | null;
|
||||
getError(errorCode: string, path?: string[]): any;
|
||||
hasError(errorCode: string, path?: string[]): boolean;
|
||||
getError(errorCode: string, path?: Array<string | number> | string): any;
|
||||
hasError(errorCode: string, path?: Array<string | number> | string): boolean;
|
||||
reset(value?: any): void;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user