microsoft / microsoft/TypeScript

Spread with enum index key, invalid members don't trigger errors

Aperta
#32,236 5 commenti 7 reazioni 1 assegnatario Vedi su GitHub

@ahejlsberg ci sta già lavorando.

Dal 3/7/2019.

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

Descrizione

TypeScript Version: 3.5.1

Search Terms:
object spread enum index missing keys

Code
Playground link has code

Expected behavior:
Missing keys & incorrect value types when I build a nested object using the spread operator with index keys, ought to throw errors for invalid types

Actual behavior:
It seems like the child object can have whatever shape I want, the types aren't being checked at all

Playground Link: This is same as above playground link

Related Issues: I'm not really sure what the root limitation that's causing this is so it's hard for me to find similar issues.

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.