feat(types): adjust type exports for manual render function and tooling usage

- v-model and v-show directives are now exposed as public
- compiler-used runtime helpers are now exposed for TS tooling, but marked as @private

close #1329
This commit is contained in:
Evan You
2020-06-10 14:57:21 -04:00
parent 9b5d13e598
commit e4dc03a8b1
13 changed files with 40 additions and 45 deletions

View File

@@ -161,7 +161,7 @@ let currentBlock: VNode[] | null = null
* disableTracking is true when creating a v-for fragment block, since a v-for
* fragment always diffs its children.
*
* @internal
* @private
*/
export function openBlock(disableTracking = false) {
blockStack.push((currentBlock = disableTracking ? null : []))
@@ -187,7 +187,7 @@ let shouldTrack = 1
* )
* ```
*
* @internal
* @private
*/
export function setBlockTracking(value: number) {
shouldTrack += value
@@ -198,7 +198,7 @@ export function setBlockTracking(value: number) {
* A block root keeps track of dynamic nodes within the block in the
* `dynamicChildren` array.
*
* @internal
* @private
*/
export function createBlock(
type: VNodeTypes | ClassComponent,
@@ -453,14 +453,14 @@ export function cloneVNode<T, U>(
}
/**
* @internal
* @private
*/
export function createTextVNode(text: string = ' ', flag: number = 0): VNode {
return createVNode(Text, null, text, flag)
}
/**
* @internal
* @private
*/
export function createStaticVNode(
content: string,
@@ -474,7 +474,7 @@ export function createStaticVNode(
}
/**
* @internal
* @private
*/
export function createCommentVNode(
text: string = '',