Skip to content

Commit

Permalink
doc: async GM.xmlHttpRequest + GM.download
Browse files Browse the repository at this point in the history
  • Loading branch information
tophf committed Apr 10, 2024
1 parent 964ca41 commit 1455e1a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Blob> | void)) |
((url: string, name: string) => (Promise<Blob> | void));
getResourceText: typeof GM_getResourceText;
log: typeof GM_log;
removeValueChangeListener: typeof GM_removeValueChangeListener;
Expand All @@ -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: <T = string | Blob | ArrayBuffer | Document | object>(
details: VMScriptGMXHRDetails<T>
) => (Promise<T> & VMScriptXHRControl);
}

declare const GM: VMScriptGMObject;

0 comments on commit 1455e1a

Please sign in to comment.