chore(types): cleanup

This commit is contained in:
moklick
2022-10-21 11:35:56 +02:00
parent 74cacd29cb
commit 7b1dc1b18c
79 changed files with 353 additions and 372 deletions
+3 -2
View File
@@ -2,10 +2,11 @@
import { memo } from 'react';
import cc from 'classcat';
import shallow from 'zustand/shallow';
import { useStore, getRectOfNodes, ReactFlowState, Rect, Panel, getBoundsOfRects } from '@reactflow/core';
import { useStore, getRectOfNodes, getBoundsOfRects, Panel } from '@reactflow/core';
import type { ReactFlowState, Rect } from '@reactflow/core';
import MiniMapNode from './MiniMapNode';
import { MiniMapProps, GetMiniMapNodeAttribute } from './types';
import type { MiniMapProps, GetMiniMapNodeAttribute } from './types';
declare const window: any;
+2 -1
View File
@@ -1,4 +1,5 @@
import { memo, CSSProperties } from 'react';
import { memo } from 'react';
import type { CSSProperties } from 'react';
import cc from 'classcat';
interface MiniMapNodeProps {
+4 -4
View File
@@ -1,10 +1,10 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { HTMLAttributes } from 'react';
import { Node, PanelPosition } from '@reactflow/core';
import type { HTMLAttributes } from 'react';
import type { Node, PanelPosition } from '@reactflow/core';
export type GetMiniMapNodeAttribute<NodeData = any> = (node: Node<NodeData>) => string;
export interface MiniMapProps<NodeData = any> extends HTMLAttributes<SVGSVGElement> {
export type MiniMapProps<NodeData = any> = HTMLAttributes<SVGSVGElement> & {
nodeColor?: string | GetMiniMapNodeAttribute<NodeData>;
nodeStrokeColor?: string | GetMiniMapNodeAttribute<NodeData>;
nodeClassName?: string | GetMiniMapNodeAttribute<NodeData>;
@@ -12,4 +12,4 @@ export interface MiniMapProps<NodeData = any> extends HTMLAttributes<SVGSVGEleme
nodeStrokeWidth?: number;
maskColor?: string;
position?: PanelPosition;
}
};