microsoft / microsoft/TypeScript

Heuristic/loose completions for the 'any' type

Aperta
#5,334 8 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

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

Descrizione

Motivation

Today, if you have a value of type 'any', dotting off of the value and requesting members for completion will return nothing back. The original motivation for this was that we should never risk giving users incorrect completions.

This is great for a fully typed TypeScript project. However, for those migrating to TypeScript, as well as those who need to drop down to any fairly frequently, this can be slightly frustrating.

For those used to the JS editing experience in editors like Sublime where they just "got completions", the current behavior might be seen as unattractive.

Proposal

We should consider adding a language service option for users to get "loose" completions akin to what we give in the Salsa language service.

We can still keep the warning for each completion, but we should provide completions with a builder.

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.

Direzione di ricerca

Inizia leggendo la proposta e confrontando il comportamento esistente di Salsa language-service menzionato nell’issue. Determina l’ambito di un’opzione di language-service per completamenti permissivi, compreso il modo in cui gli avvisi dovrebbero rimanere associati e quale comportamento di completamento dimostrerebbe che la funzionalità è completa.

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
Da chiarire
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.