From 964e21fc62eb97a95eced5135f813f3b35da66c0 Mon Sep 17 00:00:00 2001 From: Guo Yunhe Date: Fri, 28 Nov 2025 17:23:42 +0800 Subject: [PATCH] feat(ErrorBoundary): export ErrorBoundaryProps type (#55974)w --- components/alert/ErrorBoundary.tsx | 2 +- components/alert/index.tsx | 1 + components/index.ts | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/components/alert/ErrorBoundary.tsx b/components/alert/ErrorBoundary.tsx index 0d9c4d4417..3f1cf34d3d 100644 --- a/components/alert/ErrorBoundary.tsx +++ b/components/alert/ErrorBoundary.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import Alert from './Alert'; -interface ErrorBoundaryProps { +export interface ErrorBoundaryProps { title?: React.ReactNode; /** * @deprecated please use `title` instead. diff --git a/components/alert/index.tsx b/components/alert/index.tsx index a9f01e8343..569ba3b551 100644 --- a/components/alert/index.tsx +++ b/components/alert/index.tsx @@ -2,6 +2,7 @@ import InternalAlert from './Alert'; import ErrorBoundary from './ErrorBoundary'; export type { AlertProps } from './Alert'; +export type { ErrorBoundaryProps } from './ErrorBoundary'; type CompoundedComponent = typeof InternalAlert & { ErrorBoundary: typeof ErrorBoundary; diff --git a/components/index.ts b/components/index.ts index d8ca50451c..3b4369c4ab 100644 --- a/components/index.ts +++ b/components/index.ts @@ -6,7 +6,7 @@ export type { GetProp, GetProps, GetRef } from './_util/type'; export { default as Affix } from './affix'; export type { AffixProps, AffixRef } from './affix'; export { default as Alert } from './alert'; -export type { AlertProps } from './alert'; +export type { AlertProps, ErrorBoundaryProps } from './alert'; export { default as Anchor } from './anchor'; export type { AnchorLinkProps, AnchorProps } from './anchor'; export { default as App } from './app';