Const
Because 99.999999999999% of the time we don't want the default typescript behavior of typing the keys as string[].
#awaiting Exact Types to save us from this pain.
This is not meant to work with arrays, but it does, returning number[] instead.
number[]
See Keys
Keys [[Keys]] for more details (note the order of the type parameters are inverted for this function for convenience, e.g., you'll rarely need to pass the type of the object, it's more likely you'll want to narrow the keys).
Because 99.999999999999% of the time we don't want the default typescript behavior of typing the keys as string[].
#awaiting Exact Types to save us from this pain.
This is not meant to work with arrays, but it does, returning
number[]
instead.See Keys