re-export connectionState types

This commit is contained in:
peterkogo
2024-08-15 13:10:27 +02:00
parent 24e87e3984
commit 21e5fc1520
2 changed files with 9 additions and 2 deletions

View File

@@ -52,8 +52,6 @@ export type OnConnectStart = (event: MouseEvent | TouchEvent, params: OnConnectS
export type OnConnect = (connection: Connection) => void;
export type OnConnectEnd = (event: MouseEvent | TouchEvent, connectionState: FinalConnectionState) => void;
export type FinalConnectionState = Omit<ConnectionState, 'inProgress'>;
export type IsValidConnection = (edge: EdgeBase | Connection) => boolean;
export type FitViewParamsBase<NodeType extends NodeBase> = {
@@ -175,6 +173,11 @@ export type ConnectionState<NodeType extends InternalNodeBase = InternalNodeBase
| ConnectionInProgress<NodeType>
| NoConnection;
export type FinalConnectionState<NodeType extends InternalNodeBase = InternalNodeBase> = Omit<
ConnectionState<NodeType>,
'inProgress'
>;
export type UpdateConnection<NodeType extends InternalNodeBase = InternalNodeBase> = (
params: ConnectionState<NodeType>
) => void;