method mapFrom.pick
mapFrom.pick<TKey extends PropertyKey>(
this: void,
key: TKey,
...keys: TKey[]
): [K in TKey]: K

Maps the specified properties to themselves as is

const objectMapperSchema = {
  ...mapFrom.pick('a', 'b', 'c', 'd'),
}

Type Parameters

TKey extends PropertyKey

Parameters

this: void
key: TKey
...keys: TKey[]

Return Type

[K in TKey]: K

Usage

import { mapFrom } from ".";