feat: cleanup unused types from common/index.ts

- Remove 104 unused type exports from packages/client/src/common/index.ts
- Keep only 7 actually used exports (93% reduction)
- Add cleanup script with enhanced import pattern detection
- Support both named imports and namespace imports (* as t)
- Create automatic backups and comprehensive documentation
- Maintain type safety with build verification
- No breaking changes to existing code

Kept exports:
- TShowToast, Option, OptionWithIcon, DropdownValueSetter
- MentionOption, NotificationSeverity, MenuItemProps

Scripts: cleanup-common-types-safe.js, README-CLEANUP.md
This commit is contained in:
Marco Beretta 2025-07-12 22:13:51 +02:00
parent 0b7dd55797
commit 882cca247a
No known key found for this signature in database
GPG key ID: D918033D8E74CC11
11 changed files with 841 additions and 201 deletions

View file

@ -14,7 +14,7 @@ import {
FileMapContext,
SetConvoProvider,
} from '~/Providers';
import TermsAndConditionsModal from '~/components/ui/TermsAndConditionsModal';
import TermsAndConditionsModal from '~/components/ui'; // TODO: remove this comment after updating the import path of all components
import { useUserTermsQuery, useGetStartupConfig } from '~/data-provider';
import { Nav, MobileNav } from '~/components/Nav';
import { useHealthCheck } from '~/data-provider';