react-native-charts-wrapper
react-native-charts-wrapper copied to clipboard
Add typings
Can i add typescript definitions for this project ?
When typescript support is landed. we can have a good development experience. and we can generate documentation from type definitions.
- add typings for this project or
- rewrite lib/*.js using typescript then generate type definitions automatically.
Thank you 😄
That will be great. Fork and pull request are welcome.
Add typings or rewrite it using typescript ?
It is ok to rewrite it using typescript if it is compatible to current javascript user.
Yes. it does
We need upgrade to prop-types
, i am almost done only have a few issues. prop-types does not call validator function.
dragDecelerationFrictionCoef: (props, propName, componentName) => {
let coef = props[propName];
if (coef && (typeof coef !== 'number' || coef < 0 || coef > 1)) {
return new Error(`Invalid prop ${propName} supplied to '${componentName}'. Value must be number and between 0 and 1.`);
}
},
this prop-type should be changed.
@wuxudong I just file a PR. could take a look. thanks
Well, It may take me sometime, because I should learn typescript first. I will do it as soon as possible.
😄 I just rename lib/* to src/*.tsx documentation need improvement and need your help.
any update on this please?
2019 present! ✌️ :v
@bang88 Why you closed your PR? wasn't it correct?
Well, It may take me sometime, because I should learn typescript first. I will do it as soon as possible.
Maybe the author has not ready ~ 2019.
@wuxudong
can you please add typescript support into your library? there are lots of RN projects using typescript as the main development language and they need to use libraries that have type support. currently, I even can't import the chart components in my project.
There's a type file for 0.5.2
on DefinitelyTyped:
yarn add -D @types/react-native-charts-wrapper