Skip to content

Suggestions are not listed properly for arrays of generic type in function parameters (contextual completion) #53555

Description

@jgoux

Bug Report

🔎 Search Terms

suggestions, intellisense, autocomplete

🕗 Version & Regression Information

  • This is the behavior in every version I tried

⏯ Playground Link

Playground link with relevant code

💻 Code

declarefunctiontest<Textends'a'|'b'>(a: {foo: T[]}): void// Try trigerring the suggestions within the foo array, no suggestionstest({foo: [<cursorhere,ctrl+space>]})// Try trigerring the suggestions within the foo array, only suggestion is 'a'test({foo: ['a',<cursorhere,ctrl+space>]})

🙁 Actual behavior

When the array is empty, there is no suggestions at all
When the array has items, the suggestions are restricted to the items already set in the array

🙂 Expected behavior

In both cases, we should have the full list of suggestions 'a' | 'b'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions