-
-
Notifications
You must be signed in to change notification settings - Fork 752
Description
Dear Typedoc Team,
sorry for rising this topic up again, but I'm rather sure the lack of this feature makes the documentation generator uncomplete.
Consider this valid case:
Foo.ts
import { IFoo } from './IFoo';
export class Foo {
getFoo (params: IFoo) {
return params.foo;
}
}IFoo.ts
import { Bar } from './Bar';
export interface IFoo {
foo: string
bar: Bar
}
Bar.ts
export class Bar {
logBar () {}
}
Now let's say, we want to generate the documentation for the Foo class. When we specify "entryPoints": ["Foo.ts"] we will lose half of the required documentation - about what are IFoo and Bar.
The
entryPointnaming is a bit misleading, as it usually means linker/compiler/generator will traverse the Tree, but it stops for theFooclass only.
As I see, there are 2 possible workarounds:
- To specify what Types should be generated, via multiple
entryPoints, or using theplugin-not-exported- but in both cases we have manually to track all required Types for the documentation. And usually due to the nested refs this is not quit easy to do. - Using the wildcard in
entryPointsto generate the docs for all files - but this blows the documentation with unneeded types.
So those workarounds are almost not usable.
What is the expected behavior?
Documentation generator should track all Types accessible by the reference (in property, argument, return type) and include those in output. It should track also deeply nested refs like in example Foo ➝ IFoo ➝ Bar
Or is there another way to output and link all Types direct or indirect accessible by Foo consumer?