1👍
Please use ()=>void instead of Function Type.
let masquerNotification: () => void = () => {
if (notification.value && notification.value.message !== '') {
masquerNotification = $q.notify({
type: notification.value.type,
message: notification.value.message,
position: 'bottom-right',
timeout: notification.value.timeout,
actions: [{ icon: 'close', color: 'white' }],
});
void nettoyerNotification();
}
if (notification.value.masquer) {
masquerNotification();
}
};
or
let masquerNotification: () => void = () => {
function afficherNotification(){
if (notification.value && notification.value.message !== '') {
masquerNotification = $q.notify({
type: notification.value.type,
message: notification.value.message,
position: 'bottom-right',
timeout: notification.value.timeout,
actions: [{ icon: 'close', color: 'white' }],
});
void nettoyerNotification();
}
if (notification.value.masquer) {
masquerNotification();
}
}
};
- [Vuejs]-Vuejs loop over in data results not on how many fields i have
- [Vuejs]-Can I use Vue extension when developing a Chrome extension using Vue CSP mode?
Source:stackexchange.com