Home > @wixc3/common > getValue
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>;
| Parameter | Type | Description |
|---|---|---|
| map | T | |
| key | keyof T | |
| errorMessage | string | _(Optional)_ |
Returns:
ObjValue<T>