Is there a way to use Pick<T, K>
to extract all keys of a certain type?
Example:
type MyObject = {
a: string;
b: number;
c: string;
d: boolean;
}
I want to extract all string
types, so final type will be:
type NewType = {
a: string;
c: string;
}