Maxim is right, you cannot pass around functions in arguments and return values, you can send the function’s name (childWorkflow.name) though.
Any values passed around should be serializable using a data converter: Interface: DataConverter | Temporal Node.js SDK API Reference