Not sure whether there exist other solutions, but what you suggest here is more or less the same as the solution provided by @Mason in this older thread:
ffevotte
2
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Creating the instance of a function type | 13 | 457 | November 7, 2024 | |
| How to get a function instance from a function type? | 3 | 753 | April 17, 2022 | |
| Extract function from function type | 13 | 682 | November 22, 2022 | |
| Is there a way to get f from typeof(f)? | 17 | 4270 | December 29, 2018 | |
| How to get anonymous function from its type? | 3 | 561 | April 26, 2021 |