Skip to content

webshrine / stdlib/src / pickStrict

Function: pickStrict()

pickStrict<Input, Key>(object, keys): Pick<Input, Key>

Returns new object by specified keys.

  • Implements Pick utility type from Typescript.
  • Controls that received keys list is exists.

Type Parameters

Input extends AnyObject

Key extends string = Keys<Input>

Parameters

object

Input

keys

readonly Key[]

Returns

Pick<Input, Key>

Defined in

packages/stdlib/src/transformers/pickers.ts:77