DEV Community

Discussion on: Types vs. Interfaces in Typescript

Collapse
 
codinghusi profile image
Gerrit Weiermann

The & will merge the types, so all the properties of both types will be in the resulting type.

The | will give you the option to choose between all the given types, and use one of them, rather than all together :)