From 1455e1a48157318f20c59b52e33b896487843381 Mon Sep 17 00:00:00 2001 From: tophf Date: Wed, 10 Apr 2024 08:18:45 +0300 Subject: [PATCH] doc: async GM.xmlHttpRequest + GM.download --- index.d.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/index.d.ts b/index.d.ts index d154600..3c1c9cc 100644 --- a/index.d.ts +++ b/index.d.ts @@ -438,7 +438,9 @@ declare interface VMScriptGMObjectVMExtensions { addElement: typeof GM_addElement; addStyle: typeof GM_addStyle; addValueChangeListener: typeof GM_addValueChangeListener; - download: typeof GM_download; + download: + ((options: VMScriptGMDownloadOptions) => (Promise | void)) | + ((url: string, name: string) => (Promise | void)); getResourceText: typeof GM_getResourceText; log: typeof GM_log; removeValueChangeListener: typeof GM_removeValueChangeListener; @@ -458,7 +460,9 @@ declare interface VMScriptGMObject extends VMScriptGMObjectVMExtensions { notification: typeof GM_notification; openInTab: typeof GM_openInTab; setClipboard: typeof GM_setClipboard; - xmlHttpRequest: typeof GM_xmlhttpRequest; + xmlHttpRequest: ( + details: VMScriptGMXHRDetails + ) => (Promise & VMScriptXHRControl); } declare const GM: VMScriptGMObject;