[PR #2644] [MERGED] chore(web): improve type checking #9645

Closed
opened 2026-02-05 14:08:24 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/immich-app/immich/pull/2644
Author: @michelheusschen
Created: 6/2/2023
Status: Merged
Merged: 6/2/2023
Merged by: @alextran1502

Base: mainHead: chore/web-type-checking


📝 Commits (4)

  • a3e14de fix(web): use id instead of assetId
  • aaa1c68 chore(web): improve type checking
  • 82db2dc fix test jobs
  • ef46329 improve type checking and resolve errors

📊 Changes

35 files changed (+157 additions, -136 deletions)

View changed files

📝 .github/workflows/test.yml (+5 -1)
📝 web/package.json (+4 -3)
📝 web/src/api/utils.ts (+2 -2)
📝 web/src/hooks.server.ts (+2 -2)
📝 web/src/lib/components/admin-page/jobs/jobs-panel.svelte (+2 -2)
📝 web/src/lib/components/admin-page/server-stats/server-stats-panel.svelte (+4 -4)
📝 web/src/lib/components/admin-page/settings/storage-template/supported-datetime-panel.svelte (+1 -1)
📝 web/src/lib/components/album-page/__tests__/album-card.spec.ts (+6 -6)
📝 web/src/lib/components/album-page/album-card.svelte (+3 -15)
web/src/lib/components/album-page/album-card.ts (+12 -0)
📝 web/src/lib/components/album-page/asset-selection.svelte (+7 -7)
📝 web/src/lib/components/album-page/thumbnail-selection.svelte (+2 -2)
📝 web/src/lib/components/asset-viewer/asset-viewer-nav-bar.svelte (+10 -12)
📝 web/src/lib/components/forms/api-key-form.svelte (+2 -2)
📝 web/src/lib/components/map-page/map-settings-modal.svelte (+1 -10)
📝 web/src/lib/components/photos-page/asset-date-group.svelte (+7 -7)
📝 web/src/lib/components/photos-page/asset-grid.svelte (+8 -9)
📝 web/src/lib/components/photos-page/asset-select-control-bar.svelte (+1 -1)
📝 web/src/lib/components/shared-components/create-share-link-modal/create-shared-link-modal.svelte (+13 -13)
📝 web/src/lib/components/shared-components/leaflet/marker-cluster/asset-marker-cluster.svelte (+1 -1)

...and 15 more files

📄 Description

Adds a new job for checking TypeScript types. Existing errors in the album tests have been fixed. Removed importsNotUsedAsValues from tsconfig, because it has a deprecation warning and the default of error is better as it prevents unneeded imports. Basically means using import type when you only use the import as a type.

For some reason TypeScript complains when importing the context="module" part of *.svelte files from a *.ts file. I've moved around some type definitions to circumvent these errors.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/immich-app/immich/pull/2644 **Author:** [@michelheusschen](https://github.com/michelheusschen) **Created:** 6/2/2023 **Status:** ✅ Merged **Merged:** 6/2/2023 **Merged by:** [@alextran1502](https://github.com/alextran1502) **Base:** `main` ← **Head:** `chore/web-type-checking` --- ### 📝 Commits (4) - [`a3e14de`](https://github.com/immich-app/immich/commit/a3e14de102273e39ad94cc09f5188cc83af5454d) fix(web): use id instead of assetId - [`aaa1c68`](https://github.com/immich-app/immich/commit/aaa1c68cc4c5059461b1fa2100f41924474572d5) chore(web): improve type checking - [`82db2dc`](https://github.com/immich-app/immich/commit/82db2dc5769f43dc03930494c5accd471eeac17a) fix test jobs - [`ef46329`](https://github.com/immich-app/immich/commit/ef463294bd215afa7d2e2b9a4de2264c3ecdd5f5) improve type checking and resolve errors ### 📊 Changes **35 files changed** (+157 additions, -136 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/test.yml` (+5 -1) 📝 `web/package.json` (+4 -3) 📝 `web/src/api/utils.ts` (+2 -2) 📝 `web/src/hooks.server.ts` (+2 -2) 📝 `web/src/lib/components/admin-page/jobs/jobs-panel.svelte` (+2 -2) 📝 `web/src/lib/components/admin-page/server-stats/server-stats-panel.svelte` (+4 -4) 📝 `web/src/lib/components/admin-page/settings/storage-template/supported-datetime-panel.svelte` (+1 -1) 📝 `web/src/lib/components/album-page/__tests__/album-card.spec.ts` (+6 -6) 📝 `web/src/lib/components/album-page/album-card.svelte` (+3 -15) ➕ `web/src/lib/components/album-page/album-card.ts` (+12 -0) 📝 `web/src/lib/components/album-page/asset-selection.svelte` (+7 -7) 📝 `web/src/lib/components/album-page/thumbnail-selection.svelte` (+2 -2) 📝 `web/src/lib/components/asset-viewer/asset-viewer-nav-bar.svelte` (+10 -12) 📝 `web/src/lib/components/forms/api-key-form.svelte` (+2 -2) 📝 `web/src/lib/components/map-page/map-settings-modal.svelte` (+1 -10) 📝 `web/src/lib/components/photos-page/asset-date-group.svelte` (+7 -7) 📝 `web/src/lib/components/photos-page/asset-grid.svelte` (+8 -9) 📝 `web/src/lib/components/photos-page/asset-select-control-bar.svelte` (+1 -1) 📝 `web/src/lib/components/shared-components/create-share-link-modal/create-shared-link-modal.svelte` (+13 -13) 📝 `web/src/lib/components/shared-components/leaflet/marker-cluster/asset-marker-cluster.svelte` (+1 -1) _...and 15 more files_ </details> ### 📄 Description Adds a new job for checking TypeScript types. Existing errors in the album tests have been fixed. Removed `importsNotUsedAsValues` from tsconfig, because it has a deprecation warning and the default of `error` is better as it prevents unneeded imports. Basically means using `import type` when you only use the import as a type. For some reason TypeScript complains when importing the `context="module"` part of `*.svelte` files from a `*.ts` file. I've moved around some type definitions to circumvent these errors. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 14:08:24 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#9645