DEV Community

Discussion on: Using TypeScript without TypeScript 😎

Collapse
 
dgreene1 profile image
Dan Greene

Well, now that Babel can do Typescript transpiration, there really aren’t many constraints that prevent the use of Typescript. I’d be interested to hear others.

Thread Thread
 
puruvj profile image
PuruVJ

The constraint wasn't not having TypeScript, but not having any compile/watch step at all, which is the why behind this article.

Thread Thread
 
dgreene1 profile image
Dan Greene • Edited

Sure, I hadn’t thought about pushing the transpiration responsibilities down the consumer of the library.

To be fair, the typescript compiler can turn off a lot of the transpiration stuff if you change the target in tsconfig.JSON to ESNext or ES2020. That means you can get the advantages of (full) type checking without the noise since the compiler assumes the browser knows about things like Object.entries and the spread operator.

typescriptlang.org/tsconfig#target