UNPKG

@clerk/shared

Version:

Internal package utils used by the Clerk SDKs

21 lines (18 loc) 656 B
import Cookies from 'js-cookie'; type LocationAttributes = { path?: string; domain?: string; }; declare function createCookieHandler(cookieName: string): { get(): string | undefined; /** * Setting a cookie will use some defaults such as path being set to "/". */ set(newValue: string, options?: Cookies.CookieAttributes): string | undefined; /** * On removing a cookie, you have to pass the exact same path/domain attributes used to set it initially * @see https://github.com/js-cookie/js-cookie#basic-usage */ remove(locationAttributes?: LocationAttributes): void; }; export { createCookieHandler };