Skip to content

Latest commit

 

History

History
12 lines (7 loc) · 1.57 KB

File metadata and controls

12 lines (7 loc) · 1.57 KB

Get Required hard #utils #infer

by Zheeeng @zheeeng

Take the Challenge    简体中文 日本語

Implement the advanced util type GetRequired<T>, which remains all the required fields

For example

type I = GetRequired<{ foo: number, bar?: string }> // expected to be { foo: number }

Back Share your Solutions Check out Solutions