-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The Property '$snotify' does not exist #74
Comments
I've been able to do this in my router by calling |
Hey all! 👋 You need to extends VueJs types. import Vue from 'vue'
import { SnotifyService } from 'vue-snotify/SnotifyService'
declare module 'vue/types/vue' {
interface Vue {
$snotify: SnotifyService
}
} This code will extends the Vue interface and add The best would be to have this library handle this for us. |
@RomainLanz 's answser was exactly what I needed - this wasn't obvious at all nor easy to find, and wasn't mentioned anywhere in the docs!! |
I'm trying to use vue-snotify in a Vue.js TypeScript project.
At the moment, I'm importing and using it:
I'm trying to show a toast in the global Vue.config.errorHandler. But the property $snotify isn't available on the global Vue instance like:
Vue.$snotify.success(...
Are there any other ways of doing this?
The text was updated successfully, but these errors were encountered: