import { type ValueOf } from "https://deno.land/x/enzastdlib@v0.0.4/collections/object.ts";
Returns all the values of an Object
as a type union of its values.
Examples
Example 1
Example 1
import type { ValueOf } from 'https://deno.land/x/enzastdlib/collections/mod.ts';
const MY_CONSTANT_OBJECT = {
x: 1,
y: 2,
z: 3
} as const;
type MyValues = ValueOf<typeof MY_CONSTANT_OBJECT>; // `1 | 2 | 3`