Skip to content

Docs: JSDoc for method decorators don't render properly #292

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

Closed
3 tasks
dreamorosi opened this issue Dec 12, 2021 · 5 comments · Fixed by #1755
Closed
3 tasks

Docs: JSDoc for method decorators don't render properly #292

dreamorosi opened this issue Dec 12, 2021 · 5 comments · Fixed by #1755
Assignees
Labels
completed This item is complete and has been merged/shipped documentation Improvements or additions to documentation

Comments

@dreamorosi
Copy link
Contributor

Description of the improvement

Summary of the proposal
Currently hovering on a decorator in VS Code shows an unindented code example with also additional characters (*) around the decorator name. This, aside from the fact that decorators are still experimental in TypeScript, is probably due to either the @ sigil conflicting with JSDocs (which uses the same symbol to delimit sections) and/or VS Code itself.

Discussion of the issue here.

TODO:

  • Create isolated code sample
  • Test if this is an issue in other IDEs (like the IntelliJ ones)
  • Open an issue on the TS or VS Code repos

How, where did you look for information
Hover on a decorator while on VS Code.

Missing or unclear documentation
N/A

Improvement
The code example should be indented & highlighted/rendered properly.

Related existing documentation

image

Related issues, RFCs

N/A

@dreamorosi dreamorosi added documentation Improvements or additions to documentation good-first-issue Something that is suitable for those who want to start contributing all labels Dec 12, 2021
@saragerion saragerion added priority:high blocked This item's progress is blocked by external dependency or reason and removed priority:high labels Jan 18, 2022
@saragerion saragerion added this to the production-ready-release milestone Jan 27, 2022
@dreamorosi
Copy link
Contributor Author

Opened issue on the VS Code repo: microsoft/TypeScript#47679

@dreamorosi
Copy link
Contributor Author

Update on the above:

The issue on the TS repo was initially included in the TypeScript 4.7.0 milestone but it has now been rescheduled as part of the 4.8.0 milestone (link).

The milestone is, at the time of writing this, at 2% completion and includes north of 350 issues.

@saragerion saragerion removed this from the production-ready-release milestone May 24, 2022
@dreamorosi dreamorosi removed good-first-issue Something that is suitable for those who want to start contributing priority:medium labels Oct 27, 2022
@dreamorosi dreamorosi changed the title (all): JSDoc for method decorators don't render properly Docs: JSDoc for method decorators don't render properly Nov 14, 2022
@dreamorosi dreamorosi added the bug-upstream This item is related to a bug caused by upstream dependency label Nov 14, 2022
@dreamorosi dreamorosi self-assigned this Oct 18, 2023
@dreamorosi dreamorosi added confirmed The scope is clear, ready for implementation and removed blocked This item's progress is blocked by external dependency or reason bug-upstream This item is related to a bug caused by upstream dependency labels Oct 18, 2023
@dreamorosi dreamorosi moved this from On hold to Working on it in Powertools for AWS Lambda (TypeScript) Oct 18, 2023
@dreamorosi
Copy link
Contributor Author

The issue still persists, however it appears that using an invisible character (U+2063) in front of the @ forces the IDE to display the decorator properly.

This is not an ideal solution, however we can adopt this workaround so that customers can consume the docstrings and have them rendered correctly.

I am subscribed to the upstream issue and will keep an eye on it, if a proper fix is released I'll remove the invisible character.

@github-project-automation github-project-automation bot moved this from Working on it to Coming soon in Powertools for AWS Lambda (TypeScript) Oct 18, 2023
@github-actions
Copy link
Contributor

⚠️ COMMENT VISIBILITY WARNING ⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@github-actions github-actions bot added pending-release This item has been merged and will be released soon and removed confirmed The scope is clear, ready for implementation labels Oct 18, 2023
Copy link
Contributor

github-actions bot commented Nov 1, 2023

This is now released under v1.14.1 version!

@github-actions github-actions bot added completed This item is complete and has been merged/shipped and removed pending-release This item has been merged and will be released soon labels Nov 1, 2023
@dreamorosi dreamorosi moved this from Coming soon to Shipped in Powertools for AWS Lambda (TypeScript) Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completed This item is complete and has been merged/shipped documentation Improvements or additions to documentation
Projects
2 participants