What’s the difference between tsc (TypeScript compiler) and ts-node?
I’m very confused about the difference between tsc
and ts-node
. I’m learning TypeScript and I usually transpile server .ts
files with tsc
command.
I’m very confused about the difference between tsc
and ts-node
. I’m learning TypeScript and I usually transpile server .ts
files with tsc
command.
I have a Node.js project written in Typescript which is expected to run as a CLI, and am having trouble to import a module located out of the node_modules
directory using an absolute path (relative paths work fine). It might be important to mention that I am using the oclif framework for building my CLI.
I am using Nestjs
with WebStorm & TS 4.2.3^latest.
I’m working on a relative large typescript project, I’m using ts-node
to run node testing and examples. As far as I understand, ts-node
will compile ts
files to js
files and execute.
Below if I import Entity
I get the posts’s subject error (TypeError: Object prototype may only be an Object or null: undefined), but if I replace the import with the actual Entity
declaration the code runs fine.