mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-04-24 06:17:08 -04:00
Properly type validation errors/warnings
This commit is contained in:
parent
e5f19f01fa
commit
20273b07ad
1 changed files with 16 additions and 2 deletions
|
@ -1,7 +1,21 @@
|
|||
export interface ValidationFailure {
|
||||
propertyName: string;
|
||||
errorMessage: string;
|
||||
severity: 'error' | 'warning';
|
||||
}
|
||||
|
||||
export interface ValidationError extends ValidationFailure {
|
||||
isWarning: false;
|
||||
}
|
||||
|
||||
export interface ValidationWarning extends ValidationFailure {
|
||||
isWarning: true;
|
||||
}
|
||||
|
||||
export interface Pending<T> {
|
||||
value: T;
|
||||
errors: any[];
|
||||
warnings: any[];
|
||||
errors: ValidationError[];
|
||||
warnings: ValidationWarning[];
|
||||
}
|
||||
|
||||
export type PendingSection<T> = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue