Skip to content

Commit

Permalink
fix(utils/cookie): partitioned typo in CookieOptions (#3566)
Browse files Browse the repository at this point in the history
  • Loading branch information
imcotton authored Oct 27, 2024
1 parent f55dc45 commit 3a59d86
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/utils/cookie.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import { decodeURIComponent_ } from './url'
export type Cookie = Record<string, string>
export type SignedCookie = Record<string, string | false>

type PartitionCookieConstraint =
| { partition: true; secure: true }
| { partition?: boolean; secure?: boolean } // reset to default
type PartitionedCookieConstraint =
| { partitioned: true; secure: true }
| { partitioned?: boolean; secure?: boolean } // reset to default
type SecureCookieConstraint = { secure: true }
type HostCookieConstraint = { secure: true; path: '/'; domain?: undefined }

Expand All @@ -25,7 +25,7 @@ export type CookieOptions = {
sameSite?: 'Strict' | 'Lax' | 'None' | 'strict' | 'lax' | 'none'
partitioned?: boolean
prefix?: CookiePrefixOptions
} & PartitionCookieConstraint
} & PartitionedCookieConstraint
export type CookiePrefixOptions = 'host' | 'secure'

export type CookieConstraint<Name> = Name extends `__Secure-${string}`
Expand Down

0 comments on commit 3a59d86

Please sign in to comment.