Skip to content

Commit 1455e1a

Browse files
committed
doc: async GM.xmlHttpRequest + GM.download
1 parent 964ca41 commit 1455e1a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

index.d.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,9 @@ declare interface VMScriptGMObjectVMExtensions {
438438
addElement: typeof GM_addElement;
439439
addStyle: typeof GM_addStyle;
440440
addValueChangeListener: typeof GM_addValueChangeListener;
441-
download: typeof GM_download;
441+
download:
442+
((options: VMScriptGMDownloadOptions) => (Promise<Blob> | void)) |
443+
((url: string, name: string) => (Promise<Blob> | void));
442444
getResourceText: typeof GM_getResourceText;
443445
log: typeof GM_log;
444446
removeValueChangeListener: typeof GM_removeValueChangeListener;
@@ -458,7 +460,9 @@ declare interface VMScriptGMObject extends VMScriptGMObjectVMExtensions {
458460
notification: typeof GM_notification;
459461
openInTab: typeof GM_openInTab;
460462
setClipboard: typeof GM_setClipboard;
461-
xmlHttpRequest: typeof GM_xmlhttpRequest;
463+
xmlHttpRequest: <T = string | Blob | ArrayBuffer | Document | object>(
464+
details: VMScriptGMXHRDetails<T>
465+
) => (Promise<T> & VMScriptXHRControl);
462466
}
463467

464468
declare const GM: VMScriptGMObject;

0 commit comments

Comments
 (0)