Skip to content

Commit b397f0b

Browse files
authored
Merge pull request #118 from docsbydoxdox/hotfix/jsdoc-filter-undocumented
[hotfix] Filter undocumented methods from parser.
2 parents 800deb8 + 9b094f5 commit b397f0b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

packages/doxdox-parser-jsdoc/src/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ export default async (cwd: string, path: string): Promise<File> => {
3131
const docs = JSON.parse(output) as Jsdoc[];
3232

3333
const methods = docs
34-
.filter((jsdoc: Jsdoc) => jsdoc.kind === 'function')
34+
.filter(
35+
(jsdoc: Jsdoc) =>
36+
jsdoc.kind === 'function' && !jsdoc.undocumented
37+
)
3538
.map((jsdoc: Jsdoc) => {
3639
const params = (jsdoc.params || []).map(
3740
({ name, description, type }) => ({

packages/doxdox-parser-jsdoc/src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export interface Jsdoc {
55
params: JsdocParam[];
66
returns: JsdocParam[];
77
access: string;
8+
undocumented?: boolean;
89
}
910

1011
export interface JsdocParam {

0 commit comments

Comments
 (0)