import { defineComponent, PropType, } from 'vue'; import { DeclarationReflection, TypeParameterReflection, } from 'typedoc'; import './TSDocs.scss'; const getTypeParamString = (params: TypeParameterReflection[]) => `<${params.map(p => p.name).join(', ')}>`; export default defineComponent({ name: 'TSDocs', props: { docs: { type: (null as unknown) as PropType, required: true, }, }, setup(props) { const docs = props.docs; return () =>

{docs.name} {docs.typeParameters ? getTypeParamString(docs.typeParameters) : ''}

{docs.kindString}

{docs.comment?.shortText || ''}

{...(docs.children || []).map(child =>

        {child.name}: {child.type?.name}
      
)}
; }, });