Skip to content

Latter type parameters are not suggested in constraints of the preceding onesΒ #56474

Closed
@Andarist

Description

@Andarist

πŸ”Ž Search Terms

type parameters constraints completions

πŸ•— Version & Regression Information

⏯ Playground Link

https://www.typescriptlang.org/play?ts=5.4.0-dev.20231120#code/GYVwdgxgLglg9mABFApgZygHgGIwE4aIoAeqYAJmogMoD0AVPbQDQ0oQLkB8AFAIYAuRLgJRWAIyHV2nAJSIA3gF8AUCqA

πŸ’» Code

function test<First extends S/**/, Second>(a: First, b: Second) {}

πŸ™ Actual behavior

Second is not suggested at this marker

πŸ™‚ Expected behavior

I'd expect Second to be suggested since depending on the latter type parameters is valid (even if weird at times).

Additional information about the issue

This change was called out in comments of the PR that introduced this (initially it focused only on expression-space parameters) but I wonder if this is something that could be revisited. cc @zardoy

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: Completion ListsThe issue relates to showing completion lists in an editorHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions