I am able to get a method's parameter types easily with ReflectAPI:
Reflect.getMetadata('design:paramtypes', target, propertyKey);
but, when I try to get a function's parameter types it is always returning undefined. I have tried to do with these example functions:
const foo = (bar: Bar) => void 0;
function foo(bar: Bar) {}
export function foo(bar: Bar) {}
And also I read that TypeScript only emits metadata when you decorate a class and method. So, how can I get a function's metadata?