We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If you use this in a typescript Vue component, e.g.
this.$cookies.set('foo', resp, { secure: true });
You will get an error like this:
TS2339: Property '$cookies' does not exist on type
The underlying problem is the contents of https://github.com/S64/vue-universal-cookies/blob/master/packages/vue-universal-cookies/typings/vue.d.ts are not included in dist/index.d.ts . I haven't been able to find a way to get these ambient declarations included in index.d.ts.
My current workaround is to write:
import 'vue-universal-cookies/typings/vue'
in my component.
The text was updated successfully, but these errors were encountered:
Stuck on the same issue. If you do find the solution then please help me out with , on https://stackoverflow.com/questions/52775027/vue-compiler-unable-to-parse-cookies Thank you :)
Sorry, something went wrong.
In my nuxt project worked by adding in tsconfig.json "types": [ ... "cookie-universal-nuxt", ]
"types": [ ... "cookie-universal-nuxt", ]
"types": [ ... "cookie-universal-nuxt", ] adding in tsconfig.json
I just figure something hope this helps
const { $cookiz }:any = this console.log($cookiz.get('storeAddress'));
const { $cookiz }:any = this.$root.$options console.log($cookiz.get('storeAddress'));
Exactly what I was looking for, thanks a lot!
No branches or pull requests
If you use this in a typescript Vue component, e.g.
You will get an error like this:
The underlying problem is the contents of https://github.com/S64/vue-universal-cookies/blob/master/packages/vue-universal-cookies/typings/vue.d.ts are not included in dist/index.d.ts . I haven't been able to find a way to get these ambient declarations included in index.d.ts.
My current workaround is to write:
in my component.
The text was updated successfully, but these errors were encountered: