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

@@ -16,7 +16,8 @@ import {
createObjectProperty,
ForCodegenNode,
ElementCodegenNode,
SlotOutletCodegenNode
SlotOutletCodegenNode,
SlotOutletNode
} from '../ast'
import { createCompilerError, ErrorCodes } from '../errors'
import {
@@ -119,7 +120,7 @@ export const transformFor = createStructuralDirectiveTransform(
: isTemplate &&
node.children.length === 1 &&
isSlotOutlet(node.children[0])
? node.children[0]
? (node.children[0] as SlotOutletNode) // api-extractor somehow fails to infer this
: null
const keyProperty = keyProp
? createObjectProperty(