3 ms·
Isn't a large part of the win for typescript the tooling? Specifically the auto completion and documentation that pops up in various typescript enabled editors.
by greggman 10y ago
Isn't a large part of the win for typescript the tooling? Specifically the auto completion and documentation that pops up in various typescript enabled editors.
Does such a thing exist for Flow? Could it? If it did that would go a lot further to push me to flow than that it just catches more errors. I get huge productivity gains from my editor helping me with API completions etc...
- Ezku 10y agoOur team is using Flow, and most devs use Nuclide[1] for the autocompletion and type hint popups. I can't compare it to any TS IDE, I'm afraid, but I can attest it's way more comfortable than doing without. [1]: https://nuclide.io/docs/languages/flow/ https://nuclide.io/docs/languages/flow/
- Roboprog 10y agoTry using one of the JetBrains IDE's, such as IntelliJ or Webstorm, on plain old Javascript some time. It does a surprisingly good job inferring the methods on an object, as well as autocompleting the names of stand-alone functions (much of what I write) that are in scope. Aside: I tend to do much more with higher order functions than with classes, so Typescript and the like really don't excite me very much. I'm happier to skip the whole transpile and source-map shuffle. Also, I tend to put at least partial JSDoc comments on just about everything, so that an open documentation panel explains things as I move the cursor down the file. Any type annotation is also shown on the function names/params in the structure tree browser. Finally, autocomplete is not as useful when not using "Enterprise" style naming conventions. E.g. - "inv_acct.load()" vs "checkoutInvoicePayableAccount.asynchronousLazyLoadFromRemoteServer()". Hopefully, between context and comments, such ridiculous names aren't really necesary - like, how many "account" type values do you have floating around in the current scope/context???
- t1amat 10y agoThere are many code analysis engines for JavaScript that can be used as a plugin for code completion. One commonly available as a plugin to many extensible editors is TernJS[0]. [0]: http://ternjs.net/ http://ternjs.net/