Skip to content

Commit 826988b

Browse files
committed
👍 commitし忘れてた
1 parent 38f4526 commit 826988b

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

userscript.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export type Scrapbox =
3535
removeAllItems: () => void;
3636
};
3737
}
38-
& UserScriptEvents
38+
& UserScriptEventTarget
3939
& ({
4040
Layout:
4141
| "list"
@@ -60,8 +60,18 @@ export type Scrapbox =
6060
};
6161
});
6262

63-
export interface UserScriptEvents {
63+
export interface UserScriptEventTarget {
64+
/** Register an event listener to Scrapbox
65+
*
66+
* @param type the event type the event listener registers to
67+
* @param the event listener
68+
*/
6469
addListener: (type: string, listener: () => void) => void;
70+
/** Register an event listener to Scrapbox
71+
*
72+
* @param type the event type the event listener registers to
73+
* @param the event listener
74+
*/
6575
on: (type: string, listener: () => void) => void;
6676
removeListener: (type: string, listener: () => void) => void;
6777
off: (type: string, listener: () => void) => void;

0 commit comments

Comments
 (0)