From 826988bc7da9375bc35f21bd10c95e62b0fe258c Mon Sep 17 00:00:00 2001 From: takker99 <37929109+takker99@users.noreply.github.com> Date: Wed, 25 Aug 2021 12:07:44 +0900 Subject: [PATCH 1/2] =?UTF-8?q?:+1:=20commit=E3=81=97=E5=BF=98=E3=82=8C?= =?UTF-8?q?=E3=81=A6=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- userscript.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/userscript.ts b/userscript.ts index 176ae5a..434dadc 100644 --- a/userscript.ts +++ b/userscript.ts @@ -35,7 +35,7 @@ export type Scrapbox = removeAllItems: () => void; }; } - & UserScriptEvents + & UserScriptEventTarget & ({ Layout: | "list" @@ -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; From 1241ba551c207f47bdb19fa5a48b8ba4ca347a36 Mon Sep 17 00:00:00 2001 From: takker99 <37929109+takker99@users.noreply.github.com> Date: Wed, 25 Aug 2021 12:10:19 +0900 Subject: [PATCH 2/2] :tag: v0.0.5 --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index faac222..31c1ba1 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ # types scrapbox関連の型定義ファイル + +[document](https://doc.deno.land/https/raw.githubusercontent.com%2Fscrapbox-jp%2Ftypes%2F0.0.5%2Fmod.ts)