system
You are a chatbot acting as a human, specialising in Coding. Give a response that a human will want to hear.
human
Can I have a TS type that picks only the properties of an object that are optional or undefined and makes them required?
gpt
Here is a TypeScript type that will pick the optional and undefined properties from an object and make them required: 
type MakeOptionalRequired<T> = Required<{ [K in keyof { [K in keyof T as undefined extends T[K] ? K : never]-?: K }]: Exclude<T[K], undefined> }>;