A function expect 2 arguments, a string and a callback. Depending on the first argument the type of the second may change.
function (eventName: string, fn: (dto?: any) => unknown) {}
In the above example if eventName is signup I want dto to be some object (interface).