mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-29 00:51:29 +08:00
35 lines
843 B
TypeScript
35 lines
843 B
TypeScript
// 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;
|
|
}
|
|
}
|