Skip to content
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

[types] Add missing overload for set #419

Merged
merged 1 commit into from
Feb 10, 2024

Conversation

MysteryBlokHed
Copy link
Member

The set function can also take an object of coordinates to modify, as described in the README: https://github.com/color-js/color.js#manipulating-colors

This PR changes the types to reflect this.

The reason that the definition on the Color class had to be changed is because of how TypeScript handles overloaded functions in other types (i.e. ToColorPrototype). Without this, only the last signature of the set function would be present on Color.

Copy link

netlify bot commented Feb 10, 2024

Deploy Preview for colorjs ready!

Name Link
🔨 Latest commit 024ce82
🔍 Latest deploy log https://app.netlify.com/sites/colorjs/deploys/65c79f60150d100008cf0db0
😎 Deploy Preview https://deploy-preview-419--colorjs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@MysteryBlokHed
Copy link
Member Author

(Force pushed because of accidental formatting changes)

@jgerigmeyer jgerigmeyer merged commit a8bc6fd into color-js:main Feb 10, 2024
4 checks passed
@MysteryBlokHed MysteryBlokHed deleted the types/add-set-overloads branch February 10, 2024 17:41
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