keys
The keys() method returns an array of an object's keys with precise typing, excluding symbols.
Interactive example
Syntax
typescript
function keys<
GenericInput extends object
>(
input: GenericInput
): (Exclude<keyof GenericInput, symbol>)[]Parameters
input: The object whose keys you want to retrieve.
Return value
An array containing all the object's keys (excluding symbols) with precise typing.
