问题
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?
回答1:
Does such an executable exist?
Yes. Its called ts-node
: https://github.com/TypeStrong/ts-node
来源:https://stackoverflow.com/questions/44752995/transpile-a-typescript-file-in-memory