Skip to content

Fix tsc declaration errors for @mui/icons-material deep imports#359

Merged
dkhalife merged 1 commit into
mainfrom
dkhalife/fix-mui-icons-types
Jun 22, 2026
Merged

Fix tsc declaration errors for @mui/icons-material deep imports#359
dkhalife merged 1 commit into
mainfrom
dkhalife/fix-mui-icons-types

Conversation

@dkhalife

Copy link
Copy Markdown
Owner

Problem

yarn tsc failed with TS7016 errors because frontend/src/views/Labels/LabelView.tsx used deep imports (@mui/icons-material/Delete and @mui/icons-material/Edit) that lack bundled declaration files in the current install:

'n src/views/Labels/LabelView.tsx(15,24): error TS7016: Could not find a declaration file for module '@mui/icons-material/Delete' src/views/Labels/LabelView.tsx(16,22): error TS7016: Could not find a declaration file for module '@mui/icons-material/Edit' 'n

Fix

Switched to the named barrel import import { Add, Delete as DeleteIcon, Edit as EditIcon } from '@mui/icons-material', matching the convention used by every other file in the codebase. yarn tsc and yarn lint now pass cleanly.

Copilot AI review requested due to automatic review settings June 22, 2026 11:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes TypeScript TS7016 declaration errors in the frontend by eliminating deep imports from @mui/icons-material and switching to the package’s barrel (named) exports, aligning with existing import usage elsewhere in the codebase.

Changes:

  • Replaced deep icon imports (@mui/icons-material/Delete, @mui/icons-material/Edit) with barrel imports from @mui/icons-material.
  • Aliased Delete and Edit exports to preserve existing component names (DeleteIcon, EditIcon) without changing JSX usage.
Show a summary per file
File Description
frontend/src/views/Labels/LabelView.tsx Switches MUI icon imports to barrel exports to resolve missing declaration errors in yarn tsc.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 0

@dkhalife dkhalife merged commit f67d908 into main Jun 22, 2026
10 checks passed
@dkhalife dkhalife deleted the dkhalife/fix-mui-icons-types branch June 22, 2026 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants