justinkx / react-crypto-chart

crypto chart widget for react using binance api
https://www.npmjs.com/package/react-crypto-chart
MIT License
22 stars 13 forks source link

Documentation mismatch #8

Closed rafaelfaria closed 2 years ago

rafaelfaria commented 2 years ago

Your documentation says the props are not required however Typescript says otherwise :)

image

you should use ? on each one of them if you want to make them optional.


export interface Props {
    pair: string;
    interval?: string;
    candleStickConfig?: CandleStickConfig;
    histogramConfig?: HistogramConfig;
    chartLayout?: DeffaultChartLayout;
    containerStyle?: {
        [x: string]: any;
    };
}
justinkx commented 2 years ago

Have mainly used it in my personal projects which are not in typescript so haven't faced this. I've added default values to each props just in case it's not supplied. Happy to merge the change if you could provide a PR