Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Ignore some type errors

Manav Rathi171d8a7ae0dd
diff --git a/apps/photos/src/components/ItemList.tsx b/apps/photos/src/components/ItemList.tsx
index 69909783a0..8186e72956 100644
--- a/apps/photos/src/components/ItemList.tsx
+++ b/apps/photos/src/components/ItemList.tsx
@@ -33,6 +33,7 @@ const createItemData: <T>(
items,
}));
+// @ts-expect-error "TODO(MR): Understand and fix the type error here"
const Row: <T>({
index,
style,
diff --git a/apps/photos/src/services/machineLearning/mlWorkManager.ts b/apps/photos/src/services/machineLearning/mlWorkManager.ts
index f6910f8a40..a01b28b147 100644
--- a/apps/photos/src/services/machineLearning/mlWorkManager.ts
+++ b/apps/photos/src/services/machineLearning/mlWorkManager.ts
@@ -179,6 +179,7 @@ class MLWorkManager {
return mlWorker.syncLocalFile(token, userID, enteFile, localFile);
});
+ // @ts-expect-error "TODO: Fix ML related type errors"
if ('message' in result) {
// TODO: redirect/refresh to gallery in case of session_expired
// may not be required as uploader should anyways take care of this
diff --git a/apps/photos/src/services/machineLearning/mobileFaceNetEmbeddingService.ts b/apps/photos/src/services/machineLearning/mobileFaceNetEmbeddingService.ts
index 850af11d43..439c403418 100644
--- a/apps/photos/src/services/machineLearning/mobileFaceNetEmbeddingService.ts
+++ b/apps/photos/src/services/machineLearning/mobileFaceNetEmbeddingService.ts
@@ -84,6 +84,7 @@ class MobileFaceNetEmbeddingService implements FaceEmbeddingService {
private async getFaceEmbedding(
faceImage: ImageBitmap
): Promise<FaceEmbedding> {
+ // @ts-expect-error "TODO: Fix ML related type errors"
return this.serialQueue.add(() =>
this.getFaceEmbeddingNoQueue(faceImage)
);
diff --git a/apps/photos/src/utils/machineLearning/mldataExport.ts b/apps/photos/src/utils/machineLearning/mldataExport.ts
index ee9e6db503..65a6c00bc1 100644
--- a/apps/photos/src/utils/machineLearning/mldataExport.ts
+++ b/apps/photos/src/utils/machineLearning/mldataExport.ts
@@ -5,6 +5,7 @@ import { CACHES } from '@ente/shared/storage/cacheStorage/constants';
import { CacheStorageService } from '@ente/shared/storage/cacheStorage';
import { addLogLine } from '@ente/shared/logging';
+// @ts-expect-error "TODO: Fix ML related type errors"
class FileSystemWriter extends zip.Writer {
writableStream: FileSystemWritableFileStream;
@@ -23,6 +24,7 @@ class FileSystemWriter extends zip.Writer {
}
}
+// @ts-expect-error "TODO: Fix ML related type errors"
class FileReader extends zip.Reader {
file: File;
@@ -32,6 +34,7 @@ class FileReader extends zip.Reader {
}
public async init() {
+ // @ts-expect-error "TODO: Fix ML related type errors"
this.size = this.file.size;
// addLogLine('zipReader init, size: ', this.size);
}
@@ -52,6 +55,7 @@ export async function exportMlData(
mlDataZipWritable: FileSystemWritableFileStream
) {
const zipWriter = new zip.ZipWriter(
+ // @ts-expect-error "TODO: Fix ML related type errors"
new FileSystemWriter(mlDataZipWritable)
);
@@ -70,6 +74,7 @@ export async function exportMlData(
addLogLine('Ml Data Exported');
}
+// @ts-expect-error "TODO: Fix ML related type errors"
async function exportMlDataToZipWriter(zipWriter: zip.ZipWriter) {
const mlDbData = await mlIDbStorage.getAllMLData();
const faceClusteringResults =
@@ -115,6 +120,7 @@ async function exportMlDataToZipWriter(zipWriter: zip.ZipWriter) {
}
}
export async function importMlData(mlDataZipFile: File) {
+ // @ts-expect-error "TODO: Fix ML related type errors"
const zipReader = new zip.ZipReader(new FileReader(mlDataZipFile));
try {
@@ -126,6 +132,7 @@ export async function importMlData(mlDataZipFile: File) {
addLogLine('ML Data Imported');
}
+// @ts-expect-error "TODO: Fix ML related type errors"
async function importMlDataFromZipReader(zipReader: zip.ZipReader) {
const zipEntries = await zipReader.getEntries();
// addLogLine(zipEntries);