Why doesn't [number | string] extends [number] | [string] in typescript?

Subscribers:
4,130
Published on ● Video Link: https://www.youtube.com/watch?v=vQsj6VE8ybQ



Duration: 2:20
37 views
1


Why doesn't [number | string] extends [number] | [string] in typescript?
I hope you found a solution that worked for you :)
The Content (except music & images) is licensed under (https://meta.stackexchange.com/help/licensing)CC BY-SA |
Thanks to all those great people for their contributions!

(stackoverflow.com/users/20497500/theoolee)theoolee |
(stackoverflow.com/users/2887218/jcalz)jcalz |
A special thanks goes out to the (https://stackoverflow.com/questions/74427309/why-doesnt-number-string-extends-number-string-in-typescript)Stackexchange community |

I wish you all a wonderful day! Stay safe :)

typescript







Tags:
typescript