Skip to content

Commit 6cfd72e

Browse files
committed
refactor: move type utils to shared
1 parent 2e3e183 commit 6cfd72e

File tree

6 files changed

+10
-8
lines changed

6 files changed

+10
-8
lines changed

packages/runtime-core/src/componentEmits.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ import {
88
isArray,
99
isFunction,
1010
isOn,
11-
toNumber
11+
toNumber,
12+
UnionToIntersection
1213
} from '@vue/shared'
1314
import {
1415
ComponentInternalInstance,
@@ -18,7 +19,6 @@ import {
1819
} from './component'
1920
import { callWithAsyncErrorHandling, ErrorCodes } from './errorHandling'
2021
import { warn } from './warning'
21-
import { UnionToIntersection } from './helpers/typeUtils'
2222
import { devtoolsComponentEmit } from './devtools'
2323
import { AppContext } from './apiCreateApp'
2424
import { emit as compatInstanceEmit } from './compat/instanceEventEmitter'

packages/runtime-core/src/componentOptions.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ import {
1515
isObject,
1616
isArray,
1717
NOOP,
18-
isPromise
18+
isPromise,
19+
LooseRequired,
20+
UnionToIntersection
1921
} from '@vue/shared'
2022
import { computed, isRef, Ref } from '@vue/reactivity'
2123
import {
@@ -60,7 +62,6 @@ import {
6062
import { warn } from './warning'
6163
import { VNodeChild } from './vnode'
6264
import { callWithAsyncErrorHandling } from './errorHandling'
63-
import { LooseRequired, UnionToIntersection } from './helpers/typeUtils'
6465
import { deepMergeData } from './compat/data'
6566
import { DeprecationTypes } from './compat/compatConfig'
6667
import {

packages/runtime-core/src/componentProps.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ import {
2121
EMPTY_ARR,
2222
def,
2323
extend,
24-
isOn
24+
isOn,
25+
IfAny
2526
} from '@vue/shared'
2627
import { warn } from './warning'
2728
import {
@@ -39,7 +40,6 @@ import { createPropsDefaultThis } from './compat/props'
3940
import { isCompatEnabled, softAssertCompatEnabled } from './compat/compatConfig'
4041
import { DeprecationTypes } from './compat/compatConfig'
4142
import { shouldSkipAttr } from './compat/attrsFallthrough'
42-
import { IfAny } from './helpers/typeUtils'
4343

4444
export type ComponentPropsOptions<P = Data> =
4545
| ComponentObjectPropsOptions<P>

packages/runtime-core/src/componentPublicInstance.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ import {
1313
NOOP,
1414
extend,
1515
isString,
16-
isFunction
16+
isFunction,
17+
UnionToIntersection
1718
} from '@vue/shared'
1819
import {
1920
toRaw,
@@ -40,7 +41,6 @@ import { Slots } from './componentSlots'
4041
import { markAttrsAccessed } from './componentRenderUtils'
4142
import { currentRenderingInstance } from './componentRenderContext'
4243
import { warn } from './warning'
43-
import { UnionToIntersection } from './helpers/typeUtils'
4444
import { installCompatInstanceProperties } from './compat/instance'
4545

4646
/**

packages/shared/src/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export * from './domAttrConfig'
1212
export * from './escapeHtml'
1313
export * from './looseEqual'
1414
export * from './toDisplayString'
15+
export * from './typeUtils'
1516

1617
export const EMPTY_OBJ: { readonly [key: string]: any } = __DEV__
1718
? Object.freeze({})

0 commit comments

Comments
 (0)