docs: clarify TypeScript introduction and first example - #120
docs: clarify TypeScript introduction and first example#120sumitjhacodes wants to merge 1 commit into
Conversation
## Summary This PR improves the **Introduction to TypeScript** page by adding more context to the introductory explanation and the first code example. ### Changes - Clarify that TypeScript is a superset of JavaScript with a static type system. - Expand the walkthrough of the first example to explain each step more clearly. - Explain the purpose of the `satisfies` operator. - Improve the explanation of type inference. - Add a short note explaining that TypeScript types are removed during compilation and do not affect runtime behavior. ## Motivation While reading the documentation as a beginner, I found that some concepts in the introduction could benefit from additional explanation. These changes aim to make the page easier to follow for new TypeScript users while preserving the original intent and technical accuracy. Signed-off-by: Sumit Jha <156579114+devlopersumit@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryLow Risk Overview The first code example section replaces two dense paragraphs with a structured walkthrough: Reviewed by Cursor Bugbot for commit 6fa971a. Bugbot is set up for automated code reviews on this repo. Configure here. |
👋 Codeowner Review RequestThe following codeowners have been identified for the changed files: Team reviewers: @nodejs/typescript Please review the changes when you have a chance. Thank you! 🙏 |
| If the code doesn't match the declared types---for example, if `age` | ||
| were a string instead of a number---TypeScript reports an error during | ||
| development, helping you catch mistakes before your code runs. |
There was a problem hiding this comment.
| If the code doesn't match the declared types---for example, if `age` | |
| were a string instead of a number---TypeScript reports an error during | |
| development, helping you catch mistakes before your code runs. | |
| If the code doesn't match the declared types, for example, if `age` | |
| were a string instead of a number, TypeScript reports an error during | |
| development, helping you catch mistakes before your code runs. |
Summary
This PR improves the Introduction to TypeScript page by adding more context to the introductory explanation and the first code example.
Changes
satisfiesoperator.Motivation
While reading the documentation as a beginner, I found that some concepts in the introduction could benefit from additional explanation. These changes aim to make the page easier to follow for new TypeScript users while preserving the original intent and technical accuracy.