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;
}
export async function sendChunkedTelegramReplyText<TChunk, TReplyMarkup = unknown>(params: {
export async function sendChunkedTelegramReplyText<
TChunk,
TReplyMarkup = unknown,
TProgress extends DeliveryProgress = DeliveryProgress,
>(params: {
chunks: readonly TChunk[];
progress: DeliveryProgress;
progress: TProgress;
replyToId?: number;
replyToMode: ReplyToMode;
replyMarkup?: TReplyMarkup;
replyQuoteText?: string;
quoteOnlyOnFirstChunk?: boolean;
markDelivered?: (progress: DeliveryProgress) => void;
markDelivered?: (progress: TProgress) => void;
sendChunk: (opts: {
chunk: TChunk;
isFirstChunk: boolean;