Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/froebel/equality.ts>oneOf

A strictly typed utility library.
Go to Latest
variable oneOf
import { oneOf } from "https://deno.land/x/froebel@v0.18.0/equality.ts";

Checks if v is one of cmps.

type

<T, TT extends (T extends string ? string & T : T extends number ? number & T : any)[]>(value: T, ...cmps: TT) => value is TT[number]