Skip to content

Heuristic/loose completions for the 'any' type #5334

Open
@DanielRosenwasser

Description

@DanielRosenwasser

Motivation

Today, if you have a value of type 'any', dotting off of the value and requesting members for completion will return nothing back. The original motivation for this was that we should never risk giving users incorrect completions.

This is great for a fully typed TypeScript project. However, for those migrating to TypeScript, as well as those who need to drop down to any fairly frequently, this can be slightly frustrating.

For those used to the JS editing experience in editors like Sublime where they just "got completions", the current behavior might be seen as unattractive.

Proposal

We should consider adding a language service option for users to get "loose" completions akin to what we give in the Salsa language service.

We can still keep the warning for each completion, but we should provide completions with a builder.

Metadata

Metadata

Assignees

No one assigned

    Labels

    In DiscussionNot yet reached consensusSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions