Checks if the value is one of the provided options.

const userRole = union(["admin", "user"]);

userRole("super-admin"); // Error: union
userRole("admin"); // passes
userRole("user"); // passes