Skip to content

Commit

Permalink
fix: workaround duplicate cheminfo-types
Browse files Browse the repository at this point in the history
  • Loading branch information
lpatiny committed Feb 24, 2022
1 parent 5d90f30 commit a2eb9d2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/component/hooks/useXYReduce.ts
@@ -1,3 +1,4 @@
import { DataXY, DoubleArray } from 'cheminfo-types';
import { xyReduce } from 'ml-spectra-processing';
import { useCallback } from 'react';

Expand All @@ -10,7 +11,9 @@ export enum XYReducerDomainAxis {

type XYReducerDomainAxisType = keyof typeof XYReducerDomainAxis;

export default function useXYReduce(domainAxis: XYReducerDomainAxisType) {
export default function useXYReduce(
domainAxis: XYReducerDomainAxisType,
): (data: { x: number[]; y: number[] }) => DataXY<DoubleArray> {
const { width, xDomain, yDomain } = useChartData();

return useCallback(
Expand Down

0 comments on commit a2eb9d2

Please sign in to comment.