]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
refactor: move type utils to shared
authorEvan You <yyx990803@gmail.com>
Sun, 16 Jan 2022 07:43:19 +0000 (15:43 +0800)
committerEvan You <yyx990803@gmail.com>
Sun, 16 Jan 2022 07:47:00 +0000 (15:47 +0800)
packages/runtime-core/src/componentEmits.ts
packages/runtime-core/src/componentOptions.ts
packages/runtime-core/src/componentProps.ts
packages/runtime-core/src/componentPublicInstance.ts
packages/shared/src/index.ts
packages/shared/src/typeUtils.ts [moved from packages/runtime-core/src/helpers/typeUtils.ts with 100% similarity]

index 390c6350b8ce8c2d2bba97ea7c851a9f7fe43277..4d028913d15a0bf6aa85fc0aedfd92a384bae30a 100644 (file)
@@ -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'
index 41e02c5da0a63c6368c5355c67809f5d9e7efd0e..139ef6d396744bb8e23e6e6eeae92dd06c797efb 100644 (file)
@@ -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 {
index dbd5453904d8c463222785ea78bf6c067e691700..946564b5e4adc446c57fc0d4a2852591c375f443 100644 (file)
@@ -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<P = Data> =
   | ComponentObjectPropsOptions<P>
index 8298aff42b1114378833af76946abc6c3191438f..1d7cfbdec69825bd3989dd47bffecbbccba5abb9 100644 (file)
@@ -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'
 
 /**
index c41a1a5fad51636bb62855b4415a7051e80e5c17..fd4f5c9ddcec821a3ccab59b9d4662f87d1666e6 100644 (file)
@@ -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({})