Skip to content

No Suggestions in class property initializer #34621

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mjbvz opened this issue Oct 21, 2019 · 1 comment · Fixed by #35999
Closed

No Suggestions in class property initializer #34621

mjbvz opened this issue Oct 21, 2019 · 1 comment · Fixed by #35999
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue Good First Issue Well scoped, documented and has the green light Help Wanted You can do this

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Oct 21, 2019

From microsoft/vscode#82989

TypeScript Version: 3.7.0-dev.20191021

Search Terms:

  • completionInfo
  • suggest / suggestions
  • property initializer

Code

class Foo {
    private a = D
}

Place the cursor after the D and trigger suggestions

Expected behavior:
A suggestion for Date is returned.

Actual behavior:
Only keyword entries are returned

[Trace  - 1:53:49 PM] <semantic> Response received: completionInfo (118). Request took 2 ms. Success: true 
Result: {
    "isGlobalCompletion": false,
    "isMemberCompletion": true,
    "isNewIdentifierLocation": true,
    "entries": [
        {
            "name": "abstract",
            "kind": "keyword",
            "kindModifiers": "",
            "sortText": "4"
        },
        {
            "name": "async",
            "kind": "keyword",
            "kindModifiers": "",
            "sortText": "4"
        },
        {
            "name": "constructor",
            "kind": "keyword",
            "kindModifiers": "",
            "sortText": "4"
        },
        {
            "name": "get",
            "kind": "keyword",
            "kindModifiers": "",
            "sortText": "4"
        },
        {
            "name": "private",
            "kind": "keyword",
            "kindModifiers": "",
            "sortText": "4"
        },
        {
            "name": "protected",
            "kind": "keyword",
            "kindModifiers": "",
            "sortText": "4"
        },
        {
            "name": "public",
            "kind": "keyword",
            "kindModifiers": "",
            "sortText": "4"
        },
        {
            "name": "readonly",
            "kind": "keyword",
            "kindModifiers": "",
            "sortText": "4"
        },
        {
            "name": "set",
            "kind": "keyword",
            "kindModifiers": "",
            "sortText": "4"
        },
        {
            "name": "static",
            "kind": "keyword",
            "kindModifiers": "",
            "sortText": "4"
        }
    ]
}

Playground Link:

Related Issues:

@DanielRosenwasser
Copy link
Member

Thank you @a-tarasyuk!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue Good First Issue Well scoped, documented and has the green light Help Wanted You can do this
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants