update(types): remove null types and use undefined

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-11-22 17:14:57 +01:00
parent fec38a129a
commit b9bb3cfb1a
9 changed files with 40 additions and 25 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
import { Component, CSSProperties, DefineComponent } from 'vue'
import { CSSProperties } from 'vue'
import { BackgroundVariant, Dimensions, ElementId, FitViewParams, Position, XYPosition } from './flow'
import { Connection } from './connection'
import { Node } from './node'
@@ -6,7 +6,7 @@ import { Node } from './node'
export type HandleType = 'source' | 'target'
export interface HandleElement extends XYPosition, Dimensions {
id?: ElementId | null
id?: ElementId
position: Position
}
@@ -64,7 +64,7 @@ export interface EdgeTextProps {
| string
| {
component: any
props?: Record<string, any>
props?: any
}
labelStyle?: CSSProperties
labelShowBg?: boolean
+4 -4
View File
@@ -9,10 +9,10 @@ export enum ConnectionLineType {
}
export interface Connection {
source: ElementId | null
target: ElementId | null
sourceHandle: ElementId | null
targetHandle: ElementId | null
source: ElementId
target: ElementId
sourceHandle: ElementId
targetHandle: ElementId
}
export type ConnectionLineProps = {
+2 -2
View File
@@ -7,8 +7,8 @@ export interface Edge<T = any> {
type?: string
source: ElementId
target: ElementId
sourceHandle?: ElementId | null
targetHandle?: ElementId | null
sourceHandle?: ElementId
targetHandle?: ElementId
selected?: boolean
sourcePosition?: Position
targetPosition?: Position
+2 -2
View File
@@ -8,8 +8,8 @@ export interface VFInternals {
width: number
height: number
handleBounds: {
source: HandleElement[] | null
target: HandleElement[] | null
source?: HandleElement[]
target?: HandleElement[]
}
}