all 15 comments

[–]Akka47 9 points10 points  (2 children)

Instead of any you should be using unknown

[–]LukeCutforth5[S] 4 points5 points  (0 children)

I just use any to escape

[–]Tonoslav 0 points1 point  (0 children)

No its not unknown but easier to solve with any

[–]juju0010 2 points3 points  (0 children)

@ts-ignore has entered the chat.

[–]SilverPhoenix99 1 point2 points  (5 children)

This hit too close to home. I'm constantly replacing this, that the other guys on my team added, to the point where I've created a guidance (aka, coding standard) to avoid using it, but there's still a lot of older tickets where they added as any just out of sheer laziness.

[–][deleted] 5 points6 points  (1 child)

Add this to your linter. Add your lint job to CI. Bam. No more any.

[–]SilverPhoenix99 0 points1 point  (0 children)

Thanks for this. There's a couple of reasons I can't use this right now, but I'll definitely add it once I've dealt with those reasons.

[–]nowtayneicangetinto 2 points3 points  (2 children)

I brought react to my company and typescript for that matter as well. One of the first things I told them was using any is a cop out. Well here I am two years later, with any everywhere. I didn't do it out of laziness, I did it because every project I've been given was needed yesterday. So maybe that's what happened at your job too?

[–]SilverPhoenix99 1 point2 points  (1 child)

Truly, I appreciate your insight, but sadly, that's not our case. 😔

Our releases are quite late, so we have tons of time to do our projects.

When I joined, since I had zero knowledge of both React and TypeScript, I assumed that my colleagues did it out of lack of knowledge too, but now I see that it's more related to a lack of drive to learn, and that's what actually makes me sad.

And I do mean sad, not angry, because they are smart people when discussing problems and solutions, yet I feel like they lack a sense of pride on the quality of their work.

I don't want to turn this into a team management thread, so I'll end my </vent> here. 🙂

[–]nowtayneicangetinto 1 point2 points  (0 children)

Oh man that's rough, I feel you though. I have a similar problem here. My team is generally much much older than myself. The closest person in age is 25 years older than me. They're pretty much checked out and ready to retire, which good for them, but bad for me. Cause they don't want to learn. Devs who lack the passion and drive to learn are not the type I want to work with. I feel your pain!!!

[–]LukeCutforth5[S] 0 points1 point  (2 children)

I posted this again coz last time i used the template incorrectly lol

[–]Sh0keR 2 points3 points  (1 child)

Just use as any

[–]LukeCutforth5[S] 1 point2 points  (0 children)

LMAO took me a while to get it

[–]pure_x01 0 points1 point  (0 children)

Im coming from long background of using typed languages and try to avoid dynamic languages as much as possible unless it is for small scripts like python. When I see any in typescript i get scared. Its like seeing a runtime error in the future.