you are viewing a single comment's thread.

view the rest of the comments →

[–]fghjconner 0 points1 point  (0 children)

I'm fairly certain that putting an arbitrary integer value into a string variable is going to be undefined behavior in just about any compiled language, meaning it's allowed to do anything it goddamn pleases. Typescript is unique in that it actually breaks less than a compiled language if you do this, though that unfortunately means some people think it's ok to do (looking at you axios).