-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Description
- I have searched the issues of this repository and believe that this is not a duplicate.
What problem does this feature solve?
I want to write my code such example in Ant design documentation
this.$notification[type]({
message: title,
description: description,
placement: 'bottomRight'
})
But using TypeScript in my project I need to write
this.$notification.warning({
message: title,
description: description,
placement: 'bottomRight'
})
Because class Notification hasn't index signature
What does the proposed API look like?
export declare class Notification {
[s: string]: (config: NotificationOptions) => void
...
}
instead type string we can declare enum with Notification property keys