types: (wip) improve dts output

This commit is contained in:
Evan You
2019-11-01 11:32:53 -04:00
parent 06c5b0a861
commit 5eee1152ca
9 changed files with 53 additions and 31 deletions

View File

@@ -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 =