Skip to content

@morph-mapper/source


@morph-mapper/source / getKeys

Variable: getKeys

const getKeys: <T>(obj) => keyof T[]

Defined in: mapping.ts:6

This function takes an object and returns an array of its keys. Object.keys usually returns a string[], but this function returns narrower types based on the type of the object.

Type Parameters

T

T extends object

Parameters

obj

T

Returns

keyof T[]