TypeScript is not able to infer the type of the profil prop in your function, so it assumes it has the 'any' type. You should either define an interface or type for the profil prop.
type Profil = {
name: string;
};
interface Profil {
name: string;
}