@dash0/sdk-web
Version:
Dash0's Web SDK to collect telemetry from end-users' web browsers
10 lines (9 loc) • 475 B
TypeScript
/**
* Creates a new object by picking specified properties from the source object.
* Similar to TypeScript's Pick<T, K> utility type but as a runtime function.
*
* @param obj - The source object to pick properties from
* @param keys - Array of property keys to pick from the source object
* @returns A new object containing only the specified properties
*/
export declare function pick<T extends Record<string, any>, K extends keyof T>(obj: T, keys: K[]): Pick<T, K>;