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

refactor(number-input): migrate to TypeScript #1875

Merged
merged 3 commits into from
Apr 28, 2021
Merged

Conversation

adnasa
Copy link
Contributor

@adnasa adnasa commented Apr 17, 2021

Summary

@vercel
Copy link

vercel bot commented Apr 17, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/commercetools/ui-kit/DqdSJ4PaCDUCB4erzwdbFfcrSSvc
✅ Preview: https://ui-kit-git-adnasa-number-input-commercetools.vercel.app

@changeset-bot
Copy link

changeset-bot bot commented Apr 17, 2021

🦋 Changeset detected

Latest commit: 9288def

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@commercetools-uikit/number-input Patch
@commercetools-uikit/number-field Patch
@commercetools-uikit/pagination Patch
@commercetools-uikit/inputs Patch
@commercetools-uikit/fields Patch
@commercetools-frontend/ui-kit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

if (typeof value === 'string') return value.trim().length === 0;
if (typeof value === 'number') return isNaN(value);
return true;
};

NumberInput.hasFractionDigits = (number) => {
NumberInput.hasFractionDigits = (number: number) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning message sounds like i may be able to pass in a string type to this function, but the function signature only specifies numbers.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's my mistake, and good catch on the message.

Copy link
Contributor

@tdeekens tdeekens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@adnasa adnasa merged commit d8530a8 into main Apr 28, 2021
@adnasa adnasa deleted the adnasa-number-input branch April 28, 2021 12:56
@ghost ghost mentioned this pull request Apr 28, 2021
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.

3 participants