cookie.d.ts 447 B

12345678910111213141516
  1. declare namespace cookie {
  2. interface IOptions {
  3. path?: string;
  4. expires?: number;
  5. domain?: string;
  6. secure?: boolean;
  7. }
  8. interface ICookie {
  9. get(key: string, options?: cookie.IOptions): string;
  10. set(key: string, val: string, options?: cookie.IOptions): ICookie;
  11. remove(key: string, options?: cookie.IOptions): ICookie;
  12. }
  13. }
  14. declare const cookie: cookie.ICookie;
  15. export = cookie;