microsoft / microsoft/TypeScript

Provide a better display experience for unresolved values and types

Offen
#39,032 0 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

@sheetalkamat arbeitet bereits daran.

Seit 24.6.2020.

In Discussion Rescheduled Suggestion
Vorherrschende Sprache
Go
Sterne
111k
Forks
14.3k
Ø Merge
1 T. 19 Std.
Gemergte PRs (30 T.)
117

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.