Fix uncaught error in copyStickerToAttachments

This commit is contained in:
Fedor Indutny 2021-10-07 10:08:55 -07:00 committed by GitHub
parent 0f9242670c
commit 0d5ef38e52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 4 deletions

13
ts/window.d.ts vendored
View file

@ -303,7 +303,14 @@ declare global {
writeNewAttachmentData: (data: Uint8Array) => Promise<string>;
deleteExternalMessageFiles: (attributes: unknown) => Promise<void>;
getAbsoluteAttachmentPath: (path: string) => string;
loadAttachmentData: (attachment: WhatIsThis) => WhatIsThis;
loadAttachmentData: <T extends { path?: string }>(
attachment: T
) => Promise<
T & {
data: Uint8Array;
size: number;
}
>;
loadQuoteData: (quote: unknown) => WhatIsThis;
loadPreviewData: (preview: unknown) => WhatIsThis;
loadStickerData: (sticker: unknown) => WhatIsThis;
@ -332,7 +339,9 @@ declare global {
attachment: DownloadedAttachmentType
) => Promise<DownloadedAttachmentType>;
copyIntoTempDirectory: any;
copyIntoTempDirectory: (
path: string
) => Promise<{ path: string; size: number }>;
deleteDraftFile: (path: string) => Promise<void>;
deleteTempFile: (path: string) => Promise<void>;
getAbsoluteDraftPath: any;