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? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Constructs a type by extracting from Type all union members that are assignable to Union.
type T0 = Extract<"a" | "b" | "c", "a" | "f">; // type T0 = "a" type T1 = Extract<string | number | (() => void), Function>; // type T1 = () => void
The text was updated successfully, but these errors were encountered:
/** * Extract from T those types that are assignable to U */ type Extract<T, U> = T extends U ? T : never;
Sorry, something went wrong.
No branches or pull requests
Constructs a type by extracting from Type all union members that are assignable to Union.
The text was updated successfully, but these errors were encountered: