1

I am using TypeDoc to generate documentation from my typescript files. Let say I have this source code

/**
 * Some function
 * @param bar some callback function
 */
export function foo(bar:(x:number)=>void)
{

}

Which gives me this output

generated documentation

I could have make an extra type for bar then document it

/**
 * @param x callback parameter
 */
export type Bar = (x:number)=>void

/**
 * Some function
 * @param bar some callback function
 */
 export function foo(bar:Bar)
 {
 
 }

which output

documentation of foo with Bar declared documentation of Bar

But it would look nicer if the documentation of a callback can be inlined. Is it possible to document x without declaring an extra type just for the callback?

Ricky Mo
  • 6,285
  • 1
  • 14
  • 30

0 Answers0