microsoft / microsoft/TypeScript

In JS, don't complain about a better inferred type if there's no code action

Open
#28,702 2 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Domain: JavaScript Experience Enhancement Fixed Suggestion
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

TypeScript Version: 3.2.0-rc

Search Terms: inferred type

Code
JS file with checkJS on:
unbenannt

This message is on every single parameter without a JSDoc comment!

Expected behavior:
No complaint, or a code action that is offered

Actual behavior:
Complaint about a better inferred type, Ctrl + . offers no code actions.

Related Issues: https://github.com/Microsoft/TypeScript/issues/22357

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 report with TypeScript 3.2.0-rc in a JavaScript file with checkJS enabled, focusing on parameters without JSDoc and the inferred-type diagnostic. Confirm whether Ctrl+. offers no code actions; done means the diagnostic is suppressed when no action is available, or an applicable code action is offered.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
compilers, devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.