fix(cli): generated type def on multi impl blocks

This commit is contained in:
LongYinan 2022-04-26 17:53:54 +08:00
parent cc79c9794e
commit c3a35a0704
No known key found for this signature in database
GPG key ID: C3666B7FC82ADAD7
4 changed files with 7 additions and 1 deletions
cli/src

View file

@ -592,7 +592,11 @@ async function processIntermediateTypeFile(
})
break
case 'impl':
impls.set(def.name, `${def.js_doc}${def.def}`)
const existed = impls.get(def.name)
impls.set(
def.name,
`${existed ? existed + '\n' : ''}${def.js_doc}${def.def}`,
)
break
case 'interface':
dts +=