import type { Literal } from "../_utils"; import type { Guard } from "./Guard"; /* * ------------------------------------------- * Guard Constructors * ------------------------------------------- */ /** * @category Constructors * @since 1.0.0 */ export const literal = ]>(...values: A): Guard => ({ is: (u): u is A[number] => values.findIndex((a) => a === u) !== -1 });