mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Add parameters to callbacks for bootstrap-notify
This commit is contained in:
parent
fd67ee7268
commit
de1439e667
@ -46,4 +46,21 @@ $.notify({
|
||||
'</div>' +
|
||||
'<a href="{3}" target="{4}" data-notify="url"></a>' +
|
||||
'</div>'
|
||||
});
|
||||
});
|
||||
|
||||
const notifyResult = $.notify({
|
||||
message: 'Callbacks have the popup element as an argument',
|
||||
},{
|
||||
onShow: function($ele) {
|
||||
notifyResult.$ele === $ele;
|
||||
},
|
||||
onShown: function($ele) {
|
||||
notifyResult.$ele === $ele;
|
||||
},
|
||||
onClose: function($ele) {
|
||||
notifyResult.$ele === $ele;
|
||||
},
|
||||
onClosed: function($ele) {
|
||||
notifyResult.$ele === $ele;
|
||||
},
|
||||
});
|
||||
|
||||
10
types/bootstrap-notify/index.d.ts
vendored
10
types/bootstrap-notify/index.d.ts
vendored
@ -48,16 +48,16 @@ interface NotifySettings {
|
||||
enter?: string;
|
||||
exit?: string;
|
||||
};
|
||||
onShow?: () => void;
|
||||
onShown?: () => void;
|
||||
onClose?: () => void;
|
||||
onClosed?: () => void;
|
||||
onShow?: ($ele: JQuery) => void;
|
||||
onShown?: ($ele: JQuery) => void;
|
||||
onClose?: ($ele: JQuery) => void;
|
||||
onClosed?: ($ele: JQuery) => void;
|
||||
icon_type?: string;
|
||||
template?: string;
|
||||
}
|
||||
|
||||
interface NotifyReturn {
|
||||
$ele: JQueryStatic;
|
||||
$ele: JQuery;
|
||||
close: () => void;
|
||||
update: (command: string, update: any) => void;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user