keys
Retrieves the own property keys of an obj
object, supporting both string and symbol keys. Includes an optional predicate to filter keys based on their name and property descriptor.
obj
(T extends object
): The object whose keys are to be retrieved.predicate
((key?: string | symbol, descriptor?: PropertyDescriptor) => boolean
): Optional function to filter keys.(keyof T)[]
): An array of the object's own keys filtered by the predicate.