<!-- Notes: 🎉 Congrats on solving the challenge and we are happy to see you'd like to share your solutions! However, due to the increasing number of users, the issue pool would be filled by answers very quickly. Before you submit your solutions, please kindly search for similar solutions that may already be posted. You can "thumb up" on them or leave your comments on that issue. If you think you have a different solution, do not hesitate to create the issue and share it with others. Sharing some ideas or thoughts about how to solve this problem is greatly welcome! Thanks! --> ```ts type RequiredKeys<T , K = keyof T> = K extends keyof T ? T extends Required<Pick<T,K>> ? K : never :never ```
Activity
dimitropoulos commentedon Jan 16, 2023
I really like how this solution works
RequiredandPickinto it. It makes it read much easier. Thanks! I'll be featuring this in the video solutions!WisestCoder commentedon Apr 19, 2023
iversonwool commentedon May 15, 2024
like the OptionalKeys
HNHED commentedon Dec 8, 2025
type RequiredKeys = keyof {[K in keyof T as T[K] extends Required[K] ? K: never]: K}