refactor(core): remove primtive typeguards

This commit is contained in:
braks
2023-10-30 13:36:07 +01:00
committed by Braks
parent 785f147236
commit 3b175a553e
10 changed files with 35 additions and 54 deletions
@@ -3,7 +3,7 @@ import { effectScope, nextTick, onScopeDispose, watch } from 'vue'
import type { WatchPausableReturn } from '@vueuse/core'
import { toRef, watchPausable } from '@vueuse/core'
import type { Connection, FlowProps, VueFlowStore } from '~/types'
import { isDef, isFunction } from '~/utils'
import { isDef } from '~/utils'
export function useWatchProps(
models: ToRefs<Pick<FlowProps, 'nodes' | 'edges' | 'modelValue'>>,
@@ -221,7 +221,7 @@ export function useWatchProps(
const autoConnector = async (params: Connection) => {
let connection: boolean | Connection = params
if (isFunction(props.autoConnect)) {
if (typeof props.autoConnect === 'function') {
connection = await props.autoConnect(params)
}