Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove duplicate types from interfaces #2940

Merged
merged 2 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .changeset/quick-camels-cheer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
"victory-area": patch
"victory-axis": patch
"victory-bar": patch
"victory-candlestick": patch
"victory-core": patch
"victory-errorbar": patch
"victory-group": patch
"victory-histogram": patch
"victory-line": patch
"victory-pie": patch
"victory-polar-axis": patch
"victory-stack": patch
---

Remove duplicate types from interfaces
1 change: 0 additions & 1 deletion packages/victory-area/src/victory-area.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ export interface VictoryAreaProps
events?: EventPropTypeInterface<VictoryAreaTTargetType, string | number>[];
// eslint-disable-next-line @typescript-eslint/ban-types
interpolation?: InterpolationPropType | Function;
samples?: number;
style?: VictoryStyleInterface;
}

Expand Down
2 changes: 0 additions & 2 deletions packages/victory-axis/src/victory-axis.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
addEvents,
Axis,
UserProps,
DomainPropType,
EventPropTypeInterface,
OrientationTypes,
VictoryAxisCommonProps,
Expand Down Expand Up @@ -49,7 +48,6 @@ export interface VictoryAxisProps
VictoryCommonProps,
VictorySingleLabelableProps {
crossAxis?: boolean;
domain?: DomainPropType;
events?: EventPropTypeInterface<VictoryAxisTTargetType, number | string>[];
fixLabelOverlap?: boolean;
offsetX?: number;
Expand Down
1 change: 0 additions & 1 deletion packages/victory-bar/src/victory-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export interface VictoryBarProps
>[];
eventKey?: StringOrNumberOrCallback;
getPath?: (props: VictoryBarProps) => string;
horizontal?: boolean;
style?: VictoryStyleInterface;
}

Expand Down
1 change: 0 additions & 1 deletion packages/victory-candlestick/src/victory-candlestick.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export type VictoryCandlestickLabelsType =
export interface VictoryCandlestickProps
extends Omit<VictoryCommonProps, "polar">,
VictoryDatableProps,
VictoryLabelableProps,
VictoryMultiLabelableProps {
candleColors?: {
positive?: string;
Expand Down
3 changes: 2 additions & 1 deletion packages/victory-core/src/victory-theme/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
PaddingOrCallback,
StringOrNumberOrCallback,
} from "../types/callbacks";
import { DomainPropType } from "../types/prop-types";

export type BlockProps = {
top?: number;
Expand Down Expand Up @@ -49,7 +50,7 @@ export interface VictoryAxisCommonProps {
axisLabelComponent?: React.ReactElement;
axisValue?: number | string | object | Date;
dependentAxis?: boolean;
disableInlineStyles?: boolean;
domain?: DomainPropType;
gridComponent?: React.ReactElement;
invertAxis?: boolean;
style?: {
Expand Down
1 change: 0 additions & 1 deletion packages/victory-errorbar/src/victory-errorbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ export type ErrorType =
export interface VictoryErrorBarProps
extends Omit<VictoryCommonProps, "polar">,
VictoryDatableProps,
VictoryLabelableProps,
VictoryMultiLabelableProps {
borderWidth?: number;
errorX?: ErrorType;
Expand Down
5 changes: 0 additions & 5 deletions packages/victory-group/src/victory-group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,13 @@ export interface VictoryGroupProps
extends VictoryCommonProps,
VictoryDatableProps,
VictoryMultiLabelableProps {
categories?: CategoryPropType;
children?: React.ReactNode;
color?: string;
colorScale?: ColorScalePropType;
domain?: DomainPropType;
domainPadding?: DomainPaddingPropType;
events?: EventPropTypeInterface<
VictoryGroupTTargetType,
StringOrNumberOrCallback
>[];
eventKey?: StringOrNumberOrCallback;
horizontal?: boolean;
offset?: number;
style?: VictoryStyleInterface;
displayName?: string;
Expand Down
1 change: 0 additions & 1 deletion packages/victory-histogram/src/victory-histogram.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ export interface VictoryHistogramProps
number | string | number[] | string[]
>[];
eventKey?: StringOrNumberOrCallback;
horizontal?: boolean;
style?: VictoryStyleInterface;
}

Expand Down
2 changes: 0 additions & 2 deletions packages/victory-line/src/victory-line.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,10 @@ export type VictoryLineTTargetType = "data" | "labels" | "parent";
export interface VictoryLineProps
extends VictoryCommonProps,
VictoryDatableProps,
VictoryLabelableProps,
VictoryMultiLabelableProps {
events?: EventPropTypeInterface<VictoryLineTTargetType, number | string>[];
eventKey?: StringOrNumberOrCallback | string[];
// eslint-disable-next-line @typescript-eslint/ban-types
interpolation?: InterpolationPropType | Function;
samples?: number;
style?: VictoryStyleInterface;
}
3 changes: 0 additions & 3 deletions packages/victory-pie/src/victory-pie.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ import {
export interface VictoryPieProps
extends Omit<VictoryCommonProps, "polar">,
VictoryDatableProps,
VictoryLabelableProps,
VictoryMultiLabelableProps {
colorScale?: ColorScalePropType;
cornerRadius?: SliceNumberOrCallback<SliceProps, "cornerRadius">;
endAngle?: number;
events?: EventPropTypeInterface<
Expand All @@ -56,7 +54,6 @@ export interface VictoryPieProps

labelIndicatorComponent?: React.ReactElement;
labelRadius?: number | ((props: SliceProps) => number);
origin?: OriginType;
padAngle?: NumberOrCallback;
radius?: NumberOrCallback;
startAngle?: number;
Expand Down
4 changes: 0 additions & 4 deletions packages/victory-polar-axis/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {
DomainPropType,
EventPropTypeInterface,
LabelOrientationType,
VictoryAxisCommonProps,
Expand All @@ -19,16 +18,13 @@ export interface VictoryPolarAxisProps
VictoryCommonProps,
VictorySingleLabelableProps {
axisAngle?: number;
axisValue?: number | string | Date;
circularAxisComponent?: React.ReactElement;
circularGridComponent?: React.ReactElement;
domain?: DomainPropType;
endAngle?: number;
events?: EventPropTypeInterface<
VictoryPolarAxisTTargetType,
string | number
>[];
gridComponent?: React.ReactElement;
innerRadius?: number;
labelOrientation?: LabelOrientationType;
labelPlacement?: LabelOrientationType;
Expand Down
2 changes: 0 additions & 2 deletions packages/victory-stack/src/victory-stack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,10 @@ const fallbackProps = {
export type VictoryStackTTargetType = "data" | "labels" | "parent";
export interface VictoryStackProps
extends VictoryCommonProps,
VictoryLabelableProps,
VictoryMultiLabelableProps {
bins?: number | number[] | Date[];
categories?: CategoryPropType;
children?: React.ReactNode | React.ReactNode[];
colorScale?: ColorScalePropType;
domain?: DomainPropType;
events?: EventPropTypeInterface<
VictoryStackTTargetType,
Expand Down