phryneas / remark-typescript-tools

MIT License
129 stars 7 forks source link

Feature request: Add ability to create docblock link to specific param tags #3

Open Shrugsy opened 3 years ago

Shrugsy commented 3 years ago

Background

Currently when using a docblock link for params, it will show all params in a list, e.g.

Input docblock

/**
 * 
 * @param arg1 first arg
 * @param opts.opt1 first option
 * @param opts.opt2 second option
 */
function foo(arg1, { opt1, opt2 }) {}

docblock link

[params](docblock://index.ts?token=foo)

Output

Request

This feature request is for the ability to link directly to a specific param, and only provide the comment for that param. e.g. (pseudo-code)

docblock link

[params](docblock://index.ts?token=foo?param=opts.opt1)

Desired output

first arg