Skip to content

RangeProps allows number for pushable#725

Open
RobertMurrayImprobable wants to merge 1 commit intoreact-component:masterfrom
RobertMurrayImprobable:patch-1
Open

RangeProps allows number for pushable#725
RobertMurrayImprobable wants to merge 1 commit intoreact-component:masterfrom
RobertMurrayImprobable:patch-1

Conversation

@RobertMurrayImprobable
Copy link
Copy Markdown

The top-level README describes the pushable prop of Range as boolean or number (or undefined), but the type annotation in Range.tsx is pushable?: boolean;. When developing with rc-slider in Typescript, using for example pushable={5} causes a type error, and the only way around this is pushable={(5 as unknown) as undefined} which then produces the expected behaviour. This type annotation appears to be incorrect and would be great to have it updated.

The top-level `README` describes the `pushable` prop of `Range` as `boolean` or `number` (or `undefined`), but the type annotation in `Range.tsx` is `pushable?: boolean;`. When developing with `rc-slider` in Typescript, using for example `pushable={5}` causes a type error, and the only way around this is `pushable={(5 as unknown) as undefined}` which then produces the expected behaviour. This type annotation appears to be incorrect and would be great to have it updated.
@vercel
Copy link
Copy Markdown

vercel bot commented Dec 17, 2020

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/react-component/slider/4a591k7r7
✅ Preview: https://slider-git-patch-1.react-component.vercel.app

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 17, 2020

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.49%. Comparing base (7920af2) to head (fe784c3).
⚠️ Report is 138 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #725   +/-   ##
=======================================
  Coverage   88.49%   88.49%           
=======================================
  Files          11       11           
  Lines         756      756           
  Branches      199      199           
=======================================
  Hits          669      669           
  Misses         87       87           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@yoyo837
Copy link
Copy Markdown
Member

yoyo837 commented Apr 15, 2023

Rebase please.

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