From 18e77880da621fd5e364a23882810c92ffed1da5 Mon Sep 17 00:00:00 2001 From: volatile-static Date: Mon, 16 Jan 2023 07:57:15 +0800 Subject: [PATCH] Update toolkit.code-snippets --- .vscode/toolkit.code-snippets | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.vscode/toolkit.code-snippets b/.vscode/toolkit.code-snippets index 6cbe9e6..ab0b6da 100644 --- a/.vscode/toolkit.code-snippets +++ b/.vscode/toolkit.code-snippets @@ -25,5 +25,21 @@ "scope": "javascript,typescript", "prefix": "appendElement", "body": "appendElement({ tag: '$1' }, $2);" + }, + "register Notifier": { + "scope": "javascript,typescript", + "prefix": "registerObserver", + "body": [ + "registerObserver({", + "\t notify: (", + "\t\tevent: _ZoteroTypes.Notifier.Event,", + "\t\ttype: _ZoteroTypes.Notifier.Type,", + "\t\tids: string[],", + "\t\textraData: _ZoteroTypes.anyObj", + "\t) => {", + "\t\t$0", + "\t}", + "});" + ] } }