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

x/mtkruto/2_tl.ts>isOneOf

Cross-runtime JavaScript library for building Telegram clients
Latest
function isOneOf
import { isOneOf } from "https://deno.land/x/mtkruto@0.6.3/2_tl.ts";

Type Parameters

S extends keyof (Types & Functions)

Parameters

typeNames: S[] | readonly S[]
value: unknown

Returns

value is S extends keyof Types ? Types[S] : S extends keyof Functions ? Functions[S] : never