Skip to content

Latest commit

 

History

History
13 lines (8 loc) · 1.79 KB

File metadata and controls

13 lines (8 loc) · 1.79 KB

Required Keys hard #utils

by yituan @yi-tuan

Take the Challenge    简体中文 日本語

Implement the advanced util type RequiredKeys<T>, which picks all the required keys into a union.

For example

type Result = RequiredKeys<{ foo: number; bar?: string }>;
// expected to be “foo”

Back Share your Solutions Check out Solutions

Related Challenges

5・Get Readonly Keys