Skip to content

Latest commit

 

History

History
14 lines (9 loc) · 1.36 KB

File metadata and controls

14 lines (9 loc) · 1.36 KB

ExtractToObject medium #object

by Maxim Bazuev @bazuka5801

Take the Challenge

Implement a type that extract prop value to the interface. The type takes the two arguments. The output should be an object with the prop values. Prop value is object.

For example

type Test = { id: '1', myProp: { foo: '2' }}
type Result = ExtractToObject<Test, 'myProp'> // expected to be { id: '1', foo: '2' }

Back Share your Solutions Check out Solutions