tsdoc icon indicating copy to clipboard operation
tsdoc copied to clipboard

@param <T> syntax

Open iansan5653 opened this issue 5 years ago • 2 comments

Is @param <T> - description a valid alternative for @typeParam T - description? It's marked as invalid in the playground but is provided as an example in the docs:

/**
 * Wrapper for an HTTP Response
 * @typeParam B - Response body
 * @param <H> - Headers
 */
interface HttpResponse<B, H> {
    body: B;
    headers: H;
    statusCode: number;
}

iansan5653 avatar Dec 22 '20 19:12 iansan5653

IMO tsdoc should not change standard of jsdoc which supported anywhere like VS Code. That example should be changed to this:

/**
 * Wrapper for an HTTP Response
 * @template H, B
 * @param {B} body - Response body
 * @param {H} headers - Headers
 */

hosseinmd avatar Mar 29 '21 20:03 hosseinmd

https://github.com/microsoft/tsdoc/issues/72

hosseinmd avatar Mar 29 '21 20:03 hosseinmd