- Preserves the keys type of a typed object instead of getting a union of the actual keys values (see playground)
/**
* A strongly-typed version of `Object.keys()`
*
* Details:
* https://gist.github.com/alexilyaev/3fe3e6e6065b9f19450ac52a11209f52
*/
export const objectKeysTyped = Object.keys as <Type extends object>(
value: Type
) => Array<keyof typeof value>;