for the following function (see also http://ramdajs.com/docs/#where)
var spec2 = {x: function(val, obj) { return val + obj.y > 10; }};
R.where(spec2, {x: 2, y: 7}); //=> false
R.where(spec2, {x: 3, y: 8}); //=> true
I would like to create the typing for the case where the object T has the value of a predicate.
I was thinking I would do something like this:
where<T>(spec: {item: (val: any, testObj: T) => boolean}, testObj: T): boolean;
but I'm not sure what to do for the key.