News for hackers. Stuff that matters.
Re:Love for TypeScript by ycitm on Saturday July 30, 2016 @04:25AM (#12192152)
You could call your js function with a string, and rather than a compile time error you'd get broken behaviour at runtime.
Re:Love for TypeScript by Too on Saturday July 30, 2016 @04:37AM (#12192182)
Inside the function you also have to continue using x as a number, like you wouldnt be able to accidentally pass it into a function accepting only string as argument etc.