The following appears to be valid:
interface IPredicate {
(s: Product): boolean
and(IPredicate): IPredicate
or(IPredicate): IPredicate
}
If it is valid how could I implement it so that roughly the following works:
let a: IPredicate = (s: Something) => true
let b: IPredicate = (s: Something) => false
let c: IPredicate = a.and(b)