How to use sphinx_js with a "export default class"?

I have a project with Python and Javascript code, which I would like to document using Sphinx. I fail to get sphinx_js working. My Sphinx project is in a docs subfolder. The Javascript code is in frontend/src, so in my docs/ I configured:

js_source_path = "../frontend/src"

My JS code in frontend/src/foo_controller.js looks like this:

 * Some JSDoc like documentation just for testing.
export default class extends Controller {
     * More JSDoc documentation for a function.
    connect() {...}

In my index.rst I have:

.. js:autoclass:: ???

Whatever I tried for the ??? (foo_controller, controller/foo_controller, FooController, ...) I always get the error:

No JSDoc documentation was found for object "..." or any path ending with that.

How to I have to replace the ??? to document my class?

Read more here:

Content Attribution

This content was originally published by achim at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: