DEV Community

Discussion on: TypeScript All the Things!

Collapse
 
stereobooster profile image
stereobooster

I know how it can be annoying

I don't like how it nudges you in the direction of object oriented programming, a programming style that in my opinion can do more harm than good if used incorrectly. Functional programming, on the other hand, which I love, can be a real pain to type properly.

Most advanced type systems are in functional world not in OOP, for example, Haskell, OCaml, F#, Elm. So I would say that functional style programming should be easier for types. TS is hard sometimes, because it needs to be superset of JS, that is why it fails to do some checks or more advanced type inference.

I have to add my own type definitions. Create-react-app comes with a type definition file react-app-env.d.ts that I can use to add my type definition:

typescriptlang.org/dt/search?searc...

Collapse
 
pahund profile image
Patrick Hund

Nice one, cheers!

Collapse
 
pahund profile image
Patrick Hund

👍🏻 I've updated the article accordingly.