DEV Community

Discussion on: Boolean - The Good, The Bad and there is no place for the Ugly

Collapse
 
qm3ster profile image
Mihail Malo

I think you accidentally wrote

type User {
  /* props */
}

instead of

interface User {
  /* props */
}

in most your code examples.

Collapse
 
macsikora profile image
Pragmatic Maciej

Nope, it was intentional, but I did an error in syntax. Thanks! There is = sign missing. Will fix it. Thanks again

Collapse
 
qm3ster profile image
Mihail Malo

That's an option as well.
I tend to use interface whenever possible however, because (at least in the past) there were edge cases where the typechecking is more strict.
Plus, the error messages are also clearer.