From a3a64dca7308bb5d3cbaa57c0030366d33c41741 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=81=8F=E5=8F=B3?= Date: Tue, 15 Dec 2020 14:52:17 +0800 Subject: [PATCH] fix: message.loading return hide type (#28362) --- components/message/__tests__/type.test.tsx | 5 +++++ components/message/index.tsx | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/components/message/__tests__/type.test.tsx b/components/message/__tests__/type.test.tsx index 1462ea4f6a..a29914c56f 100644 --- a/components/message/__tests__/type.test.tsx +++ b/components/message/__tests__/type.test.tsx @@ -23,4 +23,9 @@ describe('message.typescript', () => { }, ); }); + + it('hide', () => { + const hide = message.loading('doing...'); + hide(); + }); }); diff --git a/components/message/index.tsx b/components/message/index.tsx index f4ed6baae4..48cd765fe8 100755 --- a/components/message/index.tsx +++ b/components/message/index.tsx @@ -106,7 +106,9 @@ export interface ThenableArgument { (val: any): void; } -export interface MessageType extends PromiseLike {} +export interface MessageType extends PromiseLike { + (): void; +} const typeToIcon = { info: InfoCircleFilled,