export function hasCanonicalControlRoles( controls: Readonly>> | undefined, expected: Readonly>, ): boolean { return controls !== undefined && Object.keys(controls).length === Object.keys(expected).length && Object.entries(expected).every(([id, role]) => controls[id]?.performanceRole === role); }