From c3b72a6ee28fe3c5fc63d51b5616c31bb565b462 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Tue, 23 Nov 2021 01:23:33 +0100 Subject: [PATCH] fix(types): cookie options are optional --- packages/nuxt3/src/app/composables/cookie.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nuxt3/src/app/composables/cookie.ts b/packages/nuxt3/src/app/composables/cookie.ts index cafb4e3813..ad18a17d04 100644 --- a/packages/nuxt3/src/app/composables/cookie.ts +++ b/packages/nuxt3/src/app/composables/cookie.ts @@ -19,7 +19,7 @@ const CookieDefaults: CookieOptions = { encode: val => encodeURIComponent(typeof val === 'string' ? val : JSON.stringify(val)) } -export function useCookie (name: string, _opts: CookieOptions): CookieRef { +export function useCookie (name: string, _opts?: CookieOptions): CookieRef { const opts = { ...CookieDefaults, ..._opts } const cookies = readRawCookies(opts)