fix: widen telegram reply progress typing

This commit is contained in:
Peter Steinberger 2026-03-14 01:16:54 +00:00
parent 5b53481d1d
commit d886ca6474
1 changed files with 7 additions and 3 deletions

View File

@ -32,15 +32,19 @@ export function markDelivered(progress: DeliveryProgress): void {
progress.hasDelivered = true; progress.hasDelivered = true;
} }
export async function sendChunkedTelegramReplyText<TChunk, TReplyMarkup = unknown>(params: { export async function sendChunkedTelegramReplyText<
TChunk,
TReplyMarkup = unknown,
TProgress extends DeliveryProgress = DeliveryProgress,
>(params: {
chunks: readonly TChunk[]; chunks: readonly TChunk[];
progress: DeliveryProgress; progress: TProgress;
replyToId?: number; replyToId?: number;
replyToMode: ReplyToMode; replyToMode: ReplyToMode;
replyMarkup?: TReplyMarkup; replyMarkup?: TReplyMarkup;
replyQuoteText?: string; replyQuoteText?: string;
quoteOnlyOnFirstChunk?: boolean; quoteOnlyOnFirstChunk?: boolean;
markDelivered?: (progress: DeliveryProgress) => void; markDelivered?: (progress: TProgress) => void;
sendChunk: (opts: { sendChunk: (opts: {
chunk: TChunk; chunk: TChunk;
isFirstChunk: boolean; isFirstChunk: boolean;