microsoft / tsdoc

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

What is the shortest/fastest way to extract a function’s documentation by name? #332

Open fregante opened 2 years ago

fregante commented 2 years ago

Given index.ts and the known "main" function name:

/**
 * Init the app
 * @example main()
 */
export function main(): void {};

What is the shortest amount of code to extract the function’s documentation? I looked at the demo and it seems quite verbose to just extract some data.

Side note: the demo requires python2 to be available, which is not ideal and requires that I edit it manually