当前位置:网站首页>TypeScript简化运行之ts-node
TypeScript简化运行之ts-node
2022-08-01 03:08:00 【前端菜菜DayDayUp】
问题描述:每次修改代码后,都要重复执行两个命令(tsc 文件名,node 文件名),才能运行TS代码,太繁琐。
简化方式:使用ts-nodeb包,直接在Node.js中执行代码。
安装命令:npm i -g ts-node (ts-node包提供了ts-node命令)。
使用方式:ts-node hello.ts。
解释:ts-node命令在內部偷偷的将TS->JS,然后,再运行JS代码。

边栏推荐
- Introduction to machine learning how to?
- MYSQL two-phase commit
- Nmap 操作手册 - 完整版
- MYSQL query interception optimization analysis
- Nmap manuals - the full version
- 初出茅庐的小李第114篇博客项目笔记之机智云智能浇花器实战(3)-基础Demo实现
- lua entry case combat 123DIY
- Basic use of vim - command mode
- Guys, MySQL cdc source recycles replication slave and r in incremental process
- The IDEA can't find or unable to load The main class or Module "*" must not contain The source root "*" The root already belongs to The Module "*"
猜你喜欢

剑指offer专项突击版第16天

MYSQL query interception optimization analysis

《少年派2》:新男友竟脚踩两只船,林妙妙与钱三一感情回温

Flink deploys and submits jobs

button去除黑框

Daily practice of LeetCode - Circular linked list question (interview four consecutive questions)

元宇宙改变人类工作模式的四种方式

HCIP (14)

Ordinary users cannot access HGFS directory

这个地图绘制工具太赞了,推荐~~
随机推荐
leetcode6132. 使数组中所有元素都等于零(简单,周赛)
Parse the bootargs from the device tree (dtb format data)
MYSQL-Batch insert data
数据中台建设(七):数据资产管理
内核的解压缩过程详解
Detailed explanation of TCP protocol
Beijing suddenly announced that yuan universe big news
Data Middle Office Construction (VII): Data Asset Management
<JDBC> 批量插入 的四种实现方式:你真的get到了吗?
gateway gateway cross domain
Soft Exam Senior System Architect Series: Basic Knowledge of System Development
MYSQL two-phase commit
一个service层需要调用另两个service层获取数据,并组装成最后的数据,数据都是list,缓存如何设计?
/usr/sbin/vmware-authdlauncher: error while loading shared libraries: libssl.so.1.0.2*Solution
785. 快速排序
JS new fun(); 类与实例 JS基于对象语言 只能通过书写构造函数充当类
开源项目站点必备&交流区功能
[Getting Started Tutorial] Rollup Module Packager Integration
HCIP(14)
IDEA调试