4 Star 26 Fork 9

小弟调调/cookie.js

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
index.d.ts 898 Bytes
一键复制 编辑 原始数据 按行查看 历史
Dana Mison 提交于 2022-08-22 11:19 . type: updated expires type (#28)
export interface CookieOptions {
expires?: number | Date | string;
path?: string;
domain?: string;
secure?: boolean;
sameSite?: 'None' | 'Strict' | 'Lax';
}
export interface CookieValues {
[key: string]: string;
}
export type CooiesAll = {
[key: string]: string;
}
export interface Cookie {
/**
* Get all cookie
*/
(): CooiesAll;
/**
* Create a cookie, valid across the entire site
*/
(name?: string | CookieValues, value?: string | null | CookieOptions, options?: CookieOptions | number): string;
get: (name: string) => string | boolean;
set: (name?: string | CookieValues, value?: string, options?: CookieOptions | number) => undefined;
remove: (names?: string | string[], ...ages: string[]) => string[];
clear: (names?: string | string[], ...ages: string[]) => string[];
all:() => CookieValues;
}
declare var cookie: Cookie
export default cookie;
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/jaywcjlove/cookie.js.git
git@gitee.com:jaywcjlove/cookie.js.git
jaywcjlove
cookie.js
cookie.js
master

搜索帮助