zent
Version:
一套前端设计语言和基于React的实现
27 lines (26 loc) • 984 B
TypeScript
import { IMaybeError, IFormContext, BasicModel } from './formulr';
import { Component } from 'react';
export interface ICombineErrorsProps {
names?: string[];
models?: BasicModel<any>[];
children?: (error: IMaybeError<any>) => React.ReactNode;
}
export interface ICombineErrorState {
error: IMaybeError<any>;
}
export declare class CombineErrors extends Component<ICombineErrorsProps, ICombineErrorState> {
static contextType: import("react").Context<IFormContext>;
context: IFormContext;
private $;
private $parent;
state: ICombineErrorState;
private parentChildrenChange;
setError: (error: IMaybeError<unknown>) => void;
subscribe(): void;
unsubscribe(): void;
shouldComponentUpdate(nextProps: ICombineErrorsProps, nextState: ICombineErrorState): boolean;
componentDidMount(): void;
componentDidUpdate(prevProps: ICombineErrorsProps): void;
componentWillUnmount(): void;
render(): import("react").ReactNode;
}