microsoft / microsoft/TypeScript

Provide a better display experience for unresolved values and types

Open
#39,032 0 comments 0 reactions 1 assignee View on GitHub

@sheetalkamat is already working on this.

Since Jun 24, 2020.

In Discussion Rescheduled Suggestion
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

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 https://github.com/microsoft/TypeScript/issues/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 https://github.com/microsoft/TypeScript/issues/38836

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.