mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 02:59:04 +08:00
type: type optimization (#38381)
Co-authored-by: jiang_chunqiao <chunqiao_jiang@icloud.com>
This commit is contained in:
parent
53bea24110
commit
e80e40b764
@ -7,15 +7,14 @@ interface ErrorBoundaryProps {
|
||||
children?: React.ReactNode;
|
||||
}
|
||||
|
||||
export default class ErrorBoundary extends React.Component<
|
||||
ErrorBoundaryProps,
|
||||
{
|
||||
error?: Error | null;
|
||||
info: {
|
||||
componentStack?: string;
|
||||
};
|
||||
}
|
||||
> {
|
||||
interface ErrorBoundaryStates {
|
||||
error?: Error | null;
|
||||
info?: {
|
||||
componentStack?: string;
|
||||
};
|
||||
}
|
||||
|
||||
class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryStates> {
|
||||
state = {
|
||||
error: undefined,
|
||||
info: {
|
||||
@ -41,3 +40,5 @@ export default class ErrorBoundary extends React.Component<
|
||||
return children;
|
||||
}
|
||||
}
|
||||
|
||||
export default ErrorBoundary;
|
||||
|
Loading…
Reference in New Issue
Block a user