forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ngkookies.d.ts
34 lines (27 loc) · 843 Bytes
/
ngkookies.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Type definitions for ngKookes 0.2.0
// Project: https://github.com/voronianski/ngKookies
// Definitions by: Martin McWhorter <https://github.com/martinmcwhorter>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare namespace angular.kookies {
type Options = {
expires?: number|Date,
path?: string,
domain?: string,
secure?: boolean
};
interface IKookiesService {
set(name: string, value: string, optopns?: Options): void;
get(): any;
get(name: string): any;
get(name:string, converter: any): any;
get<T>(name:string, converter: any): T;
remove(name: string, options?: Options): boolean;
}
type Config = { raw?: boolean, json?: boolean }
interface IKookiesProvider {
config: Config;
setConfig(config: Config): void;
defaults: Options;
setDefaults(options: Options): void;
}
}