Skip to content

Commit a3adc00

Browse files
committed
🎨 修改.d.ts #475
1 parent a23f6d1 commit a3adc00

3 files changed

Lines changed: 10 additions & 8 deletions

File tree

example/gm_cookie.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
// @description 可以控制浏览器的cookie, 必须指定@connect, 并且每次一个新的域调用都需要用户确定
66
// @author You
77
// @match https://bbs.tampermonkey.net.cn/
8-
// @grant GM_cookie
9-
// @connect example.com
8+
// @grant GM_cookie
9+
// @connect example.com
1010
// ==/UserScript==
1111

1212
GM_cookie("set", {

src/template/scriptcat.d.tpl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ declare const GM_info: {
7575
[key: string]: unknown;
7676
};
7777

78-
79-
8078
declare function GM_listValues(): string[];
8179

8280
declare function GM_addValueChangeListener(name: string, listener: GMTypes.ValueChangeListener): number;
@@ -90,7 +88,9 @@ declare function GM_setValues(values: { [key: string]: any }): void;
9088
declare function GM_getValue(name: string, defaultValue?: any): any;
9189

9290
// 获取多个值, 如果keysOrDefaults是一个对象, 则使用对象的值作为默认值
93-
declare function GM_getValues(keysOrDefaults: { [key: string]: any } | string[] | null | undefined): { [key: string]: any };
91+
declare function GM_getValues(keysOrDefaults: { [key: string]: any } | string[] | null | undefined): {
92+
[key: string]: any;
93+
};
9494

9595
declare function GM_deleteValue(name: string): void;
9696

@@ -353,6 +353,7 @@ declare namespace GMTypes {
353353
path: string;
354354
httpOnly: boolean;
355355
secure: boolean;
356+
sameSite: "unspecified" | "no_restriction" | "lax" | "strict";
356357
}
357358

358359
// tabid是只有后台脚本监听才有的参数

src/types/scriptcat.d.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ declare const GM_info: {
7575
[key: string]: unknown;
7676
};
7777

78-
79-
8078
declare function GM_listValues(): string[];
8179

8280
declare function GM_addValueChangeListener(name: string, listener: GMTypes.ValueChangeListener): number;
@@ -90,7 +88,9 @@ declare function GM_setValues(values: { [key: string]: any }): void;
9088
declare function GM_getValue(name: string, defaultValue?: any): any;
9189

9290
// 获取多个值, 如果keysOrDefaults是一个对象, 则使用对象的值作为默认值
93-
declare function GM_getValues(keysOrDefaults: { [key: string]: any } | string[] | null | undefined): { [key: string]: any };
91+
declare function GM_getValues(keysOrDefaults: { [key: string]: any } | string[] | null | undefined): {
92+
[key: string]: any;
93+
};
9494

9595
declare function GM_deleteValue(name: string): void;
9696

@@ -353,6 +353,7 @@ declare namespace GMTypes {
353353
path: string;
354354
httpOnly: boolean;
355355
secure: boolean;
356+
sameSite: "unspecified" | "no_restriction" | "lax" | "strict";
356357
}
357358

358359
// tabid是只有后台脚本监听才有的参数

0 commit comments

Comments
 (0)