当前位置:网站首页>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代码。

边栏推荐
- 787. Merge Sort
- 项目越写越大,我是这样做拆分的
- The fledgling Xiao Li's 113th blog project notes: Wisdom cloud smart flower watering device combat (2) - basic Demo implementation
- 彻底关闭Chrome浏览器更新及右上角的更新提示
- 在打开MYSQL表时,有的可以显示编辑,有的没有,如何设置。
- High dimensional Gaussian distribution basics
- 高维高斯分布基础
- 树莓派 的 arm 版的 gcc 安装 和环境变量的配置
- [Message Notification] How about using the official account template message?
- 785. 快速排序
猜你喜欢
随机推荐
被 CSDN,伤透了心
opencv 缩小放大用哪种插值更好??
数据中台建设(七):数据资产管理
Nmap manuals - the full version
软件测试基础理论知识—用例篇
Completely closed Chrome updated and in the top right corner of the tip
Summary of MVCC
【元胞自动机】基于matlab界面聚合元胞自动机模拟【含Matlab源码 2004期】
Ordinary users cannot access HGFS directory
When opening a MYSQL table, some can display editing, some do not, how to set.
High dimensional Gaussian distribution basics
【分层强化学习】HIRO:Data-Efficient Hierarchical Reinforcement Learning
Dart 命名参数语法
大佬们,MySQL cdc source在增量过程中回收 replication slave 和 r
C string array reverse
设备树的树形结构到底是怎样体现的?
【数据分析】基于matlab GUI学生成绩管理系统【含Matlab源码 1981期】
Flink 部署和提交job
[uniCloud] Application and Improvement of Cloud Objects
Browser download shortcut to desktop (PWA)







![[Message Notification] How about using the official account template message?](/img/4d/5b47722d1f5ec1cae73fc8d930a35d.jpg)

