How to correctly serialize Javascript curried arrow functions?
问题 const makeIncrementer = s=>a=>a+s makeIncrementer(10).toString() // Prints 'a=>a+s' which would make it impossible to de-serialize correctly (I would expect something like a=>a+10 instead. Is there a way to do it right? 回答1: This is a great question. While I don't have a perfect answer, one way you could get details about the argument/s is to create a builder function that stores the necessary details for you. Unfortunately I can't figure out a way to know which internal variables relate to