You run node with the TS support - great.
That doesn't explain how your front-end TS code is transformed into JS. You seem to be suggesting that node does it automatically, but it doesn't. The explanation of your setup isn't adding up.
You run node with the TS support - great.
That doesn't explain how your front-end TS code is transformed into JS. You seem to be suggesting that node does it automatically, but it doesn't. The explanation of your setup isn't adding up.
Node will do that at run time. Its automatic. Functions do not have to execute to receive this benefit. They just have to be imported. Ensure you are using a very recent version of Node.
Since I am not handcuffed by some giant framework I have maximum flexibility to do what makes sense.
So in other words, you created your own bundler?
Node isn't actually doing the work for you on the front-end.
> I just write my code and then point node at the main file, and this even includes front-end code for the browser.
It sounds like you're just making stuff up.
> I just write my code and then point node at the main file, and this even includes front-end code for the browser.
Then you said:
> I never said Node is did anything for the front end.
So which is it?
Yes, I push all my TS code through Node for type stripping. No, Node is not executing browser code. No, I am not suggesting Node is running in the browser.
For extra extra extra clarity importing functions in JavaScript does not execute them. They still have to be called for them to execute.
I am still willing to fix your code for a consultation fee.
You do have a build step, you just think that doing that using node script is the same as not having one, I guess.
I recommend you stop making stuff up online. We're 10 layers deep into this thread and you still can't explain how any of this works in a coherent way.
If any of this is real, why don't you attach a link from the node documention or an article that explains this technique that allows node to serve type stripped imports over http.
I'm not asking for a link to the http stack, I'm asking you to explain how you run a node app that consumes your typescript source code and serves it over http without a bundler.
But in the last post he kinda explained that he uses a node script to convert TS to JS. He is just confused.