microsoft / microsoft/TypeScript

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

Aperta
#28,980 3 commenti 3 reazioni 1 assegnatario Vedi su GitHub

@DanielRosenwasser ci sta già lavorando.

Dal 12/12/2018.

Docs
Lingua principale
Go
Stelle
111k
Fork
14.3k
Merge medio
2g 4h
PR unite (30g)
132

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.