4

Per this answer I know how to type an overloaded error function:

type IOverload = {
    (param:number):number[];
    (param:object):object[];
}

const overloadedArrowFunc:IOverload = (param:any) => {
    return [param,param];
}

let val = overloadedArrowFunc(4);

But how do I document it using TSDoc? I've tried adding documentation blocks above the individual typings in the type, but no dice.

Erwin Wessels
  • 2,972
  • 1
  • 24
  • 17

0 Answers0