objectGroupBy.ts(9,49): error TS2322: Type 'Employee' is not assignable to type 'PropertyKey'.


==== objectGroupBy.ts (1 errors) ====
    const basic = Object.groupBy([0, 2, 8], x => x < 5 ? 'small' : 'large');
    
    const chars = Object.groupBy('a string', c => c);
    
    type Employee = { name: string, role: 'ic' | 'manager' }
    const employees: Set<Employee> = new Set();
    const byRole = Object.groupBy(employees, x => x.role);
    
    const byNonKey = Object.groupBy(employees, x => x);
                                                    ~
!!! error TS2322: Type 'Employee' is not assignable to type 'PropertyKey'.
!!! related TS6502 lib.es2024.object.d.ts:--:--: The expected type comes from the return type of this signature.
    