Skip to content

Commit

Permalink
Merge pull request #9 from takker99/refactor
Browse files Browse the repository at this point in the history
chore: commitし忘れてた
  • Loading branch information
takker99 authored Aug 25, 2021
2 parents 8782d44 + 161e046 commit ae40e6b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

scrapbox関連の型定義ファイル

[document](https://doc.deno.land/https/raw.githubusercontent.com%2Fscrapbox-jp%2Ftypes%2F0.0.4%2Fmod.ts)
[document](https://doc.deno.land/https/raw.githubusercontent.com%2Fscrapbox-jp%2Ftypes%2F0.0.5%2Fmod.ts)
14 changes: 12 additions & 2 deletions userscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export type Scrapbox =
removeAllItems: () => void;
};
}
& UserScriptEvents
& UserScriptEventTarget
& ({
Layout:
| "list"
Expand All @@ -60,8 +60,18 @@ export type Scrapbox =
};
});

export interface UserScriptEvents {
export interface UserScriptEventTarget {
/** Register an event listener to Scrapbox
*
* @param type the event type the event listener registers to
* @param the event listener
*/
addListener: (type: string, listener: () => void) => void;
/** Register an event listener to Scrapbox
*
* @param type the event type the event listener registers to
* @param the event listener
*/
on: (type: string, listener: () => void) => void;
removeListener: (type: string, listener: () => void) => void;
off: (type: string, listener: () => void) => void;
Expand Down

0 comments on commit ae40e6b

Please sign in to comment.