refactor: move type utils to shared
This commit is contained in:
		
							parent
							
								
									2e3e183b4f
								
							
						
					
					
						commit
						6cfd72e760
					
				| @ -8,7 +8,8 @@ import { | |||||||
|   isArray, |   isArray, | ||||||
|   isFunction, |   isFunction, | ||||||
|   isOn, |   isOn, | ||||||
|   toNumber |   toNumber, | ||||||
|  |   UnionToIntersection | ||||||
| } from '@vue/shared' | } from '@vue/shared' | ||||||
| import { | import { | ||||||
|   ComponentInternalInstance, |   ComponentInternalInstance, | ||||||
| @ -18,7 +19,6 @@ import { | |||||||
| } from './component' | } from './component' | ||||||
| import { callWithAsyncErrorHandling, ErrorCodes } from './errorHandling' | import { callWithAsyncErrorHandling, ErrorCodes } from './errorHandling' | ||||||
| import { warn } from './warning' | import { warn } from './warning' | ||||||
| import { UnionToIntersection } from './helpers/typeUtils' |  | ||||||
| import { devtoolsComponentEmit } from './devtools' | import { devtoolsComponentEmit } from './devtools' | ||||||
| import { AppContext } from './apiCreateApp' | import { AppContext } from './apiCreateApp' | ||||||
| import { emit as compatInstanceEmit } from './compat/instanceEventEmitter' | import { emit as compatInstanceEmit } from './compat/instanceEventEmitter' | ||||||
|  | |||||||
| @ -15,7 +15,9 @@ import { | |||||||
|   isObject, |   isObject, | ||||||
|   isArray, |   isArray, | ||||||
|   NOOP, |   NOOP, | ||||||
|   isPromise |   isPromise, | ||||||
|  |   LooseRequired, | ||||||
|  |   UnionToIntersection | ||||||
| } from '@vue/shared' | } from '@vue/shared' | ||||||
| import { computed, isRef, Ref } from '@vue/reactivity' | import { computed, isRef, Ref } from '@vue/reactivity' | ||||||
| import { | import { | ||||||
| @ -60,7 +62,6 @@ import { | |||||||
| import { warn } from './warning' | import { warn } from './warning' | ||||||
| import { VNodeChild } from './vnode' | import { VNodeChild } from './vnode' | ||||||
| import { callWithAsyncErrorHandling } from './errorHandling' | import { callWithAsyncErrorHandling } from './errorHandling' | ||||||
| import { LooseRequired, UnionToIntersection } from './helpers/typeUtils' |  | ||||||
| import { deepMergeData } from './compat/data' | import { deepMergeData } from './compat/data' | ||||||
| import { DeprecationTypes } from './compat/compatConfig' | import { DeprecationTypes } from './compat/compatConfig' | ||||||
| import { | import { | ||||||
|  | |||||||
| @ -21,7 +21,8 @@ import { | |||||||
|   EMPTY_ARR, |   EMPTY_ARR, | ||||||
|   def, |   def, | ||||||
|   extend, |   extend, | ||||||
|   isOn |   isOn, | ||||||
|  |   IfAny | ||||||
| } from '@vue/shared' | } from '@vue/shared' | ||||||
| import { warn } from './warning' | import { warn } from './warning' | ||||||
| import { | import { | ||||||
| @ -39,7 +40,6 @@ import { createPropsDefaultThis } from './compat/props' | |||||||
| import { isCompatEnabled, softAssertCompatEnabled } from './compat/compatConfig' | import { isCompatEnabled, softAssertCompatEnabled } from './compat/compatConfig' | ||||||
| import { DeprecationTypes } from './compat/compatConfig' | import { DeprecationTypes } from './compat/compatConfig' | ||||||
| import { shouldSkipAttr } from './compat/attrsFallthrough' | import { shouldSkipAttr } from './compat/attrsFallthrough' | ||||||
| import { IfAny } from './helpers/typeUtils' |  | ||||||
| 
 | 
 | ||||||
| export type ComponentPropsOptions<P = Data> = | export type ComponentPropsOptions<P = Data> = | ||||||
|   | ComponentObjectPropsOptions<P> |   | ComponentObjectPropsOptions<P> | ||||||
|  | |||||||
| @ -13,7 +13,8 @@ import { | |||||||
|   NOOP, |   NOOP, | ||||||
|   extend, |   extend, | ||||||
|   isString, |   isString, | ||||||
|   isFunction |   isFunction, | ||||||
|  |   UnionToIntersection | ||||||
| } from '@vue/shared' | } from '@vue/shared' | ||||||
| import { | import { | ||||||
|   toRaw, |   toRaw, | ||||||
| @ -40,7 +41,6 @@ import { Slots } from './componentSlots' | |||||||
| import { markAttrsAccessed } from './componentRenderUtils' | import { markAttrsAccessed } from './componentRenderUtils' | ||||||
| import { currentRenderingInstance } from './componentRenderContext' | import { currentRenderingInstance } from './componentRenderContext' | ||||||
| import { warn } from './warning' | import { warn } from './warning' | ||||||
| import { UnionToIntersection } from './helpers/typeUtils' |  | ||||||
| import { installCompatInstanceProperties } from './compat/instance' | import { installCompatInstanceProperties } from './compat/instance' | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  | |||||||
| @ -12,6 +12,7 @@ export * from './domAttrConfig' | |||||||
| export * from './escapeHtml' | export * from './escapeHtml' | ||||||
| export * from './looseEqual' | export * from './looseEqual' | ||||||
| export * from './toDisplayString' | export * from './toDisplayString' | ||||||
|  | export * from './typeUtils' | ||||||
| 
 | 
 | ||||||
| export const EMPTY_OBJ: { readonly [key: string]: any } = __DEV__ | export const EMPTY_OBJ: { readonly [key: string]: any } = __DEV__ | ||||||
|   ? Object.freeze({}) |   ? Object.freeze({}) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user