How to remove types from union types

Nick Smith

I have a union type like this:

type Job = Engineer | HardwareSpecialist | VentureCapitalist

How can I remove a type from this, so that I get just Engineer | HardwareSpecialist. I don't want to create another type.

Nick Smith

Someone posted this:

Exclude<Job, VentureCapitalist>

and then deleted. That worked! Is there anything wrong with this?

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related