feat(docs): Add comments to types

This commit is contained in:
Braks
2022-03-14 18:20:58 +01:00
parent 3b8c49e654
commit c21ac7dca4
5 changed files with 82 additions and 8 deletions
+11
View File
@@ -1,5 +1,6 @@
import { HandleType } from './components'
/** Connection line types (same as default edge types */
export enum ConnectionLineType {
Bezier = 'default',
Straight = 'straight',
@@ -7,19 +8,29 @@ export enum ConnectionLineType {
SmoothStep = 'smoothstep',
}
/** Connection params that are passed when onConnect is called */
export interface Connection {
/** Source node id */
source: string
/** Target node id */
target: string
/** Source handle id */
sourceHandle?: string
/** Target handle id */
targetHandle?: string
}
/** The source nodes params when connection is initiated */
export type OnConnectStartParams = {
/** Source node id */
nodeId?: string
/** Source handle id */
handleId?: string
/** Source handle type */
handleType?: HandleType
}
/** Connection modes, when set to loose all handles are treated as source */
export enum ConnectionMode {
Strict = 'strict',
Loose = 'loose',