UNPKG

@alfresco/adf-core

Version:
39 lines (38 loc) 1.22 kB
import * as i0 from "@angular/core"; export declare class CookieService { cookieEnabled: boolean; constructor(); /** * Checks if cookies are enabled. * * @returns True if enabled, false otherwise */ isEnabled(): boolean; /** * Retrieves a cookie by its key. * * @param key Key to identify the cookie * @returns The cookie data or null if it is not found */ getItem(key: string): string | null; /** * Sets a cookie. * * @param key Key to identify the cookie * @param data Data value to set for the cookie * @param expiration Expiration date of the data * @param path "Pathname" to store the cookie */ setItem(key: string, data: string, expiration?: Date | null, path?: string | null): void; /** * Delete a cookie Key. * * @param key Key to identify the cookie * @param path "Pathname" to store the cookie */ deleteCookie(key: string, path?: string | null): void; /** Placeholder for testing purposes - do not use. */ clear(): void; static ɵfac: i0.ɵɵFactoryDeclaration<CookieService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<CookieService>; }