Skip to content

Commit ae40e6b

Browse files
authored
Merge pull request #9 from takker99/refactor
chore: commitし忘れてた
2 parents 8782d44 + 161e046 commit ae40e6b

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
scrapbox関連の型定義ファイル
44

5-
[document](https://doc.deno.land/https/raw.githubusercontent.com%2Fscrapbox-jp%2Ftypes%2F0.0.4%2Fmod.ts)
5+
[document](https://doc.deno.land/https/raw.githubusercontent.com%2Fscrapbox-jp%2Ftypes%2F0.0.5%2Fmod.ts)

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)