chore(types): cleanup
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
import type { XYPosition, Dimensions } from '@xyflow/system';
|
||||
|
||||
import type { Node, Edge } from '.';
|
||||
|
||||
@@ -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,4 +1,3 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
import {
|
||||
FitViewParamsBase,
|
||||
FitViewOptionsBase,
|
||||
|
||||
@@ -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 '.';
|
||||
|
||||
Reference in New Issue
Block a user