-
-
Notifications
You must be signed in to change notification settings - Fork 302
chore: enhance TypeScript configuration and build process #284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
chore: enhance TypeScript configuration and build process #284
Conversation
amriksingh0786
commented
Feb 8, 2025
- Update tsconfig.json with stricter type checking and module resolution
- Modify package.json scripts to include type checking and declaration generation
- Update Vite configuration for better module and library bundling
- Improve type definitions and utility functions
- Add type-related scripts and configuration for better developer experience
- Update tsconfig.json with stricter type checking and module resolution - Modify package.json scripts to include type checking and declaration generation - Update Vite configuration for better module and library bundling - Improve type definitions and utility functions - Add type-related scripts and configuration for better developer experience
src/types/types.ts
Outdated
| byFile: string; | ||
|
|
||
| /** | ||
| * Endpoints for URL upload. | ||
| */ | ||
| byUrl?: string; | ||
| byUrl: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these fields are optional. At least one should be optional.
- Update default image data initialization in index.ts - Add type documentation for index.d.ts to improve type clarity
- Remove redundant JSDoc comments from type interfaces - Improve inline documentation for type interfaces - Simplify type definitions while preserving their core structure
- Update ImageConfig interface to make byFile property optional - Improve type flexibility for image configuration
- Return upload promise directly instead of resolving immediately - Ensure proper error and success handling for upload methods - Remove redundant Promise.resolve() calls in upload methods
- Improve JSON formatting and readability - Remove redundant library declaration for 'dom' - Maintain existing TypeScript compiler options
- Remove unnecessary rollupOptions configuration for external dependencies - Simplify Vite build configuration - Maintain existing sourcemap and build format settings
src/types/index.d.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Type definitions are generated during compilation, we don't need to maintain them manually
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it, thanks. removed it.
- Convert string quotes from double to single quotes in vite.config.js - Update import statements and string literals in index.ts and ui.ts - Maintain consistent code style and formatting - Improve code readability and consistency
- Add null coalescing for byFile endpoint URL - Improve type casting for additional request data - Ensure type safety when appending form data
- Delete src/types/index.d.ts type declaration file - Remove unnecessary type definitions for ImageTool