@morph-mapper/source / getKeys
Variable: getKeys
constgetKeys: <T>(obj) => keyofT[]
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[]