Understanding Types Merging in The Typescript

I am new to typescript and I have seen in many projects they are using the following type

  1. TypeA | TypeB
  2. TypeA & TypeB
  3. TypeA | (TypeB & TypeC) | TypeD
  4. (TypeA | TypeB)[]

What is difference between each of them. Also please share the documentation link for further reference

Also please let me know what this technique actually called in typescript



from Recent Questions - Stack Overflow https://ift.tt/36i14Zq
https://ift.tt/eA8V8J

Comments

Popular posts from this blog

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation