microsoft / microsoft/TypeScript
checkJs should recognize properties assigned with lodash
Nessuno ha ancora preso questa issue.
- Lingua principale
- Go
- Stelle
- 111k
- Fork
- 14.3k
- Merge medio
- 2g 4h
- PR unite (30g)
- 132
Descrizione
Search Terms
js, lodash, properties
Suggestion
Recognize properties of some object when using lodash assign method
Use Cases
Any initalization of an object using:
_.assign(obj, { ...someProps });
// Instead of
this.oneProp = oneProp;
this.anotherProp = anotherProp;
Examples

Checklist
My suggestion meets these guidelines:
- This wouldn't be a breaking change in existing TypeScript/JavaScript code
- This wouldn't change the runtime behavior of existing JavaScript code
- This could be implemented without emitting different JS based on the types of the expressions
- This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
- This feature would agree with the rest of TypeScript's Design Goals.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
La issue descrive il comportamento di checkJs di TypeScript per le proprietà assegnate tramite il metodo assign di lodash, ma non indica file sorgente, test o punti di ingresso. Inizia riproducendo l’esempio in un test checkJs mirato e traccia il modo in cui vengono riconosciute le assegnazioni di proprietà; il lavoro è completato quando il pattern lodash viene verificato dal type checker senza modificare il JavaScript emesso.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, typescript
- Ambito
- compilers
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 30/100