在内存中转译 TypeScript 文件 [英] Transpile a TypeScript file in memory

查看:20
本文介绍了在内存中转译 TypeScript 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种可以直接运行 .ts 文件而无需写入文件的 CLI 工具.这意味着它会在内存中进行转换,然后以某种方式将该数据传递给 node.js 可执行文件.是否存在这样的可执行文件?

I am looking for a CLI tool that can run a .ts file directly, without writing to a file. That would mean it transpiles in memory, and then somehow passes that data to the node.js executable. Does such an executable exist?

推荐答案

这样的可执行文件存在吗?

Does such an executable exist?

是的.它称为 ts-node:https://github.com/TypeStrong/ts-节点

这篇关于在内存中转译 TypeScript 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆