import type { Highlight, ReverseHighlight, ReverseSnippet, Snippet } from '../helpers/components'; import type { BuiltInBindEventForHits, CustomBindEventForHits, SendEventForHits } from '../lib/utils'; import type { html } from 'htm/preact'; import type { VNode } from 'preact'; export type Template = string | ((data: TTemplateData, params: TemplateParams) => VNode | VNode[] | string | null); export type TemplateParams = { html: typeof html; components: { Highlight: typeof Highlight; ReverseHighlight: typeof ReverseHighlight; Snippet: typeof Snippet; ReverseSnippet: typeof ReverseSnippet; }; sendEvent?: SendEventForHits; }; interface TemplateWithBindEventParams extends TemplateParams { /** @deprecated use sendEvent instead */ (...args: Parameters): ReturnType; /** @deprecated use sendEvent instead */ (...args: Parameters): ReturnType; sendEvent: SendEventForHits; } export type TemplateWithBindEvent = string | ((data: TTemplateData, params: TemplateWithBindEventParams) => VNode | VNode[] | string); export type Templates = { [key: string]: Template | TemplateWithBindEvent | Templates | undefined; }; export type HoganHelpers = Record string) => string>; export {};