Skip to content

Commit

Permalink
temp: add typedoc-declaration package x15
Browse files Browse the repository at this point in the history
  • Loading branch information
vanyauhalin committed Dec 9, 2024
1 parent 2313651 commit 6ae006a
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions packages/typedoc-declaration/lib/internal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -564,12 +564,11 @@ export function shakeItems(o: J.Reflection, c: Item[]): Entity[] {
r.parentId = p.id
}

p.children.push(...t.children)

if (p instanceof Declaration) {
p.parameters.push(...t.parameters)
}

p.children.push(...t.children)
break
}

Expand All @@ -594,25 +593,34 @@ export function shakeItems(o: J.Reflection, c: Item[]): Entity[] {
continue
}

t.parentId = p.id
p.children.push(t.id)

if (
isCallSignatureReflection(s) &&
(
isCallSignatureReflection(s) ||
isConstructorSignatureReflection(s)
) &&
!t.narrative.isEmpty &&
p.narrative.isEmpty
) {
p.narrative = Narrative.merge(p.narrative, t.narrative)
}

if (
isCallSignatureReflection(s) &&
(
isCallSignatureReflection(s) ||
isConstructorSignatureReflection(s)
) &&
t.narrative.isEmpty &&
!p.narrative.isEmpty
) {
t.narrative = Narrative.merge(t.narrative, p.narrative)
}

if (isConstructorSignatureReflection(s)) {
t.name = "constructor"
}

t.parentId = p.id
p.children.push(t.id)
break
}

Expand Down

0 comments on commit 6ae006a

Please sign in to comment.