I think the problem comes from having multiple parameter list. 

But since we have another execution context in ResourceModule, I think we should just type it to the good type there, remopving the need to explicitly cast the output to a typed one.