Skip to content

TypeScript refactor, fix exact sizing #96

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

peacechen
Copy link

@peacechen peacechen commented May 19, 2024

Fixes #94

  • Fix bug when maxHeight === minHeight && maxWidth === minWidth.

Additionally:

  • This project has been converted to TypeScript with a generated type definition file.
  • The main method imageFileResizer accepts an options object argument instead of multiple individual arguments.
  • It returns a Promise instead of using a callback.

This PR refactors the code as properly typed functions. The parameters are in a single options argument instead of multiple arguments. The TypeScript definition file is automatically generated. The major version was bumped due to breaking changes in the function signature.

Also addresses #93 , #78 , #62, and #50.

The code in this PR has been published as @peacechen/react-image-file-resizer pending merge.

* Fix bug when maxHeight === minHeight && maxWidth === minWidth.
* This project has been converted to TypeScript with a generated type definition file.
* The main method `imageFileResizer` accepts an options object argument instead of multiple individual arguments.
* It returns a Promise instead of using a callback.
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.

Exact sizing not respected
1 participant