I am currently utilizing Vue Class Component alongside TypeScript and I find the need to enhance the types in order to incorporate a third-party module.
component
export default class TestComponent extends Vue {
private created() {
this.$snotify.success('test')
}
}
shims.d.ts
import Vue from 'vue'
import { Snotify } from 'vue-snotify'
declare module 'vue/types/vue' {
interface VueConstructor {
$snotify: Snotify
}
}
"Property $snotify does not exist on type TestComponent"
Although Vue.$snotify exists, it appears that this.$snotify is not recognized even when extending Vue itself.
Can you spot where my mistake lies?