diff --git a/components/message/__tests__/config.test.tsx b/components/message/__tests__/config.test.tsx index 9cc49bee87..d1c749646e 100644 --- a/components/message/__tests__/config.test.tsx +++ b/components/message/__tests__/config.test.tsx @@ -61,7 +61,7 @@ describe('message.config', () => { expect(div.querySelector('.ant-message')).toBeTruthy(); message.config({ - getContainer: null, + getContainer: undefined, }); document.body.removeChild(div); @@ -89,7 +89,7 @@ describe('message.config', () => { expect(document.querySelectorAll('.ant-message-notice')).toHaveLength(0); message.config({ - maxCount: null, + maxCount: undefined, }); }); @@ -124,7 +124,7 @@ describe('message.config', () => { expect(document.querySelector('.light-message-move-up')).toBeTruthy(); message.config({ - prefixCls: null, + prefixCls: undefined, }); }); diff --git a/components/message/index.tsx b/components/message/index.tsx index 09a6b2562f..d03662ebea 100755 --- a/components/message/index.tsx +++ b/components/message/index.tsx @@ -313,7 +313,7 @@ function destroy(key: React.Key) { const baseStaticMethods: { open: (config: ArgsProps) => MessageType; destroy: (key?: React.Key) => void; - config: any; + config: typeof setMessageGlobalConfig; useMessage: typeof useMessage; /** @private Internal Component. Do not use in your production. */ _InternalPanelDoNotUseOrYouWillBeFired: typeof PurePanel;