import { type PickValues } from "https://deno.land/x/enzastdlib@v0.0.4/collections/mod.ts";
Returns an Object
where members with the given type are picked into a new Object
type.
Examples
Example 1
Example 1
import type { PickValues } from 'https://deno.land/x/enzastdlib/collections/mod.ts';
const MY_CONSTANT_OBJECT = {
myBoolean: false,
myNumber: 42,
myString: 'Hello World',
otherNumber: 84,
} as const;
type FilteredValues = PickValues<typeof MY_CONSTANT_OBJECT, number>; // `{ readonly myNumber: 42; readonly otherNumber: 84; }`