Skip to content

completions don't include primitives for type arguments inside a function #28737

Closed
@ChuckJonas

Description

@ChuckJonas
  • VSCode Version: 1.29.1 (1.29.1)
  • OS Version: OSX 10.12.6

Steps to Reproduce:

  1. create a node typescript project
  2. npm install querystring
  3. type let m = new Map<string,

Expected:
I would have a Map with string key. No autocomplete would be preformed since I already have a valid statement

Result:
When you type the , vscode will autocomplete to let spMap = new Map<stringify, and add an import for import { stringify } from 'querystring';.

I haven't tested this with other primitive types, so I only know for sure that it fails with string.

Does this issue occur when all extensions are disabled?: Yes

wrong import

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptDomain: Completion ListsThe issue relates to showing completion lists in an editorDomain: TSServerIssues related to the TSServerFix AvailableA PR has been opened for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions