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 4f06c159be
commit ff722366e9
No known key found for this signature in database
GPG key ID: D918033D8E74CC11
11 changed files with 841 additions and 201 deletions

View file

@ -34,6 +34,7 @@
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"rollup": "^4.0.0",
"ts-prune": "^0.10.3",
"typescript": "^5.0.0"
},
"dependencies": {

View file

@ -1,8 +1,13 @@
export * from './a11y';
export * from './artifacts';
export * from './types';
export * from './menus';
export * from './tools';
export * from './selector';
export * from './assistants-types';
export * from './agents-types';
// This file was auto-generated by cleanup-common-types-safe.js
// Only exports that are actually used in the codebase are included
export {
TShowToast,
Option,
OptionWithIcon,
DropdownValueSetter,
MentionOption,
NotificationSeverity,
} from './types';
export { MenuItemProps } from './menus';