新しいjavascriptランタイム。最近安定版がリリースされた.

Quick Start

bun init

bun init helps you get started with a minimal project and tries to guess sensible defaults. Press ^C anytime to quit
 
package name (ts-bun-design-patterns): 
entry point (index.ts): 
Done! A package.json file was saved in the current directory.
 + index.ts
 + .gitignore
 + tsconfig.json (for editor auto-complete)
 + README.md

packlage.jsonscriptsを追加

{
"scripts": {
    "dev": "bun run ./index.ts"
  }
}

背景 下記のライブラリを読んでいて下記の記述があったことから気づき。 テストが標準でついていることに驚き

import { describe ,expect ,test } from "bun:test"

https://github.com/tadashi-aikawa/typescript-tdd/blob/f716b635e1a8bf27605841c5fa9dc239498a3d66/part1/Money.test.ts