import type { Update, UpdateKind, UpdateKindMap } from './generated/updates.js'; /** * runtime container for plugin-emitted custom update kinds — constructed by * `tg.emit(name, payload)` and routed through the same dispatch chain as bot-api * updates. payload fields are spread onto `this` so handlers can read `update.jobId` * directly without `update.raw` */ export declare class CustomUpdate = Record> { readonly kind: N; readonly raw: P; constructor(kind: N, raw: P); is(kind: K): this is UpdateKindMap[K]; } /** registry of declared custom-update kinds — throws on `build()` if the name wasn't declared first */ export declare class CustomUpdateRegistry { private readonly defined; define(kind: string): void; has(kind: string): boolean; build(kind: string, payload: Record): CustomUpdate>; } /** every update a `tg.on(...)` handler can see — bot-api wrapped updates plus any user-defined `CustomUpdate` */ export type AnyUpdate = Update | CustomUpdate; //# sourceMappingURL=custom-update.d.ts.map