It also has an added benefit of improving your IDE experience by offering you better auto completes.
Well, for TS lines below are equal. There is no difference in IDE experience (autocomplete, e.t.c).
letgameActive:boolean=true;letgameActive=true;
I've found it much preferable to just write types for everything rather than have the cognitive load of thinking "this probably doesn't need a type".
Just turn on noImplicitAny option in your tsconfig.json and TS will yell at you where a type can't be inferred. No extra cognitive thinking is required 😂
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Well, for TS lines below are equal. There is no difference in IDE experience (autocomplete, e.t.c).
Just turn on
noImplicitAny
option in yourtsconfig.json
and TS will yell at you where a type can't be inferred. No extra cognitive thinking is required 😂