mmarkelov / react-nouislider

React wrapper on NoUiSlider
https://mmarkelov.github.io/react-nouislider/
MIT License
60 stars 21 forks source link

TypeScript errors in type definition #21

Closed Exagone313 closed 5 years ago

Exagone313 commented 5 years ago

Hi,

When running tsc on my project using your library, this brings me two errors regarding to its type definition:

$ /project/node_modules/.bin/tsc --noEmit
node_modules/nouislider-react/index.d.ts:27:30 - error TS2314: Generic type 'Ref' requires 1 type argument(s).

27     instanceRef?: (instance: React.Ref) => void;
                                ~~~~~~~~~

node_modules/nouislider-react/index.d.ts:47:76 - error TS1036: Statements are not allowed in ambient contexts.

47 export default class Nouislider extends React.Component<NouisliderProps> {};
                                                                              ~

Found 2 errors.

I wrote a patch for that, it's coming.