Morning, how is everyone doing?
@NanoSector it's going good.
Working on my TS project. Also watched the hermes release from Facebook, which seems very promising (ps. I don't have a Facebook account, hermes is about compiling Javascript to computer code native to the computer). If this works we can get 20x speed improvements with js/ts code.
@melroy Sounds good, does sound a lot like the HHVM situation they had for PHP. I'd imagine Electron apps would get a lot of use out of that.
@NanoSector all the server side nodejs projects actually will benefit from this. A lot of people are using Javascript or typescript as a backend.
@melroy Ah right I keep forgetting JS on the server side is a thing 😅 Just feels unnatural to me.

@NanoSector Yea.. I used it quite a lot, but trust me, it should be forbidden...

JS is too dangerous throwing errors at will and even with TS the types are unsound and more a guideline, because at runtime everything can happen, incl. undefined! Crashing the server/app!

I regret JS/TS backend services. Here, I said it.

#typescript #javascript #nodejs #node #regret #unsound #unsafe #crash #error #throw

@melroy I don’t know if that’s just a configuration issue, but that does sound a lot like my experience; I *know* this code isn’t type safe yet it still compiles, but TS goes absolutely apeshit over other minor things.

Brings me to my main issue with JS which is the ecosystem and the onion (wrapper over wrapper over wrapper…), as a backend developer who sometimes does a bit of VueJS frontend I have absolutely no clue how I should *correctly* configure my JS stack…

@NanoSector @melroy That's not really been my experience of TypeScript, but of ESLint -- part pointless nagging, part eslint-ignore, and maybe one or two times where I go "Oh, you have a point."

@delineation @NanoSector typescript warnings and errors are often valid and should be considered fixing. Yet again, typescript isn't really strictly typed. Because the code just get transpiled into js. Which can do very strange runtime things.

Eslint isn't really about safety or type safety. Eslint focuses on lining aspects. Like the amount of indentation. Luckily you do have a --fix flag with Eslint to fix almost all errors for you most of the time (automatically).

@melroy @NanoSector Honestly, I've found ESLInt to be more of an annoyance than anything.

The amount of indentation is managed by Prettier most of the time. Plus, ESLint (even with the TypeScript-specific rules) fails to recognize edge-cases.

One very annoying oversight is how it handles TSDoc imports: if you import a type only to reference it in TSDoc (think @link, or @see) it claims the type is unused -- this goes against what TypeScript says.

In this specific case, it feels a bit strange to have TypeScript saying one thing and ESLint saying something completely different.

@delineation @NanoSector @link Maybe you are just missing some eslint plugins? Like `eslint-plugin-tsdoc`. Then add it to the plugin list in the config file:
```
plugins: [
"@typescript-eslint/eslint-plugin",
"eslint-plugin-tsdoc"
],
```