-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace derived
CreateCookieOptions
with explicit type
- Loading branch information
1 parent
55387ef
commit 20f629c
Showing
12 changed files
with
512 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,306 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [tough-cookie](./tough-cookie.md) > [CreateCookieOptions](./tough-cookie.createcookieoptions.md) | ||
|
||
## CreateCookieOptions interface | ||
|
||
Configurable values that can be set when creating a [Cookie](./tough-cookie.cookie.md)<!-- -->. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
export interface CreateCookieOptions | ||
``` | ||
|
||
## Properties | ||
|
||
<table><thead><tr><th> | ||
|
||
Property | ||
|
||
|
||
</th><th> | ||
|
||
Modifiers | ||
|
||
|
||
</th><th> | ||
|
||
Type | ||
|
||
|
||
</th><th> | ||
|
||
Description | ||
|
||
|
||
</th></tr></thead> | ||
<tbody><tr><td> | ||
|
||
[creation?](./tough-cookie.createcookieoptions.creation.md) | ||
|
||
|
||
</td><td> | ||
|
||
|
||
</td><td> | ||
|
||
Date \| 'Infinity' \| null | ||
|
||
|
||
</td><td> | ||
|
||
_(Optional)_ Set to the date and time when a Cookie is initially stored or a matching cookie is received that replaces an existing cookie (See [RFC6265 Section 5.3](https://www.rfc-editor.org/rfc/rfc6265.html#section-5.3)<!-- -->). | ||
|
||
Also used to maintain ordering among cookies. Among cookies that have equal-length path fields, cookies with earlier creation-times are listed before cookies with later creation-times (See [RFC6265 Section 5.4](https://www.rfc-editor.org/rfc/rfc6265.html#section-5.4)<!-- -->). | ||
|
||
|
||
</td></tr> | ||
<tr><td> | ||
|
||
[domain?](./tough-cookie.createcookieoptions.domain.md) | ||
|
||
|
||
</td><td> | ||
|
||
|
||
</td><td> | ||
|
||
string \| null | ||
|
||
|
||
</td><td> | ||
|
||
_(Optional)_ The 'Domain' attribute of the cookie represents the domain the cookie belongs to (See [RFC6265 Section 5.2.3](https://www.rfc-editor.org/rfc/rfc6265.html#section-5.2.3)<!-- -->). | ||
|
||
|
||
</td></tr> | ||
<tr><td> | ||
|
||
[expires?](./tough-cookie.createcookieoptions.expires.md) | ||
|
||
|
||
</td><td> | ||
|
||
|
||
</td><td> | ||
|
||
Date \| 'Infinity' \| null | ||
|
||
|
||
</td><td> | ||
|
||
_(Optional)_ The 'Expires' attribute of the cookie (See [RFC6265 Section 5.2.1](https://www.rfc-editor.org/rfc/rfc6265.html#section-5.2.1)<!-- -->). | ||
|
||
|
||
</td></tr> | ||
<tr><td> | ||
|
||
[extensions?](./tough-cookie.createcookieoptions.extensions.md) | ||
|
||
|
||
</td><td> | ||
|
||
|
||
</td><td> | ||
|
||
string\[\] \| null | ||
|
||
|
||
</td><td> | ||
|
||
_(Optional)_ Contains attributes which are not part of the defined spec but match the `extension-av` syntax defined in Section 4.1.1 of RFC6265 (See [RFC6265 Section 4.1.1](https://www.rfc-editor.org/rfc/rfc6265.html#section-4.1.1)<!-- -->). | ||
|
||
|
||
</td></tr> | ||
<tr><td> | ||
|
||
[hostOnly?](./tough-cookie.createcookieoptions.hostonly.md) | ||
|
||
|
||
</td><td> | ||
|
||
|
||
</td><td> | ||
|
||
boolean \| null | ||
|
||
|
||
</td><td> | ||
|
||
_(Optional)_ A boolean flag indicating if a cookie is a host-only cookie (i.e.; when the request's host exactly matches the domain of the cookie) or not (See [RFC6265 Section 5.3](https://www.rfc-editor.org/rfc/rfc6265.html#section-5.3)<!-- -->). | ||
|
||
|
||
</td></tr> | ||
<tr><td> | ||
|
||
[httpOnly?](./tough-cookie.createcookieoptions.httponly.md) | ||
|
||
|
||
</td><td> | ||
|
||
|
||
</td><td> | ||
|
||
boolean | ||
|
||
|
||
</td><td> | ||
|
||
_(Optional)_ The 'HttpOnly' flag of the cookie indicates if the cookie is inaccessible to client scripts or not (See [RFC6265 Section 5.2.6](https://www.rfc-editor.org/rfc/rfc6265.html#section-5.2.6)<!-- -->). | ||
|
||
|
||
</td></tr> | ||
<tr><td> | ||
|
||
[key?](./tough-cookie.createcookieoptions.key.md) | ||
|
||
|
||
</td><td> | ||
|
||
|
||
</td><td> | ||
|
||
string | ||
|
||
|
||
</td><td> | ||
|
||
_(Optional)_ The name or key of the cookie | ||
|
||
|
||
</td></tr> | ||
<tr><td> | ||
|
||
[lastAccessed?](./tough-cookie.createcookieoptions.lastaccessed.md) | ||
|
||
|
||
</td><td> | ||
|
||
|
||
</td><td> | ||
|
||
Date \| 'Infinity' \| null | ||
|
||
|
||
</td><td> | ||
|
||
_(Optional)_ Set to the date and time when a cookie was initially stored ([RFC6265 Section 5.3](https://www.rfc-editor.org/rfc/rfc6265.html#section-5.3)<!-- -->) and updated whenever the cookie is retrieved from the [CookieJar](./tough-cookie.cookiejar.md) ([RFC6265 Section 5.4](https://www.rfc-editor.org/rfc/rfc6265.html#section-5.4)<!-- -->). | ||
|
||
|
||
</td></tr> | ||
<tr><td> | ||
|
||
[maxAge?](./tough-cookie.createcookieoptions.maxage.md) | ||
|
||
|
||
</td><td> | ||
|
||
|
||
</td><td> | ||
|
||
number \| 'Infinity' \| '-Infinity' \| null | ||
|
||
|
||
</td><td> | ||
|
||
_(Optional)_ The 'Max-Age' attribute of the cookie (See [RFC6265 Section 5.2.2](https://www.rfc-editor.org/rfc/rfc6265.html#section-5.2.2)<!-- -->). | ||
|
||
|
||
</td></tr> | ||
<tr><td> | ||
|
||
[path?](./tough-cookie.createcookieoptions.path.md) | ||
|
||
|
||
</td><td> | ||
|
||
|
||
</td><td> | ||
|
||
string \| null | ||
|
||
|
||
</td><td> | ||
|
||
_(Optional)_ The 'Path' attribute of the cookie represents the path of the cookie (See [RFC6265 Section 5.2.4](https://www.rfc-editor.org/rfc/rfc6265.html#section-5.2.4)<!-- -->). | ||
|
||
|
||
</td></tr> | ||
<tr><td> | ||
|
||
[pathIsDefault?](./tough-cookie.createcookieoptions.pathisdefault.md) | ||
|
||
|
||
</td><td> | ||
|
||
|
||
</td><td> | ||
|
||
boolean \| null | ||
|
||
|
||
</td><td> | ||
|
||
_(Optional)_ A boolean flag indicating if a cookie had no 'Path' attribute and the default path was used (See [RFC6265 Section 5.2.4](https://www.rfc-editor.org/rfc/rfc6265.html#section-5.2.4)<!-- -->). | ||
|
||
|
||
</td></tr> | ||
<tr><td> | ||
|
||
[sameSite?](./tough-cookie.createcookieoptions.samesite.md) | ||
|
||
|
||
</td><td> | ||
|
||
|
||
</td><td> | ||
|
||
string \| undefined | ||
|
||
|
||
</td><td> | ||
|
||
_(Optional)_ The 'SameSite' attribute of a cookie as defined in RFC6265bis (See [RFC6265bis (v13) Section 5.2](https://www.ietf.org/archive/id/draft-ietf-httpbis-rfc6265bis-13.html#section-5.2)<!-- -->). | ||
|
||
|
||
</td></tr> | ||
<tr><td> | ||
|
||
[secure?](./tough-cookie.createcookieoptions.secure.md) | ||
|
||
|
||
</td><td> | ||
|
||
|
||
</td><td> | ||
|
||
boolean | ||
|
||
|
||
</td><td> | ||
|
||
_(Optional)_ The 'Secure' flag of the cookie indicates if the scope of the cookie is limited to secure channels (e.g.; HTTPS) or not (See [RFC6265 Section 5.2.5](https://www.rfc-editor.org/rfc/rfc6265.html#section-5.2.5)<!-- -->). | ||
|
||
|
||
</td></tr> | ||
<tr><td> | ||
|
||
[value?](./tough-cookie.createcookieoptions.value.md) | ||
|
||
|
||
</td><td> | ||
|
||
|
||
</td><td> | ||
|
||
string | ||
|
||
|
||
</td><td> | ||
|
||
_(Optional)_ The value of the cookie | ||
|
||
|
||
</td></tr> | ||
</tbody></table> |
Oops, something went wrong.