lodash
offers the pick function which can be used like this:
var object = { 'a': 1, 'b': '2', 'c': 3 };
_.pick(object, ['a', 'c']);
// => { 'a': 1, 'c': 3 }
I am interested in creating a type-safe version of this function using typescript.
The desired usage should look like this:
pick(object, "a", "b")
The main objective is to ensure type safety while using this function.
Is it feasible to achieve this goal?