Installation
npm install --save @types/react-cookies
Summary
This package contains type definitions for react-cookies (https://github.com/bukinoshita/react-cookies/).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-cookies.
import { CookieSerializeOptions } from "cookie";
import { Request, Response } from "express";
export function load(name: string, doNotParse?: boolean): any;
export function loadAll(doNotParse?: boolean): { [key: string]: any };
export function select(regex?: RegExp): { [key: string]: any };
export function save(name: string, val: string | number | object, opt: CookieSerializeOptions): void;
export function remove(name: string, opt?: CookieSerializeOptions): void;
export function plugToRequest(req: Request, res: Response): () => void;
export function setRawCookie(rawCookie?: string): void;
Additional Details
Credits
These definitions were written by Nikolai Lopin.