Skip to content

Commit 34c45cd

Browse files
committed
fix: fix overloaded types for GM.*
close #8
1 parent e35e29d commit 34c45cd

3 files changed

Lines changed: 16 additions & 6 deletions

File tree

.editorconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
quote_type = single

index.d.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -519,14 +519,13 @@ declare interface VMScriptGMObjectVMExtensions {
519519
addValueChangeListener: typeof GM_addValueChangeListener;
520520
/** @since VM2.19.1 */
521521
deleteValues: (names: string[]) => Promise<void>;
522-
download:
523-
| ((options: VMScriptGMDownloadOptions) => Promise<Blob> | void)
524-
| ((url: string, name: string) => Promise<Blob> | void);
522+
download(options: VMScriptGMDownloadOptions): Promise<Blob> | void;
523+
download(url: string, name: string): Promise<Blob> | void;
525524
getResourceText: typeof GM_getResourceText;
526525
/** @since VM2.19.1 */
527-
getValues:
528-
| ((names: string[]) => Promise<GenericObject>)
529-
| ((namesWithDefaults: GenericObject) => Promise<GenericObject>);
526+
getValues(names: string[]): Promise<GenericObject>;
527+
/** @since VM2.19.1 */
528+
getValues(namesWithDefaults: GenericObject): Promise<GenericObject>;
530529
log: typeof GM_log;
531530
removeValueChangeListener: typeof GM_removeValueChangeListener;
532531
/** @since VM2.19.1 */

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"user-agent-data-types": "^0.4.2"
2727
},
2828
"devDependencies": {
29+
"prettier": "^3.5.3",
2930
"typedoc": "^0.27.6",
3031
"typescript": "^5.7.3"
3132
}

0 commit comments

Comments
 (0)