Cookie <T>
Index
Constructors
constructor
Type parameters
- T: Record<string, any>
Parameters
__namedParameters: CookieOptions<T> = {}
Returns Cookie<T>
Accessors
attributes
Returns CookieAttributes
cookie attributes
Set cookie attributes
Parameters
attributes: CookieAttributes
cookie attributes
Returns void
Methods
get
Get cookie value
Type parameters
- Name: string
Parameters
name: Name
cookie name
Returns null | T[Name]
cookie value or
null
if cookie does not exist
has
Check if cookie exists
Type parameters
- Name: string
Parameters
name: Name
cookie name
Returns boolean
list
Get all cookies
Type parameters
- Cookies = T
Returns Cookies
all document cookies
remove
Remove cookie
Type parameters
- Name: string
Parameters
name: Name
cookie name
optionalattributes: CookieDomainAttributes
cookie domain attributes
Returns void
set
Set cookie value
Type parameters
- Name: string
Parameters
name: Name
cookie name
value: null | T[Name]
cookie value
optionalattributes: CookieAttributes
cookie attributes
Returns void
Get cookie attributes