Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Regression in autocompletion on spread generic argumentsΒ #54572

Copy link
Copy link
@dexx086

Description

@dexx086
Issue body actions

Bug Report

πŸ”Ž Search Terms

autocomplete, regression

πŸ•— Version & Regression Information

  • This changed between versions 5.0.4 and 5.1.3

⏯ Playground Link

Playground link with relevant code

πŸ’» Code

function fn<T extends ('value1' | 'value2' | 'value3')[]>(...values: T): T { return values; }

const value1 = fn('');
const value2 = fn('value1', '');

πŸ™ Actual behavior

It should autocomplete inside both '' (empty string) places with value1|value2|value3 possible values, however it shows incorrect (kind of randomly gathered) options. For eg.:

image

πŸ™‚ Expected behavior

It should show only value1 / value2 / value3 options (as it does correctly with 5.0.4 and before), like this:

image

This issue could be related to (#53555) and (#52726) but I think my case is more basic, and appeared only in the latest (5.1.3) version of TS. (couldn't test if versions between 5.1.0 and 5.1.3 were affected or not, I could test only 5.1.3).

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Domain: LS: Completion ListsThe issue relates to showing completion lists in an editorThe issue relates to showing completion lists in an editorHelp WantedYou can do thisYou can do thisPossible ImprovementThe current behavior isn't wrong, but it's possible to see that it might be better in some casesThe current behavior isn't wrong, but it's possible to see that it might be better in some cases

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.