microsoft / microsoft/TypeScript

No completions in `@param` tag missing parameter name

Open
#37,281 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Needs Investigation
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

You can probably whittle this down to a 2 file repro, but just install @azure/functions in a plain .js file and try to write the following code:

// @ts-check

/**
 * @param {import("@azure/functions").$}
 */
module.exports = async function (context, req, connectionInfo) {
  context.res.json(connectionInfo);
};

Remove the $, place your cursor there, and request completions.

Expected: Completions
Actual No completions, maybe because the parse isn't failing gracefully.

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 a plain .js file with @azure/functions installed, using the @ts-check and @param example from the report. Place the cursor where the parameter name is missing and request completions; done means completions appear instead of the parser failing without results.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, javascript, typescript
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.