nxkit
Version:
This is a collection of tools, independent of any other libraries
42 lines (41 loc) • 1.15 kB
TypeScript
interface ClientCookie {
/**
* 根据名字取Cookie值
* @param {String} name cookie的名称
* @return {String} 返回cookie值
* @static
*/
get(name: string): string | null;
/**
* 获取全部Cookie
* @return {Object} 返回cookie值
* @static
*/
getAll(): Dict;
/**
* 设置cookie值
* @param {String} name 名称
* @param {String} value 值
* @param {Date} expires (Optional) 过期时间
* @param {String} path (Optional)
* @param {String} domain (Optional)
* @param {Boolran} secure (Optional)
* @static
*/
set(name: string, value: string | number | boolean, expires?: Date, path?: string, domain?: string, secure?: boolean): void;
/**
* 删除一个cookie
* @param {String} name 名称
* @param {String} path (Optional)
* @param {String} domain (Optional)
* @static
*/
remove(name: string, path?: string, domain?: string): void;
/**
* 删除全部cookie
* @static
*/
removeAll(): void;
}
declare const _default: ClientCookie;
export default _default;