当前位置:网站首页>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代码。
边栏推荐
- 解决安装MySQL后,Excel打开很慢的问题
- When opening a MYSQL table, some can display editing, some do not, how to set.
- 【元胞自动机】基于matlab界面聚合元胞自动机模拟【含Matlab源码 2004期】
- How to get started with YOLO?How to implement your own training set?
- 《少年派2》:新男友竟脚踩两只船,林妙妙与钱三一感情回温
- test
- Which interpolation is better for opencv to zoom in and out??
- /usr/sbin/vmware-authdlauncher: error while loading shared libraries: libssl.so.1.0.2*Solution
- 设备树——dtb格式到struct device node结构体的转换
- "Youth Pie 2": The new boyfriend stepped on two boats, and the relationship between Lin Miaomiao and Qian Sanyi warmed up
猜你喜欢
Unknown Bounded Array
Raspberry pie arm version of GCC installed configuration and environment variables
[Message Notification] How about using the official account template message?
【 Make YOLO Great Again 】 YOLOv1 v7 full range with large parsing (Neck)
IDEA调试
这个地图绘制工具太赞了,推荐~~
Flink 部署和提交job
Beijing suddenly announced that yuan universe big news
更换树莓派内核
Data Middle Office Construction (VII): Data Asset Management
随机推荐
ROS2 series of knowledge (4): understand the concept of [service]
简单易用的任务队列-beanstalkd
带你体验一次类型编程实践
MYSQL two-phase commit
How to download the Keil package
MySQL修改SQL语句优化性能
The bigger and bigger the project is, I split it like this
How is the tree structure of the device tree reflected?
date command
更换树莓派内核
Which interpolation is better for opencv to zoom in and out??
Summary of JVM interview questions (continuously updated)
"Youth Pie 2": The new boyfriend stepped on two boats, and the relationship between Lin Miaomiao and Qian Sanyi warmed up
Compiled on unbutu with wiringPi library and run on Raspberry Pi
Basic implementation of vector
device node结构体转换成platform_device结构体
leetcode6133. 分组的最大数量(中等)
Guys, MySQL cdc source recycles replication slave and r in incremental process
移动端页面秒开优化总结
Four ways the Metaverse is changing the way humans work