Files
pokemon-doors/node_modules/@xyflow/react/dist/esm/hooks/useNodeConnections.d.ts
T

25 lines
787 B
TypeScript

import { type NodeConnection, type UseNodeConnectionsParams } from '@xyflow/system';
/**
* This hook returns an array of connections on a specific node, handle type ('source', 'target') or handle ID.
*
* @public
* @returns An array with connections.
*
* @example
* ```jsx
*import { useNodeConnections } from '@xyflow/react';
*
*export default function () {
* const connections = useNodeConnections({
* handleType: 'target',
* handleId: 'my-handle',
* });
*
* return (
* <div>There are currently {connections.length} incoming connections!</div>
* );
*}
*```
*/
export declare function useNodeConnections({ id, handleType, handleId, onConnect, onDisconnect, }?: UseNodeConnectionsParams): NodeConnection[];
//# sourceMappingURL=useNodeConnections.d.ts.map