Skip to content

Commit fd301c4

Browse files
committed
scriptcat.d.ts
1 parent 4f25aac commit fd301c4

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

src/app/service/content/gm_api/gm_api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1397,7 +1397,7 @@ export default class GMApi extends GM_Base {
13971397
let result: any;
13981398
let done = false;
13991399
const onDisconnected = () => {
1400-
killConn = null; // before resolve, set disconnectFn to null
1400+
killConn = null; // before resolve, set killConn to null
14011401
if (error) {
14021402
reject(error);
14031403
} else if (!done) {

src/template/scriptcat.d.tpl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,9 @@ declare const GM: {
304304

305305
/** Cookie 操作 */
306306
cookie(action: GMTypes.CookieAction, details: GMTypes.CookieDetails): Promise<GMTypes.Cookie[]>;
307+
308+
/** cross-context exclusive execution */
309+
runExclusive<T>(key: string, callback: () => T | PromiseLike<T>, timeout?: number): Promise<T>;
307310
};
308311

309312
/**

src/types/scriptcat.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,9 @@ declare const GM: {
304304

305305
/** Cookie 操作 */
306306
cookie(action: GMTypes.CookieAction, details: GMTypes.CookieDetails): Promise<GMTypes.Cookie[]>;
307+
308+
/** cross-context exclusive execution */
309+
runExclusive<T>(key: string, callback: () => T | PromiseLike<T>, timeout?: number): Promise<T>;
307310
};
308311

309312
/**

0 commit comments

Comments
 (0)