Answer the question
In order to leave comments, you need to log in
How to write Node.js in TypeScript?
Theoretically, you can write code in ts and compile it to commonjs so that you can then use it in node.js, right?
Or is it a method, break your head?
Answer the question
In order to leave comments, you need to log in
Well, in tsconfig you specify moduleResolution: node; module: commonjs, and compile, and everything works beautifully, juicy, with typechecking. By the way, sometimes the output code is much more efficient than that written in js by cranks like me. Microsoft is not stupid.
UPD. edited.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question