You can then access each individual argument's type by accessing the index of the type:
constfn1=(args:string,cb:Callback<string>):void=>{setTimeout(()=>{cb(null,'example1')},1000)}// P is of type 'string' since 'string' is the 0'th argumenttypeP=Parameters<typeoffn1>[0]
This is quite tricky!
You will need to infer the type of function arguments.
See here:
stackoverflow.com/questions/518516...
You can then access each individual argument's type by accessing the index of the type:
You'll also need a Mapped Type (docs on mapped types):
Hope that helps. The
????is there for you to figure out :)