Skip to content

Conversation

@amriksingh0786
Copy link

  • 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
Comment on lines 179 to 184
byFile: string;

/**
* Endpoints for URL upload.
*/
byUrl?: string;
byUrl: string;
Copy link
Contributor

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
Copy link
Contributor

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

Copy link
Author

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
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