@ansible/ansible-ui-framework
Version:
A framework for building applications using PatternFly.
13 lines (12 loc) • 397 B
TypeScript
import React from 'react';
export interface GenericErrorDetail {
message: string | React.ReactNode;
}
export interface FieldErrorDetail extends GenericErrorDetail {
name: string;
}
export interface ErrorOutput {
genericErrors: GenericErrorDetail[];
fieldErrors: FieldErrorDetail[];
}
export type ErrorAdapter = (error: unknown, mappedKeys?: Record<string, string>) => ErrorOutput;