When configuring the plugin with tsdoc: true, the formatter does not convert JSDoc to TSDoc.
Specifically:
- It does not automatically strip redundant braces with types (
{string})
- It does not automatically insert a hyphen (
-)
Config for example below:
tsdoc: true,
jsdocVerticalAlignment: false,
Example input:
/**
* Test function showing syntax conversion issues.
* @param {string} userId The identifier of the user
* @returns {boolean} True if authorized
*/
function checkUser(userId: string): boolean {
return true;
}
Expected output:
/**
* Test function showing syntax conversion issues.
*
* @param userId - The identifier of the user
* @returns True if authorized
*/
function checkUser(userId: string): boolean {
return true;
}
Actual output:
/**
* Test function showing syntax conversion issues.
*
* @param {string} userId The identifier of the user
* @returns {boolean} True if authorized
*/
function checkUser(userId: string): boolean {
return true;
}
When configuring the plugin with
tsdoc: true, the formatter does not convert JSDoc to TSDoc.Specifically:
{string})-)Config for example below:
Example input:
Expected output:
Actual output: