microsoft / microsoft/TypeScript

Docs: Advanced Types section "Interfaces vs. Type Aliases" is contradictory

Offen
#28,980 3 Kommentare 3 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

@DanielRosenwasser arbeitet bereits daran.

Seit 12.12.2018.

Docs
Vorherrschende Sprache
Go
Sterne
111k
Forks
14.4k
Ø Merge
1 T. 19 Std.
Gemergte PRs (30 T.)
117

Beschreibung

TypeScript Version: N/A

Search Terms:
label: Docs "Advanced Types" "Interfaces vs Type Aliases"

I've been trying to understand the differences between interfaces and type aliases, and I've found contradictory information on the "Advanced Types" page of the docs. The "Type Aliases" section begins with "Type aliases create a new name for a type." Just a few paragraphs later though in the "Interfaces vs. Type Aliases" subsection, it says: "Type aliases don’t create a new name". (Emphasis is mine). See also this blog post, which enumerates some other aspects of this section that would benefit from clarification/update.

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.