Could you help me come up with a descriptive comment for each line of this Typescript function?
export const pickKeys = <T, K extends keyof T = keyof T>(obj: T, ...keys: K[]): Pick<T, K> => {
	return keys.reduce((acc, key) => {
		if (hasKey(obj, key)) {
			acc[key] = obj[key];
		}
		return acc;
	}, {} as Pick<T, K>);
};
user