chore(libs): add tsdoc annotations
This commit is contained in:
@@ -21,8 +21,16 @@ export type ConnectionData = {
|
||||
connectionStatus: string | null;
|
||||
};
|
||||
|
||||
/**
|
||||
* @inline
|
||||
*/
|
||||
export type FitViewOptions<NodeType extends Node = Node> = FitViewOptionsBase<NodeType>;
|
||||
|
||||
/**
|
||||
* This type can be used to type the `onDelete` function with a custom node and edge type.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export type OnDelete<NodeType extends Node = Node, EdgeType extends Edge = Edge> = (params: {
|
||||
nodes: NodeType[];
|
||||
edges: EdgeType[];
|
||||
@@ -40,6 +48,10 @@ export type OnBeforeDelete<
|
||||
EdgeType extends Edge = Edge
|
||||
> = OnBeforeDeleteBase<NodeType, EdgeType>;
|
||||
|
||||
/**
|
||||
* This type can be used to type the `isValidConnection` function.
|
||||
* If the function returns `true`, the connection is valid and can be created.
|
||||
*/
|
||||
export type IsValidConnection<EdgeType extends Edge = Edge> = (
|
||||
edge: EdgeType | Connection
|
||||
) => boolean;
|
||||
|
||||
Reference in New Issue
Block a user