Skip to content

Commit

Permalink
chore: Definition message.config type (#38723)
Browse files Browse the repository at this point in the history
* chore: message config ts

* chore: message config test case
  • Loading branch information
hms181231 committed Nov 19, 2022
1 parent 77ea403 commit 39689bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions components/message/__tests__/config.test.tsx
Expand Up @@ -61,7 +61,7 @@ describe('message.config', () => {
expect(div.querySelector('.ant-message')).toBeTruthy();

message.config({
getContainer: null,
getContainer: undefined,
});

document.body.removeChild(div);
Expand Down Expand Up @@ -89,7 +89,7 @@ describe('message.config', () => {
expect(document.querySelectorAll('.ant-message-notice')).toHaveLength(0);

message.config({
maxCount: null,
maxCount: undefined,
});
});

Expand Down Expand Up @@ -124,7 +124,7 @@ describe('message.config', () => {
expect(document.querySelector('.light-message-move-up')).toBeTruthy();

message.config({
prefixCls: null,
prefixCls: undefined,
});
});

Expand Down
2 changes: 1 addition & 1 deletion components/message/index.tsx
Expand Up @@ -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;
Expand Down

0 comments on commit 39689bd

Please sign in to comment.