Context type of each built-in hook event. Augment it (declaration merging) to type the hooks of a plugin's custom event:
declare module '@botmesh/core' { interface HookContextMap { 'crm.lead': { leadId: string } }}bot.after('crm.lead', (lead) => lead.leadId) // typed Copy
declare module '@botmesh/core' { interface HookContextMap { 'crm.lead': { leadId: string } }}bot.after('crm.lead', (lead) => lead.leadId) // typed
Context type of each built-in hook event. Augment it (declaration merging) to type the hooks of a plugin's custom event: