diff --git a/types/cookies/cookies-tests.ts b/types/cookies/cookies-tests.ts index 094357e093..ef61a76c80 100644 --- a/types/cookies/cookies-tests.ts +++ b/types/cookies/cookies-tests.ts @@ -26,6 +26,9 @@ const server = http.createServer((req, res) => { .set("tampered", "baz") .set("tampered.sig", "bogus") + // delete cookie but pass options + .set("removed", { signed: true }) + // sameSite option .set("samesite", "same", {sameSite: 'lax'}) .set("samesite", "same", {sameSite: 'strict'}) diff --git a/types/cookies/index.d.ts b/types/cookies/index.d.ts index eef7bbdc80..7c5a07522f 100644 --- a/types/cookies/index.d.ts +++ b/types/cookies/index.d.ts @@ -29,7 +29,8 @@ interface Cookies { * the current context to allow chaining.If the value is omitted, * an outbound header with an expired date is used to delete the cookie. */ - set(name: string, value?: string, opts?: Cookies.SetOption): this; + set(name: string, value: string, opts?: Cookies.SetOption): this; + set(name: string, opts?: Cookies.SetOption): this; } declare namespace Cookies {