mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-02-04 07:52:51 +00:00
Lowercase js-cookie same site cookie values (#39143)
* Lowercase same site cookie values This matches the documented usage at https://github.com/js-cookie/js-cookie/#samesite, and also is more consistent with other attribute values typically entered in lowercase (e.g. domain names and true/false values). * Use lowercase value in test
This commit is contained in:
parent
f51857f054
commit
cde2fbca9b
2
types/js-cookie/index.d.ts
vendored
2
types/js-cookie/index.d.ts
vendored
@ -39,7 +39,7 @@ declare namespace Cookies {
|
||||
* providing some protection against cross-site request forgery
|
||||
* attacks (CSRF)
|
||||
*/
|
||||
sameSite?: 'Strict' | 'Lax' | 'None';
|
||||
sameSite?: 'strict' | 'lax' | 'none';
|
||||
|
||||
/**
|
||||
* An attribute which will be serialized, conformably to RFC 6265
|
||||
|
||||
@ -9,7 +9,7 @@ Cookies.set('name', 'value', { expires: 7, path: '', domain: '', secure: true })
|
||||
Cookies.set('name', 'value', { secure: true });
|
||||
Cookies.set('name', 'value', { domain: '' });
|
||||
Cookies.set('name', 'value', { path: '' });
|
||||
Cookies.set('name', 'value', { sameSite: 'Strict' });
|
||||
Cookies.set('name', 'value', { sameSite: 'strict' });
|
||||
Cookies.set('name', 'value', { custom: 'property' });
|
||||
|
||||
// $ExpectType string | undefined
|
||||
|
||||
Loading…
Reference in New Issue
Block a user