Trying to figure out how to convert an argument into an anonymous function, but struggling to find clear instructions. I know how to cast on variable assignment, but unsure if it's possible and how.
Working with lodash where the typings specify the argument as any
, but I need to cast it to a custom object in practice.
_.findLast(this.children, function((CustomObject) node) {
node.customMethod();
})