mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
angular-cookies - added options + minor improvements
This commit is contained in:
Vendored
+28
-3
@@ -16,6 +16,30 @@ declare module "angular-cookies" {
|
||||
*/
|
||||
declare module angular.cookies {
|
||||
|
||||
/**
|
||||
* Cookies options
|
||||
* see https://docs.angularjs.org/api/ngCookies/provider/$cookiesProvider#defaults
|
||||
*/
|
||||
interface ICookiesOptions {
|
||||
/**
|
||||
* The cookie will be available only for this path and its sub-paths. By default, this would be the URL that appears in your base tag.
|
||||
*/
|
||||
path?: string;
|
||||
/**
|
||||
* The cookie will be available only for this domain and its sub-domains.
|
||||
* For obvious security reasons the user agent will not accept the cookie if the current domain is not a sub domain or equals to the requested domain.
|
||||
*/
|
||||
domain?: string;
|
||||
/**
|
||||
* String of the form "Wdy, DD Mon YYYY HH:MM:SS GMT" or a Date object indicating the exact date/time this cookie will expire.
|
||||
*/
|
||||
expires?: string|Date;
|
||||
/**
|
||||
* The cookie will be available only in secured connection.
|
||||
*/
|
||||
secure?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* CookieService
|
||||
* see http://docs.angularjs.org/api/ngCookies.$cookies
|
||||
@@ -31,10 +55,11 @@ declare module angular.cookies {
|
||||
interface ICookiesService {
|
||||
get(key: string): string;
|
||||
getObject(key: string): any;
|
||||
getObject<T>(key: string): T;
|
||||
getAll(): any;
|
||||
put(key: string, value: string, options?: any): void;
|
||||
putObject(key: string, value: any, options?: any): void;
|
||||
remove(key: string, options?: any): void;
|
||||
put(key: string, value: string, options?: ICookiesOptions): void;
|
||||
putObject(key: string, value: any, options?: ICookiesOptions): void;
|
||||
remove(key: string, options?: ICookiesOptions): void;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user