DEV Community

Discussion on: Why so much hype over Typescript ?

Collapse
brieucp profile image
brieucp Author

Yeah, but no... Until someone prove me wrong and explain me what the real interest for using typescript over babel and types (plain JSdoc or even flow). I think the best way to use typescript is by not using it. No *.ts and no compilation. So basically no typescript.

Collapse
andrejnaumovski profile image
Andrej Naumovski

Flow is the buggiest tool I've ever used. Types work one day - bump one single version of a single package and all goes to hell. Imported types usually appear as any. JSDoc is simply not powerful enough and not intuitive to write, and it doesn't provide you with compile type checking. Most devs who come from typed languages, such as myself, find it more natural to define the types directly with the variables or arguments rather than having to write 10 lines of comments just to get IntelliSense for a function.

Also, Typescript support for React and Redux has gotten so good lately, anyone not using it on a new project must be insane. Automatic detection of which props come from the store and which do not? Consider me sold.

Thread Thread
manuelojeda profile image
Manuel Ojeda

Thats why i said Typescript its a must have in a JavaScript project, having a typed codefeels natural and you can avoid doing things like giving a value a boolean and then a number type.

Trust me, every Javascript dev has passed from that problem, i wish i had typescript in my earlier dev days.

Thread Thread
brieucp profile image
brieucp Author

You know that there is a shortcut to write Multilines comment ! Double press on * then enter and tada you have your JSDoc comment with the list of arguments and the first type prefocused to be written.

It's even faster than to write ts types ;)