From cc1df3ec682d0108666890a08c97b62ba3221b8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magyar=20Bal=C3=A1zs?= Date: Sun, 6 Nov 2022 13:21:30 -0800 Subject: [PATCH] Fixed cookie value type ### Discussed in https://github.com/nuxt/framework/discussions/2576 The cookie.value is typed as string, so // @ts-ignore must be used to do this. I have fixed the types, so the cookie can be deleted without a ts error. --- packages/nuxt/src/app/composables/cookie.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/nuxt/src/app/composables/cookie.ts b/packages/nuxt/src/app/composables/cookie.ts index 9df2d82852e..3268fd16c7e 100644 --- a/packages/nuxt/src/app/composables/cookie.ts +++ b/packages/nuxt/src/app/composables/cookie.ts @@ -15,7 +15,9 @@ export interface CookieOptions extends _CookieOptions { default?: () => T | Ref } -export interface CookieRef extends Ref {} +export interface CookieRef extends Ref { + value: T | null | undefined; +} const CookieDefaults: CookieOptions = { path: '/',