mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
replace internal module to namespace
This commit is contained in:
Vendored
+10
-10
@@ -3,7 +3,7 @@
|
||||
// Definitions by: Theodore Brown <https://github.com/theodorejb>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module Cookies {
|
||||
declare namespace Cookies {
|
||||
interface CookieAttributes {
|
||||
/**
|
||||
* Define when the cookie will be removed. Value can be a Number
|
||||
@@ -29,45 +29,45 @@ declare module Cookies {
|
||||
*/
|
||||
secure?: boolean;
|
||||
}
|
||||
|
||||
|
||||
interface CookiesStatic {
|
||||
/**
|
||||
* Allows default cookie attributes to be accessed, changed, or reset
|
||||
*/
|
||||
defaults: CookieAttributes;
|
||||
|
||||
|
||||
/**
|
||||
* Create a cookie
|
||||
*/
|
||||
set(name: string, value: string | any, options?: CookieAttributes): void;
|
||||
|
||||
|
||||
/**
|
||||
* Read cookie
|
||||
*/
|
||||
get(name: string): string;
|
||||
|
||||
|
||||
/**
|
||||
* Read all available cookies
|
||||
*/
|
||||
get(): {[key: string]: string};
|
||||
|
||||
|
||||
/**
|
||||
* Returns the parsed representation of the string
|
||||
* stored in the cookie according to JSON.parse
|
||||
*/
|
||||
getJSON(name: string): any;
|
||||
|
||||
|
||||
/**
|
||||
* Returns the parsed representation of
|
||||
* all cookies according to JSON.parse
|
||||
*/
|
||||
getJSON(): {[key: string]: any};
|
||||
|
||||
|
||||
/**
|
||||
* Delete cookie
|
||||
*/
|
||||
remove(name: string, options?: CookieAttributes): void;
|
||||
|
||||
|
||||
/**
|
||||
* If there is any danger of a conflict with the namespace Cookies,
|
||||
* the noConflict method will allow you to define a new namespace
|
||||
@@ -77,7 +77,7 @@ declare module Cookies {
|
||||
* AMD or CommonJS, thus it is not exposed in those environments.
|
||||
*/
|
||||
noConflict(): CookiesStatic;
|
||||
|
||||
|
||||
/**
|
||||
* Create a new instance of the api that overrides the default
|
||||
* decoding implementation. All methods that rely in a proper
|
||||
|
||||
Reference in New Issue
Block a user