microsoft / tsdoc

A doc comment standard for TypeScript
https://tsdoc.org/
MIT License
4.71k stars 131 forks source link

@param <T> syntax #276

Open iansan5653 opened 3 years ago

iansan5653 commented 3 years ago

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;
}
hosseinmd commented 3 years ago

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 commented 3 years ago

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