Skip to main content
Module

x/unknownutil/mod.ts>isOneOf

🦕 A lightweight utility pack for handling unknown type
Go to Latest
function isOneOf
Deprecated
Deprecated

Use isUnionOf instead.

import { isOneOf } from "https://deno.land/x/unknownutil@v3.18.0/mod.ts";

Return a type predicate function that returns true if the type of x is UnionOf<T>.

Type Parameters

T extends readonly [Predicate<unknown>, ...Predicate<unknown>[]]