ref(types): Avoid some any type casting around wrap code
#14463
+164
−128
Merged