interface Adapter {
    delete(name): void;
    get(name): undefined | Cookie;
    getAll(): Cookie[];
    set(name, value, options?): void;
}

Methods

  • Delete a cookie from the storage.

    Parameters

    • name: string

      The name of the cookie.

    Returns void

  • Get a cookie from the storage.

    Parameters

    • name: string

      The name of the cookie.

    Returns undefined | Cookie

  • Get all cookies from the storage.

    Returns Cookie[]

  • Set a cookie in the storage.

    Parameters

    • name: string

      The name of the cookie.

    • value: string

      The value of the cookie.

    • Optional options: Partial<Pick<CookieSerializeOptions, "domain" | "expires" | "httpOnly" | "maxAge" | "sameSite" | "secure" | "path">>

      The cookie's options.

    Returns void