gcanti / docs-ts

A zero-config documentation tool for my TypeScript projects
https://gcanti.github.io/docs-ts/
MIT License
101 stars 17 forks source link

Can't ignore private methods from being generated #42

Closed eduhenke closed 3 years ago

eduhenke commented 3 years ago

Do you want to request a feature or report a bug? bug

What is the current behavior? I annotate my private method with a JSDoc containing @internal or @ignore, and the documentation is generated

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://codesandbox.io/ or similar.

/**
 * Description
 *
 * @example
 * const a = 3
 * 
 * @category Animal
 */
export default class Dog {
  public bark() {}
  /** @internal */
  private scratch() {}
}

What is the expected behavior? I expect the documentation to not be generated

Which versions of docs-ts, and which browser and OS are affected by this issue? Did this work in previous versions of docs-ts? v0.6.9, first time I use it.

IMax153 commented 3 years ago

Looks like we're not filtering out methods that we shouldIgnore in the Parser.

https://github.com/gcanti/docs-ts/blob/00d85a4031d574aa1b4c2abc9903a867468e4cbe/src/Parser.ts#L598-L612

I can take a look into fixing this next week