core3-utils

@wixc3/common on Github

Home > @wixc3/common > getValue

getValue() function

Returns a value by key, throws if the value is missing or the map null

Signature:

export declare function getValue<T extends object>(map: T, key: keyof T, errorMessage?: string): ObjValue<T>;

Parameters

Parameter Type Description
map T
key keyof T
errorMessage string _(Optional)_

Returns:

ObjValue<T>