diff --git a/packages/pie/src/types.ts b/packages/pie/src/types.ts index 2fb75d4a4..66f926e8b 100644 --- a/packages/pie/src/types.ts +++ b/packages/pie/src/types.ts @@ -58,7 +58,7 @@ export interface ComputedDatum { } export interface DataProps { - data: RawDatum[] + data: readonly RawDatum[] } export interface PieTooltipProps { @@ -73,7 +73,7 @@ export type MouseEventHandler = ( export type PieLayerId = 'arcLinkLabels' | 'arcs' | 'arcLabels' | 'legends' export interface PieCustomLayerProps { - dataWithArc: ComputedDatum[] + dataWithArc: readonly ComputedDatum[] centerX: number centerY: number radius: number @@ -114,7 +114,7 @@ export type CommonPieProps = { isInteractive: boolean tooltip: React.FC> - legends: LegendProps[] + legends: readonly LegendProps[] role: string renderWrapper: boolean @@ -137,7 +137,7 @@ export type PieSvgProps = DataProps & Partial> & SvgDefsAndFill> & PieHandlers & { - layers?: PieLayer[] + layers?: readonly PieLayer[] animate?: boolean motionConfig?: MotionProps['motionConfig'] transitionMode?: ArcTransitionMode @@ -148,7 +148,7 @@ export type CompletePieSvgProps = DataProps & CommonPieProps & SvgDefsAndFill> & PieHandlers & { - layers: PieLayer[] + layers: readonly PieLayer[] animate: boolean motionConfig: MotionProps['motionConfig'] transitionMode: ArcTransitionMode