1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Node.js で TypeScript を実行

Posted at

Node.js で TypeScript が実行できるようになったということなので確認しました。

確認したバージョン

$ node --version
v25.2.0

TypeScript のプログラムを実行

a01.ts
function greet(name: string): void {
    console.log("Hello, " + name)
}

greet('太郎')

実行結果

$ node a01.ts
Hello, 太郎

JavaScript のプログラムを実行

b01.js
function greet(name) {
    console.log("Hello, " + name)
}

greet('次郎')

実行結果

$ node b01.js 
Hello, 次郎
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?