This might be already defined, I got this idea from C#. I would like to write the following:
type Result = {result: number}; function myFun(a: number, b: num