microsoft / microsoft/TypeScript

Add `asserts` example in Handbook

Aperta
#53,195 0 commenti 6 reazioni 1 assegnatario Vedi su GitHub

@DanielRosenwasser ci sta già lavorando.

Dal 10/3/2023.

Docs Rescheduled
Lingua principale
Go
Stelle
111k
Fork
14.4k
Merge medio
1g 19h
PR unite (30g)
117

Descrizione

Suggestion

🔍 Search Terms

List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily and help provide feedback.

asserts, narrowing, property

✅ Viability 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, new syntax sugar for JS, etc.)
  • This feature would agree with the rest of TypeScript's Design Goals.

⭐ Suggestion

Add asserts examples in the handbook to be properly indexed in the Search box. If there is not any specific reason for the absence of this feature in the examples I could make a PR

📃 Motivating Example

Currently asserts exists only in release notes of 3.7 and cannot find examples in handbook.

💻 Use Cases

Have asserts indexed in search box and exist in handbook, so we know that this functionality exists, without finding randomly through google searches.

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.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.