Checks that both assertions pass.
const userEmail = and(string, email);userEmail(1); // Error: typeuserEmail("Hello world"); // Error: emailuserEmail("yamiteru@icloud.com"); // passes Copy
const userEmail = and(string, email);userEmail(1); // Error: typeuserEmail("Hello world"); // Error: emailuserEmail("yamiteru@icloud.com"); // passes
Checks that both assertions pass.
Example