Samuel
@samuel.fm
the best part about typescript is you can say things with extra emphasis
const tick = useTickEveryMinute()
return useMemo(() => {
  tick!!!!!!!! 11 9 134
Robert Anderberg
Yes, very useful, but also often an indicator that someone is just working around the type system and writing unsafe code. It's often better to assert types with "as blah" or use type narrowing or whatever. We've been hit multiple times with people using this and ending up with exceptions in prod!
1 1
Mike 🍁
Thanks for the tip. In that case, it makes me wonder if this should be something that should be optionally flagged as a warning, but I haven't written any code with it, so I don't know if there is code where it is the best option. I.e. discourage features that do more harm than good.
1
Robert Anderberg
Yeah it's definitely a potential footgun and it's worth thinking about why it's being used if you end up using it.
Blank Jimmy
I mean, to be fair, the best part of typescript is you don't have to do prototypical inheritance. 😜
2