@@ -64,26 +64,26 @@ export class ToastrService {
64
64
}
65
65
}
66
66
/** show toast */
67
- show ( message ?: string , title ?: string , override : Partial < IndividualConfig > = { } , type = '' ) {
67
+ show < ConfigPayload = any > ( message ?: string , title ?: string , override : Partial < IndividualConfig < ConfigPayload > > = { } , type = '' ) {
68
68
return this . _preBuildNotification ( type , message , title , this . applyConfig ( override ) ) ;
69
69
}
70
70
/** show successful toast */
71
- success ( message ?: string , title ?: string , override : Partial < IndividualConfig > = { } ) {
71
+ success < ConfigPayload = any > ( message ?: string , title ?: string , override : Partial < IndividualConfig < ConfigPayload > > = { } ) {
72
72
const type = this . toastrConfig . iconClasses . success || '' ;
73
73
return this . _preBuildNotification ( type , message , title , this . applyConfig ( override ) ) ;
74
74
}
75
75
/** show error toast */
76
- error ( message ?: string , title ?: string , override : Partial < IndividualConfig > = { } ) {
76
+ error < ConfigPayload = any > ( message ?: string , title ?: string , override : Partial < IndividualConfig < ConfigPayload > > = { } ) {
77
77
const type = this . toastrConfig . iconClasses . error || '' ;
78
78
return this . _preBuildNotification ( type , message , title , this . applyConfig ( override ) ) ;
79
79
}
80
80
/** show info toast */
81
- info ( message ?: string , title ?: string , override : Partial < IndividualConfig > = { } ) {
81
+ info < ConfigPayload = any > ( message ?: string , title ?: string , override : Partial < IndividualConfig < ConfigPayload > > = { } ) {
82
82
const type = this . toastrConfig . iconClasses . info || '' ;
83
83
return this . _preBuildNotification ( type , message , title , this . applyConfig ( override ) ) ;
84
84
}
85
85
/** show warning toast */
86
- warning ( message ?: string , title ?: string , override : Partial < IndividualConfig > = { } ) {
86
+ warning < ConfigPayload = any > ( message ?: string , title ?: string , override : Partial < IndividualConfig < ConfigPayload > > = { } ) {
87
87
const type = this . toastrConfig . iconClasses . warning || '' ;
88
88
return this . _preBuildNotification ( type , message , title , this . applyConfig ( override ) ) ;
89
89
}
0 commit comments