types: (wip) improve dts output
This commit is contained in:
@@ -1,16 +1,10 @@
|
||||
import { ComponentInternalInstance, currentInstance } from './component'
|
||||
import {
|
||||
VNode,
|
||||
NormalizedChildren,
|
||||
normalizeVNode,
|
||||
VNodeChild,
|
||||
VNodeChildren
|
||||
} from './vnode'
|
||||
import { VNode, NormalizedChildren, normalizeVNode, VNodeChild } from './vnode'
|
||||
import { isArray, isFunction } from '@vue/shared'
|
||||
import { ShapeFlags } from './shapeFlags'
|
||||
import { warn } from './warning'
|
||||
|
||||
export type Slot = (...args: any[]) => VNodeChildren
|
||||
export type Slot = (...args: any[]) => VNode[]
|
||||
|
||||
export type InternalSlots = {
|
||||
[name: string]: Slot
|
||||
|
||||
@@ -30,7 +30,7 @@ export { PublicPatchFlags as PatchFlags } from '@vue/shared'
|
||||
export { getCurrentInstance } from './component'
|
||||
|
||||
// For custom renderers
|
||||
export { createRenderer } from './createRenderer'
|
||||
export { createRenderer, RootRenderFunction } from './createRenderer'
|
||||
export { warn } from './warning'
|
||||
export {
|
||||
handleError,
|
||||
|
||||
@@ -135,7 +135,7 @@ export const KeepAlive = {
|
||||
|
||||
return () => {
|
||||
if (!slots.default) {
|
||||
return
|
||||
return null
|
||||
}
|
||||
|
||||
const children = slots.default()
|
||||
|
||||
@@ -25,9 +25,12 @@ export const Portal = Symbol(__DEV__ ? 'Portal' : undefined)
|
||||
export const Text = Symbol(__DEV__ ? 'Text' : undefined)
|
||||
export const Comment = Symbol(__DEV__ ? 'Comment' : undefined)
|
||||
|
||||
const Suspense = (__FEATURE_SUSPENSE__
|
||||
? SuspenseImpl
|
||||
: null) as typeof SuspenseImpl
|
||||
// Export as {} to avoid circular type dependency between `suspense.ts` and
|
||||
// `createRenderer.ts` in exported types.
|
||||
// A circular type dependency causes tsc to generate d.ts with dynmaic import()
|
||||
// calls using realtive paths, which works for separate d.ts files, but will
|
||||
// fail after d.ts rollup with API Extractor.
|
||||
const Suspense = (__FEATURE_SUSPENSE__ ? SuspenseImpl : null) as {}
|
||||
export { Suspense }
|
||||
|
||||
export type VNodeTypes =
|
||||
|
||||
Reference in New Issue
Block a user