UNPKG

castage

Version:

A type-safe library for dynamic object casting and ensuring type consistency in JavaScript/TypeScript.

3 lines (2 loc) 168 B
import { Caster, CasterFn } from './types.js'; export declare const oneOf: <T extends unknown[]>(...casters: { [K in keyof T]: CasterFn<T[K]>; }) => Caster<T[number]>;