Closed dirknilius closed 3 years ago
@williamcruzme BTW: I would be able to submit a PR if that helps.
Hey @dirknilius, thank you for the help!
I was reviewing your solution. I don't use app: _Vue
because it would no longer be compatible with Vue 3, so I use app: any
Are you sure that using "static" would still work correctly with Vue 2 and Vue 3? š¤
Problem
The
VueGates
declaration is defined like this:This won't work and gives a compile error:
Reason
The class is used as
typeOf
parameter when register the plugin like this:Fix
The
install
method declared must bestatic
:This is how other
Vue
plugins withTypeScript
support declare the types.I would also suggest to use a proper parameter type for
app
like this: