Skip to content

Improve display experience for unresolved symbols #45893

@DanielRosenwasser

Description

@DanielRosenwasser

Today if you have code like

function foo(x: Thing) {

}

and Thing is not resolved, quick info will just fill in Thing as any. It may be preferable to still display Thing, which could be achieved by synthesizing a new symbol on the fly. This is handy in partial semantic mode, where full program construction is still taking place in the background, or in scenarios like web editors where we'll never have the full project.

This should not affect declaration emit. Additionally, there's a risk that users find this confusing because it's occasionally useful to know that something is in a broken state. While anys are annoying, they help signal this.

The work involved here might be related to #38836

Metadata

Metadata

Assignees

Labels

Domain: Type DisplayBugs relating to showing types in Quick Info/Tooltips, Signature Help, or Completion InfoExperimentation NeededSomeone needs to try this out to see what happensFix AvailableA PR has been opened for this issueSuggestionAn idea for TypeScript

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions