|
|
@@ -22,9 +22,22 @@ export {
|
|
|
export { Text, Comment, Fragment, Portal, Suspense } from './vnode'
|
|
|
// Internal Components
|
|
|
export { KeepAlive } from './keepAlive'
|
|
|
-// VNode flags
|
|
|
-export { PublicShapeFlags as ShapeFlags } from './shapeFlags'
|
|
|
-export { PublicPatchFlags as PatchFlags } from '@vue/shared'
|
|
|
+// VNode patchFlags
|
|
|
+import { PublicPatchFlags } from '@vue/shared'
|
|
|
+export const PatchFlags = PublicPatchFlags as {
|
|
|
+ // export flags as plain numbers to avoid d.ts relying on @vue/shared
|
|
|
+ // the enum type is internal anyway.
|
|
|
+ TEXT: number
|
|
|
+ CLASS: number
|
|
|
+ STYLE: number
|
|
|
+ PROPS: number
|
|
|
+ NEED_PATCH: number
|
|
|
+ FULL_PROPS: number
|
|
|
+ KEYED_FRAGMENT: number
|
|
|
+ UNKEYED_FRAGMENT: number
|
|
|
+ DYNAMIC_SLOTS: number
|
|
|
+ BAIL: number
|
|
|
+}
|
|
|
|
|
|
// For advanced plugins
|
|
|
export { getCurrentInstance } from './component'
|
|
|
@@ -52,7 +65,12 @@ export { toHandlers } from './helpers/toHandlers'
|
|
|
export { renderSlot } from './helpers/renderSlot'
|
|
|
export { createSlots } from './helpers/createSlots'
|
|
|
export { setBlockTracking, createTextVNode, createCommentVNode } from './vnode'
|
|
|
-export { capitalize, camelize } from '@vue/shared'
|
|
|
+// Since @vue/shared is inlined into final builds,
|
|
|
+// when re-exporting from @vue/shared we need to avoid relying on their original
|
|
|
+// types so that the bundled d.ts does not attempt to import from it.
|
|
|
+import { capitalize as _capitalize, camelize as _camelize } from '@vue/shared'
|
|
|
+export const capitalize = _capitalize as (s: string) => string
|
|
|
+export const camelize = _camelize as (s: string) => string
|
|
|
|
|
|
// Internal, for integration with runtime compiler
|
|
|
export { registerRuntimeCompiler } from './component'
|