microsoft / microsoft/TypeScript
Type Guard Documentation Is Incorrectly Labeled as Deprecated
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
The only source of online information for the proper use of typescript type guards (value is someType, asserts value is someType) is [this page](https://www.typescriptlang.org/docs/handbook/advanced-types.html), which has a big DEPRECATED banner at the top. Please REMOVE THIS BANNER until this documentation has a replacement, then make the "Go To New Page" button link to the updated documentation, not some top level page where user needs to once again search for this new page that actually does not exist. THIS IS VALUABLE INFORMATION and it needs to be easier to find and trust, this is one of the most important features of typescript!

### 🕗 Version & Regression Information
This is not code, it's documentation and I can't figure out how else to submit this bug but none of the "code questions" fit here. This documentation page has been like this for at least 2 years. Please fix 🙏
### ⏯ Playground Link
https://www.typescriptlang.org/docs/handbook/advanced-types.html
### 💻 Code
```ts
https://www.typescriptlang.org/docs/handbook/advanced-types.html
```
### 🙁 Actual behavior
Valid and important typescript documentation has deprecation banner and link to new page that does not link to new page and there is no new page, so it's difficult to understand how to use type-guards to get that awesome control flow analysis-based type narrowing. Instead, it looks like typscript is removing the feature (please don't!)
### 🙂 Expected behavior
Valid and important typescript documentation does not have deprecation banner. OR it has deprecation banner but the link to new page actually goes to the new and updated page. Users can find out how to use type-guards and actually trust the information and can use it with confidence.
### Additional information about the issue
Please tell me how to properly submit this bug if this is not the correct location or approach, I don't know what else to do
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
Inizia dalla pagina della documentazione Advanced Types all’indirizzo https://www.typescriptlang.org/docs/handbook/advanced-types.html e ispeziona il relativo banner DEPRECATED e il link “Go To New Page”. Il lavoro è completato quando il banner viene rimosso finché non esiste una documentazione sostitutiva, oppure quando il link punta direttamente alla documentazione aggiornata di type-guards.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- typescript
- Ambito
- documentation
- Tipo di issue
- Documentazione
- Difficoltà
- 1/5
- Tempo stimato
- Meno di un'ora
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 45/100