d5f55b5f9c
Coverage / build (push) Has been cancelled
Docker / Build (push) Has been cancelled
Docker / Publish (push) Has been cancelled
Node.js CI / build (16, macos-latest) (push) Has been cancelled
Node.js CI / build (16, ubuntu-latest) (push) Has been cancelled
Node.js CI / build (16, windows-latest) (push) Has been cancelled
NPM / Build (22) (push) Has been cancelled
NPM / Pack (push) Has been cancelled
NPM / Publish (push) Has been cancelled
20 lines
468 B
TypeScript
20 lines
468 B
TypeScript
import type { WechatyInterface } from './wechaty/mod.js'
|
|
|
|
export type WechatyPluginUninstaller = () => void
|
|
|
|
export type WechatyPluginReturn = void | WechatyPluginUninstaller
|
|
|
|
export interface WechatyPlugin {
|
|
(bot: WechatyInterface): WechatyPluginReturn
|
|
}
|
|
|
|
function isWechatyPluginUninstaller (
|
|
pluginReturn: WechatyPluginReturn,
|
|
): pluginReturn is WechatyPluginUninstaller {
|
|
return typeof pluginReturn === 'function'
|
|
}
|
|
|
|
export {
|
|
isWechatyPluginUninstaller,
|
|
}
|