I have been looking for a strict version of Extract<T, U>
. For simplicity, let's call it ExtractStrict<T, U>
. ExtractStrict
would have one additional feature compared to Extract
: ExtractStrict
would throw an error if some element in U
is not part of T
.
I know of an implementation by @ChristianIvicevic which has been proposed for inclusion in Typescript itself: microsoft/TypeScript#31474 I've asked him if he'd be willing to submit it here instead.
Edit: I've found a use case in my code for a strict version of Exclude
too (ExcludeStrict
), so I've added it to the title.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too