diff --git a/packages/core/index.d.ts b/packages/core/index.d.ts index 6df3710cb..60fd87439 100644 --- a/packages/core/index.d.ts +++ b/packages/core/index.d.ts @@ -35,11 +35,11 @@ export type BoxAlign = | 'bottom' | 'bottom-left' | 'left' -export const boxAlignments: BoxAlign[] +export const boxAlignments: readonly BoxAlign[] export function alignBox(box: AlignBox, container: AlignBox, alignment: BoxAlign): [number, number] export type GetColor = (datum: T) => string -export type Colors = string[] | string +export type Colors = readonly string[] | string export interface ColorProps { colors?: Colors colorBy?: string | GetColor @@ -278,11 +278,11 @@ export function useMotionConfig(): { export type SvgFillMatcher = (datum: T) => boolean export interface SvgDefsAndFill { - defs?: { + defs?: readonly { id: string [key: string]: any }[] - fill?: { id: string; match: Record | SvgFillMatcher | '*' }[] + fill?: readonly { id: string; match: Record | SvgFillMatcher | '*' }[] } export type CssMixBlendMode = @@ -394,7 +394,7 @@ export function PatternLines(props: Omit): JSX.Element export type Def = LinearGradientDef | PatternDotsDef | PatternSquaresDef | PatternLinesDef export type DefsProps = { - defs: Def[] + defs: readonly Def[] } export function Defs(props: DefsProps): JSX.Element @@ -547,7 +547,7 @@ interface CartesianMarkersProps< height: number xScale: (value: X) => number yScale: (value: Y) => number - markers: CartesianMarkerProps[] + markers: readonly CartesianMarkerProps[] } type CartesianMarkersType = ( props: CartesianMarkersProps @@ -605,7 +605,7 @@ export type ClosedCurveFactoryId = | 'cardinalClosed' | 'catmullRomClosed' | 'linearClosed' -export const closedCurvePropKeys: ClosedCurveFactoryId[] +export const closedCurvePropKeys: readonly ClosedCurveFactoryId[] export const curveFromProp: (interpolation: CurveFactoryId) => CurveFactory