microsoft / microsoft/TypeScript

Allow folding of JSDoc comments

Open
#35,611 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Domain: LS: Outlining Effort: Moderate Help Wanted Suggestion
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

VsCode version: 1.40.2 (Oct 2019, 2)
OS: Windows 10 v1709 os build 16299.847
TypeScript Version: 3.6.3

Search Terms: vs code fold "app.get" outlining jsdoc comment expressjs folding

Code


/**
 * @api {get} /ProjectsList/:projectId/ Get project
 *
 * @apiDescription Get a project by projectId.
 *
 * @apiName Get User Projects
 * @apiGroup Project
 * @apiVersion 1.0.0
 *
 */
app.get('/:retailUnit/:language/ProjectsList/:projectId/', retailUnit, (req, res) => {
    const projectListController = new ProjectListController();

  });

Repro:

  • Create file foobar.js, copy paste the code from above.
  • Try fold all.
    Expected behavior: Comment and method fold
    Actual behavior: method fold, comment does not

Expected behavior: I can fold the jsdoc comment above the app.get function

Actual behavior: I cannot fold the jsdoc comment, outlining not available.

Related Issues: Some (incorrectly?) for vs code, but these are the ones I found, but the first one is very similar to this one, but for arrow functions instead:

This is my first report here, I hope it is ok. :-)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in foobar.js using the supplied JSDoc and app.get example, then trace the TypeScript/VS Code outlining behavior. Done means Fold All and the comment's fold control include the JSDoc block; no specific source file or test is named in the report.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript, vscode
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.