Browse documentation

pick

Creates an object with the selected keys from a source value.

Table of contents

Category

Value

Import

js
import { pick } from "valyrian.js/utils";

Public signature

ts
<T extends object, K extends keyof T>(source: any, keys: K[]): Pick<T, K>

Parameters

ts
source: any, keys: K[]

Result

ts
Pick<T, K>