Type Stripping with Zero Dependencies
termer.net·4h·
Discuss: Hacker News
📘Typescript
Preview
Report Post

TypeScript famously "becomes JavaScript via the delete key", and the process of deleting TypeScript syntax to transform a file into pure JavaScript is called "type stripping".

“TypeScript becomes JavaScript via the delete key” quote on the TypeScript website

Browsers cannot run TypeScript directly, so usually developers will use a bundler to perform type stripping. Even serverside JavaScript runtimes like Node.js required TypeScript transformation before running projects, until recently. Fortunately, we now have access to native type stripping directly inside recent versions of Node.js (see type stripping in the Node.js docs). Having typ…

Similar Posts

Loading similar posts...