refactor: replace AnyFunction by proper types
#1916
+13
−16
Merged