@supabase/ssr
should include @types/cookie
as a (non-dev) dependency
#1568
Labels
@supabase/ssr
should include @types/cookie
as a (non-dev) dependency
#1568
Bug report
Describe the bug
The server client example for NextJS setups throws errors with stricter TS/ESLint configs (specifically with the
@typescript-eslint/no-unsafe-argument
rule):It's not immediately obvious when trying to debug but
{ name, value, ...options }
evaluates toany
. This is becauseCookieOptions
is an alias for a type provided by the@types/cookie
package, but this is a devDependency, so it's not being installed with@supabase/ssr
:As is,
CookieOptions
is basically an obscuredany
type, which only makes the type issues harder to debug.To Reproduce
Attempt to use the server client example in any project with
@typescript-eslint/no-unsafe-argument
set toerror
.Expected behavior
This can be fixed by adding
@types/cookie
to a project manually, but it would be better to include the package with@supabase/ssr
.The text was updated successfully, but these errors were encountered: