Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a better display experience for unresolved values and types #39032

Open
DanielRosenwasser opened this issue Jun 12, 2020 · 0 comments
Open
Assignees
Labels
In Discussion Not yet reached consensus Rescheduled This issue was previously scheduled to an earlier milestone Suggestion An idea for TypeScript

Comments

@DanielRosenwasser
Copy link
Member

Today, an unresolved type, or the type of an unresolved variable will look something like any. Internally, these resolve to a well-known error type that semantically acts as any.

However, in #37713, we may not have a full picture of the world because we're limited to a single file.

I think we should consider doing two things

  1. In the syntactic mode, the type of any unresolved symbol should be of a new any-like type called loading.
  2. anywhere else, usage of an unresolved type should "stick around" and be recognized as a type reference to an extremely permissive type. This could be implemented through something similar to Ensure find-all-refs works on unresolved locals #38836

According to @CyrusNajmabadi, Roslyn already does something really similar to this.

@DanielRosenwasser DanielRosenwasser added Suggestion An idea for TypeScript In Discussion Not yet reached consensus labels Jun 12, 2020
@DanielRosenwasser DanielRosenwasser added this to the Typescript 4.0.1 milestone Jun 24, 2020
@RyanCavanaugh RyanCavanaugh added the Rescheduled This issue was previously scheduled to an earlier milestone label Aug 31, 2020
@RyanCavanaugh RyanCavanaugh removed this from the TypeScript 5.1.0 milestone Mar 4, 2024
@RyanCavanaugh RyanCavanaugh added this to the TypeScript 5.5.0 milestone Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
In Discussion Not yet reached consensus Rescheduled This issue was previously scheduled to an earlier milestone Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

4 participants