You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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. */exporttypeBroadcast=(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. */exporttypeBroadcast<TOutboundMessageextendsJson>=(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.
The text was updated successfully, but these errors were encountered:
@jameswilddev, I had the same problem. Try to put the docs between the = and the method declaration, it worked for me:
exporttypeBroadcast=/** * 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
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:
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:
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.
The text was updated successfully, but these errors were encountered: