4.1.34 • Published 6 months ago

@types/angular-cookie v4.1.34

Weekly downloads
541
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/angular-cookie

Summary

This package contains type definitions for angular-cookie (https://github.com/ivpusic/angular-cookie).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/angular-cookie.

index.d.ts

// Type definitions for angular-cookie v4.1.0
// Project: https://github.com/ivpusic/angular-cookie
// Definitions by: Borislav Zhivkov <https://github.com/borislavjivkov>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3

/// <reference types="angular" />

declare namespace angular.cookie {
    interface CookieService {
        /**
         * Get all cookies
         */
        (): any;

        /**
         * Get a cookie with a specific key
         */
        (key: string): any;

        /**
         * Create a cookie
         */
        (key: string, value: any, options?: CookieOptions): any;

        /**
         * Remove a cookie
         */
        remove(key: string, options?: CookieOptions): void;
    }

    interface CookieOptions {
        /**
         * The domain tells the browser to which domain the cookie should be sent. If you don't specify it, it becomes the domain of the page that sets the cookie.
         */
        domain?: string | undefined;

        /**
         * The path gives you the chance to specify a directory where the cookie is active.
         */
        path?: string | undefined;

        /**
         * Each cookie has an expiry date after which it is trashed. If you don't specify the expiry date the cookie is trashed when you close the browser.
         */
        expires?: number | undefined;

        /**
         * Allows you to set the expiration time in hours, minutes, seconds, or `milliseconds. If this is not specified, any expiration time specified will default to days.
         */
        expirationUnit?: string | undefined;

        /**
         * The Secure attribute is meant to keep cookie communication limited to encrypted transmission, directing browsers to use cookies only via secure/encrypted connections.
         */
        secure?: boolean | undefined;

        /**
         * The method that will be used to encode the cookie value (should be passed when using Set).
         */
        encode?: ((value: any) => any) | undefined;

        /**
         * The method that will be used to decode extracted cookie values (should be passed when using Get).
         */
        decode?: ((value: any) => any) | undefined;
    }
}

Additional Details

  • Last updated: Wed, 07 Jul 2021 21:44:17 GMT
  • Dependencies: @types/angular
  • Global values: none

Credits

These definitions were written by Borislav Zhivkov.

4.1.33

7 months ago

4.1.34

6 months ago

4.1.32

3 years ago

4.1.31

7 years ago

4.1.30

8 years ago

4.1.29

8 years ago

4.1.28-alpha

8 years ago

4.1.26-alpha

8 years ago

4.1.25-alpha

8 years ago

4.1.24-alpha

8 years ago

4.1.23-alpha

8 years ago

4.1.22-alpha

8 years ago

4.1.21-alpha

8 years ago

4.1.16-alpha

8 years ago

4.1.15-alpha

8 years ago