type ExtractOptionalKeys<T extends object> = { [K in keyof T]: undefined extends T[K] ? K : never }[keyof T]