Currently working with TypeScript and I have a query regarding the utilization of TypeScript interface. Is there a way to selectively extract and output specific key types from the interface being used? While I am able to isolate the type I need, I am interested in knowing if there exists a method that aligns with this requirement during developmental stages. Could you provide a concise example illustrating my question?
interface Props {
aType: number;
bType: string;
certainType : 'a' | 'b' | 'c';
}
interface PooProps {
cType: boolean;
wantType: any Method // Props certainType
}
function foo(value: PooProps){}
const result = foo({cType: true, wantType: 'a'}) //Type Ok
Do you think this is achievable?