Skip to content

Commit

Permalink
refactor: move type utils to shared
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jan 16, 2022
1 parent 2e3e183 commit 6cfd72e
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions packages/runtime-core/src/componentEmits.ts
Expand Up @@ -8,7 +8,8 @@ import {
isArray,
isFunction,
isOn,
toNumber
toNumber,
UnionToIntersection
} from '@vue/shared'
import {
ComponentInternalInstance,
Expand All @@ -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'
Expand Down
5 changes: 3 additions & 2 deletions packages/runtime-core/src/componentOptions.ts
Expand Up @@ -15,7 +15,9 @@ import {
isObject,
isArray,
NOOP,
isPromise
isPromise,
LooseRequired,
UnionToIntersection
} from '@vue/shared'
import { computed, isRef, Ref } from '@vue/reactivity'
import {
Expand Down Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions packages/runtime-core/src/componentProps.ts
Expand Up @@ -21,7 +21,8 @@ import {
EMPTY_ARR,
def,
extend,
isOn
isOn,
IfAny
} from '@vue/shared'
import { warn } from './warning'
import {
Expand All @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions packages/runtime-core/src/componentPublicInstance.ts
Expand Up @@ -13,7 +13,8 @@ import {
NOOP,
extend,
isString,
isFunction
isFunction,
UnionToIntersection
} from '@vue/shared'
import {
toRaw,
Expand All @@ -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'

/**
Expand Down
1 change: 1 addition & 0 deletions packages/shared/src/index.ts
Expand Up @@ -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({})
Expand Down
File renamed without changes.

0 comments on commit 6cfd72e

Please sign in to comment.