Hacker News new | past | comments | ask | show | jobs | submit login

"You have a problem with JavaScript. You rewrite your entire code base in TypeScript. Now you have two problems."



Wrong, JavaScript is valid Typescript, so you don't have to rewrite anything.


No, JavaScript is not valid TypeScript. This might be a silly example but there are dozens of similar, small JavaScript programs that are not legal TypeScript (for good reason!).

http://crystae.net/2015/01/22/typescript-is-not-a-superset-o...

Try running jQuery's source through the TypeScript compiler some time.


This is a silly thing to say; why would you use TypeScript if you're going to leave everything exactly as it was in JavaScript? Wouldn't want to rewrite it using TypeScript features? Otherwise there would be zero point to TypeScript.


You seem to be unaware of what TypeScript is. TypeScript is more of a high-powered linter than a new language. If you take Javascript and put it in TypeScript mode, most errors are due to variable reuse (x was a number and now a string) or actually an error in the javascript if you're trying to be well typed.

For a certain style of Javascript, making it Typescript is a no-op




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: