3 ms·
You write typescript and unit test without tsc, jest, webpack/esbuild or a ton of config files. bun projects can be super lean and still cough out a tested bund
by tlarkworthy 3y ago
You write typescript and unit test without tsc, jest, webpack/esbuild or a ton of config files. bun projects can be super lean and still cough out a tested bundle.js for execution on a browser.
I love it, it super simplifies project and for minimalists it's perfect.
- iainmerrick 3y agoHow do you do type-checking? Do you just run TSC with “noEmit: true”, like you’d do with any other bundler? TSC is simultaneously the most valuable and the most flaky part of your typical JS project setup. That’s the main part I’d be interested in replacing with a different tool.
- tlarkworthy 3y agoIt reads the tsconfig file if present. You just write TS files and bun build outputs JS. Vscode highlights typecheck errors based on TS errors. Bun build fails if you can't typecheck. No tsc installation necessary, but also consistency with tsc if you use a tsconfig. For simple stuff tsconfig is not needed
- iainmerrick 3y agoBun build fails if you can't typecheck It has to run TSC (or expect somebody else to run it) in order to typecheck, though, right?
- simon04 3y agoThat's my understanding, too. > Bun can run .js, .ts, .cjs, .mjs, .jsx, and .tsx files, which can replace: > > tsc — (but you can keep it for typechecking!)
- tlarkworthy 3y agoI am mistaken. Yeah bun does not typescheck like esbuild doesn't. It reads the tsconfig for build options. Either you add tsc or let your editor do it.
- tacone 3y agoAnd the speed of package installs, bundling and test running might make up for very fast pipelines.