Is there anyway to preserve comments for interface in typescript4.0?

219 Views Asked by At

My .ts file like this:

/**
 * @typedef {Object} ITest 
 * @property {string} a
 */
export interface ITest {
  a: string
}

/**
 * @function test
 * @params {string} a
 */
export function test (a: string): void {
  console.log('a', a)
}

when i use tsc to compile this file to .js, the comment for interface will be removed.

Is there anyway to preserve this comment in .js?

The version of tsc is 4.1.3

0

There are 0 best solutions below