- yeah our project uses typescript
- look inside
- any
as unknown as any
In my defense, the backend contracts change so often in early development the any just made sense at first…
…and then the delivery date was moved up and we all just had to ship it…
…and then half of us got laid off so now there are no resources to go back and fix it…
…rinse, wash, repeat
Use the unknown type so at least someone might have enough brain cells to validate before casting because squiggles
JavaScript is so ass, typescript is just putting ketchup on a rotten banana. Better just to choke it down quickly if you have to eat it, IMO.
I wouldn’t say JavaScript is horrible, it’s a fine little language to do general things in if you know JS well. I would say, though, that it is not a great language. Give me F# and I’m happy forever. I do not like typescript that much more than JS.
PHP is better than Javascript these days.
Fucking PHP.
The only thing JS really has going for it is ease of execution, since any browser can run your code… though the ubiquity of Python is closing that gap.