Add typing to function defs in order to enhance documentation

Edited by Vincent Delbar