Skip to content

armgit / ente

Public Imported from GitHub
0

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

lf

Manav Rathi70ee3e3fbe16
diff --git a/web/packages/new/photos/services/ml/ml-data.ts b/web/packages/new/photos/services/ml/ml-data.ts
index 60622ee45c..9f03c618cd 100644
--- a/web/packages/new/photos/services/ml/ml-data.ts
+++ b/web/packages/new/photos/services/ml/ml-data.ts
@@ -172,9 +172,8 @@ export const fetchMLData = async (
}
try {
- // TODO: This line is included in the photos app which currently
- // doesn't have strict mode enabled, and where it causes a spurious
- // error, so we unfortunately need to turn off typechecking.
+ // See: [Note: strict mode migration]
+ //
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
const decryptedBytes = await decryptBlob(remoteFileData, file.key);
@@ -194,8 +193,11 @@ export const fetchMLData = async (
const remoteMLDataFromJSONString = (jsonString: string) => {
const raw = RawRemoteMLData.parse(JSON.parse(jsonString));
const parseResult = ParsedRemoteMLData.safeParse(raw);
- // This code is included in apps/photos, which currently does not have the
- // TypeScript strict mode enabled, which causes a spurious tsc failure.
+ // TODO: [Note: strict mode migration]
+ //
+ // This code is included in apps/photos where it causes spurious tsc failure
+ // since the photos app currently does not have the TypeScript strict mode
+ // enabled (unlike the current file).
//
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
diff --git a/web/packages/new/photos/services/search/worker.ts b/web/packages/new/photos/services/search/worker.ts
index b7a24a50c5..58bc3bf553 100644
--- a/web/packages/new/photos/services/search/worker.ts
+++ b/web/packages/new/photos/services/search/worker.ts
@@ -442,9 +442,8 @@ const defaultCityRadius = 10;
const kmsPerDegree = 111.16;
const isInsideLocationTag = (location: Location, locationTag: LocationTag) =>
- // This code is included in the photos app which currently doesn't have
- // strict mode, and causes a spurious linter warning (but only when included
- // in photos!), so we need to ts-ignore.
+ // See: [Note: strict mode migration]
+ //
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
isWithinRadius(location, locationTag.centerPoint, locationTag.radius);
diff --git a/web/packages/new/photos/services/user-entity.ts b/web/packages/new/photos/services/user-entity.ts
index 88b494fcf6..abbc070ddb 100644
--- a/web/packages/new/photos/services/user-entity.ts
+++ b/web/packages/new/photos/services/user-entity.ts
@@ -109,6 +109,10 @@ export const savedLocationTags = async () =>
* the cgroup specific entity key.
*/
export const pullCGroups = (masterKey: Uint8Array) => {
+ // See: [Note: strict mode migration]
+ //
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
+ // @ts-ignore
const parse = async (id: string, data: Uint8Array): Promise<CGroup> => ({
id,
name: undefined,