From 5471db8383bfe7dae355e50778a3969e1e43f5d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=B6=E6=9E=AB?= <7971419+crazyair@users.noreply.github.com> Date: Wed, 31 Dec 2025 17:03:15 +0800 Subject: [PATCH 1/8] type: fix modal type (#56441) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: fix modal type * fix: add type * feat: add warn deprecated --------- Co-authored-by: 遇见同学 <1875694521@qq.com> --- components/modal/confirm.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/components/modal/confirm.tsx b/components/modal/confirm.tsx index 08cd2e5050..c1b4e81566 100644 --- a/components/modal/confirm.tsx +++ b/components/modal/confirm.tsx @@ -22,7 +22,15 @@ export type ModalFunc = (props: ModalFuncProps) => { update: (configUpdate: ConfigUpdate) => void; }; -export type ModalStaticFunctions = Record, ModalFunc>; +export type ModalStaticFunctions = { + info: ModalFunc; + success: ModalFunc; + error: ModalFunc; + warning: ModalFunc; + confirm: ModalFunc; + /** @deprecated Please use `warning` instead */ + warn: ModalFunc; +}; const ConfirmDialogWrapper: React.FC = (props) => { const { prefixCls: customizePrefixCls, getContainer, direction } = props; From e2f3cf6133a8ffa80ba9f7667df1f0c50deda63a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8C=E8=B4=A7=E7=88=B1=E5=90=83=E7=99=BD=E8=90=9D?= =?UTF-8?q?=E5=8D=9C?= Date: Wed, 31 Dec 2025 17:50:18 +0800 Subject: [PATCH 2/8] test: update test case (#56451) --- .../__snapshots__/components.test.tsx.snap | 14 ---- .../__snapshots__/demo-extend.test.ts.snap | 1 - .../__snapshots__/demo.test.tsx.snap | 1 - .../__snapshots__/demo-extend.test.tsx.snap | 3 - .../__snapshots__/demo-extend.test.ts.snap | 11 --- .../__snapshots__/demo.test.tsx.snap | 11 --- .../__snapshots__/pagination.test.tsx.snap | 1 - .../__snapshots__/index.test.tsx.snap | 71 ------------------- .../__snapshots__/demo-extend.test.ts.snap | 19 ----- .../__tests__/__snapshots__/demo.test.ts.snap | 19 ----- .../__snapshots__/index.test.tsx.snap | 1 - .../__snapshots__/demo-extend.test.ts.snap | 1 - .../__tests__/__snapshots__/demo.test.ts.snap | 1 - .../__snapshots__/demo-extend.test.ts.snap | 4 -- .../__tests__/__snapshots__/demo.test.ts.snap | 6 -- .../__snapshots__/demo-extend.test.ts.snap | 1 - package.json | 6 +- 17 files changed, 3 insertions(+), 168 deletions(-) diff --git a/components/config-provider/__tests__/__snapshots__/components.test.tsx.snap b/components/config-provider/__tests__/__snapshots__/components.test.tsx.snap index e953bcfebd..2cbf434ab2 100644 --- a/components/config-provider/__tests__/__snapshots__/components.test.tsx.snap +++ b/components/config-provider/__tests__/__snapshots__/components.test.tsx.snap @@ -18614,7 +18614,6 @@ exports[`ConfigProvider components Pagination configProvider 1`] = ` class="config-pagination-options" >