“cara menjalankan naskah” Kode Jawaban

cara menjalankan naskah

npx ts-node src/foo.ts
Frightened Flatworm

cara menjalankan file typescript

// First run the below command.
tsc hello.ts //tsc filename.ts  here in the example hello.ts is the file name for typescript.

//After running the above command a javascript file will be generated of same .ts file name.
//To run that file run the below command.
node hello.js

//And you will get your output.

//If you want to change the JS version then the command is.
tsc --target ES6 hello.ts //After this the same procedure as above.

// (For Windows Only ) If you are getting Security policy error then you may enter the command for the same or run the above command in the command prompt.
Unusual Unicorn

cara mengkompilasi ts dalam cmd

"scripts": {
    "clean": "rimraf dist",
    "start": "npm-run-all clean --parallel watch:build watch:server --print-label",
    "watch:build": "tsc --watch",
    "watch:server": "nodemon './dist/index.js' --watch './dist'"
}
Restu Wahyu Saputra

Jawaban yang mirip dengan “cara menjalankan naskah”

Pertanyaan yang mirip dengan “cara menjalankan naskah”

Lebih banyak jawaban terkait untuk “cara menjalankan naskah” di TypeScript

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya