Skip to content

Commit

Permalink
Added example for method parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
Theo van der Donk committed Oct 23, 2023
1 parent 4dea5f7 commit 4c4e0ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ $ npx [email protected] --out ./docs
* Docs for class `Sub` must have a link in comment "Class that implements IBase". However, `IBase` is not a link, just text.
* Docs for class `Sub` must have a link in "Implements - IBase". However, `IBase` is not link, just text.
* Docs for class `Sub` must have a link in method baz which returns "IBase". However, `IBase` is not link, just text.
* Docs for class `Sub` must have a link for parameter `foo` of method `another` which is of type "IBase". However, `IBase` is not link, just text.
* Docs for interface `IBase` should have in the comment links to `ISub` and `Sub`.

These 4 errors should, IMHO, just work. It is annoying in a monorepo that you cannot link to other packages. There may be other occurrances (like having IBase as part of a method parameter, etc).

# Secondary erroneous result:
These may not be a bug but a related feature request.

* Docs for `IBase` should mention `Sub` as implementing class and `ISub` as derived interface.
* Docs for `IBase` should mention `Sub` as implementiSng class and `ISub` as derived interface.

So, subclasses/interfaces in other packages within the monorepo should be listed for the base class, even if it is in another package.
4 changes: 4 additions & 0 deletions sub/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,8 @@ export class Sub implements IBase {
baz(): IBase | undefined {
return undefined;
}

another(foo: IBase): void {
//
}
}

0 comments on commit 4c4e0ce

Please sign in to comment.