Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
I wished i could enforce strict mode - but the code base isn't ready for it - yet. So it is just warnings for some strict checks for now (the code base is very yellow) and whenever i touch something, i make it pass the checks too.
-
@horus It has been built without null safety enabled and there is a lot of impicit and explicit use of the any type.
-
horus30601yI have the same. It took me two days already and I think i will need two more to make it work under strict. Wonder if it's worth the hasse. The no-implicit-any rule leads to insane constructs here and there but most likely i am doing it wrong.
-
@horus If you are really sure, you can just cast an unknown to what it actually is. But beware: The transpiler won't verify whether you're right.
-
LerkerMark31yI know what you mean. I do typescript, and then take a few month break and repeat. One of this time, angular was updated and changed to strict. I had to add all this extra code. It's not very pretty.
I'm glad for the compiler checks.
But in retrospect thinking i have to go back to the code and rethink my variable declarations. Maybe that will pretty up my code a bit.
Related Rants
After some joyful years with typescript i learned that my major code base didn't use strict mode. I changed and now i feel i don't know typescript at all. Some things get irritatingly complicated now although it's even more resilient now for sure. I am not sure how to feel about it. So to the typescript out there: Do you use strict? A custom set of rules?
question
typescript
insert funny tag here
strict