Skip to content

Completions for type arguments of expressions #61751

Open
@mkantor

Description

@mkantor

πŸ” Search Terms

generic, function, class, call, apply, construct, "type parameter", "type argument", completion, suggestion, autocomplete, intellisense

βœ… Viability Checklist

⭐ Suggestion

#43526 implemented completions within type arguments of generic types. It would be nice to extend that behavior to the expression level, suggesting completions within type arguments of generic function calls, new expressions, etc.

πŸ“ƒ Motivating Example

In this code, foo is suggested:

type A<T extends { foo: unknown }> = T
type _ = A<{/* trigger completions here */}>

(Playground)

In this code it's not:

function f<T extends { foo: unknown }>() {}
f<{/* trigger completions here */}>()

(Playground)

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    Help WantedYou can do thisPossible ImprovementThe current behavior isn't wrong, but it's possible to see that it might be better in some cases

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions