UNPKG

@commercelayer/react-components

Version:
17 lines (16 loc) 634 B
import type { LineItem } from '@commercelayer/sdk'; import type { BaseError } from '../../typings/errors'; import type { TResourceError } from '../errors/Errors'; import type { JSX } from "react"; export interface AllErrorsParams { allErrors: BaseError[]; messages: BaseError[]; field?: string; props: Omit<JSX.IntrinsicElements['span'], 'ref'>; lineItem?: LineItem | null; resource?: TResourceError; returnHtml?: boolean; } export type GetAllErrors = <P extends AllErrorsParams>(params: P) => Array<JSX.Element | string | undefined>; declare const getAllErrors: GetAllErrors; export default getAllErrors;