Skip to content

No member suggestions after class property definition without semicolon #30536

@mjbvz

Description

@mjbvz

From microsoft/vscode#69897

TypeScript Version: 3.4.0-rc

Search Terms:

  • suggestion, suggest, completions

Code
For the javascript

// @ts-check

import React from 'react';

class X extends React.Component {
    x = 1
    comp
}
  1. Trigger suggestions after comp

Expected behavior:
Suggestions for the react componentDid... methods returned

Actual behavior:
Global suggestions returned

If you add a semicolon after x = 1;, you get the correct suggestions:

// @ts-check

import React from 'react';

class X extends React.Component {
    x = 1
    comp
}

Playground Link:

Related Issues:

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptDomain: Completion ListsThe issue relates to showing completion lists in an editor

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions