Skip to content

Commit

Permalink
Fix type declaration errors when tsc (recharts#2675)
Browse files Browse the repository at this point in the history
  • Loading branch information
megos authored Oct 15, 2021
1 parent c76a1fc commit a28db43
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/polar/Radar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ interface RadarProps {
onMouseLeave?: (props: any, e: MouseEvent<SVGPolygonElement>) => void;
}

type RadiusAxis = PolarRadiusAxisProps & { scale: (value: any) => number };
type AngleAxis = PolarAngleAxisProps & { scale: (value: any) => number };

export type Props = Omit<SVGProps<SVGElement>, 'onMouseEnter' | 'onMouseLeave'> & RadarProps;

interface State {
Expand Down Expand Up @@ -92,8 +95,8 @@ export class Radar extends PureComponent<Props, State> {
dataKey,
bandSize,
}: {
radiusAxis: PolarRadiusAxisProps & { scale: (value: any) => number };
angleAxis: PolarAngleAxisProps & { scale: (value: any) => number };
radiusAxis: RadiusAxis;
angleAxis: AngleAxis;
displayedData: any[];
dataKey: RadarProps['dataKey'];
bandSize: number;
Expand Down

0 comments on commit a28db43

Please sign in to comment.