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

RangeProps allows number for pushable #725

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

Conversation

RobertMurrayImprobable
Copy link

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

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

codecov bot commented Dec 17, 2020

Codecov Report

Merging #725 (fe784c3) into master (7920af2) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #725   +/-   ##
=======================================
  Coverage   88.49%   88.49%           
=======================================
  Files          11       11           
  Lines         756      756           
  Branches      199      199           
=======================================
  Hits          669      669           
  Misses         87       87           
Impacted Files Coverage Δ
src/Range.tsx 77.32% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7920af2...fe784c3. Read the comment docs.

@yoyo837
Copy link
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