camljs icon indicating copy to clipboard operation
camljs copied to clipboard

CamlBuilder TypeScript Generic

Open rlking1985 opened this issue 2 years ago • 0 comments

Hi Andrei,

Is it possible to add a Generic when instantiating the CamlBuilder class?

type Person = "Name" | "Age" | "Address" | "Mobile";

// Should Pass
const validQuery= new CamlBuilder<Person>().Where().TextField("Name").IsNotNull().ToString()

// Should Fail
const invalidQuery = new CamlBuilder<Person>().Where().TextField("Birthdate").IsNotNull().ToString()

rlking1985 avatar Jul 14 '22 11:07 rlking1985