Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use @link references that TypeDoc can understand #11

Open
yokuze opened this issue Nov 18, 2021 · 0 comments
Open

Use @link references that TypeDoc can understand #11

yokuze opened this issue Nov 18, 2021 · 0 comments

Comments

@yokuze
Copy link
Contributor

yokuze commented Nov 18, 2021

The JSDoc documentation in this repo uses this format when @linking to code in its comments: {@link EventEmitterMixin#on}, where a # symbol separates the interface/class name and the interface/class's member:

* the optional `context` parameter on the {@link EventEmitterMixin#on} method to do so

JSDoc supports this syntax, although it is not well documented. Note the example of it under the "Example" heading here, but no formal documentation on how to reference class members.

It seems that using a . character instead of # is equally valid. TypeScript, VS Code, and other tools like TypeDoc that parse JSDoc comments recognize the . convention. However, TypeDoc does not recognize the # convention, which leads to broken links in documentation sites generated with TypeDoc.

We should switch to using the . format that's supported by the most tooling.

Additionally, the TS types in this project reference the EventEmitterMixin symbol when is should be referencing the IEventEmitter interface.

yokuze added a commit to yokuze/event-emitter that referenced this issue Nov 18, 2021
Additionally, use IEventEmitter in @links rather than EventEmitterMixin.
The documentation for IEventEmitter contained references to
EventEmitterMixin, but it should be referencing itself (IEventEmitter).
jthomerson added a commit that referenced this issue Nov 18, 2021
…x_11

docs: Use '.' separator syntax in JSDoc @links (#11)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant