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

Inline Defined in headings #746

Closed
techfg opened this issue Dec 23, 2024 · 4 comments
Closed

Inline Defined in headings #746

techfg opened this issue Dec 23, 2024 · 4 comments
Labels
bug Issue raised as a bug. enhancement

Comments

@techfg
Copy link

techfg commented Dec 23, 2024

What package is the bug related to?

typedoc-plugin-markdown

Describe the issue

As mentioned here, interfaces do not currently contain an h2 for Defined in, which is inconsistent compared to html equivalent. Type aliases do contain h2 for Defined in as expected.

Repro: https://stackblitz.com/edit/vitejs-vite-ejmybzgn

npm run docs

image

TypeDoc configuration

    "typedoc": "^0.27.5",
    "typedoc-plugin-markdown": "^4.3.3",
    "typescript": "^5.7.2",

Expected behavior

An h2 for Defined in should appear for each interface

@tgreyuk
Copy link
Member

tgreyuk commented Dec 23, 2024

This issue also applies to Classes and Enums.

As discussed in #743 it potentially makes more sense to move the defined in with the symbol as inline text rather than a heading placed at the bottom of the symbol. This would be placed directly under the heading or declaration/signature block.

This would be implemented across the board for example:

Interface

Screenshot 2024-12-23 at 15 44 58

Type Alias

Screenshot 2024-12-23 at 15 49 34

I actually think this would be welcomed by users as this heading can create quite a lot of noise on auto-generated tocs.

@techfg
Copy link
Author

techfg commented Dec 23, 2024

Very much agree with this direction, thanks @tgreyuk!

@tgreyuk tgreyuk changed the title interface markdown does not contain ## Defined in heading Inline Defined in headings Dec 30, 2024
@tgreyuk
Copy link
Member

tgreyuk commented Dec 30, 2024

@techfg as discussed "Defined in" headings have been moved inline as per example in above discussion.

Available in [email protected]

@techfg
Copy link
Author

techfg commented Dec 30, 2024

Looks good in v4.4.0 @tgreyuk, thank you!

@tgreyuk tgreyuk closed this as completed Jan 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue raised as a bug. enhancement
Projects
None yet
Development

No branches or pull requests

2 participants