Skip to content

docs: clarify TypeScript type stripping behavior#76

Merged
avivkeller merged 1 commit into
nodejs:mainfrom
Herrtian:clarify-type-stripping-runtime
May 24, 2026
Merged

docs: clarify TypeScript type stripping behavior#76
avivkeller merged 1 commit into
nodejs:mainfrom
Herrtian:clarify-type-stripping-runtime

Conversation

@Herrtian
Copy link
Copy Markdown
Contributor

Summary:

  • Explain what type stripping does in the native TypeScript guide.
  • Clarify that Node.js does not type check TypeScript files at runtime.
  • Mention tsc --noEmit for type checking.

Verification:

  • npm run format:check -- pages/typescript/run-natively.md
  • npm run lint -- pages/typescript/run-natively.md
  • npm run build

Refs: #34

@vercel
Copy link
Copy Markdown

vercel Bot commented May 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nodejs-learn Ready Ready Preview May 23, 2026 12:18pm

Request Review

@cursor
Copy link
Copy Markdown

cursor Bot commented May 23, 2026

PR Summary

Low Risk
Low risk documentation-only changes clarifying runtime behavior; no code or API behavior is modified.

Overview
Clarifies the native TypeScript guide to explain that Node.js runs .ts files via type stripping (removing erasable TS syntax) rather than full transpilation.

Adds explicit guidance that Node.js does not type check at runtime and recommends running npx tsc --noEmit separately, plus expands the constraints section with dedicated Type stripping and Type checking explanations and examples of non-erasable syntax (e.g., enum, namespaces) requiring --experimental-transform-types or other tooling.

Reviewed by Cursor Bugbot for commit f1b2e1c. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions
Copy link
Copy Markdown

👋 Codeowner Review Request

The following codeowners have been identified for the changed files:

Team reviewers: @nodejs/typescript

Please review the changes when you have a chance. Thank you! 🙏

@avivkeller avivkeller added this pull request to the merge queue May 24, 2026
Merged via the queue into nodejs:main with commit 8cb595a May 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants