Open igorfraa opened 1 year ago
Hello, I use vue-cookies TypeScript and analyser says that injected cookies could be undefined.
const cookies = inject<VueCookies>('$cookies') cookies.set('my_cookie', btoa(cookieVal))
The warning got easily suppressed with optional chaining (cookies?.set()), but it look a little weird due const not assumed to be undefined any way.
cookies?.set()
Hello, I use vue-cookies TypeScript and analyser says that injected cookies could be undefined.
The warning got easily suppressed with optional chaining (
cookies?.set()
), but it look a little weird due const not assumed to be undefined any way.