Skip to content

Commit

Permalink
nodeJs: fix GenTsDecl to skip NoDoc types and slots
Browse files Browse the repository at this point in the history
  • Loading branch information
briansfrank committed Apr 7, 2024
1 parent e4fab77 commit 1bbeba1
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/nodeJs/fan/ts/GenTsDecl.fan
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,11 @@ class GenTsDecl
{
genTypes := pod.types.findAll |CType type->Bool|
{
if (type.isSynthetic || type.isInternal) return false
// TODO: skip @NoDoc???
if (type.isSynthetic || type.isInternal || type.isNoDoc) return false

// if we aren't generating all types, short-circuit if missing @Js facet
if (!allTypes && !type.hasFacet("sys::Js")) return false

return true
}

Expand Down Expand Up @@ -173,14 +174,17 @@ class GenTsDecl
out.print(" $staticStr$name($inputs): $output\n")
}

out.print("}\n")
out.print("}\n\n")
}

private Bool includeSlot(CType type, CSlot slot)
{
// declared only slots, not inherited
if (slot.parent !== type) return false

// skip @NoDoc
if (slot.isNoDoc) return false

// public only
return slot.isPublic
}
Expand Down Expand Up @@ -282,6 +286,8 @@ class GenTsDecl
text := doc?.text?.trimToNull
if (text == null) return

if (node.isNoDoc) return

parser := FandocParser()
parser.silent = true
fandoc := parser.parse(node.toStr, text.in)
Expand Down

0 comments on commit 1bbeba1

Please sign in to comment.