How to run TypeScript without transpile the code | Direct TypeScript Execution

Опубликовано: 23 Ноябрь 2022
на канале: MrNick
250
6

In this video, we'll show you how to run a direct Typescript file in Nodejs. This is a useful technique for writing large applications using Typescript.

By using this technique, you'll be able to reduce the amount of code you have to write and make your applications more efficient. In this video, we'll show you how to run a direct Typescript file in Nodejs and explain the benefits of using this approach.

How to run a direct typescript file in nodejs

There are two ways to run the file
1) ts-node development to run the file - (npm install -D ts-node)
add a script in package.json "start": "ts-node index.ts"
to run the file by $ npm start or yarn start

2) ts-node global command to run the file - (npm install -g ts-node)
to run the file by $ ts-node filename.ts

Thanks for watching!

#typescript #ts-node #ts


Смотрите видео How to run TypeScript without transpile the code | Direct TypeScript Execution онлайн, длительностью часов минут секунд в хорошем качестве, которое загружено на канал MrNick 23 Ноябрь 2022. Делитесь ссылкой на видео в социальных сетях, чтобы ваши подписчики и друзья так же посмотрели это видео. Данный видеоклип посмотрели 250 раз и оно понравилось 6 посетителям.