chore(core): cleanup

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
braks
2023-05-25 20:48:26 +02:00
committed by Braks
parent 26943b2d85
commit ff9f6471ed
3 changed files with 5 additions and 8 deletions
+2 -2
View File
@@ -1,11 +1,11 @@
import { toValue } from '@vueuse/core'
import { unref } from 'vue'
import { ErrorCode, VueFlowError, connectionExists, getEdgeId, isEdge, parseEdge, parseNode } from '.'
import type { Actions, Connection, Edge, GraphEdge, GraphNode, Node, State } from '~/types'
type NonUndefined<T> = T extends undefined ? never : T
export function isDef<T>(val: T): val is NonUndefined<T> {
const unrefVal = toValue(val)
const unrefVal = unref(val)
return typeof unrefVal !== 'undefined'
}