public shared func getRoleProfile(name : types.Name) : async ?types.Profile {
role.getProfile(name);
};
I am calling role.getProfile() function from my main.mo file. The function is define in role.mo file.
The defination of the function is
public func getProfile(name : types.Name) : async ?types.Profile{
profiles.get(name);
};
I am getting an error in the function getRoleProfile in main.mo. The error is
expression of type
async<$getRoleProfile__14> ?Profile__764
cannot produce expected type
?Profile__764
What will be the return type of this function?