Typescript Call Function With Multiple Conditions In Where Clause