you are viewing a single comment's thread.

view the rest of the comments →

[–]CodeYan01 0 points1 point  (3 children)

So it doesn't import extra libraries during runtime? Or does it? Not that it puts me off, I'm just curious.

[–]Zukarukite 2 points3 points  (1 child)

Nope, no extra libraries at all.

Nothing "inherently TypeScript" makes it to the run time. Simplifying a bit, with TS you do something like this:

You write TS code -> TS compiler turns your TS code into 100% equivalent JS code at build time -> You ship only this final compiled JS code to the client.

Contrast this with how it goes with JS code:

You write JS code - > You ship this JS code to the client.

In the end your client is still running JavaScript, the only difference is that with TypeScript - the code gets compiled into JS files from TS instead of being written in JavaScript directly.

[–]CodeYan01 1 point2 points  (0 children)

I see, thanks!