use generics across the library

This commit is contained in:
peterkogo
2025-04-17 15:36:39 +02:00
parent cf1e0bee81
commit 353c661dd8
27 changed files with 198 additions and 152 deletions
@@ -3,7 +3,7 @@
import type { Snippet } from 'svelte';
import { type SvelteFlowRestProps } from '$lib/store/types';
import { toPxString } from '$lib/utils';
import type { Node, Edge, NodeTypes } from '$lib/types';
import type { Node, Edge } from '$lib/types';
let {
width,
@@ -45,9 +45,9 @@ import type { EdgeEvents, NodeEvents, NodeSelectionEvents, PaneEvents } from '$l
export type SvelteFlowProps<
NodeType extends Node = Node,
EdgeType extends Edge = Edge
> = NodeEvents &
NodeSelectionEvents &
EdgeEvents &
> = NodeEvents<NodeType> &
NodeSelectionEvents<NodeType> &
EdgeEvents<EdgeType> &
PaneEvents & {
/** The id of the flow
*