Function keys

Returns an array of string keys from an object, trying to preserve the type of the keys.

const a = keys({ a: 1, b: 2, c: 3 }); // => ['a', 'b', 'c']
a.push('d'); // Error => '"d"' is not assignable to '"a" | "b" | "c"'.