chore(types): cleanup

This commit is contained in:
moklick
2024-02-17 16:32:59 +01:00
parent ad7403cc75
commit a16c5c9bd5
7 changed files with 8 additions and 13 deletions
-1
View File
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import type { XYPosition, Dimensions } from '@xyflow/system';
import type { Node, Edge } from '.';
+7 -7
View File
@@ -45,22 +45,22 @@ export type Edge<
focusable?: boolean;
};
type SmoothStepEdgeType<EdgeData extends Record<string, unknown> = Record<string, unknown>> = Edge<EdgeData> & {
type: 'smoothstep';
type SmoothStepEdge<EdgeData extends Record<string, unknown> = Record<string, unknown>> = Edge<
EdgeData,
'smoothstep'
> & {
pathOptions?: SmoothStepPathOptions;
};
type BezierEdgeType<EdgeData extends Record<string, unknown> = Record<string, unknown>> = Edge<EdgeData> & {
type: 'default';
type BezierEdge<EdgeData extends Record<string, unknown> = Record<string, unknown>> = Edge<EdgeData, 'default'> & {
pathOptions?: BezierPathOptions;
};
type StepEdgeType<EdgeData extends Record<string, unknown> = Record<string, unknown>> = Edge<EdgeData> & {
type: 'step';
type StepEdge<EdgeData extends Record<string, unknown> = Record<string, unknown>> = Edge<EdgeData, 'step'> & {
pathOptions?: StepPathOptions;
};
export type BuiltInEdge = SmoothStepEdgeType | BezierEdgeType | StepEdgeType;
export type BuiltInEdge = SmoothStepEdge | BezierEdge | StepEdge;
export type EdgeMouseHandler<EdgeType extends Edge = Edge> = (event: ReactMouseEvent, edge: EdgeType) => void;
-1
View File
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import {
FitViewParamsBase,
FitViewOptionsBase,
-1
View File
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/no-namespace */
import type { Rect, Viewport } from '@xyflow/system';
import type { Node, Edge, ViewportHelperFunctions } from '.';