0

Goal:

type Question = {
    id: string;
    answer?: string;
    thirdProp?: number;
    fourthProp?: number;
}

// usage Required<Question, 'answer' | 'thirdProp'> expect to equal
/*

type Question = {
    id: string;
    answer: string;
    thirdProp: number;
    fourthProp?: number;
}

*/

The above example should be pretty explanatory. I want to have type Required which yields the result explained above. How can one achieve that?

ZenVentzi
  • 3,945
  • 3
  • 33
  • 48

0 Answers0