Skip to content

Commit 65bb48a

Browse files
committed
fix: scope.registerDeclaration type export warning
1 parent d9e52a5 commit 65bb48a

File tree

4 files changed

+19
-36
lines changed

4 files changed

+19
-36
lines changed

example/app/chart.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {
22
type AxisLabelProps,
33
LineChart,
44
type PanGestureHandlerOnChangeEventPayload,
5-
HoverGestureHandlerOnChangeEventPayload,
5+
type HoverGestureHandlerOnChangeEventPayload,
66
} from "@codeherence/react-native-graph";
77
import { Paint } from "@shopify/react-native-skia";
88
import { useCallback, useMemo, useReducer } from "react";

src/components/LineChart/index.tsx

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ interface PathFillProps {
2727
width: number;
2828
}
2929

30-
interface LineChartProps extends ViewProps {
30+
export interface LineChartProps extends ViewProps {
3131
/**
3232
* Array of [x, y] points for the chart.
3333
*/
@@ -161,7 +161,7 @@ interface LineChartProps extends ViewProps {
161161
onHoverGestureEnd?: ((payload: HoverGestureHandlerOnEndEventPayload) => void) | null;
162162
}
163163

164-
const LineChart: React.FC<LineChartProps> = ({
164+
export const LineChart: React.FC<LineChartProps> = ({
165165
points = [],
166166
precision = 2,
167167
strokeWidth = 2,
@@ -266,17 +266,3 @@ const styles = StyleSheet.create({
266266
container: { flex: 1 },
267267
canvas: { flex: 1 },
268268
});
269-
270-
export {
271-
LineChart,
272-
type LineChartProps,
273-
type PathFillProps,
274-
type AxisLabelProps,
275-
// Gesture exports
276-
type PanGestureHandlerOnBeginEventPayload,
277-
type PanGestureHandlerEventPayload,
278-
type PanGestureHandlerOnChangeEventPayload,
279-
type HoverGestureHandlerOnBeginEventPayload,
280-
type HoverGestureHandlerOnChangeEventPayload,
281-
type HoverGestureHandlerOnEndEventPayload,
282-
};

src/components/index.ts

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
export {
2-
LineChart,
3-
type LineChartProps,
4-
type PathFillProps,
5-
type AxisLabelProps,
6-
// Gesture exports
7-
type PanGestureHandlerOnBeginEventPayload,
8-
type PanGestureHandlerEventPayload,
9-
type PanGestureHandlerOnChangeEventPayload,
10-
type HoverGestureHandlerOnBeginEventPayload,
11-
type HoverGestureHandlerOnChangeEventPayload,
12-
type HoverGestureHandlerOnEndEventPayload,
13-
} from "./LineChart";
1+
export { LineChart, type LineChartProps } from "./LineChart";
2+
export type { AxisLabelProps } from "./LineChart/AxisLabel";
3+
export type {
4+
PanGestureHandlerOnBeginEventPayload,
5+
PanGestureHandlerOnChangeEventPayload,
6+
PanGestureHandlerEventPayload,
7+
HoverGestureHandlerOnBeginEventPayload,
8+
HoverGestureHandlerOnChangeEventPayload,
9+
HoverGestureHandlerOnEndEventPayload,
10+
} from "./LineChart/useGestures";

src/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ export {
22
LineChart,
33
type LineChartProps,
44
type AxisLabelProps,
5-
PanGestureHandlerOnBeginEventPayload,
6-
PanGestureHandlerOnChangeEventPayload,
7-
PanGestureHandlerEventPayload,
8-
HoverGestureHandlerOnBeginEventPayload,
9-
HoverGestureHandlerOnChangeEventPayload,
10-
HoverGestureHandlerOnEndEventPayload,
5+
type PanGestureHandlerOnBeginEventPayload,
6+
type PanGestureHandlerOnChangeEventPayload,
7+
type PanGestureHandlerEventPayload,
8+
type HoverGestureHandlerOnBeginEventPayload,
9+
type HoverGestureHandlerOnChangeEventPayload,
10+
type HoverGestureHandlerOnEndEventPayload,
1111
} from "./components";

0 commit comments

Comments
 (0)