microsoft / microsoft/TypeScript
Autofill object literal in IDE
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
- autofill object literal
Suggestion
It would be nice if there was a way to automatically fill in the required values of an object literal so I don't have to do it one property at a time, it would set the value to a minimum value (string '', number 0, etc). Then I can manually add the optional properties and there values.

Use Cases
This will help speed up creation of objects that have lots of required items.
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
L'issue non indica file, test o punti di ingresso. Inizia individuando la logica di completamento dei letterali oggetto dell'IDE e esaminando i test di completamento esistenti. Il lavoro è completato quando un'azione di completamento compila le proprietà obbligatorie con valori minimi appropriati, lasciando disponibili le proprietà opzionali per l'aggiunta manuale.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- typescript
- Ambito
- developer-experience, tooling
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 25/100