We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Set intersection of given union types A and B
import { SetIntersection } from 'utility-types'; // Expect: "2" | "3" type ResultSet = SetIntersection<'1' | '2' | '3', '2' | '3' | '4'>; // Expect: () => void type ResultSetMixed = SetIntersection<string | number | (() => void), Function>;
The text was updated successfully, but these errors were encountered:
/** * SetIntersection (same as Extract) * @desc Set intersection of given union types `A` and `B` * @example * // Expect: "2" | "3" * SetIntersection<'1' | '2' | '3', '2' | '3' | '4'>; * * // Expect: () => void * SetIntersection<string | number | (() => void), Function>; */ export type SetIntersection<A, B> = A extends B ? A : never;
Sorry, something went wrong.
No branches or pull requests
Set intersection of given union types A and B
The text was updated successfully, but these errors were encountered: