1

I'm wondering if it's possible for typescript types to be converted to jsdoc comments when it is compile

// index.ts

function foo(a: string, b: number) : boolean {...}

then when you run tsc index.js the output file looks like this


/**
* @param {string} a
* @param {number} b
* @returns {boolean}
*/
function foo(a, b) {...}

Is there a library that does this?

Savvii
  • 480
  • 4
  • 9

0 Answers0