Best explained in code:
const ROUTE_PARAMS = {
userId: 'userId',
companyId: 'companyId',
};
// Is this somehow possible?
// `typeof` is obviously not the right tool here, just used as an example.
function buildRoute(typeof ROUTE_PARAMS): string;
// Result should be similar to:
function buildRoute2(userId: string, companyId: string): string;
//