Skip to content

completionInfo returns isNewIdentifierLocation false after async inside object literal  #46470

@adamburgess

Description

@adamburgess

TS Template added by @mjbvz

TypeScript Version: 4.5.0-dev.20211021

Search Terms

  • completionInfo
  • suggest / suggestions
  • isNewIdentifierLocation

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

  • VS Code Version: 1.62.0-insider
  • OS Version: Windows_NT x64 10.0.19043

Steps to Reproduce:

  1. Create a new js file
  2. Type:
let obj = {
    a() {},
    async b(
  1. After typing the ( after async b, it is autocompleted to blur(). Note how the non-async method a does not autocomplete.

I think this is unexpected, as I'm creating a new method same as a, so it shouldn't autocomplete the word.
Similarly, if I do a generator *: * c( it also autocompletes.

Also, computed properties [] do not autocomplete, maybe they should? e.g. [pf( should autocomplete to [parseFloat() I would think?

Here's a video:

repro2.mp4

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFix 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