Hello!
Starting out with documenting a TypeScript project and there are places where methods have callbacks I would like to document. To do this, I make a type alias and document that:
/**
* Call to send a message over all open sessions, where "open" is taken to mean
* that at least one message has been received and the session has not ended.
* @param message The message to serialize and send.
*/
export type Broadcast = (
message: Json
) => void
This, however, generates documentation which lists the parameters twice, once without names, and once without descriptions:

Adding type parameters causes them to be documented similarly:
/**
* Call to send a message over all open sessions, where "open" is taken to mean
* that at least one message has been received and the session has not ended.
* @template TOutboundMessage The type of message which can be sent.
* @param message The message to serialize and send.
*/
export type Broadcast<TOutboundMessage extends Json> = (
message: TOutboundMessage
) => void
So my question here is: how should I be documenting callbacks? I found mention in #102 that this was possible, but the same problems I am seeing here seem to apply there too.
Thanks,
James.
@jameswilddev, I had the same problem. Try to put the docs between the = and the method declaration, it worked for me:
export type Broadcast =
/**
* Call to send a message over all open sessions, where "open" is taken to mean
* that at least one message has been received and the session has not ended.
* @param message The message to serialize and send.
*/
(
message: Json
) => void
Most helpful comment
@jameswilddev, I had the same problem. Try to put the docs between the
=and the method declaration, it worked for me: