diff --git a/packages/runtime-core/src/componentEmits.ts b/packages/runtime-core/src/componentEmits.ts index 390c6350b8c..4d028913d15 100644 --- a/packages/runtime-core/src/componentEmits.ts +++ b/packages/runtime-core/src/componentEmits.ts @@ -8,7 +8,8 @@ import { isArray, isFunction, isOn, - toNumber + toNumber, + UnionToIntersection } from '@vue/shared' import { ComponentInternalInstance, @@ -18,7 +19,6 @@ import { } from './component' import { callWithAsyncErrorHandling, ErrorCodes } from './errorHandling' import { warn } from './warning' -import { UnionToIntersection } from './helpers/typeUtils' import { devtoolsComponentEmit } from './devtools' import { AppContext } from './apiCreateApp' import { emit as compatInstanceEmit } from './compat/instanceEventEmitter' diff --git a/packages/runtime-core/src/componentOptions.ts b/packages/runtime-core/src/componentOptions.ts index 41e02c5da0a..139ef6d3967 100644 --- a/packages/runtime-core/src/componentOptions.ts +++ b/packages/runtime-core/src/componentOptions.ts @@ -15,7 +15,9 @@ import { isObject, isArray, NOOP, - isPromise + isPromise, + LooseRequired, + UnionToIntersection } from '@vue/shared' import { computed, isRef, Ref } from '@vue/reactivity' import { @@ -60,7 +62,6 @@ import { import { warn } from './warning' import { VNodeChild } from './vnode' import { callWithAsyncErrorHandling } from './errorHandling' -import { LooseRequired, UnionToIntersection } from './helpers/typeUtils' import { deepMergeData } from './compat/data' import { DeprecationTypes } from './compat/compatConfig' import { diff --git a/packages/runtime-core/src/componentProps.ts b/packages/runtime-core/src/componentProps.ts index dbd5453904d..946564b5e4a 100644 --- a/packages/runtime-core/src/componentProps.ts +++ b/packages/runtime-core/src/componentProps.ts @@ -21,7 +21,8 @@ import { EMPTY_ARR, def, extend, - isOn + isOn, + IfAny } from '@vue/shared' import { warn } from './warning' import { @@ -39,7 +40,6 @@ import { createPropsDefaultThis } from './compat/props' import { isCompatEnabled, softAssertCompatEnabled } from './compat/compatConfig' import { DeprecationTypes } from './compat/compatConfig' import { shouldSkipAttr } from './compat/attrsFallthrough' -import { IfAny } from './helpers/typeUtils' export type ComponentPropsOptions

= | ComponentObjectPropsOptions

diff --git a/packages/runtime-core/src/componentPublicInstance.ts b/packages/runtime-core/src/componentPublicInstance.ts index 8298aff42b1..1d7cfbdec69 100644 --- a/packages/runtime-core/src/componentPublicInstance.ts +++ b/packages/runtime-core/src/componentPublicInstance.ts @@ -13,7 +13,8 @@ import { NOOP, extend, isString, - isFunction + isFunction, + UnionToIntersection } from '@vue/shared' import { toRaw, @@ -40,7 +41,6 @@ import { Slots } from './componentSlots' import { markAttrsAccessed } from './componentRenderUtils' import { currentRenderingInstance } from './componentRenderContext' import { warn } from './warning' -import { UnionToIntersection } from './helpers/typeUtils' import { installCompatInstanceProperties } from './compat/instance' /** diff --git a/packages/shared/src/index.ts b/packages/shared/src/index.ts index c41a1a5fad5..fd4f5c9ddce 100644 --- a/packages/shared/src/index.ts +++ b/packages/shared/src/index.ts @@ -12,6 +12,7 @@ export * from './domAttrConfig' export * from './escapeHtml' export * from './looseEqual' export * from './toDisplayString' +export * from './typeUtils' export const EMPTY_OBJ: { readonly [key: string]: any } = __DEV__ ? Object.freeze({}) diff --git a/packages/runtime-core/src/helpers/typeUtils.ts b/packages/shared/src/typeUtils.ts similarity index 100% rename from packages/runtime-core/src/helpers/typeUtils.ts rename to packages/shared/src/typeUtils.ts