Understanding Types Merging in The Typescript
I am new to typescript and I have seen in many projects they are using the following type
- TypeA | TypeB
- TypeA & TypeB
- TypeA | (TypeB & TypeC) | TypeD
- (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
Post a Comment