Skip to content
This repository was archived by the owner on Jul 19, 2025. It is now read-only.

Commit 639c847

Browse files
committed
refactor(runtime-shared): move Data
1 parent 7cd7050 commit 639c847

21 files changed

+28
-31
lines changed

packages/runtime-core/__tests__/vnode.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ import {
1111
openBlock,
1212
transformVNodeArgs,
1313
} from '../src/vnode'
14-
import { type Data, PatchFlags, ShapeFlags } from '@vue/shared'
14+
import { PatchFlags, ShapeFlags } from '@vue/shared'
15+
import type { Data } from '@vue/runtime-shared'
1516
import { h, isReactive, reactive, ref, setBlockTracking, withCtx } from '../src'
1617
import { createApp, nodeOps, serializeInner } from '@vue/runtime-test'
1718
import { setCurrentRenderingInstance } from '../src/componentRenderContext'

packages/runtime-core/src/apiCreateApp.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ import { warn } from './warning'
2121
import { type VNode, cloneVNode, createVNode } from './vnode'
2222
import type { RootHydrateFunction } from './hydration'
2323
import { devtoolsInitApp, devtoolsUnmountApp } from './devtools'
24-
import { type Data, NO, extend, isFunction, isObject } from '@vue/shared'
24+
import { NO, extend, isFunction, isObject } from '@vue/shared'
25+
import type { Data } from '@vue/runtime-shared'
2526
import { version } from '.'
2627
import { installAppCompatProperties } from './compat/global'
2728
import type { NormalizedPropsOptions } from './componentProps'

packages/runtime-core/src/compat/props.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { type Data, isArray } from '@vue/shared'
1+
import { isArray } from '@vue/shared'
2+
import type { Data } from '@vue/runtime-shared'
23
import { inject } from '../apiInject'
34
import type { ComponentInternalInstance } from '../component'
45
import {

packages/runtime-core/src/compat/renderFn.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import {
2-
type Data,
32
ShapeFlags,
43
extend,
54
hyphenate,
@@ -11,6 +10,7 @@ import {
1110
normalizeStyle,
1211
toHandlerKey,
1312
} from '@vue/shared'
13+
import type { Data } from '@vue/runtime-shared'
1414
import type {
1515
Component,
1616
ComponentInternalInstance,

packages/runtime-core/src/component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ import {
6060
normalizeEmitsOptions,
6161
} from './componentEmits'
6262
import {
63-
type Data,
6463
EMPTY_OBJ,
6564
type IfAny,
6665
NOOP,
@@ -73,6 +72,7 @@ import {
7372
isPromise,
7473
makeMap,
7574
} from '@vue/shared'
75+
import type { Data } from '@vue/runtime-shared'
7676
import type { SuspenseBoundary } from './components/Suspense'
7777
import type { CompilerOptions } from '@vue/compiler-core'
7878
import { markAttrsAccessed } from './componentRenderUtils'

packages/runtime-core/src/componentOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
currentInstance,
99
} from './component'
1010
import {
11-
type Data,
1211
type LooseRequired,
1312
NOOP,
1413
type Prettify,
@@ -19,6 +18,7 @@ import {
1918
isPromise,
2019
isString,
2120
} from '@vue/shared'
21+
import type { Data } from '@vue/runtime-shared'
2222
import { type Ref, getCurrentScope, isRef, traverse } from '@vue/reactivity'
2323
import { computed } from './apiComputed'
2424
import {

packages/runtime-core/src/componentProps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
trigger,
77
} from '@vue/reactivity'
88
import {
9-
type Data,
109
EMPTY_ARR,
1110
EMPTY_OBJ,
1211
type IfAny,
@@ -25,6 +24,7 @@ import {
2524
makeMap,
2625
toRawType,
2726
} from '@vue/shared'
27+
import type { Data } from '@vue/runtime-shared'
2828
import { warn } from './warning'
2929
import {
3030
type ComponentInternalInstance,

packages/runtime-core/src/componentPublicInstance.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import {
1111
instanceWatch,
1212
} from './apiWatch'
1313
import {
14-
type Data,
1514
EMPTY_OBJ,
1615
type IfAny,
1716
NOOP,
@@ -23,6 +22,7 @@ import {
2322
isGloballyAllowed,
2423
isString,
2524
} from '@vue/shared'
25+
import type { Data } from '@vue/runtime-shared'
2626
import {
2727
ReactiveFlags,
2828
type ShallowUnwrapRef,

packages/runtime-core/src/componentRenderUtils.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,8 @@ import {
1414
normalizeVNode,
1515
} from './vnode'
1616
import { ErrorCodes, handleError } from './errorHandling'
17-
import {
18-
type Data,
19-
PatchFlags,
20-
ShapeFlags,
21-
isModelListener,
22-
isOn,
23-
} from '@vue/shared'
17+
import { PatchFlags, ShapeFlags, isModelListener, isOn } from '@vue/shared'
18+
import type { Data } from '@vue/runtime-shared'
2419
import { warn } from './warning'
2520
import { isHmrUpdating } from './hmr'
2621
import type { NormalizedProps } from './componentProps'

packages/runtime-core/src/directives.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,8 @@ return withDirectives(h(comp), [
1212
*/
1313

1414
import type { VNode } from './vnode'
15-
import {
16-
type Data,
17-
EMPTY_OBJ,
18-
isBuiltInDirective,
19-
isFunction,
20-
} from '@vue/shared'
15+
import { EMPTY_OBJ, isBuiltInDirective, isFunction } from '@vue/shared'
16+
import type { Data } from '@vue/runtime-shared'
2117
import { warn } from './warning'
2218
import { type ComponentInternalInstance, getExposeProxy } from './component'
2319
import { currentRenderingInstance } from './componentRenderContext'

0 commit comments

Comments
 (0)