Auth0.js: Documentation is listing prototype extension of base classes as global

Created on 11 Feb 2021  ·  3Comments  ·  Source: auth0/auth0.js

Describe the problem

In the code we see this pattern a lot:
WebAuth.prototype.changePassword = function(options, cb) {..}
When I look at https://auth0.github.io/auth0.js/WebAuth.html this method is not listed. Instead it is listed under Globals
and I can't know without reading the source code that this function is called by doing WebAuth.changePassword(..).

What was the expected behavior?

These functions that are added to the prototype of the base classes (WebAuth, Authentication, Management) should be visible under Methods when I browse to the documentation page for each base class i.e https://auth0.github.io/auth0.js/WebAuth.html etc. but they are not.

Reproduction

Browse to the documentation page https://auth0.github.io/auth0.js/WebAuth.html and take a look.
You can also download this repo and run jsdoc -c .jsdoc.json and look in the out folder.

Possible fix

I found that by putting @memberof WebAuth.prototype in the jsdoc comment above the function wrongly listed as global gives the expected behaviour. It is described here.

documentation bug report

All 3 comments

Thanks for the suggestion - let me have a look at the docs and see how to improve in this area!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you have not received a response for our team (apologies for the delay) and this is still a blocker, please reply with additional information or just a ping. Thank you for your contribution! 🙇‍♂️

Keeping open, still want to do something with this.

Was this page helpful?
0 / 5 - 0 ratings