From d9518ccb0b1635964dba27944246b48b78083f9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Huan=20LI=20=28=E6=9D=8E=E5=8D=93=E6=A1=93=29?= Date: Tue, 9 Jun 2020 18:33:46 +0800 Subject: [PATCH] add uninstaller for plugin interface (#1939) --- src/wechaty.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wechaty.ts b/src/wechaty.ts index e0d5c509..32cfb5cb 100644 --- a/src/wechaty.ts +++ b/src/wechaty.ts @@ -114,8 +114,9 @@ export interface WechatyOptions { ioToken? : string, // Io TOKEN } +type WechatyPluginUninstaller = () => void export interface WechatyPlugin { - (bot: Wechaty): void + (bot: Wechaty): void | WechatyPluginUninstaller } const PUPPET_MEMORY_NAME = 'puppet' -- GitLab