DEV Community

Discussion on: Static Typing or Typescript

Collapse
 
jwp profile image
John Peters • Edited

I think my git comment was in thinking of a new type in current branch where there are other non merged branches that didn't know about the new design change. I agree Git would never find that edge case.

The problem of 'it will not detect the property ' is true in Javascript and one pitfall that can cause headaches. Its the primary reason I prefer Typescript, where for example, it's impossible to misspell a property name. I have seen dynamic Javascript object property misspelling.

Yes, well defined interfaces are required but not always present. Any code like that is of poor quality.

Thread Thread
 
jessekphillips profile image
Jesse Phillips

Since my context is with test code, everything is internal. I've tried hard to use appropriate depreciation (is that even a thing in Javascript?) but I have had slip ups and it is nice to have a type system to keep things in check.