Skip to content

Commit b7d6485

Browse files
committed
Merge pull request DefinitelyTyped#8622 from waywardmonkeys/fix-antd-notification
antd: Fix notification typings.
2 parents ae408e6 + f573342 commit b7d6485

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

antd/antd-tests.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import React = __React
2323
Menu,
2424
message,
2525
Modal,
26-
Notification,
26+
notification,
2727
Pagination,
2828
Popconfirm,
2929
Popover,
@@ -71,7 +71,7 @@ import Col from 'antd/lib/Col'
7171
import Menu from 'antd/lib/Menu'
7272
import message from 'antd/lib/message'
7373
import Modal from 'antd/lib/Modal'
74-
import Notification from 'antd/lib/Notification'
74+
import notification from 'antd/lib/notification'
7575
import Pagination from 'antd/lib/Pagination'
7676
import Popconfirm from 'antd/lib/Popconfirm'
7777
import Popover from 'antd/lib/Popover'
@@ -229,7 +229,7 @@ class App extends React.Component<any, any>{
229229

230230
Modal.info({ title: 'hello' });
231231
Modal.success({ cancelText: 'No' })
232-
Notification.success({
232+
notification.success({
233233
message: 'hello',
234234
description: 'test'
235235
})

antd/antd.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ declare namespace Antd {
924924
duration?: number
925925
}) => void
926926
/**
927-
* #Notification
927+
* #notification
928928
全局展示通知提醒信息。
929929
930930
## 何时使用
@@ -934,7 +934,7 @@ declare namespace Antd {
934934
- 较为复杂的通知内容。
935935
- 带有交互的通知,给出用户下一步的行动点。
936936
- 系统主动推送。*/
937-
export const Notification: {
937+
export const notification: {
938938
success: NotificationFunc
939939
error: NotificationFunc
940940
info: NotificationFunc
@@ -2017,8 +2017,8 @@ declare module 'antd/lib/message' {
20172017
declare module 'antd/lib/Modal' {
20182018
export default Antd.Modal
20192019
}
2020-
declare module 'antd/lib/Notification' {
2021-
export default Antd.Notification
2020+
declare module 'antd/lib/notification' {
2021+
export default Antd.notification
20222022
}
20232023
declare module 'antd/lib/Pagination' {
20242024
export default Antd.Pagination

0 commit comments

Comments
 (0)