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

Cross-linking for argument types in typescript #130

Open
Luthaf opened this issue Jan 16, 2020 · 2 comments
Open

Cross-linking for argument types in typescript #130

Luthaf opened this issue Jan 16, 2020 · 2 comments

Comments

@Luthaf
Copy link

Luthaf commented Jan 16, 2020

Hi, and thanks a lot for this package! I am using it to document a typescript project, and I have a feature request.


Code like this

interface Person {
   age: number;
   city: string;
}

class Bar {
    private drinks: string[] = [];
}

/**
 * get_out description
 * @param  person description
 * @param  bar    description
 */
function get_out(person: Person, bar: Bar) {}
.. js:autoclass:: Person

.. js:autoclass:: Bar

.. js:autofunction:: get_out

currently renders as

screenshot

It would greatly improve navigation if the types of parameters (index.Person and index.Bar) where links to the documentation for the type.

Is it currently possible to do this?

Thanks for your time

@erikrose
Copy link
Contributor

I'm about 80% sure that we would have to take over the low-level rendering of functions, interfaces, etc., where we currently use the bits Sphinx provides for free. I'm not against that, but it would be a bit of a project. I welcome any who want to undertake it; I agree it's an eminently sane feature.

@erikrose
Copy link
Contributor

erikrose commented Sep 2, 2020

Now I'm 100% sure, for what that's worth. :-)

hoodmane added a commit to hoodmane/sphinx-js that referenced this issue May 2, 2024
We can't use a ? unless we fix things on the Python side because `undefined`
turns into an entirely missing entry. If we want to turn it into `None` we need
to either put a `null` in javascript or set `None` as the default value in
`ir.py`. I removed a lot of the `?`'s because we don't use them, but
qualifiedName and sourcefilename do sometimes seem to go missing right now.
Maybe we can fix that later.
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

2 participants