chore(Translator): fix typescript stange error

This commit is contained in:
ShareVB committed 2025-08-22 22:47:34 +02:00
1 parent 6a8d1d30f3
commit 6b1825f568
1 file changed
+2 -1
+2 -1
View File
@@ -90,7 +90,8 @@ async function translateText() {
loadingModel.value = true;
try {
translators.set(modelId, await pipeline('translation', modelId));
// @ts-expect-error Probably a Typescript bug 'too complex type'
translators.set(modelId, await pipeline('translation', modelId) as TranslationPipeline);
}
catch (e: any) {
error.value = `Model loading failed: ${e.toString()}`;