refactor(editor): cleanup ts-expect-error (#9369)

This commit is contained in:
Saul-Mirone
2024-12-27 05:14:23 +00:00
parent 908e3efd12
commit 2b27d62b0e
35 changed files with 84 additions and 90 deletions

View File

@@ -242,7 +242,7 @@ export async function copyImageBlob(
}
try {
// @ts-expect-error FIXME: ts error
// @ts-expect-error FIXME: BS-2239
if (window.apis?.clipboard?.copyAsImageFromString) {
const dataURL = await convertToString(blob);
if (!dataURL)
@@ -250,7 +250,7 @@ export async function copyImageBlob(
ErrorCode.DefaultRuntimeError,
'Cant convert a blob to data URL.'
);
// @ts-expect-error FIXME: ts error
// @ts-expect-error FIXME: BS-2239
await window.apis.clipboard?.copyAsImageFromString(dataURL);
} else {
// DOMException: Type image/jpeg not supported on write.