Documentation / @finchart/react / ChartSeriesProps
Type Alias: ChartSeriesProps<TSource, TPoint>
ChartSeriesProps<
TSource,TPoint> =PlainSeriesProps<TSource> |DerivedSeriesProps<TSource,TPoint> |InputSeriesProps<TSource,TPoint>
Defined in: components/chart-series.tsx:88
점을 얻는 길 셋 중 하나다 — 넘긴 것(data) · 파생(derive) · 남이 만든 것(input). 갈래는 배타이고 섞을 수 없다.
둘을 같이 주면 TS가 잡지만 메시지가 간접적이다: input과 derive를 같이 주면 *"Type '(s: OHLC[]) => LineDataPoint[]' is not assignable to type 'undefined'"*로 필드는 정확히 짚지만 이유는 추론해야 한다 — 판별 유니온의 성질이라 메시지 자체는 못 고치고, 대신 이 문장이 hover에 뜬다.
Type Parameters
TSource
TSource extends BaseDataPoint
TPoint
TPoint extends BaseDataPoint = TSource