refactor: type definition for ActionMap

This commit is contained in:
Wesley F. Young 2024-08-12 11:35:17 +08:00
parent ea4d1d3275
commit 28930fdad4

View File

@ -77,7 +77,9 @@ import { NapCatCore } from '@/core';
import { NapCatOneBot11Adapter } from '@/onebot';
export function createActionMap(onebotContext: NapCatOneBot11Adapter, coreContext: NapCatCore) {
export type ActionMap = Map<string, BaseAction<any, any>>;
export function createActionMap(onebotContext: NapCatOneBot11Adapter, coreContext: NapCatCore): ActionMap {
const actionHandlers = [
new FetchEmojiLike(onebotContext, coreContext),
new GetFile(onebotContext, coreContext),