microsoft / microsoft/TypeScript

Indicate in the editor that a type is explicitly `any`

Aperta
#60,189 2 commenti 9 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Awaiting More Feedback Suggestion
Lingua principale
Go
Stelle
111k
Fork
14.3k
Merge medio
1g 19h
PR unite (30g)
117

Descrizione

🔍 Search Terms

any marker editor

✅ Viability Checklist
⭐ Suggestion

Types that are explicitly set to any are sometimes hard to distinguish from actually typed variables in the editor. You might be adopting types while still having a lot of any around and then it would be helpful to call any out more explicitly in the editor.

📃 Motivating Example

I am now using the extension https://marketplace.visualstudio.com/items?itemName=danvk.any-xray which does this:

Image

💻 Use Cases
  1. What do you want to use this for?

Seeing explicit any types easily so that I can work on adding types.

  1. What shortcomings exist with current approaches?

I can disable explicit any by producing errors but that is very aggressive.

  1. What workarounds are you using in the meantime?

Hovering over the type.

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

La issue descrive un’indicazione nell’editor per i tipi any dichiarati esplicitamente e indica l’estensione any-xray come riferimento. Inizia tracciando il modo in cui TypeScript espone le informazioni sui tipi agli editor e rivedendo i test correlati dell’editor o del language-service; il lavoro è completo quando l’indicazione prevista è implementata senza modificare l’output a runtime ed è coperta dai test.

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
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.