-
Notifications
You must be signed in to change notification settings - Fork 25
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
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/commercetools/ui-kit/DqdSJ4PaCDUCB4erzwdbFfcrSSvc |
🦋 Changeset detectedLatest commit: 9288def The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
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 |
413dd46
to
e02c302
Compare
e02c302
to
72a2ce3
Compare
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) => { |
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.
warning message sounds like i may be able to pass in a string type to this function, but the function signature only specifies numbers.
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.
that's my mistake, and good catch on the message.
72a2ce3
to
47ea2d0
Compare
44bbd17
to
88e3bd2
Compare
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.
💯
e6fe73c
to
ad50976
Compare
ad50976
to
9288def
Compare
Summary
input-utils
to TypeScript #1867