Type Challenges Judge

Required Keys

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”